#include <dataPump.h>
Inheritance diagram for dataPump:
Public Types | |
enum | Server_Type { MN_SERVER, VC_SERVER } |
Public Member Functions | |
dataPump (MNSelector &sel, DataPumpResponse *resp, SDPSessionDescription *sdesc) | |
virtual | ~dataPump () |
DataPumpResponse * | responder () |
MNSelector & | mainSelector () |
virtual int | init (KomServer *, StreamingType type)=0 |
void | setUrl (MNString &url) |
virtual void | setNptSeek (int npt) |
virtual int | getNptSeconds () |
virtual void | setRTPTimestamp (int idx, u_int32 rtptime) |
virtual bool | createUpstreamSocks (int idx, int &requested, RTPSockets::FactoryMode mode, RTSP::TransportTypes requested_transport=RTSP::RTP_AVP_UDP)=0 |
virtual bool | createDownstreamSocks (int idx, int &requested, RTPSockets::FactoryMode mode, RTSP::TransportTypes requested_transport=RTSP::RTP_AVP_UDP)=0 |
virtual int | stream_start (int idx, const MNString &filename, const MNString &DescFileName, const MNString &client, const MNString &server, int ClientPortAnnounced, int ServerPortAnnounced)=0 |
virtual void | setupNewServerSideReflectorGM (int idx) |
virtual void | setupExistingServerSideReflectorGM (int idx) |
virtual int | play (int start, int stop)=0 |
virtual int | stop ()=0 |
virtual int | pause () |
virtual int | jump (int startpos) |
virtual void | fileComplete (const char *filename, bool comp) |
virtual long | getFilePos () |
Server_Type | getServerType () |
void | setServerType (Server_Type stype) |
bool | upStreamReady (int idx) const |
bool | downStreamReady (int idx) const |
virtual MNSocket * | getLocalDownRtp (int idx) const |
virtual MNSocket * | getLocalDownRtcp (int idx) const |
virtual MNSocket * | getLocalUpRtp (int idx) const |
virtual MNSocket * | getLocalUpRtcp (int idx) const |
virtual bool | fillTransportString (int idx, MNString &out, bool mc) const =0 |
virtual void | setLocalDownSocks (int idx, MNSocket *rtp, MNSocket *rtcp) |
virtual void | setLocalUpSocks (int idx, MNSocket *rtp, MNSocket *rtcp) |
virtual int | getDistantPortDownstream (int idx) const |
virtual void | setDistantPortDownstream (int idx, int) |
virtual int | getDistantPortUpstream (int idx) const |
virtual void | setDistantPortUpstream (int idx, int) |
virtual int | getLocalPortDownstream (int idx) const |
virtual int | getLocalPortUpstream (int idx) const |
virtual StreamingType | getStreamingType () const |
virtual void | set_client_port (int, int) |
virtual long | getCorrespondingSsrc (int payloadtype) |
virtual void | addFmtSsrcMapping (SDPSessionDescription *sdesc) |
virtual void | switchFormat () |
void | setSessionDescription (SDPSessionDescription *desc) |
SDPSessionDescription * | getSessionDescription () |
virtual const SDP::PayloadTypeTable * | getPayloadTypes () |
Implementation of the only GMuser interface function. | |
virtual SDP::PayloadTypes | getInternalPayloadType () |
virtual int | getRTPPayloadType () |
virtual const SDP::PayloadTypeTable * | getPayloadTypes (int idx) |
virtual SDP::PayloadTypes | getInternalPayloadType (int idx) |
virtual int | getRTPPayloadType (int idx) |
virtual int | getPlayTimeSeconds () |
virtual bool | isPatchingCapable () const |
virtual void | setMulticastInformation (MNString, MNSocket *, MNSocket *) |
virtual void | setBufferInformation (int, int) |
void | setProxyFormatswitching (bool yesno) |
bool | getProxyFormatswitching () const |
void | setTCPfriendly (bool yesno) |
void | setClientHostname (MNString client) |
bool | getTCPfriendly () const |
void | setClientBandwidth (int client_bw) |
int | getClientBandwidth () const |
void | setClientBandwidth (int idx, int client_bw) |
int | getClientBandwidth (int idx) const |
Static Public Member Functions | |
int | getLegalEvenPortnum () |
Public Attributes | |
Server_Type | _stype |
DataPumpResponse * | _resp |
Protected Attributes | |
StreamingType | _StreamingType |
PortVector | _DistantPortDownstream |
PortVector | _DistantPortUpstream |
bool | _tfrc |
int | _client_bw |
Holds the ClientBandwidth. | |
PortVector | _client_bw_vec |
MNString | _clientname |
Holds clienthostname to connect to in case of RTP/TCP. | |
MNString | _url |
|
|
|
|
|
|
|
This function is called for an original sender data pump, ie. a server or a proxy in streaming mode. It checks the payload types for all streams in a container, and adds the mapping payload type to ssrc to the session description. Problems:
|
|
The data pump tries to create the requested socket as an RTP socket, with the matching RTCP socket as well. The mode determines whether the actual port may differ, and whether the RTCP socket must exist or not. On return, the actually allocated port is returned in the parameter requested.
Implemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
The data pump tries to create the requested socket as an RTP socket, with the matching RTCP socket as well. The mode determines whether the actual port may differ, and whether the RTCP socket must exist or not. On return, the actually allocated port is returned in the parameter requested.
Implemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
|
|
Reimplemented from GMUser.
Reimplemented in MNStreamer, and NopStreamer.
|
|
When the proxy must formulate a SETUP response for the client, the Transport line must be created. Since the transport protocol is only known to the specific data pump, the data pump is the entity that should write this string.
Implemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
|
|
|
|
This code is unfinished. It will become necessary when we reintroduce containers. |
|
Reimplemented in NopStreamer.
|
|
Reimplemented in NopStreamer.
|
|
If the dataPump is streaming, this method returns the current time position in the source file. Else it returns -1!! Reimplemented in MNStreamer, and NopStreamer.
|
|
Implements GMUser.
|
|
|
|
This function returns a random integer that can legally be used as a UDP/TCP port. This integer will be even, but the port may already be allocated. |
|
Reimplemented in NopStreamer.
|
|
Reimplemented in NopStreamer.
|
|
Reimplemented in NopStreamer.
|
|
Reimplemented in NopStreamer.
|
|
Reimplemented in NopStreamer.
|
|
Reimplemented in NopStreamer.
|
|
Reimplemented in MNStreamer.
|
|
Implements GMUser.
|
|
Implementation of the only GMuser interface function.
|
|
Reimplemented from GMUser.
|
|
|
|
Implements GMUser.
|
|
|
|
|
|
|
|
|
|
|
|
Implemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
If a data pump is capable of patching support, it must overload the functions setMulticastInformation and setBufferInformation that exist only as dummy implementations in this base class. The default is that a data pump is not capable of patching. Reimplemented in MNStreamer, and NopStreamer.
|
|
Reimplemented in MNStreamer, and NopStreamer.
|
|
|
|
Reimplemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
Implemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
|
|
Reimplemented in MNStreamer.
|
|
A dummy provided for non-patching-capable data pumps and overloaded by patching-capable data pumps. Reimplemented in MNStreamer, and NopStreamer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A dummy provided for non-patching-capable data pumps and overloaded by patching-capable data pumps. Reimplemented in NopStreamer.
|
|
Reimplemented in MNStreamer.
|
|
|
|
Reimplemented in MNStreamer.
|
|
|
|
|
|
|
|
Reimplemented in MNStreamer.
|
|
Reimplemented in MNStreamer.
|
|
|
|
Implemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
Implemented in MNDummyStreamer, MNStreamer, and NopStreamer.
|
|
|
|
|
|
Holds the ClientBandwidth.
|
|
|
|
Holds clienthostname to connect to in case of RTP/TCP.
|
|
General: see _LocalPortDownstream. Specific: CacheReflectors have all of these <> -1 |
|
General: see _LocalPortDownstream. |
|
|
|
|
|
|
|
|
|
|