00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef RTPReflectorGM_H
00027
#define RTPReflectorGM_H
00028
00029
#include <sys/types.h>
00030
#include "var_type.h"
00031
00032
#include "MNSem.h"
00033
#include "MNMutex.h"
00034
00035
#include "MNRTPutildefs.h"
00036
00037
#include "ServerGM.h"
00038
00039
#include "MNFileSinkSH.h"
00040
#include "MNRTPSourceSH.h"
00041
#include "MNRTPDecoderSH.h"
00042
#include "MNPacketMultiplierSH.h"
00043
#include "MNRTPSinkSH.h"
00044
00049 class RTPReflectorGM :
public ServerGM
00050 {
00051
SH::RTPSourceSH* _RTPSourceSH;
00052
SH::RTPSinkSH* _RTPSinkSH;
00053
00054
MediaState _streamer_state;
00055
MNSem _eof_sig;
00056
MNMutex _eof_lock;
00057
00058
MNString _client;
00059
MNString _server;
00060
00061
MNSocket* _local_down_rtp;
00062
MNSocket* _local_down_rtcp;
00063
MNSocket* _local_up_rtp;
00064
MNSocket* _local_up_rtcp;
00065
int _DistantPortDown;
00066
int _DistantPortUp;
00067
00068
public:
00069
RTPReflectorGM(
GMUser* user,
MNSelector& sel );
00070
virtual ~RTPReflectorGM();
00071
00072
virtual void init(
int idx);
00073
00074
virtual void uninit();
00075
virtual void set_hostnames(
const MNString& Client,
const MNString& Server );
00076
virtual void set_ports(
int idx,
00077
MNSocket* locDownRtp,
00078
MNSocket* locDownRtcp,
00079
int distDown,
00080
MNSocket* locUpRtp,
00081
MNSocket* locUpRtcp,
00082
int distUp );
00083
virtual void start();
00084
virtual bool graphManNotify(
int idx,
00085
SH::Base* caller,
00086 SH::Notification attribute,
00087
void* msg );
00088
private:
00089
virtual int start_streamer(
int idx,
int bandwidth );
00090
public:
00091
virtual int open_file(
int idx,
00092
const char* name ,
00093
int rtp_pt,
00094 SDP::PayloadTypes int_pt,
00095
u_int32 bw,
00096 SDP::RetransTypes int_rt,
00097
int packetsize );
00098
virtual int play(
int startp,
int stopp );
00099
virtual int stop( );
00100
virtual int pause( );
00101
virtual int jump (
long pos );
00102 };
00103
00105
00106
#endif