[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] broadcast/transport/rtp/recv/pub rtpbcstreams.h, NONE,
From: dcollins () helixcommunity ! org
Date: 2011-10-28 15:40:35
[Download RAW message or body]
Update of /cvsroot/server/broadcast/transport/rtp/recv/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv21038/pub
Modified Files:
Tag: DEAN_PERF_2011_10_17
rtpbcobj.h
Added Files:
Tag: DEAN_PERF_2011_10_17
rtpbcstreams.h sdpfilereader.h
Log Message:
experimental DEAN_PERF_2011_10_17 branch checkin: move RTPBCStreamsObject and \
SDPFileReader into their own source files
--- NEW FILE: sdpfilereader.h ---
/* ***** BEGIN LICENSE BLOCK *****
* Source last modified: $Id: sdpfilereader.h,v 1.1.2.1 2011/10/28 15:40:33 dcollins \
Exp $
*
* Portions Copyright (c) 1995-2011 RealNetworks, Inc. All Rights Reserved.
*
* The contents of this file, and the files included with this file,
* are subject to the current version of the RealNetworks Public
* Source License (the "RPSL") available at
* http://www.helixcommunity.org/content/rpsl unless you have licensed
* the file under the current version of the RealNetworks Community
* Source License (the "RCSL") available at
* http://www.helixcommunity.org/content/rcsl, in which case the RCSL
* will apply. You may also obtain the license terms directly from
* RealNetworks. You may not use this file except in compliance with
* the RPSL or, if you have a valid RCSL with RealNetworks applicable
* to this file, the RCSL. Please see the applicable RPSL or RCSL for
* the rights, obligations and limitations governing use of the
* contents of the file.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the
* portions it created.
*
* This file, and the files included with this file, is distributed
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
#ifndef _SDPFILEREADER_H
#define _SDPFILEREADER_H
/****************************************************************************
*
* SDPFileReader Class
*
*/
class SDPFileReader : public IHXFileResponse
{
public:
SDPFileReader(IHXFileObject* pFileObject,
IHXCommonClassFactory* pClassFactory,
RTPBCStreamsObject* pResponse);
virtual ~SDPFileReader();
// *** IUnknown methods ***
STDMETHOD (QueryInterface ) (THIS_
REFIID ID,
void** ppInterfaceObj);
STDMETHOD_(UINT32, AddRef ) (THIS);
STDMETHOD_(UINT32, Release) (THIS);
// *** IHXFileResponse methods ***
STDMETHOD(InitDone) (THIS_
HX_RESULT status);
STDMETHOD(CloseDone) (THIS_
HX_RESULT status);
STDMETHOD(ReadDone) (THIS_
HX_RESULT status,
IHXBuffer* pBuffer);
STDMETHOD(WriteDone) (THIS_
HX_RESULT status);
STDMETHOD(SeekDone) (THIS_
HX_RESULT status);
// Public methods
HX_RESULT ReadFile ();
HX_RESULT Done ();
protected:
INT32 m_lRefCount;
IHXCommonClassFactory* m_pClassFactory;
IHXFileObject* m_pFileObject;
RTPBCStreamsObject* m_pResponse;
IHXFragmentedBuffer* m_pSDPFile;
};
#endif /* _SDPFILEREADER_H */
Index: rtpbcobj.h
===================================================================
RCS file: /cvsroot/server/broadcast/transport/rtp/recv/pub/Attic/rtpbcobj.h,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- rtpbcobj.h 27 Oct 2011 23:24:51 -0000 1.1.2.4
+++ rtpbcobj.h 28 Oct 2011 15:40:32 -0000 1.1.2.5
@@ -49,9 +49,6 @@
*/
#define DEFAULT_MIN_PREROLL 1000 /* 1 second */
-// FIXME
-#define RDPRINTF(a,b) /**/
-
/****************************************************************************
* Forward declarations
*/
@@ -197,229 +194,4 @@
};
-/****************************************************************************
- *
- * RTPBCStreamsObject Class
- *
- */
-class RTPBCStreamsObject : public IHXFileSystemManagerResponse,
- public IHXFileStatResponse,
- public IHXFileExists,
- public IRTPSyncResponse,
- public IPacketQueueResponse,
- public IQueuedSession
-{
-public:
- /****** Public Class Methods ******************************************/
- RTPBCStreamsObject(IUnknown* pContext, IHXValues* pOptions);
-
-
- /* File Objects returned by broadcast formats need to implement
- * IHXFileExists and IHXBroadcastMapper. They do NOT need to
- * implement IHXFileObject!
- */
-
- /************************************************************************
- * IHXFileExists Interface Methods ref: hxfiles.h
- */
- STDMETHOD(DoesExist) (THIS_
- const char* pPath,
- IHXFileExistsResponse* pResponse);
-
-
- /************************************************************************
- * IHXFileSystemManagerResponse Interface Methods ref: hxfiles.h
- */
- STDMETHOD(InitDone) (THIS_
- HX_RESULT status);
- STDMETHOD(FileObjectReady) (THIS_
- HX_RESULT status,
- IUnknown* pObject);
- STDMETHOD(DirObjectReady) (THIS_
- HX_RESULT status,
- IUnknown* pDirObject);
-
- /************************************************************************
- * IHXFileStatResponse Interface Methods ref: hxfiles.h
- */
- STDMETHOD(StatDone) (THIS_
- HX_RESULT status,
- HX_OFF_T size,
- HX_STAT_TIME_T tCreationTime,
- HX_STAT_TIME_T tAccessTime,
- HX_STAT_TIME_T tModificationTime,
- HX_STAT_MODE_T mode);
-
-
- /************************************************************************
- * IUnknown COM Interface Methods ref: hxcom.h
- */
- STDMETHOD (QueryInterface ) (THIS_ REFIID ID, void** ppInterfaceObj);
- STDMETHOD_(UINT32, AddRef ) (THIS);
- STDMETHOD_(UINT32, Release) (THIS);
-
-
- /************************************************************************
- * IRTPSyncResponse Methods
- */
- STDMETHOD(SyncDone)(THIS);
-
- /************************************************************************
- * IPacketQueueResponse Methods
- */
- STDMETHOD(PacketsStarted) (THIS_ UINT16 unStreamNum);
- STDMETHOD(PacketQueued) (THIS_ UINT16 unStreamNum,
- IHXServerPacketExt* pPkt);
- STDMETHOD(StreamDone) (THIS_ UINT16 unStreamNum);
-
- /************************************************************************
- * IQueuedSession Methods
- */
- STDMETHOD(PacketReady) (THIS_ IHXServerPacketExt* pPkt);
- STDMETHOD(StopReceiving)(THIS);
- STDMETHOD(EndSession) (THIS);
- STDMETHOD(OnError) (THIS_ UINT8 unSeverity, HX_RESULT err,
- const char* szMsg);
-
-
- HX_RESULT ReadFileDone (HX_RESULT status,
- IHXFragmentedBuffer* pBuffer);
- void Init(IHXFormatResponse* pFileFormatResponse);
- HX_RESULT GetStreamHeader(UINT16 unStreamNumber, REF(IHXValues*) pHeader);
- HX_RESULT GetFileHeader(REF(IHXValues*) pHeader);
- void StartPackets(UINT16 unStreamNumber);
- void StopAllStreams(HXBOOL bFlushPkts = TRUE);
- HX_RESULT DispatchStopAllStreams(HXBOOL bFlushPkts);
-private:
- /****** Private Class Variables ****************************************/
- INT32 m_lRefCount;
- IUnknown* m_pContext;
- IHXValues* m_pOptions;
- IHXBuffer* m_pBaseMountPoint;
- IHXCommonClassFactory* m_pClassFactory;
- IHXFileSystemManager* m_pFSManager;
- IHXFileExistsResponse* m_pFEResponse;
- char* m_pRequestedPath;
- IHXRegistry* m_pRegistry;
-
- IHXFileStat* m_pFileStat;
- BOOL m_bStatDoneCalled;
-
- SDPFileReader* m_pFileReader;
- IHXBuffer* m_pSDPFile;
- CHXPtrArray* m_pStreams;
- IHXFormatResponse* m_pFFResponse;
- IHXFileObject* m_pFileObject;
-
- SyncedQueueManager* m_pPacketBufferManager;
- CallbackHandle m_hPktQChecker;
- BOOL m_bFlushPkts;
- BOOL m_bDidSessionEnd;
- BOOL m_bSendImmediate;
- BOOL m_bInitRegistry;
- BOOL m_bInitDoneCalled;
- BOOL m_bStreamsReady;
- BOOL m_bStartSendingPacket;
- BOOL m_bStreamsStopping;
- UINT32 m_ulRegID;
-
- UINT16 m_unKeyframeStream;
-
- BrcvStatistics *m_pSharedStats;
- UINT32 m_uiNumStreamsStarted;
-
- IHXValues* m_pFileHeader;
- IHXValues** m_ppStreamHeaders;
- UINT16 m_usStreamCnt;
-
- RTPInfoSynch* m_pRTPInfoSync;
-
- HXBOOL* m_pbStarted;
- UINT16 m_unStarted;
- UINT32* m_pPacketStreamSequenceNo;
- IHXMutex* m_pLiveConnectionsLock;
-
- /****** Private Class Methods ******************************************/
- ~RTPBCStreamsObject();
-
- HX_RESULT FormSDPRequest (REF(IHXRequest*) ppRequest);
-
- HX_RESULT ProcessSDPFile ();
- HX_RESULT ParseSDPFile ();
- void TakeCareOfDefault(void);
- /* initializing/buffering */
- void StartBuffering();
- void InitRegistry(UINT16 unStreamNum);
- void CleanupRegistry();
- HX_RESULT SyncReady();
- void CloseAllStreams();
-
- void StreamsReady(HX_RESULT theErr);
- void LogError(const char* pErrText);
- void BuildUrl(const char* pBase, const char* pUrl, char* pBuf);
-
- HX_RESULT DispatchStartPackets(UINT16 unStreamNumber);
-
- typedef enum
- {
- SDP_READY,
- SDP_INITING,
- SDP_OPENING,
- SDP_STATING,
- SDP_READING,
- SDP_PARSING,
- SDP_FAILED,
- SDP_DONE,
- } SDP_FILE_HANDLING_STATUS;
- SDP_FILE_HANDLING_STATUS m_status;
-};
-
-
-/****************************************************************************
- *
- * SDPFileReader Class
- *
- */
-class SDPFileReader : public IHXFileResponse
-{
-public:
- SDPFileReader(IHXFileObject* pFileObject,
- IHXCommonClassFactory* pClassFactory,
- RTPBCStreamsObject* pResponse);
- virtual ~SDPFileReader();
-
- // *** IUnknown methods ***
- STDMETHOD (QueryInterface ) (THIS_
- REFIID ID,
- void** ppInterfaceObj);
- STDMETHOD_(UINT32, AddRef ) (THIS);
- STDMETHOD_(UINT32, Release) (THIS);
-
-
- // *** IHXFileResponse methods ***
- STDMETHOD(InitDone) (THIS_
- HX_RESULT status);
- STDMETHOD(CloseDone) (THIS_
- HX_RESULT status);
- STDMETHOD(ReadDone) (THIS_
- HX_RESULT status,
- IHXBuffer* pBuffer);
- STDMETHOD(WriteDone) (THIS_
- HX_RESULT status);
- STDMETHOD(SeekDone) (THIS_
- HX_RESULT status);
-
- // Public methods
- HX_RESULT ReadFile ();
- HX_RESULT Done ();
-
-protected:
- INT32 m_lRefCount;
- IHXCommonClassFactory* m_pClassFactory;
- IHXFileObject* m_pFileObject;
- RTPBCStreamsObject* m_pResponse;
- IHXFragmentedBuffer* m_pSDPFile;
-
-};
-
#endif
--- NEW FILE: rtpbcstreams.h ---
/* ***** BEGIN LICENSE BLOCK *****
* Source last modified: $Id: rtpbcstreams.h,v 1.1.2.1 2011/10/28 15:40:33 dcollins \
Exp $
*
* Portions Copyright (c) 1995-2011 RealNetworks, Inc. All Rights Reserved.
*
* The contents of this file, and the files included with this file,
* are subject to the current version of the RealNetworks Public
* Source License (the "RPSL") available at
* http://www.helixcommunity.org/content/rpsl unless you have licensed
* the file under the current version of the RealNetworks Community
* Source License (the "RCSL") available at
* http://www.helixcommunity.org/content/rcsl, in which case the RCSL
* will apply. You may also obtain the license terms directly from
* RealNetworks. You may not use this file except in compliance with
* the RPSL or, if you have a valid RCSL with RealNetworks applicable
* to this file, the RCSL. Please see the applicable RPSL or RCSL for
* the rights, obligations and limitations governing use of the
* contents of the file.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the
* portions it created.
*
* This file, and the files included with this file, is distributed
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
#ifndef _RTPFEED_H_
#define _RTPFEED_H_
/****************************************************************************
* Constants
*/
/****************************************************************************
* Forward declarations
*/
class RTPBroadcastObject;
class RTPStream;
class RTPLiveStream;
class PacketBufferManager;
struct IHXCommonClassFactory;
struct IHXErrorMessages;
class SDPFileReader;
class MediaDescription;
class CHXPtrArray;
class NTPTime;
class CHXSimpleList;
class CHXString;
class RTPBCStreamsObject;
struct IHXScheduler;
struct IHXRegistry;
class RTPInfoSynch;
class RTCPPacket;
class IRTPSyncResponse;
class IHXRTPPacketSink;
_INTERFACE IHXServerPacketExt;
/****************************************************************************
*
* RTPBCStreamsObject Class
*
*/
class RTPBCStreamsObject : public IHXFileSystemManagerResponse,
public IHXFileStatResponse,
public IHXFileExists,
public IRTPSyncResponse,
public IPacketQueueResponse,
public IQueuedSession
{
public:
/****** Public Class Methods ******************************************/
RTPBCStreamsObject(IUnknown* pContext, IHXValues* pOptions);
/* File Objects returned by broadcast formats need to implement
* IHXFileExists and IHXBroadcastMapper. They do NOT need to
* implement IHXFileObject!
*/
/************************************************************************
* IHXFileExists Interface Methods ref: hxfiles.h
*/
STDMETHOD(DoesExist) (THIS_
const char* pPath,
IHXFileExistsResponse* pResponse);
/************************************************************************
* IHXFileSystemManagerResponse Interface Methods ref: hxfiles.h
*/
STDMETHOD(InitDone) (THIS_
HX_RESULT status);
STDMETHOD(FileObjectReady) (THIS_
HX_RESULT status,
IUnknown* pObject);
STDMETHOD(DirObjectReady) (THIS_
HX_RESULT status,
IUnknown* pDirObject);
/************************************************************************
* IHXFileStatResponse Interface Methods ref: hxfiles.h
*/
STDMETHOD(StatDone) (THIS_
HX_RESULT status,
HX_OFF_T size,
HX_STAT_TIME_T tCreationTime,
HX_STAT_TIME_T tAccessTime,
HX_STAT_TIME_T tModificationTime,
HX_STAT_MODE_T mode);
/************************************************************************
* IUnknown COM Interface Methods ref: hxcom.h
*/
STDMETHOD (QueryInterface ) (THIS_ REFIID ID, void** ppInterfaceObj);
STDMETHOD_(UINT32, AddRef ) (THIS);
STDMETHOD_(UINT32, Release) (THIS);
/************************************************************************
* IRTPSyncResponse Methods
*/
STDMETHOD(SyncDone)(THIS);
/************************************************************************
* IPacketQueueResponse Methods
*/
STDMETHOD(PacketsStarted) (THIS_ UINT16 unStreamNum);
STDMETHOD(PacketQueued) (THIS_ UINT16 unStreamNum,
IHXServerPacketExt* pPkt);
STDMETHOD(StreamDone) (THIS_ UINT16 unStreamNum);
/************************************************************************
* IQueuedSession Methods
*/
STDMETHOD(PacketReady) (THIS_ IHXServerPacketExt* pPkt);
STDMETHOD(StopReceiving)(THIS);
STDMETHOD(EndSession) (THIS);
STDMETHOD(OnError) (THIS_ UINT8 unSeverity, HX_RESULT err,
const char* szMsg);
HX_RESULT ReadFileDone (HX_RESULT status,
IHXFragmentedBuffer* pBuffer);
void Init(IHXFormatResponse* pFileFormatResponse);
HX_RESULT GetStreamHeader(UINT16 unStreamNumber, REF(IHXValues*) pHeader);
HX_RESULT GetFileHeader(REF(IHXValues*) pHeader);
void StartPackets(UINT16 unStreamNumber);
void StopAllStreams(HXBOOL bFlushPkts = TRUE);
HX_RESULT DispatchStopAllStreams(HXBOOL bFlushPkts);
private:
/****** Private Class Variables ****************************************/
INT32 m_lRefCount;
IUnknown* m_pContext;
IHXValues* m_pOptions;
IHXBuffer* m_pBaseMountPoint;
IHXCommonClassFactory* m_pClassFactory;
IHXFileSystemManager* m_pFSManager;
IHXFileExistsResponse* m_pFEResponse;
char* m_pRequestedPath;
IHXRegistry* m_pRegistry;
IHXFileStat* m_pFileStat;
BOOL m_bStatDoneCalled;
SDPFileReader* m_pFileReader;
IHXBuffer* m_pSDPFile;
CHXPtrArray* m_pStreams;
IHXFormatResponse* m_pFFResponse;
IHXFileObject* m_pFileObject;
SyncedQueueManager* m_pPacketBufferManager;
CallbackHandle m_hPktQChecker;
BOOL m_bFlushPkts;
BOOL m_bDidSessionEnd;
BOOL m_bSendImmediate;
BOOL m_bInitRegistry;
BOOL m_bInitDoneCalled;
BOOL m_bStreamsReady;
BOOL m_bStartSendingPacket;
BOOL m_bStreamsStopping;
UINT32 m_ulRegID;
UINT16 m_unKeyframeStream;
BrcvStatistics *m_pSharedStats;
UINT32 m_uiNumStreamsStarted;
IHXValues* m_pFileHeader;
IHXValues** m_ppStreamHeaders;
UINT16 m_usStreamCnt;
RTPInfoSynch* m_pRTPInfoSync;
HXBOOL* m_pbStarted;
UINT16 m_unStarted;
UINT32* m_pPacketStreamSequenceNo;
IHXMutex* m_pLiveConnectionsLock;
/****** Private Class Methods ******************************************/
~RTPBCStreamsObject();
HX_RESULT FormSDPRequest (REF(IHXRequest*) ppRequest);
HX_RESULT ProcessSDPFile ();
HX_RESULT ParseSDPFile ();
void TakeCareOfDefault(void);
/* initializing/buffering */
void StartBuffering();
void InitRegistry(UINT16 unStreamNum);
void CleanupRegistry();
HX_RESULT SyncReady();
void CloseAllStreams();
void StreamsReady(HX_RESULT theErr);
void LogError(const char* pErrText);
void BuildUrl(const char* pBase, const char* pUrl, char* pBuf);
HX_RESULT DispatchStartPackets(UINT16 unStreamNumber);
typedef enum
{
SDP_READY,
SDP_INITING,
SDP_OPENING,
SDP_STATING,
SDP_READING,
SDP_PARSING,
SDP_FAILED,
SDP_DONE,
} SDP_FILE_HANDLING_STATUS;
SDP_FILE_HANDLING_STATUS m_status;
};
#endif /* _RTPFEED_H_ */
_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic