rmaphook.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:8k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /****************************************************************************
  2.  * 
  3.  *  $Id: rmaphook.h,v 1.1 2003/05/30 02:17:36 gabest 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.  *  RealMedia Architecture Selective Record interface
  15.  *
  16.  */
  17. #ifndef _RMAPHOOK_H_
  18. #define _RMAPHOOK_H_
  19. /*
  20.  * Forward declarations of some interfaces defined or used here-in.
  21.  */
  22. typedef _INTERFACE IRMAPacket IRMAPacket;
  23. typedef _INTERFACE IRMAPacketHook IRMAPacketHook;
  24. typedef _INTERFACE IRMAPacketHookManager IRMAPacketHookManager;
  25. typedef _INTERFACE IRMAPacketHookHelper IRMAPacketHookHelper;
  26. typedef _INTERFACE IRMAPacketHookHelperResponse    IRMAPacketHookHelperResponse;
  27. /****************************************************************************
  28.  * 
  29.  *  Interface:
  30.  *
  31.  * IRMAPacketHook
  32.  *
  33.  *  Purpose:
  34.  *
  35.  * Interface implemented by the top level client to support selective
  36.  * record
  37.  *
  38.  *  IID_IRMAPacketHook:
  39.  *
  40.  * {00002000-0901-11d1-8B06-00A024406D59}
  41.  *
  42.  */
  43. DEFINE_GUID(IID_IRMAPacketHook, 0x00002000, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  44. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  45. DECLARE_INTERFACE_(IRMAPacketHook, IUnknown)
  46. {
  47.     /*
  48.      * IUnknown methods
  49.      */
  50.     STDMETHOD(QueryInterface) (THIS_
  51. REFIID riid,
  52. void** ppvObj) PURE;
  53.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  54.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  55.     /*
  56.      * IRMAPacketHook methods
  57.      */
  58.     /************************************************************************
  59.      * Method:
  60.      *     IRMAPacketHook::OnStart
  61.      * Purpose:
  62.      *     Called by the core to notify the start of this packet hook session
  63.      */
  64.     STDMETHOD(OnStart) (THIS) PURE;
  65.     /************************************************************************
  66.      * Method:
  67.      *     IRMAPacketHook::OnEnd
  68.      * Purpose:
  69.      *     Called by the core to notify the end of this packet hook session
  70.      */
  71.     STDMETHOD(OnEnd) (THIS) PURE;
  72.     /************************************************************************
  73.      * Method:
  74.      *     IRMAPacketHook::OnFileHeader
  75.      * Purpose:
  76.      *     Called by the core to send file header information
  77.      *
  78.      */
  79.     STDMETHOD(OnFileHeader) (THIS_
  80. IRMAValues* pValues) PURE;
  81.     /************************************************************************
  82.      * Method:
  83.      *     IRMAPacketHook::OnStreamHeader
  84.      * Purpose:
  85.      *     Called by the core to send stream header information
  86.      *
  87.      */
  88.     STDMETHOD(OnStreamHeader) (THIS_
  89. IRMAValues* pValues) PURE;
  90.     /************************************************************************
  91.      * Method:
  92.      *     IRMAPacketHook:OnPacket
  93.      * Purpose:
  94.      *     Called by the core to send packet information.
  95.      *
  96.      */
  97.     STDMETHOD(OnPacket) (THIS_
  98. IRMAPacket* pPacket) PURE;
  99. };
  100. /****************************************************************************
  101.  * 
  102.  *  Interface:
  103.  *
  104.  * IRMAPacketHookManager
  105.  *
  106.  *  Purpose:
  107.  *
  108.  * Interface to the selective record
  109.  *
  110.  *  IID_IRMAPacketHookManager
  111.  *
  112.  * {00002001-0901-11d1-8B06-00A024406D59}
  113.  */
  114. DEFINE_GUID(IID_IRMAPacketHookManager, 0x00002001, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  115. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  116. #undef  INTERFACE
  117. #define INTERFACE   IRMAPacketHookManager
  118. DECLARE_INTERFACE_(IRMAPacketHookManager, IUnknown)
  119. {
  120.     /*
  121.      * IUnknown methods
  122.      */
  123.     STDMETHOD(QueryInterface) (THIS_
  124. REFIID riid,
  125. void** ppvObj) PURE;
  126.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  127.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  128.     /*
  129.      * IRMAPacketHookManager methods
  130.      */
  131.     /************************************************************************
  132.      * Method:
  133.      *     IRMAPacketHookManager::InitHook
  134.      * Purpose:
  135.      *     called by the top level client to pass the IRMAPacketHook object
  136.      */
  137.     STDMETHOD(InitHook) (THIS_
  138. IRMAPacketHook* pPacketHook) PURE;
  139.     /************************************************************************
  140.      * Method:
  141.      *     IRMAPacketHookManager::CloseHook
  142.      * Purpose:
  143.      *     called by the top level client to close the hook connection
  144.      */
  145.     STDMETHOD(CloseHook) (THIS) PURE;
  146.     /************************************************************************
  147.      * Method:
  148.      *     IRMAPacketHookManager::StartHook
  149.      * Purpose:
  150.      *     called by the top level client to start recording
  151.      */
  152.     STDMETHOD(StartHook) (THIS) PURE;
  153.     /************************************************************************
  154.      * Method:
  155.      *     IRMAPacketHookManager::StopHook
  156.      * Purpose:
  157.      *     called by the top level client to stop recording
  158.      */
  159.     STDMETHOD(StopHook) (THIS) PURE;
  160. };
  161. /****************************************************************************
  162.  * 
  163.  *  Interface:
  164.  * 
  165.  * IRMAPacketHookHelper
  166.  * 
  167.  *  Purpose:
  168.  * 
  169.  * provide methods to prepare the packet for recording and send back the core
  170.  * 
  171.  *  IID_IRMAPacketHookHelper:
  172.  * 
  173.  * {00002002-0901-11d1-8B06-00A024406D59}
  174.  * 
  175.  */
  176. DEFINE_GUID(IID_IRMAPacketHookHelper, 0x00002002, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  177. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  178. #undef  INTERFACE
  179. #define INTERFACE   IRMAPacketHookHelper
  180. DECLARE_INTERFACE_(IRMAPacketHookHelper, IUnknown)
  181. {
  182.     /*
  183.      * IUnknown methods
  184.      */
  185.     STDMETHOD(QueryInterface) (THIS_
  186. REFIID riid,
  187. void** ppvObj) PURE;
  188.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  189.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  190.     /*
  191.      * IRMAPacketHookHelper methods
  192.      */
  193.     /******************************************************************
  194.      * Method:
  195.      *     IRMAPacketHookHelper::StartHook
  196.      *
  197.      * Purpose:
  198.      *    tell the renderer to start sending the record packets
  199.      *
  200.      */
  201.     STDMETHOD(StartHook) (THIS_
  202. ULONG32 ulStreamNumber,
  203. ULONG32 ulTimeOffset,
  204. IRMAPacketHookHelperResponse* pPacketHookHelperResponse) PURE;
  205.     /******************************************************************
  206.      * Method:
  207.      *    IRMAPacketHookHelper::StopHook
  208.      *
  209.      * Purpose:
  210.      *    tell the renderer to stop sending the record packets
  211.      */
  212.     STDMETHOD(StopHook) (THIS) PURE;
  213. };
  214. /****************************************************************************
  215.  * 
  216.  *  Interface:
  217.  *
  218.  * IRMAPacketHookHelperResponse
  219.  *
  220.  *  Purpose:
  221.  *
  222.  * Response interface to the IRMAPacketHookHelper at renderer
  223.  *
  224.  *  IID_IRMAPacketHookHelperResponse
  225.  *
  226.  * {00002003-0901-11d1-8B06-00A024406D59}
  227.  */
  228. DEFINE_GUID(IID_IRMAPacketHookHelperResponse, 0x00002003, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  229. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  230. #undef  INTERFACE
  231. #define INTERFACE   IRMAPacketHookHelperResponse
  232. DECLARE_INTERFACE_(IRMAPacketHookHelperResponse, IUnknown)
  233. {
  234.     /*
  235.      * IUnknown methods
  236.      */
  237.     STDMETHOD(QueryInterface) (THIS_
  238. REFIID riid,
  239. void** ppvObj) PURE;
  240.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  241.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  242.     /*
  243.      * IRMAPacketHookHelperResponse methods
  244.      */
  245.     /************************************************************************
  246.      * Method:
  247.      *     IRMAPacketHookHelperResponse::OnPacket
  248.      * Purpose:
  249.      *     called by the renderer to pass the packet for recording
  250.      */
  251.     STDMETHOD(OnPacket) (THIS_
  252. IRMAPacket* pPacket) PURE;
  253.     /************************************************************************
  254.      * Method:
  255.      *     IRMAPacketHookManager::OnEndOfPackets
  256.      * Purpose:
  257.      *     called by the renderer to notify the end of this stream
  258.      */
  259.     STDMETHOD(OnEndOfPackets) (THIS) PURE;
  260. };
  261. #endif /* _RMAPHOOK_H_ */