qtpktasm.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:3k
源码类别:

Symbian

开发平台:

C/C++

  1. /****************************************************************************
  2.  * 
  3.  *  $Id: qtpktasm.h,v 1.1 2003/03/30 22:17:13 milko Exp $
  4.  *
  5.  *  Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
  6.  *  
  7.  *  http://www.real.com/devzone
  8.  *
  9.  *  This program contains proprietary 
  10.  *  information of Progressive Networks, Inc, and is licensed
  11.  *  subject to restrictions on use and distribution.
  12.  *
  13.  *
  14.  *  Packet Assembler
  15.  *
  16.  */
  17. #ifndef _QTPKTASM_H_
  18. #define _QTPKTASM_H_
  19. /****************************************************************************
  20.  *  Defines
  21.  */
  22. /****************************************************************************
  23.  *  Includes
  24.  */
  25. #include "hxcom.h"
  26. #include "hxtypes.h"
  27. #include "hxcomm.h"
  28. #include "qttrack.h"
  29. class CQTTrack;
  30. class CQTRTPSample;
  31. class CQTHintTrack;
  32. /****************************************************************************
  33.  * 
  34.  *  Class:
  35.  * CQTPacketAssembler
  36.  *
  37.  *  Purpose:
  38.  * Implements Quick Time Hint Track Packet Assembler
  39.  */
  40. class CQTPacketAssembler : public IUnknown
  41. {
  42. public:
  43.     /*
  44.      * Constructor/Destructor
  45.      */
  46.     CQTPacketAssembler(void);
  47.     ~CQTPacketAssembler();
  48.     /*
  49.      * Main Interface
  50.      */
  51.     HX_RESULT Init(CQTFileFormat* pFileFormat);
  52.     HX_RESULT AssemblePacket( CQTRTPSample* pSample,
  53. CQTHintTrack* pHintTrack);
  54.     HX_RESULT SegmentReady( HX_RESULT status,
  55.     IHXBuffer* pBuffer);
  56.     HX_RESULT SegmentReady( HX_RESULT status,
  57.     IHXBuffer* pBuffer,
  58.     ULONG32 ulOffset,
  59.     ULONG32 ulSize);
  60.     /*
  61.      * IUnknown methods
  62.      */
  63.     STDMETHOD (QueryInterface )     (THIS_ 
  64.     REFIID ID, 
  65.     void** ppInterfaceObj);
  66.     STDMETHOD_(UINT32, AddRef )     (THIS);
  67.     STDMETHOD_(UINT32, Release)     (THIS);
  68. private:
  69.     HX_RESULT MakePacket(IHXBuffer* pBuffer = NULL);
  70.     inline HX_RESULT LoadPacket(void);
  71.     inline CQTTrack* FindTrackByRefIdx(UINT8 uRefIdx);
  72.     inline BOOL NeedToSkipPacket(void);
  73.     HX_RESULT AddSegmentToPacket(HX_RESULT status,
  74.  IHXBuffer* pBuffer,
  75.  UINT8* pData,
  76.  ULONG32 ulOffset,
  77.       ULONG32 ulSize);
  78.     HX_RESULT HandleAsyncFailure(HX_RESULT status);
  79.     CQTRTPSample* m_pSample;
  80.     CQTHintTrack* m_pHintTrack;
  81.     CQTTrack* m_pDataTrack;
  82.     IHXCommonClassFactory* m_pClassFactory;
  83.     CQTFileFormat* m_pFileFormat;
  84.     IHXPacket* m_pPacket;
  85.     UINT8* m_pCurrentSegmentStart;
  86.     ULONG32 m_ulCurrentSegmentSize;
  87.     UINT16 m_ulCurrentSegmentIdx;
  88.     UINT16 m_ulSegmentFragments;
  89.     LONG32  m_lRefCount;
  90. };
  91. #endif  // _QTPKTASM_H_