StreamPlaying and StreamStopped Events

Emmanuel BEUQUE (ebeuque@pratique.fr)
Mon, 9 Feb 1998 12:33:35 +0100

Hi Folks,

I would like to clarify in my mind when exactly streamPlaying and
StreamStopped events are generated.

Following what is said in MHEG, it seems it is absolutely not related to
the speed attribute. My first question is :

Is the StreamPlaying event of any interest compared to IsRunning (or
IsAvailable) ?

The standard says in 37.2 StreamPlaying :

"This event is generated when a Stream multiplex has started playing."

This tends to signify that this event is generated during the activation of
the stream, step 2, when the engine shall "start playing all active
StreamComponents".
But then the standard says :

" More specifically, it is generated simultaneously with the first piece of
content data (video frame, audio sample) being presented to the user."

Since the initialyActive StreamComponents are activated during the
preparation of the Stream object (see 37.3), I guess these components would
be presented to the user at this time. Is this correct ? Consequently, is
the StreamPlaying event generated as a result of the stream to be prepared ?

The streamStopped event definition seems not clearer to me :

"This event is generated when a Stream multiplex has stopped playing."

This could be confusing with the time a stream speed attribute is set to 0/1.

"More specifically, it is generated as soon as the last piece of content
data (video frame, audio sample) has been presented to the user."

As the standard says "the last piece of *content* data", I would considered
that this event is generated as if there were a counterTrigger on the last
time code of the stream. Does this mean that the StreamStopped event should
be generated each time the stream loops, if its looping attribute specify
this, even if the stream continue playing ?
In this case (stream looping), shall a streamPlaying event be generated
immediately after the streamStopped event ?

"Note that the RunningStatus of the Stream object is not affected by the
occurrence of a StreamStopped event."

OK, so this clarify that the stream is not deactivated when the stream is
finished and has stopped playing.
But may a streamStopped event be generated if the stream is deactivated
before the last frame has been shown ?

I think this could also need some clarifications in the standard.
BR,
Emmanuel

__________________________________________________________________
Emmanuel BEUQUE mailto:ebeuque@pratique.fr
MediaServ tel: +33 (0) 2 99 64 35 64
Multimedia consultant & developer fax: +33 (0) 2 99 64 36 65