📄 rtspclnt.h
字号:
STDMETHOD(InitPacketFilter) (THIS_ RawPacketFilter* pFilter); STDMETHOD(SetResendBufferDepth) (THIS_ UINT32 uSeconds); /* * IHXTransportSyncServer methods */ STDMETHOD(DistributeSyncAnchor) (THIS_ ULONG32 ulHXTime, ULONG32 ulNTPTime); STDMETHOD(DistributeSync) (ULONG32 ulHXTime, LONG32 lHXTimeOffset); STDMETHOD(DistributeStartTime) (ULONG32 ulHXRefTime); /* * IHXTransportBufferLimit methods */ /************************************************************************ * Method: * IHXTransportBufferLimit::SetByteLimit * Purpose: * Sets the maximum number of bytes that can be buffered in the * transport buffer. If incomming packets would put us over this * limit, then they are replaced with lost packets. A byte limit * of 0 means unlimited buffering. */ STDMETHOD(SetByteLimit) (THIS_ UINT16 uStreamNumber, UINT32 uByteLimit); /************************************************************************ * Method: * IHXTransportBufferLimit::GetByteLimit * Purpose: * Returns the current byte limit in effect. A value of 0 means * unlimited buffering is allowed */ STDMETHOD_(UINT32,GetByteLimit) (THIS_ UINT16 uStreamNumber); /* * RTSPClientProtocol public methods */ HX_RESULT(ReadDoneWithToPort) ( HX_RESULT status, IHXBuffer* pBuffer, UINT32 ulAddr, UINT16 nFromPort, UINT16 nToPort); HX_RESULT HandleUnexpected (RTSPMessage* pMsg); HX_RESULT HandleBadVersion (RTSPMessage* pMsg); HX_RESULT HandleOptions (RTSPOptionsMessage* pMsg); HX_RESULT HandleTeardown (RTSPTeardownMessage* pMsg); HX_RESULT HandleGetParam (RTSPGetParamMessage* pMsg); HX_RESULT HandleSetParam (RTSPSetParamMessage* pMsg); HX_RESULT HandleRedirect (RTSPRedirectMessage* pMsg); HX_RESULT HandleUseProxy (RTSPResponseMessage* pMsg); void SessionCreated (RTSPClientSession* pSession); void SessionSucceeded (RTSPClientSession* pSession, IHXTCPSocket* pSocket); void SessionFailed (RTSPClientSession* pSession, IHXTCPSocket* pSocket); HX_RESULT InitDone (HX_RESULT status); void DoConnectionCheck (); void GetForeignHostPort (char*& pHost, UINT16* pPort); void SetSplitterConsumer (BOOL); void EnterPrefetch (void) { m_bPrefetch = TRUE; }; void LeavePrefetch (void); void EnterFastStart (void); void LeaveFastStart (void); void InitCloak (UINT16* pCloakPorts, UINT8 nCloakPorts, IHXValues* pValues); UINT16 GetCloakPortSucceeded (void); HX_RESULT SetStatistics (UINT16 uStreamNumber, STREAM_STATS* pStats); BOOL IsSessionSucceeded() {return m_bSessionSucceeded;}; HX_RESULT InitExt(IUnknown* pContext, const char* pHostName, UINT16 foreignPort, IHXRTSPClientProtocolResponse* pClient, UINT32 initializationType, IHXValues* pSessionHeaders, IHXValues* pInfo, BOOL bHTTPCloak, UINT16 uCloakPort, BOOL bNoReuseConnection); virtual UINT16 GetRDTFeatureLevel(void){ return 0; }; friend class RTSPClientSession; void ReportError( HX_RESULT theErr );protected: HX_RESULT handleMessage (RTSPMessage* pMsg); HX_RESULT handleTCPData (BYTE* pData, UINT16 dataLen, UINT16 channel); HX_RESULT handleOptionsResponse (RTSPResponseMessage* pMsg); HX_RESULT handleGetParamResponse (RTSPResponseMessage* pMsg); HX_RESULT handleSetParamResponse (RTSPResponseMessage* pMsg); HX_RESULT handleTeardownResponse (RTSPResponseMessage* pMsg); HX_RESULT handlePlayResponse (RTSPResponseMessage* pMsg, RTSPPlayMessage* pPlayMsg); HX_RESULT handleRecordResponse (RTSPResponseMessage* pMsg); HX_RESULT handlePauseResponse (RTSPResponseMessage* pMsg); HX_RESULT handleSetupResponse (RTSPResponseMessage* pMsg, RTSPSetupMessage* pSetupMsg); HX_RESULT handleDescribeResponse (RTSPResponseMessage* pMsg); HX_RESULT handleAnnounceResponse (RTSPResponseMessage* pMsg); HX_RESULT HandleRedirectResponse (RTSPResponseMessage* pMsg); HX_RESULT sendInitialMessage (RTSPClientSession* pSession, IHXTCPSocket* pSocket); HX_RESULT addTransportMimeType (MIMEHeaderValue* pValue, UINT16 streamNumber); HX_RESULT sendFirstSetupRequest ( IHXValues* pIHXValuesRequestHeaders ); HX_RESULT sendRemainingSetupRequests(); HX_RESULT sendSetupRequestMessage ( RTSPStreamInfo* pStreamInfo, IHXValues* pIHXValuesRequestHeaders, BOOL bFirstSetup ); const char* allowedMethods (); void messageDebugFileOut (const char* pMsg, BOOL bIncoming); RTSPTransportRequest* getTransportRequest(MIMEHeaderValue* pValue); void reset(); void clearTransportRequestList (); void clearStreamInfoList (); void clearUDPResponseHelperList (); void clearSocketStreamMap(CHXMapLongToObj*& pSocketStreamMap); HX_RESULT getStreamDescriptionMimeType (char*& pMimeType); IHXStreamDescription* getStreamDescriptionInstance(const char* pMimeType); HX_RESULT closeSocket (); HX_RESULT reopenSocket (); HX_RESULT ReopenSocketDone (HX_RESULT status); HX_RESULT sendPendingStreamDescription(const char* pURL, IHXValues* pRequestHeaders); // only for [RTP|RDT]/TCP void mapTransportChannel (RTSPTransport* pTran, UINT16 nChannel); // Interop - control number could be anything... void mapControlToStreamNo (const char* pControl, UINT16 uStreamNo); BOOL getStreamNoFromControl (const char* pControl, REF(UINT16) uStreamNo); void setSetupRequestURL (RTSPSetupMessage* pMsg, RTSPStreamInfo* ); RTSPStreamInfo* getStreamInfoFromSetupRequestURL(const char* pUrl); /* interop */ /* since Allow doesn't deal with encoder stuff, just do it here */ /* depending on the result, we will use either old or new sdp file */ SdpFileType GetSdpFileTypeWeNeed(IHXValues* pHeaders); HX_RESULT GetStreamDescriptionInfo(IUnknown* pUnknown, CHXString& mimeTypes); void SendMsgToTransport(TRANSPORT_MSG msg); void AddCommonHeaderToMsg(RTSPRequestMessage* pMsg); HX_RESULT SendMsgToServer(RTSPMethod msg); HX_RESULT extractRealmInformation(RTSPResponseMessage* pMsg); HX_RESULT extractExistingAuthorizationInformation(IHXValues* pIHXValuesRequestHeaders); void appendAuthorizationHeaders(/*RTSPDescribeMessage*/ RTSPMessage* pMsg); HX_RESULT RetrieveReconnectInfo(MIMEHeader* pHeader, ReconnectType reconnectType, IHXValues*& pReconnectValues); HX_RESULT handleAuthentication(RTSPResponseMessage* pMsg); HX_RESULT ParseSDP(const char* pszContentType, IHXBuffer* pSDPBuffer); void RemoveSDPHeaders(void);#if defined(HELIX_FEATURE_TRANSPORT_MULTICAST) BOOL DetermineIfRMPresentation(IHXValues** ppStrmHeaders, UINT32 ulNumStreams); BOOL GetSubscriptionBW(IHXValues* pFileHeader, IHXValues** ppStrmHeaders, UINT16 unNumStrmHeaders, REF(UINT32*) pulSubscriptionBW, UINT32 ulNumStreams); BOOL GetRightHeaders(REF(IHXValues**) ppRealHeaders, // out UINT32 ulNumStreams, IHXValues** ppHeaders, UINT32 cHeaders, UINT32* pulSubscriptionBW);#endif /* HELIX_FEATURE_TRANSPORT_MULTICAST */ BOOL GetStreamCountNoTrust(IHXValues** ppHeaders, UINT16 unNumHeader, REF(UINT32) ulNumStream); HX_RESULT CreateUDPSockets(UINT32 ulStream, UINT16 ulPort); virtual BOOL IsRealServer(void); virtual HX_RESULT RetrieveChallenge(RTSPResponseMessage* pMessage); virtual HX_RESULT sendSetupRequestMessageExt(RTSPStreamInfo* pStreamInfo, IHXValues*& pIHXValuesRequestHeaders, BOOL bFirstSetup, RTSPSetupMessage*& pMsg); virtual HX_RESULT handleSetupResponseExt(RTSPStreamInfo* pStreamInfo, RTSPResponseMessage* pMsg, RTSPSetupMessage* pSetupMsg); virtual HX_RESULT DoSendRTTRequest(void); virtual HX_RESULT DoSendBWReport(INT32 aveBandwidth, INT32 packetLoss, INT32 bandwidthWanted); void addUAProfHeaders(IHXValues *pHeaders); RTSPTransportBuffer* getTransportBuffer(UINT16 uStreamNumber); virtual HX_RESULT sendRequest(RTSPRequestMessage* pMsg, UINT32 seqNo); virtual HX_RESULT sendRequest(RTSPRequestMessage* pMsg, const char* pContent, const char* pMimeType, UINT32 seqNo); LONG32 m_lRefCount; UINT16 m_foreignPort; UINT32 m_foreignAddr; UINT32 m_ulConnectToAddr; UINT16 m_setupResponseCount; IHXInterruptState* m_pInterruptState; IHXRTSPClientProtocolResponse* m_pResp; RTSPClientSessionManager* m_pSessionManager; RTSPClientSession* m_pSession; RTSPClientProtocol::State m_state; IHXScheduler* m_pScheduler; IHXValues* m_pSessionHeaders; IHXValues* m_pCloakValues; IHXKeyValueList* m_pResponseHeaders; IHXResolver* m_pResolver; IHXRegistry* m_pRegistry; CHXString m_versionString; CHXString m_url; CHXString m_contentBase; CHXString m_headerControl; CHXString m_challenge; CHXString m_hostName; CHXString m_proxyHost; CHXString m_sessionHost; UINT16 m_proxyPort; UINT16* m_pCloakPorts; UINT8 m_nCloakPorts; CHXString m_sessionID; IHXValues* m_pFileHeader; CHXSimpleList m_streamInfoList; CHXSimpleList m_transportRequestList; CHXSimpleList m_UDPResponseHelperList; CHXSimpleList m_sessionList; CHXMapLongToObj* m_pTransportStreamMap; // map streamID->trans CHXMapLongToObj* m_pTransportPortMap; // map port->trans CHXMapLongToObj* m_pTransportMPortMap; // map multicast port->trans CHXMapLongToObj* m_pTransportChannelMap; // map channel->trans (only in TCP) CHXMapLongToObj* m_pUDPSocketStreamMap; // map streamID->socket CHXMapLongToObj* m_pRTCPSocketStreamMap; // map streamID->socket CHXMapStringToOb* m_pControlToStreamNoMap; // streamID->streamNumber BOOL m_bSeqValueReceived; BOOL m_bSetupRecord; BOOL m_bClientDone; BOOL m_bMessageDebug; BOOL m_bUseProxy; BOOL m_bUseHTTPProxy; BOOL m_bHTTPOnly; BOOL m_bNoReuseConnection; BOOL m_bLoadTest; BOOL m_bPrefetch; BOOL m_bFastStart; BOOL m_bPaused; BOOL m_bSessionSucceeded; IHXConnectionlessControl* m_pConnectionlessControl; BOOL m_bConnectionlessControl; ConnectionCheckCallback* m_pConnectionCheckCallback; UINT32 m_uConnectionCheckCallbackHandle; BOOL m_bConnectionAlive; UINT32 m_uConnectionTimeout; BOOL m_bEntityRequired; UINT16 m_uCloakPort; CHXString m_messageDebugFileName; HXMutex* m_pMutex; UINT16 m_uProtocolType; TransportMode m_currentTransport; UINT32 m_ulBufferDepth; BOOL m_bSplitterConsumer; RawPacketFilter* m_pPacketFilter; BOOL m_bHasSyncMasterStream; IHXNetworkServices* m_pNetworkServices; IHXPreferences* m_pPreferences; IHXBuffer* m_pUAProfURI; IHXBuffer* m_pUAProfDiff; /* Interop */ // TRUE iff a server we are talking is not RS...This implies RTP.. BOOL m_bNonRSRTP; IHXValues* m_pSetupRequestHeader; BOOL m_bPlayJustSent; BOOL m_bIPTV; BOOL m_bColumbia; BOOL m_bNoKeepAlive; BOOL m_bForceUCaseTransportMimeType; BOOL m_bReportedSuccessfulTransport; BOOL m_bSDPInitiated; BOOL m_bMulticast; UINT32 m_ulMulticastAddress; IHXValues* m_pSDPFileHeader; CHXSimpleList* m_pSDPStreamHeaders; BOOL m_pIsMethodSupported[RTSP_TABLE_SIZE]; static const RTSPTableEntry zm_pRTSPTable[RTSP_TABLE_SIZE]; class TimeoutCallback : public IHXCallback { public: TimeoutCallback(RTSPClientProtocol* pOwner); ~TimeoutCallback(); STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj); STDMETHOD_(ULONG32,AddRef) (THIS); STDMETHOD_(ULONG32,Release) (THIS); STDMETHOD(Func) (THIS); private: LONG32 m_lRefCount; RTSPClientProtocol* m_pOwner; }; CHXKeepAlive* m_pSessionTimeout; TimeoutCallback* m_pTimeoutCallback; BOOL m_bUseLegacyTimeOutMsg; BOOL m_bKeepAlivePending; UINT32 m_ulServerTimeOut; UINT32 m_ulCurrentTimeOut;#if defined(_MACINTOSH) RTSPClientProtocolCallback* m_pCallback;#endif /* _MACINTOSH */};#endif /* _RTSPCLNT_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -