2014-01-02

Wowza Module Life Cycle (RTSP)


Wowza module event hooks and their properties and life-cycle.

These tables form part of a blog post. It is too long for Google.

If there's one thing that's been bothering me about Wowza module development, it's that the lifecycle seems to be poorly documented, or else it is hidden away somewhere.

Here I present the life-cycle of a module and the available objects at those milestones.

  1. RTP
  2. HTTP — Cupertino HLS streaming

RTP

To test the life-cycle the stream was played as described in the sections below.

  • The stream was opened for playing
  • The stream was left playing for two minutes
  • The stream was paused
  • The stream was resumed
  • The stream was skipped to a point in the future
  • The stream was stopped

Click on the event names for more information

Opened the stream for playing in the media player (from a web link)

Originator Time ⟶
IModuleOnApp onAppStart
IModuleOnRTPSession onRTPSessionCreate onRTPSessionDestroy
IModuleOnStream onStreamCreate onStreamDestroy
IMediaReaderActionNotify onMediaReaderCreate onMediaReaderInit onMediaReaderOpen onMediaReaderExtractMetadata onMediaReaderClose
IRTSPActionNotify onDescribe onSetup onSetup onPlay onOptions onTeardown
IMediaStreamActionNotify onPlay onStop
Idle time 4s
Originator Time ⟶
IModuleOnApp
IModuleOnRTPSession onRTPSessionCreate
IModuleOnStream onStreamCreate
IMediaReaderActionNotify onMediaReaderCreate onMediaReaderInit onMediaReaderOpen onMediaReaderExtractMetadata
IRTSPActionNotify onDescribe onSetup onSetup onPlay onOptions
IMediaStreamActionNotify onPlay
Idle time

Stream is playing without player intervention

Originator Time ⟶
IModuleOnApp
IModuleOnRTPSession
IModuleOnStream
IMediaReaderActionNotify
IRTSPActionNotify onOptions onOptions
IMediaStreamActionNotify
Idle time 55s 55s 37s

Stream is paused by the player and later resumed

Originator Time ⟶
IModuleOnApp
IModuleOnRTPSession
IModuleOnStream
IMediaReaderActionNotify
IRTSPActionNotify onPause onOptions onPlay onOptions
IMediaStreamActionNotify onSeek
Idle time 18s 12s 16s

Notice that the time between onOption events is still 55 seconds (27 + 28) even when the stream is paused.

Skipped to a later part of the stream in the media player

Originator Time ⟶
IModuleOnApp
IModuleOnRTPSession
IModuleOnStream
IMediaReaderActionNotify
IRTSPActionNotify onPause onPlay onOptions
IMediaStreamActionNotify onSeek
Idle time 26s

Stopped the stream in the media player

Originator Time ⟶
IModuleOnApp onAppStop*
IModuleOnRTPSession onRTPSessionDestroy
IModuleOnStream onStreamDestroy
IMediaReaderActionNotify onMediaReaderClose
IRTSPActionNotify onTeardown
IMediaStreamActionNotify onStop
Idle time 1m

* the application instance stops if there are no active streams for a period of time.

No comments:

Post a Comment