00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _DARWIN_INJECTOR_HH
00024 #define _DARWIN_INJECTOR_HH
00025
00026 #ifndef _RTSP_CLIENT_HH
00027 #include <RTSPClient.hh>
00028 #endif
00029
00030 #ifndef _RTCP_HH
00031 #include <RTCP.hh>
00032 #endif
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 class SubstreamDescriptor;
00056
00057 class DarwinInjector: public Medium {
00058 public:
00059 static DarwinInjector* createNew(UsageEnvironment& env,
00060 char const* applicationName = "DarwinInjector",
00061 int verbosityLevel = 0);
00062
00063 static Boolean lookupByName(UsageEnvironment& env, char const* name,
00064 DarwinInjector*& result);
00065
00066 void addStream(RTPSink* rtpSink, RTCPInstance* rtcpInstance);
00067
00068 Boolean setDestination(char const* remoteRTSPServerNameOrAddress,
00069 char const* remoteFileName,
00070 char const* sessionName = "",
00071 char const* sessionInfo = "",
00072 portNumBits remoteRTSPServerPortNumber = 554,
00073 char const* remoteUserName = "",
00074 char const* remotePassword = "",
00075 char const* sessionAuthor = "",
00076 char const* sessionCopyright = "",
00077 int timeout = -1);
00078
00079 private:
00080 virtual Boolean isDarwinInjector() const;
00081
00082 private:
00083 DarwinInjector(UsageEnvironment& env,
00084 char const* applicationName, int verbosityLevel);
00085
00086
00087 virtual ~DarwinInjector();
00088
00089 static void genericResponseHandler(RTSPClient* rtspClient, int responseCode, char* responseString);
00090 void genericResponseHandler1(int responseCode, char* responseString);
00091
00092 private:
00093 char const* fApplicationName;
00094 int fVerbosityLevel;
00095 RTSPClient* fRTSPClient;
00096 unsigned fSubstreamSDPSizes;
00097 SubstreamDescriptor* fHeadSubstream;
00098 SubstreamDescriptor* fTailSubstream;
00099 MediaSession* fSession;
00100 unsigned fLastTrackId;
00101 char fWatchVariable;
00102 int fResultCode;
00103 char* fResultString;
00104 };
00105
00106 #endif