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

多媒体编程

开发平台:

Visual C++

  1. /****************************************************************************
  2.  * 
  3.  *  $Id: rmasrc.h,v 1.1 2003/05/30 02:18:01 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 information of RealNetworks, Inc, 
  10.  *  and is licensed subject to restrictions on use and distribution.
  11.  *
  12.  *
  13.  *  RealMedia Architecture Packet Source Interfaces.
  14.  *
  15.  */
  16. #ifndef _RMASRC_H_
  17. #define _RMASRC_H_
  18. /*
  19.  * Forward declarations of some interfaces defined or used here-in.
  20.  */
  21. typedef _INTERFACE IRMARawSourceObject IRMARawSourceObject;
  22. typedef _INTERFACE IRMARawSinkObject IRMARawSinkObject;
  23. typedef _INTERFACE IRMASourceFinderObject IRMASourceFinderObject;
  24. typedef _INTERFACE IRMASourceFinderResponse IRMASourceFinderResponse;
  25. typedef _INTERFACE IRMARequest IRMARequest;
  26. /****************************************************************************
  27.  * 
  28.  *  Interface:
  29.  * 
  30.  * IRMARawSourceObject
  31.  * 
  32.  *  Purpose:
  33.  * 
  34.  * Object that serves packets to sinks
  35.  * 
  36.  *  IID_IRMARawSourceObject:
  37.  * 
  38.  * {00001000-0901-11d1-8B06-00A024406D59}
  39.  * 
  40.  */
  41. DEFINE_GUID(IID_IRMARawSourceObject, 0x00001000, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  42. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  43. #undef  INTERFACE
  44. #define INTERFACE   IRMARawSourceObject
  45. DECLARE_INTERFACE_(IRMARawSourceObject, 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.  * IRMARawSourceObject methods
  57.  */
  58.     /************************************************************************
  59.      * Method:
  60.      *     IRMARawSourceObject::Init
  61.      * Purpose:
  62.      *     Initializes the connection between the source and the sink
  63.      */
  64.     STDMETHOD(Init) (THIS_
  65. IUnknown* pUnknown) PURE;
  66.     STDMETHOD(Done) (THIS) PURE;
  67.     STDMETHOD(GetFileHeader) (THIS) PURE;
  68.     STDMETHOD(GetStreamHeader) (THIS_
  69. UINT16 unStreamNumber) PURE;
  70.     STDMETHOD(StartPackets) (THIS_
  71. UINT16 unStreamNumber) PURE;
  72.     STDMETHOD(StopPackets) (THIS_
  73. UINT16 unStreamNumber) PURE;
  74. };
  75. /****************************************************************************
  76.  * 
  77.  *  Interface:
  78.  * 
  79.  * IRMARawSinkObject
  80.  * 
  81.  *  Purpose:
  82.  * 
  83.  * Object that receives raw packets from a source
  84.  * 
  85.  *  IID_IRMARawSinkObject:
  86.  * 
  87.  * {00001001-0901-11d1-8B06-00A024406D59}
  88.  * 
  89.  */
  90. DEFINE_GUID(IID_IRMARawSinkObject, 0x00001001, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  91. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  92. #undef  INTERFACE
  93. #define INTERFACE   IRMARawSinkObject
  94. DECLARE_INTERFACE_(IRMARawSinkObject, IUnknown)
  95. {
  96. /*
  97.  * IUnknown methods
  98.  */
  99.     STDMETHOD(QueryInterface) (THIS_
  100. REFIID riid,
  101. void** ppvObj) PURE;
  102.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  103.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  104. /*
  105.  * IRMARawSinkObject methods
  106.  */
  107.     /************************************************************************
  108.      * Method:
  109.      *     IRMARawSinkObject::InitDone
  110.      * Purpose:
  111.      *     Callback after source object has initialized the connection
  112.      */
  113.     STDMETHOD(InitDone) (THIS_
  114. PN_RESULT status) PURE;
  115.     STDMETHOD(FileHeaderReady) (THIS_
  116. PN_RESULT status,
  117. IRMAValues* pHeader) PURE;
  118.     STDMETHOD(StreamHeaderReady) (THIS_
  119. PN_RESULT status,
  120. IRMAValues* pHeader) PURE;
  121.     STDMETHOD(PacketReady) (THIS_
  122. PN_RESULT status,
  123. IRMAPacket* pPacket) PURE;
  124.     STDMETHOD(StreamDone) (THIS_
  125. UINT16 unStreamNumber) PURE;
  126. };
  127. /****************************************************************************
  128.  * 
  129.  *  Interface:
  130.  * 
  131.  * IRMASourceFinderObject
  132.  * 
  133.  *  Purpose:
  134.  * 
  135.  * Object that allows a sink to search for a raw packet source
  136.  * 
  137.  *  IID_IRMASourceFinderObject:
  138.  * 
  139.  * {00001002-0901-11d1-8B06-00A024406D59}
  140.  * 
  141.  */
  142. DEFINE_GUID(IID_IRMASourceFinderObject, 0x00001002, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  143. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  144. #define CLSID_IRMASourceFinderObject IID_IRMASourceFinderObject
  145. #undef  INTERFACE
  146. #define INTERFACE   IRMASourceFinderObject
  147. #define CLSID_IRMASourceFinderObject IID_IRMASourceFinderObject
  148. DECLARE_INTERFACE_(IRMASourceFinderObject, IUnknown)
  149. {
  150. /*
  151.  * IUnknown methods
  152.  */
  153.     STDMETHOD(QueryInterface) (THIS_
  154. REFIID riid,
  155. void** ppvObj) PURE;
  156.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  157.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  158. /*
  159.  * IRMASourceFinderObject methods
  160.  */
  161.     STDMETHOD(Init) (THIS_ 
  162. IUnknown* pUnknown) PURE;
  163.     STDMETHOD(Find) (THIS_
  164. IRMARequest* pRequest) PURE;
  165.     STDMETHOD(Done) (THIS) PURE;
  166. };
  167. /****************************************************************************
  168.  * 
  169.  *  Interface:
  170.  * 
  171.  * IRMASourceFinderResponse
  172.  * 
  173.  *  Purpose:
  174.  * 
  175.  * Object that returns a raw packet source to a sink
  176.  * 
  177.  *  IID_IRMASourceFinderResponse:
  178.  * 
  179.  * {00001003-0901-11d1-8B06-00A024406D59}
  180.  * 
  181.  */
  182. DEFINE_GUID(IID_IRMASourceFinderResponse, 0x00001003, 0x901, 0x11d1,
  183.             0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  184. #undef  INTERFACE
  185. #define INTERFACE   IRMASourceFinderResponse
  186. DECLARE_INTERFACE_(IRMASourceFinderResponse, IUnknown)
  187. {
  188. /*
  189.  * IUnknown methods
  190.  */
  191.     STDMETHOD(QueryInterface) (THIS_
  192. REFIID riid,
  193. void** ppvObj) PURE;
  194.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  195.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  196. /*
  197.  * IRMASourceFinderResponse methods
  198.  */
  199.     STDMETHOD(InitDone) (THIS_
  200. PN_RESULT status) PURE;
  201.     STDMETHOD(FindDone) (THIS_
  202. PN_RESULT status,
  203. IUnknown* pUnknown) PURE;
  204. };
  205. #endif /* _RMASRC_H_ */