#include <PlayerGM.h>
Inheritance diagram for PlayerGM:
Public Types | |
enum | SourceMode { Uninitialized, RtpAny, RtpUnicastUDP, RtpMulticast } |
Public Member Functions | |
PlayerGM (GMUser *user, MNSelector &sel) | |
virtual | ~PlayerGM () |
void | clear () |
void | addSubsession (Subsession *s) |
void | addSubsession () |
virtual bool | graphManNotify (int idx, SH::Base *caller, SH::Notification attribute, void *msg) |
void | setMediaDesc (MDescPtr mdesc) |
void | setMediaDesc (int idx, MDescPtr mdesc) |
void | setRtpBandwidth (size_t bandwidth) |
void | setRtpBandwidth (int idx, size_t bandwidth) |
void | setRequestedPort (int port) |
void | setRequestedPort (int idx, int port) |
bool | open (SourceMode sourceMode) |
bool | openall (SourceMode sourceMode) |
int | getOpenRtpPort () const |
int | getOpenRtpPort (int startPort) const |
int | getOpenRtpPort (Subsession *s) const |
void | setRtpSenderPort (int port) |
void | setRtpSenderPort (int idx, int port) |
void | setRtpSenderHostname (const MNString &name) |
void | setRtpSenderHostname (int idx, const MNString &name) |
void | getPT (int idx, struct timeval &presentationTime) |
void | resetSyncTime () |
bool | hasBeenSynchronized (int idx) |
bool | start () |
bool | startall () |
void | stop () |
void | stopall () |
int | checkBuffer () |
int | checkBuffer (int idx) |
int | fillBuffer (unsigned char *buffer, int length) |
int | fillBuffer (int idx, unsigned char *buffer, int length) |
|
|
|
Constructor. |
|
Destructor |
|
Adds an empty subsession to the PlayerGM state. |
|
Adds a given subsession to the PlayerGM state. check if this function is really needed. |
|
Function required by mplayer. It must be checked if data have arrived because the player should block otherwise. |
|
|
|
Reset the PlayerGM from an arbitrary state. |
|
Function to actually copy data for mplayer. |
|
|
|
|
|
|
|
In case of a success, the RTP receive port is retrieved to report it to the server via RTSP.
|
|
Returns the timestamp corresponding to the data in the rope container. Note that you must provide a reasonable value on your own by calling check_buffer(idx) before. |
|
The upcall interface through which all reports from stream handler reach this object. The function does not act directly but calls ll_ functions to allow easier separation in later steps.
Implements SHGraphManager.
|
|
Called to test if stream has been synchronized in the decoder using RTCP SR.
|
|
A success to open the loopback gives us an open port on localhost that we can send data to later. Keep the port number and proceed to opening the RTP sockets. In case of multicast, this may fail immediately if the server's chosen port can not be bound by the client. (Obviously, this termination is not necessary, it would be sufficient to report the lack of RTCP and to receive the data on another port without reporting.) Otherwise, proceed to the Open state.
|
|
Opens the localhost port and sockets for all subsessions of a presentation. This does not work for multicast so far. |
|
|
|
|
|
Set new media information. The media description field is one entry of the servers SDP message and refers to one RTP substream. At this time, it can not be overridden by information that is extracted from the data stream itself althrough that would be better.
|
|
|
|
Set the receive port to allocate in case of RTP multicast. multicast
|
|
|
|
Set expected bandwidth information.
|
|
|
|
Reports the RTP sender's hostname. |
|
|
|
Reports the RTP sender's chosen port from the RTSP setup message. |
|
Changes the player state to prepare it for data reception. This function can only be called for RTSP streams, not for playing from file (which is dumb).
|
|
Works like start(), but for all subsessions of a presentation. |
|
Undo all the work of a successful start. |
|
Like stop(), but for all subsessions of a presentation. Stopping several subsessions must be fixed. |