00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
#ifndef NOP_STREAMER_H
00016
#define NOP_STREAMER_H
00017
00018
#include "MNString.h"
00019
#include "MNSocket.h"
00020
#include "MNValid.h"
00021
#include "dataPump.h"
00022
#include "sdp/PayloadTypes.h"
00023
#include "sdp/RetransTypes.h"
00024
00025
class KomServer;
00026
00027
class MNUDPSocket;
00028
class SDPSessionDescription;
00029
00030 class NopStreamer :
public dataPump
00031 {
00032 DECLARE_VALID
00033
private:
00035
NopStreamer(
const NopStreamer& );
00036
00038
NopStreamer& operator=(
const NopStreamer& );
00039
00040
public:
00042
NopStreamer(
MNSelector& sel,
00043
DataPumpResponse* resp,
00044
SDPSessionDescription* sdesc );
00045
00046
virtual ~NopStreamer ( );
00047
00048
virtual int init ( KomServer* streamer,
StreamingType type );
00049
00054
virtual bool createUpstreamSocks(
int idx,
00055
int& requested,
00056
RTPSockets::FactoryMode mode,
00057 RTSP::TransportTypes requested_transport = RTSP::RTP_AVP_UDP );
00058
00063
virtual bool createDownstreamSocks(
int idx,
00064
int& requested,
00065
RTPSockets::FactoryMode mode,
00066 RTSP::TransportTypes requested_transport = RTSP::RTP_AVP_UDP );
00067
00068
00072
virtual MNSocket*
getLocalDownRtp(
int idx)
const;
00073
virtual MNSocket*
getLocalDownRtcp(
int idx)
const;
00074
virtual MNSocket*
getLocalUpRtp(
int idx)
const;
00075
virtual MNSocket*
getLocalUpRtcp(
int idx)
const;
00076
00080
virtual int getDistantPortDownstream(
int idx)
const;
00081
virtual int getDistantPortUpstream(
int idx )
const;
00083
00087
virtual int getLocalPortDownstream(
int idx)
const;
00088
virtual int getLocalPortUpstream(
int idx)
const;
00090
00091
virtual bool fillTransportString(
int idx,
MNString& out,
bool mc )
const;
00092
00093
virtual int stream_start (
int idx,
00094
const MNString& filename,
00095
const MNString& DescFileName,
00096
const MNString& client,
00097
const MNString& server,
00098
int ClientPortAnnounced,
00099
int ServerPortAnnounced );
00100
virtual int play (
int start,
int stop );
00101
virtual int stop ( );
00102
virtual int pause ( );
00103
virtual int jump (
int cont_time );
00104
virtual void fileComplete(
const char* filename,
bool comp );
00105
virtual long getFilePos();
00106
00107 virtual void set_client_port(
int ) { }
00108
00109
virtual void setMulticastInformation(
MNString server,
00110
MNSocket* main_rtp,
00111
MNSocket* main_rtcp );
00112
virtual void setBufferInformation(
int threshold,
int size );
00113
00114 virtual bool isPatchingCapable()
const {
return true; }
00115
00116
private:
00117
int* _upstream_rtp_created;
00118
int* _downstream_rtp_created;
00119
MNString _filename;
00120 };
00121
00122
#endif
00123