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

多媒体编程

开发平台:

Visual C++

  1. /****************************************************************************
  2.  * 
  3.  *  $Id: rmaasm.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 Interfaces for Adaptive Stream Management and
  15.  *  Backchannel Support.
  16.  *
  17.  */
  18. #ifndef _RMAASM_H_
  19. #define _RMAASM_H_
  20. /*
  21.  * Forward declarations of some interfaces defined here-in.
  22.  */
  23. typedef _INTERFACE IRMAPacket IRMAPacket;
  24. typedef _INTERFACE IRMABackChannel IRMABackChannel;
  25. typedef _INTERFACE IRMAASMSource IRMAASMSource;
  26. typedef _INTERFACE IRMAASMStreamSink IRMAASMStreamSink;
  27. typedef _INTERFACE IRMAASMStream IRMAASMStream;
  28. /****************************************************************************
  29.  * 
  30.  *  Interface:
  31.  * 
  32.  * IRMABackChannel
  33.  * 
  34.  *  Purpose:
  35.  * 
  36.  *      Backchannel interface to be used by renderers and implemented by
  37.  * FileFormat Plugins
  38.  * 
  39.  *  IID_IRMABackChannel:
  40.  *  
  41.  * {00001500-0901-11d1-8B06-00A024406D59}
  42.  *
  43.  */
  44. DEFINE_GUID(IID_IRMABackChannel, 0x00001500, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  45.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  46. #undef  INTERFACE
  47. #define INTERFACE   IRMABackChannel
  48. DECLARE_INTERFACE_(IRMABackChannel, IUnknown)
  49. {
  50.     /*
  51.      * IUnknown methods
  52.      */
  53.     STDMETHOD(QueryInterface)   (THIS_
  54.                                 REFIID riid,
  55.                                 void** ppvObj) PURE;
  56.     STDMETHOD_(ULONG,AddRef)  (THIS) PURE;
  57.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  58.     /*
  59.      * IRMABackChannel method
  60.      */
  61.     /************************************************************************
  62.      * Method:
  63.      *     IRMABackChannel::PacketReady
  64.      * Purpose:
  65.      *      A back channel packet sent from Renderer to FileFormat plugin.
  66.      */
  67.     STDMETHOD(PacketReady) (THIS_
  68. IRMAPacket* pPacket) PURE;
  69. };
  70. /****************************************************************************
  71.  * 
  72.  *  Interface:
  73.  *
  74.  * IRMAASMSource
  75.  *
  76.  *  Purpose:
  77.  *
  78.  *      This interface is implemented by file formats so that they can
  79.  * act on ASM Subscribe and Unsubscribe actions.
  80.  *
  81.  *  IID_IRMAASMSource:
  82.  *
  83.  * {00001501-0901-11d1-8B06-00A024406D59}
  84.  *
  85.  */
  86. DEFINE_GUID(IID_IRMAASMSource, 0x00001501, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  87.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  88. #undef  INTERFACE
  89. #define INTERFACE   IRMAASMSource
  90. DECLARE_INTERFACE_(IRMAASMSource, IUnknown)
  91. {
  92.     /*
  93.      * IUnknown methods
  94.      */
  95.     STDMETHOD(QueryInterface) (THIS_
  96. REFIID riid,
  97. void** ppvObj) PURE;
  98.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  99.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  100.     /*
  101.      * IRMAASMSource methods
  102.      */
  103.     /************************************************************************
  104.      * Method:
  105.      *     IRMAASMSource::Subscribe
  106.      * Purpose:
  107.      *      Called to inform a file format that a subscription has occurred,
  108.      *     to rule number uRuleNumber, for stream uStreamNumber.
  109.      */
  110.     STDMETHOD(Subscribe) (THIS_
  111. UINT16 uStreamNumber,
  112. UINT16 uRuleNumber) PURE;
  113.     /************************************************************************
  114.      * Method:
  115.      *     IRMAASMSource::Unsubscribe
  116.      * Purpose:
  117.      *      Called to inform a file format that a unsubscription has occurred,
  118.      *     to rule number uRuleNumber, for stream uStreamNumber.
  119.      */
  120.     STDMETHOD(Unsubscribe) (THIS_
  121. UINT16 uStreamNumber,
  122. UINT16 uRuleNumber) PURE;
  123. };
  124. /****************************************************************************
  125.  * 
  126.  *  Interface:
  127.  *
  128.  * IRMAASMStream
  129.  *
  130.  *  Purpose:
  131.  * This interface is implemented by the client core.  Top level clients
  132.  * renderers, etc can query for this interface off of IRMAStream.  This
  133.  * interface allows you to subscribe and unsubscribe to certain rules,
  134.  * and it also allows you to add a advise sink for these events. 
  135.  *
  136.  *  IID_IRMAASMStream:
  137.  *
  138.  * {00001502-0901-11d1-8B06-00A024406D59}
  139.  *
  140.  */
  141. DEFINE_GUID(IID_IRMAASMStream, 0x00001502, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  142.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  143. #undef  INTERFACE
  144. #define INTERFACE   IRMAASMStream
  145. DECLARE_INTERFACE_(IRMAASMStream, IUnknown)
  146. {
  147.     /*
  148.      * IUnknown methods
  149.      */
  150.     STDMETHOD(QueryInterface) (THIS_
  151. REFIID riid,
  152. void** ppvObj) PURE;
  153.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  154.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  155.     /*
  156.      * IRMAASMStream methods
  157.      */
  158.     /************************************************************************
  159.      * Method:
  160.      *     IRMAASMStream::AddASMStreamSink
  161.      * Purpose:
  162.      *     Add an advise sink for getting subscribe and unsubscribe
  163.      *     notifications.
  164.      */
  165.     STDMETHOD(AddStreamSink) (THIS_
  166. IRMAASMStreamSink* pASMStreamSink) PURE;
  167.     /************************************************************************
  168.      * Method:
  169.      *     IRMAASMStream::RemoveStreamSink
  170.      * Purpose:
  171.      *     Remove an advise sink for getting subscribe and unsubscribe
  172.      *     notifications.
  173.      */
  174.     STDMETHOD(RemoveStreamSink) (THIS_
  175. IRMAASMStreamSink* pASMStreamSink) PURE;
  176.     /************************************************************************
  177.      * Method:
  178.      *     IRMAASMStream::Subscribe
  179.      * Purpose:
  180.      *     Called by renderers and possibly even top level clients to
  181.      *     inform the core to subscribe to a particular rule number for
  182.      *     this stream.
  183.      */
  184.     STDMETHOD(Subscribe) (THIS_
  185. UINT16 uRuleNumber) PURE;
  186.     /************************************************************************
  187.      * Method:
  188.      *     IRMAASMStream::Unsubscribe
  189.      * Purpose:
  190.      *     Called by renderers and possibly even top level clients to
  191.      *     inform the core to unsubscribe to a particular rule number for
  192.      *     this stream.
  193.      */
  194.     STDMETHOD (Unsubscribe) (THIS_
  195. UINT16 uRuleNumber) PURE;
  196. };
  197. /****************************************************************************
  198.  * 
  199.  *  Interface:
  200.  *
  201.  * IRMAASMStreamSink
  202.  *
  203.  *  Purpose:
  204.  * This is a advise sink for getting notification about subscriptions
  205.  * and unsubscriptions for a stream.
  206.  *
  207.  *  IID_IRMAASMStream:
  208.  *
  209.  * {00001503-0901-11d1-8B06-00A024406D59}
  210.  *
  211.  */
  212. DEFINE_GUID(IID_IRMAASMStreamSink, 0x00001503, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  213.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  214. #undef  INTERFACE
  215. #define INTERFACE   IRMAASMStreamSink
  216. DECLARE_INTERFACE_(IRMAASMStreamSink, IUnknown)
  217. {
  218.     /*
  219.      * IUnknown methods
  220.      */
  221.     STDMETHOD(QueryInterface) (THIS_
  222. REFIID riid,
  223. void** ppvObj) PURE;
  224.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  225.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  226.     /*
  227.      * IRMAASMStreamSink methods
  228.      */
  229.     /************************************************************************
  230.      * Method:
  231.      *     IRMAASMStreamSink::OnSubscribe
  232.      * Purpose:
  233.      *     Called to inform you that a subscribe has occurred.
  234.      */
  235.     STDMETHOD (OnSubscribe) (THIS_
  236. UINT16 uRuleNumber) PURE;
  237.     /************************************************************************
  238.      * Method:
  239.      *     IRMAASMStreamSink::OnUnsubscribe
  240.      * Purpose:
  241.      *     Called to inform you that a unsubscribe has occurred.
  242.      */
  243.     STDMETHOD (OnUnsubscribe) (THIS_
  244. UINT16 uRuleNumber) PURE;
  245. };
  246. #endif /*_RMAASM_H_*/