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

Symbian

开发平台:

C/C++

  1. /* ***** BEGIN LICENSE BLOCK ***** 
  2.  * Version: RCSL 1.0/RPSL 1.0 
  3.  *  
  4.  * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
  5.  *      
  6.  * The contents of this file, and the files included with this file, are 
  7.  * subject to the current version of the RealNetworks Public Source License 
  8.  * Version 1.0 (the "RPSL") available at 
  9.  * http://www.helixcommunity.org/content/rpsl unless you have licensed 
  10.  * the file under the RealNetworks Community Source License Version 1.0 
  11.  * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
  12.  * in which case the RCSL will apply. You may also obtain the license terms 
  13.  * directly from RealNetworks.  You may not use this file except in 
  14.  * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
  15.  * applicable to this file, the RCSL.  Please see the applicable RPSL or 
  16.  * RCSL for the rights, obligations and limitations governing use of the 
  17.  * contents of the file.  
  18.  *  
  19.  * This file is part of the Helix DNA Technology. RealNetworks is the 
  20.  * developer of the Original Code and owns the copyrights in the portions 
  21.  * it created. 
  22.  *  
  23.  * This file, and the files included with this file, is distributed and made 
  24.  * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  25.  * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  26.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
  27.  * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  28.  * 
  29.  * Technology Compatibility Kit Test Suite(s) Location: 
  30.  *    http://www.helixcommunity.org/content/tck 
  31.  * 
  32.  * Contributor(s): 
  33.  *  
  34.  * ***** END LICENSE BLOCK ***** */ 
  35. #if defined(HELIX_FEATURE_MEDIAMARKER)
  36. #ifndef MEDIAMRK_H
  37. #define MEDIAMRK_H
  38. // Forward declarations
  39. typedef _INTERFACE IHXMediaMarkerSink    IHXMediaMarkerSink;
  40. typedef _INTERFACE IHXMediaMarkerManager IHXMediaMarkerManager;
  41. typedef _INTERFACE IHXValues             IHXValues;
  42. typedef _INTERFACE IHXBuffer             IHXBuffer;
  43. class HXPlayer;
  44. class CHXMapStringToOb;
  45. class CHXMapPtrToPtr;
  46. class CHXSimpleList;
  47. class CMarkerInfo
  48. {
  49. public:
  50.     CMarkerInfo(IHXBuffer* pURLStr,
  51.                 IHXBuffer* pNameStr,
  52.                 UINT32      ulTime,
  53.                 IHXValues* pOtherParams);
  54.     virtual ~CMarkerInfo();
  55.     IHXBuffer* m_pURLStr;
  56.     IHXBuffer* m_pNameStr;
  57.     UINT32      m_ulTime;
  58.     IHXValues* m_pOtherParams;
  59. };
  60. class CHXMediaMarkerManager : public IHXMediaMarkerManager
  61. {
  62. public:
  63.     CHXMediaMarkerManager(HXPlayer* pPlayer);
  64.     virtual ~CHXMediaMarkerManager();
  65.     // IUnknown methods
  66.     STDMETHOD(QueryInterface)   (THIS_ REFIID riid, void** ppvObj);
  67.     STDMETHOD_(ULONG32,AddRef)  (THIS);
  68.     STDMETHOD_(ULONG32,Release) (THIS);
  69.     // CHXMediaMarkerManager methods
  70.     STDMETHOD(Close) (THIS);
  71.     // IHXMediaMarkerManager methods
  72.     STDMETHOD(AddMediaMarkerSink)       (THIS_ IHXMediaMarkerSink* pSink);
  73.     STDMETHOD(RemoveMediaMarkerSink)    (THIS_ IHXMediaMarkerSink* pSink);
  74.     STDMETHOD(AddMediaMarkerSinkFilter) (THIS_ IHXMediaMarkerSink* pSink,
  75.                                                IHXValues*          pFilter);
  76.     STDMETHOD(ResolveMarker)            (THIS_ IHXBuffer* pURLStr,
  77.                                                IHXBuffer* pMarkerNameStr,
  78.                                                UINT32      ulTime,
  79.                                                IHXValues* pOtherMarkerParams);
  80.     STDMETHOD_(BOOL,IsMarkerResolved)   (THIS_ IHXBuffer* pURLStr,
  81.                                                IHXBuffer* pMarkerNameStr);
  82.     STDMETHOD(GetFirstMarker)           (THIS_ IHXMediaMarkerSink* pSink,
  83.                                                REF(IHXBuffer*)     rpURLStr,
  84.                                                REF(IHXBuffer*)     rpMarkerNameStr,
  85.                                                REF(UINT32)          rulTime,
  86.                                                REF(IHXValues*)     rpOtherMarkerParams);
  87.     STDMETHOD(GetNextMarker)            (THIS_ IHXMediaMarkerSink* pSink,
  88.                                                REF(IHXBuffer*)     rpURLStr,
  89.                                                REF(IHXBuffer*)     rpMarkerNameStr,
  90.                                                REF(UINT32)          rulTime,
  91.                                                REF(IHXValues*)     rpOtherMarkerParams);
  92. protected:
  93.     INT32          m_lRefCount;
  94.     HXPlayer*     m_pPlayer;
  95.     CHXSimpleList* m_pMarkerList;
  96.     CHXSimpleList* m_pSinkList;
  97.     void           ClearMarkerList();
  98.     void           ClearSinkList();
  99.     BOOL           WasSinkAdded(IHXMediaMarkerSink* pSink);
  100.     HX_RESULT      AddMarkerInfo(CMarkerInfo* pInfo);
  101.     BOOL           AreMarkersIdentical(CMarkerInfo* pInfo1, CMarkerInfo* pInfo2);
  102.     void           BroadcastMarkerToSinks(CMarkerInfo* pInfo);
  103.     BOOL           SinkWantsThisMarker(IHXMediaMarkerSink* pSink,
  104.                                        CMarkerInfo*         pInfo);
  105. };
  106. #endif /* #ifdef MEDIAMRK_H */
  107. #endif /* #if defined(HELIX_FEATURE_MEDIAMARKER) */