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

多媒体编程

开发平台:

Visual C++

  1. /****************************************************************************
  2.  * 
  3.  *  $Id: rmaencod.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 Encoder Interfaces.
  15.  *
  16.  */
  17. #ifndef _RMAENCOD_H_
  18. #define _RMAENCOD_H_
  19. typedef _INTERFACE IUnknown IUnknown;
  20. typedef _INTERFACE IRMAValues IRMAValues;
  21. typedef _INTERFACE IRMAPacket IRMAPacket;
  22. typedef _INTERFACE IRMARequest IRMARequest;
  23. typedef _INTERFACE IRMAEncoder IRMAEncoder;
  24. typedef _INTERFACE IRMAEncoderResponse IRMAEncoderResponse;
  25. typedef _INTERFACE IRMAEncoderCompletion IRMAEncoderCompletion;
  26. typedef _INTERFACE IRMAEncoderResponseCompletion IRMAEncoderResponseCompletion;
  27. typedef _INTERFACE IRMAConnectionlessControl IRMAConnectionlessControl;
  28. typedef _INTERFACE IRMATransportControl IRMATransportControl;
  29. #ifndef _MACINTOSH
  30. STDAPI_(IUnknown*) CreateContext();
  31. #else
  32. #pragma export on
  33. STDAPI_(IUnknown*) CreateContext();
  34. #pragma export off
  35. #endif
  36. DEFINE_GUID(IID_IRMAEncoderResponse,  0x00001600, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  37. #undef INTERFACE
  38. #define INTERFACE IRMAEncoderResponse
  39. DECLARE_INTERFACE_(IRMAEncoderResponse, IUnknown)
  40. {
  41.     /*
  42.      * IUnknown methods
  43.      */
  44.     STDMETHOD(QueryInterface) (THIS_
  45.  REFIID riid,
  46.  void** ppvObj) PURE;
  47.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  48.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  49.     /*
  50.      * IRMAEncoderResponse methods
  51.      */
  52.     STDMETHOD(InitEncoderResponse) (THIS_
  53.     const char* pHost,
  54.     UINT16 unPort, 
  55.     IRMARequest* pRequest,
  56.     const char* pUsername,
  57.     const char* pPassword,
  58.     IRMAEncoder* pEncoder) PURE;
  59.     STDMETHOD(FileHeaderReady)     (THIS_ 
  60.     PN_RESULT   result, 
  61.     IRMAValues* pHeader) PURE;
  62.     STDMETHOD(StreamHeaderReady)   (THIS_ 
  63.     PN_RESULT   result, 
  64.     IRMAValues* pHeader) PURE;
  65.     STDMETHOD(PacketReady)         (THIS_ 
  66.     PN_RESULT   result,
  67.     IRMAPacket* pPacket) PURE;
  68.     STDMETHOD(StreamDone)          (THIS_ 
  69.     UINT16 unStream) PURE;
  70.     STDMETHOD(Process)             (THIS) PURE;
  71.     STDMETHOD_(UINT32,GetTime)     (THIS) PURE;
  72. };
  73. DEFINE_GUID(IID_IRMAEncoder, 0x00001601, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  74. #undef INTERFACE
  75. #define INTERFACE IRMAEncoder
  76. DECLARE_INTERFACE_(IRMAEncoder, IUnknown)
  77. {
  78.     /*
  79.      * IUnknown methods
  80.      */
  81.     STDMETHOD(QueryInterface) (THIS_
  82.  REFIID riid,
  83.  void** ppvObj) PURE;
  84.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  85.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  86.     /*
  87.      * IRMAEncoder methods
  88.      */
  89.     STDMETHOD(InitEncoderResponseDone) (THIS_ 
  90. PN_RESULT result) PURE;
  91.     STDMETHOD(GetFileHeader)           (THIS) PURE;
  92.     STDMETHOD(GetStreamHeader)         (THIS_ 
  93. UINT16 unStream) PURE;
  94.     STDMETHOD(StartPackets)            (THIS_ 
  95. UINT16 unStream) PURE;
  96.     STDMETHOD(StopPackets)             (THIS_ 
  97. UINT16 unStream) PURE;
  98. };
  99. DEFINE_GUID(IID_IRMAEncoderCompletion, 0x00001602, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  100. #undef INTERFACE
  101. #define INTERFACE IRMAEncoderCompletion
  102. DECLARE_INTERFACE_(IRMAEncoderCompletion, IUnknown)
  103. {
  104.     /*
  105.      * IUnknown methods
  106.      */
  107.     STDMETHOD(QueryInterface) (THIS_
  108.  REFIID riid,
  109.  void** ppvObj) PURE;
  110.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  111.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  112.     /*
  113.      * IRMAEncoderCompletion methods
  114.      */
  115.     STDMETHOD(EncoderDone) (THIS_ 
  116.  PN_RESULT result) PURE;
  117. };
  118. DEFINE_GUID(IID_IRMAConnectionlessControl, 0x00001603, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  119. #undef INTERFACE
  120. #define INTERFACE IRMAConnectionlessControl
  121. DECLARE_INTERFACE_(IRMAConnectionlessControl, IUnknown)
  122. {
  123.     /*
  124.      * IUnknown methods
  125.      */
  126.     STDMETHOD(QueryInterface) (THIS_
  127.  REFIID riid,
  128.  void** ppvObj) PURE;
  129.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  130.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  131.     /*
  132.      * IRMAConnectionlessControl methods
  133.      */
  134.     STDMETHOD(EnableConnectionlessControl)
  135. (THIS) PURE;
  136.     STDMETHOD(ConnectionCheckFailed) (THIS_
  137. PN_RESULT status) PURE;
  138.     STDMETHOD(SetConnectionTimeout) (THIS_
  139. UINT32 uSeconds) PURE;
  140. };
  141. DEFINE_GUID(IID_IRMAEncoderResponseCompletion, 0x00001604, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  142. #undef INTERFACE
  143. #define INTERFACE IRMAEncoderResponseCompletion
  144. DECLARE_INTERFACE_(IRMAEncoderResponseCompletion, IUnknown)
  145. {
  146.     /*
  147.      * IUnknown methods
  148.      */
  149.     STDMETHOD(QueryInterface) (THIS_
  150.  REFIID riid,
  151.  void** ppvObj) PURE;
  152.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  153.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  154.     /*
  155.      * IRMAEncoderResponseCompletion methods
  156.      */
  157.     STDMETHOD(EncoderResponseDone) (THIS) PURE;
  158. };
  159. /*
  160.  * The only 2 encoder transport types supported are:
  161.  * "x-pn-tng/udp"
  162.  * "x-pn-tng/tcp"
  163.  */
  164. DEFINE_GUID(IID_IRMATransportControl, 0x00001605, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  165. #undef INTERFACE
  166. #define INTERFACE IRMATransportControl
  167. DECLARE_INTERFACE_(IRMATransportControl, IUnknown)
  168. {
  169.     /*
  170.      * IUnknown methods
  171.      */
  172.     STDMETHOD(QueryInterface) (THIS_
  173.  REFIID riid,
  174.  void** ppvObj) PURE;
  175.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  176.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  177.     /*
  178.      * IRMATransportControl methods
  179.      */
  180.     STDMETHOD(SetTransportType) (const char* pTransportType) PURE;
  181. };
  182. #endif /* _RMAENCOD_H_ */