class PlaybackWindow

manage mpeg player

Public Fields

Timeval lastPacketReceivedTime
remember the time when last packet was received

Public Methods

PlaybackWindow( const char *argv0, Session &ses )
void prepare_to_die()
~PlaybackWindow()
void playback_mode( const MovieFilesT &movieFiles, struct tm t, int movid )
At the beginning, player does not open any socket
void broadcast_mode( const string &url )
void stop()
void timeout()
periodically called

Protected Methods

void init_player( const char *argv0 )
don't open any listen socket at that time
void check_player_msgs()
void process_feedback( const PMP_DATA_A2G *data, int size )
void wait_player_msg_sec( int sec )

Private Fields

Session& session
reference to Session
PMP_STRUCT Player
only one player
Sockaddr pushServControlAddr
always holds the latest push server control port
int serverSocketOut
send/receive messages to push server by UDP socket
int playerState
if stopped or paused - buffer incoming stream, if playing - put data immediately in pipe
int playerStateMustBe
what user wants
bool playerIsReady
typedef enum broadcast operatingModeT
operatingModeT operatingMode
playback or broadcast mode
int currentMovieId
remember the id of movie which is playing now
int sih_handler_id
this handler is used to deal with sih plugin
typedef enum plugin_link command_requested_statusT
command_requested_statusT command_requested_status
value
bool cleanup_flag
set flag that tell that player is in state of shutdown, don't throw exceptions, etc

Private

to compare incoming packets with
typedef enum playback
both playback window and SII plugin must be sinchronized to the same mode
typedef enum nothing
When calling plug-in with flag PMP_FLAG_RETURN_STATUS, dispatcher may take actions on return value

Documentation

manage mpeg player. Should be only single instance. The new SIH plugin interface for mpeg-tv operates through URL. So the play source is defined by calling COM_OPEN_STREAM_URL. Plug-in doesn't handle the difference between playback and broadcast handles. Instead plug-in keeps all sockets on and build the map of all existing URL's to corresponding socket. If entry already exists in the tree - no needs to re-open it.
Session& session
reference to Session

PMP_STRUCT Player
only one player

Sockaddr pushServControlAddr
always holds the latest push server control port

int serverSocketOut
send/receive messages to push server by UDP socket

to compare incoming packets with

Timeval lastPacketReceivedTime
remember the time when last packet was received. Play if timeout

int playerState
if stopped or paused - buffer incoming stream, if playing - put data immediately in pipe

int playerStateMustBe
what user wants

bool playerIsReady

typedef enum playback
both playback window and SII plugin must be sinchronized to the same mode

typedef enum broadcast operatingModeT

operatingModeT operatingMode
playback or broadcast mode. The stopped mode is not used - to keep data consistent application should check playerStateMustBe. The only difference between p. and b. modes is that in p. mode, when stopped, client must post the stop message to push server. In brcst mode, it just have to stop reading the port.

int currentMovieId
remember the id of movie which is playing now

int sih_handler_id
this handler is used to deal with sih plugin. To get the handler_id of an SIH plugin, you should ask for the return status of the COM_SIH_LINK message. If the status indicates that no error occured (i.e. if you get a message of type A2G_COM_RETURN_SUCCESS in return), the handler_id is passed back in the data.data_return_success.value of the A2G_COM_RETURN_SUCCESS message.

typedef enum nothing
When calling plug-in with flag PMP_FLAG_RETURN_STATUS, dispatcher may take actions on return value. It must know, what command requested status

typedef enum plugin_link command_requested_statusT

command_requested_statusT command_requested_status
value

bool cleanup_flag
set flag that tell that player is in state of shutdown, don't throw exceptions, etc

PlaybackWindow( const char *argv0, Session &ses )

void prepare_to_die()

~PlaybackWindow()

void init_player( const char *argv0 )
don't open any listen socket at that time

void playback_mode( const MovieFilesT &movieFiles, struct tm t, int movid )
At the beginning, player does not open any socket. Player play is operated by 3 functions: playback_mode, broadcast_mode and stop. Plugin is designed the way that you must just post the URL which describe the protocol, optionally the server and the listen sock number. It take care to open socket. When stopped, player actually does not close the socket, but discontinue to read it. Parameters of the push server are inside each movieFiles item

void broadcast_mode( const string &url )

void stop()

void timeout()
periodically called

void check_player_msgs()

void process_feedback( const PMP_DATA_A2G *data, int size )

void wait_player_msg_sec( int sec )


This class has no child classes.

alphabetic index html hierarchy of classes or java



This page was generated with the help of DOC++.