qtpktasm.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:3k
- /****************************************************************************
- *
- * $Id: qtpktasm.h,v 1.1 2003/03/30 22:17:13 milko Exp $
- *
- * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
- *
- * http://www.real.com/devzone
- *
- * This program contains proprietary
- * information of Progressive Networks, Inc, and is licensed
- * subject to restrictions on use and distribution.
- *
- *
- * Packet Assembler
- *
- */
- #ifndef _QTPKTASM_H_
- #define _QTPKTASM_H_
- /****************************************************************************
- * Defines
- */
- /****************************************************************************
- * Includes
- */
- #include "hxcom.h"
- #include "hxtypes.h"
- #include "hxcomm.h"
- #include "qttrack.h"
- class CQTTrack;
- class CQTRTPSample;
- class CQTHintTrack;
- /****************************************************************************
- *
- * Class:
- * CQTPacketAssembler
- *
- * Purpose:
- * Implements Quick Time Hint Track Packet Assembler
- */
- class CQTPacketAssembler : public IUnknown
- {
- public:
- /*
- * Constructor/Destructor
- */
- CQTPacketAssembler(void);
- ~CQTPacketAssembler();
- /*
- * Main Interface
- */
- HX_RESULT Init(CQTFileFormat* pFileFormat);
- HX_RESULT AssemblePacket( CQTRTPSample* pSample,
- CQTHintTrack* pHintTrack);
- HX_RESULT SegmentReady( HX_RESULT status,
- IHXBuffer* pBuffer);
- HX_RESULT SegmentReady( HX_RESULT status,
- IHXBuffer* pBuffer,
- ULONG32 ulOffset,
- ULONG32 ulSize);
- /*
- * IUnknown methods
- */
- STDMETHOD (QueryInterface ) (THIS_
- REFIID ID,
- void** ppInterfaceObj);
- STDMETHOD_(UINT32, AddRef ) (THIS);
- STDMETHOD_(UINT32, Release) (THIS);
- private:
- HX_RESULT MakePacket(IHXBuffer* pBuffer = NULL);
- inline HX_RESULT LoadPacket(void);
- inline CQTTrack* FindTrackByRefIdx(UINT8 uRefIdx);
- inline BOOL NeedToSkipPacket(void);
- HX_RESULT AddSegmentToPacket(HX_RESULT status,
- IHXBuffer* pBuffer,
- UINT8* pData,
- ULONG32 ulOffset,
- ULONG32 ulSize);
- HX_RESULT HandleAsyncFailure(HX_RESULT status);
- CQTRTPSample* m_pSample;
- CQTHintTrack* m_pHintTrack;
- CQTTrack* m_pDataTrack;
- IHXCommonClassFactory* m_pClassFactory;
- CQTFileFormat* m_pFileFormat;
- IHXPacket* m_pPacket;
- UINT8* m_pCurrentSegmentStart;
- ULONG32 m_ulCurrentSegmentSize;
- UINT16 m_ulCurrentSegmentIdx;
- UINT16 m_ulSegmentFragments;
- LONG32 m_lRefCount;
- };
- #endif // _QTPKTASM_H_