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

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. #ifndef _HXFORMT_H_
  36. #define _HXFORMT_H_
  37. #include "hxfiles.h"
  38. /*
  39.  * Forward declarations of some interfaces defined here-in.
  40.  */
  41. typedef _INTERFACE IHXFileFormatObject     IHXFileFormatObject;
  42. typedef _INTERFACE      IHXBroadcastFormatObject   IHXBroadcastFormatObject;
  43. typedef _INTERFACE IHXFormatResponse       IHXFormatResponse;
  44. typedef _INTERFACE IHXFormatReuse          IHXFormatReuse;
  45. typedef _INTERFACE IHXFileObject     IHXFileObject;
  46. typedef _INTERFACE      IHXNetworkServices     IHXNetworkServices;
  47. typedef _INTERFACE      IHXPacket                  IHXPacket;
  48. typedef _INTERFACE      IHXValues                  IHXValues;
  49. typedef _INTERFACE IHXPacketTimeOffsetHandler IHXPacketTimeOffsetHandler;
  50. typedef _INTERFACE IHXPacketTimeOffsetHandlerResponse
  51.     IHXPacketTimeOffsetHandlerResponse;
  52. typedef _INTERFACE IHXLiveFileFormatInfo     IHXLiveFileFormatInfo;
  53. // $Private:
  54. typedef _INTERFACE IHXBroadcastLatency     IHXBroadcastLatency;
  55. typedef _INTERFACE IHXPayloadFormatObject     IHXPayloadFormatObject;
  56. typedef _INTERFACE IHXBlockFormatObject     IHXBlockFormatObject;
  57. typedef _INTERFACE IHXFileFormatHeaderAdvise  IHXFileFormatHeaderAdvise;
  58. typedef _INTERFACE IHXFileFormatHeaderAdviseResponse
  59.     IHXFileFormatHeaderAdviseResponse;
  60. typedef _INTERFACE IHXSetPlayParam     IHXSetPlayParam;
  61. typedef _INTERFACE IHXSetPlayParamResponse    IHXSetPlayParamResponse;
  62. typedef _INTERFACE IHXSeekByPacket         IHXSeekByPacket;
  63. typedef _INTERFACE IHXSeekByPacketResponse    IHXSeekByPacketResponse;
  64. // $EndPrivate.
  65. /****************************************************************************
  66.  * 
  67.  *  Interface:
  68.  * 
  69.  * IHXFileFormatObject
  70.  * 
  71.  *  Purpose:
  72.  * 
  73.  * Object that allows a Controller to communicate with a specific
  74.  * File Format plug-in session
  75.  * 
  76.  *  IID_IHXFileFormatObject:
  77.  * 
  78.  * {00000F00-0901-11d1-8B06-00A024406D59}
  79.  * 
  80.  */
  81. DEFINE_GUID(IID_IHXFileFormatObject, 0x00000F00, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  82. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  83. #undef  INTERFACE
  84. #define INTERFACE   IHXFileFormatObject
  85. DECLARE_INTERFACE_(IHXFileFormatObject, IUnknown)
  86. {
  87.     /*
  88.      * IUnknown methods
  89.      */
  90.     STDMETHOD(QueryInterface) (THIS_
  91. REFIID riid,
  92. void** ppvObj) PURE;
  93.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  94.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  95.     /*
  96.      * IHXFileFormatObject methods
  97.      */
  98.     /************************************************************************
  99.      * Method:
  100.      *     IHXFileFormatObject::GetFileFormatInfo
  101.      * Purpose:
  102.      *     Returns information vital to the instantiation of file format 
  103.      *     plugins.
  104.      */
  105.     STDMETHOD(GetFileFormatInfo)(THIS_
  106. REF(const char**) /*OUT*/ pFileMimeTypes,
  107. REF(const char**) /*OUT*/ pFileExtensions,
  108. REF(const char**) /*OUT*/ pFileOpenNames
  109. ) PURE;
  110.     STDMETHOD(InitFileFormat)
  111. (THIS_
  112.         IHXRequest* /*IN*/ pRequest, 
  113. IHXFormatResponse* /*IN*/ pFormatResponse,
  114. IHXFileObject* /*IN*/  pFileObject) PURE;
  115.     STDMETHOD(GetFileHeader) (THIS) PURE;
  116.     STDMETHOD(GetStreamHeader) (THIS_
  117. UINT16 unStreamNumber) PURE;
  118.     STDMETHOD(GetPacket) (THIS_
  119. UINT16 unStreamNumber) PURE;
  120.     STDMETHOD(Seek) (THIS_
  121. ULONG32 ulOffset) PURE;
  122.     STDMETHOD(Close) (THIS) PURE;
  123. };
  124. /****************************************************************************
  125.  * 
  126.  *  Interface:
  127.  * 
  128.  * IHXBroadcastFormatObject
  129.  * 
  130.  *  Purpose:
  131.  * 
  132.  * Object that allows a Controller to communicate with a specific
  133.  * Broadcast Format plug-in session
  134.  * 
  135.  *  IID_IHXBroadcastFormatObject:
  136.  * 
  137.  * {00000F01-0901-11d1-8B06-00A024406D59}
  138.  * 
  139.  */
  140. DEFINE_GUID(IID_IHXBroadcastFormatObject, 0x00000F01, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  141. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  142. #undef  INTERFACE
  143. #define INTERFACE   IHXBroadcastFormatObject
  144. DECLARE_INTERFACE_(IHXBroadcastFormatObject, IUnknown)
  145. {
  146.     /*
  147.      * IUnknown methods
  148.      */
  149.     STDMETHOD(QueryInterface) (THIS_
  150. REFIID riid,
  151. void** ppvObj) PURE;
  152.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  153.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  154.     /*
  155.      * IHXBroadcastFormatObject methods
  156.      */
  157.     /************************************************************************
  158.      * Method:
  159.      *     IHXBroadcastFormatObject::GetBroadcastFormatInfo
  160.      * Purpose:
  161.      *     Returns information vital to the instantiation of broadcast format 
  162.      *     plugins.
  163.      */
  164.     STDMETHOD(GetBroadcastFormatInfo)(THIS_
  165. REF(const char*) /*OUT*/ pToken) PURE;
  166.     STDMETHOD(InitBroadcastFormat) (THIS_
  167.  const char* /*IN*/ pURL, 
  168.  IHXFormatResponse* /*IN*/ pFormatResponse
  169. ) PURE;
  170.     STDMETHOD(GetFileHeader) (THIS) PURE;
  171.     STDMETHOD(GetStreamHeader) (THIS_
  172. UINT16 unStreamNumber) PURE;
  173.     STDMETHOD(StartPackets) (THIS_
  174. UINT16 unStreamNumber) PURE;
  175.     STDMETHOD(StopPackets) (THIS_
  176. UINT16 unStreamNumber) PURE;
  177. };
  178. /****************************************************************************
  179.  * 
  180.  *  Interface:
  181.  * 
  182.  * IHXFormatResponse
  183.  * 
  184.  *  Purpose:
  185.  * 
  186.  * Object that allows a specific File Format Object to communicate 
  187.  * with its user
  188.  * 
  189.  *  IID_IHXFormatResponse:
  190.  * 
  191.  * {00000F02-0901-11d1-8B06-00A024406D59}
  192.  * 
  193.  */
  194. DEFINE_GUID(IID_IHXFormatResponse, 0x00000F02, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  195. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  196. #undef  INTERFACE
  197. #define INTERFACE   IHXFormatResponse
  198. DECLARE_INTERFACE_(IHXFormatResponse, IUnknown)
  199. {
  200.     /*
  201.      * IUnknown methods
  202.      */
  203.     STDMETHOD(QueryInterface) (THIS_
  204. REFIID riid,
  205. void** ppvObj) PURE;
  206.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  207.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  208.     /*
  209.      * IHXFormatResponse methods
  210.      */
  211.     STDMETHOD(InitDone) (THIS_
  212. HX_RESULT status) PURE;
  213.     STDMETHOD(PacketReady) (THIS_
  214. HX_RESULT status,
  215. IHXPacket* pPacket) PURE;
  216.     STDMETHOD(SeekDone) (THIS_
  217. HX_RESULT status) PURE;
  218.     STDMETHOD(FileHeaderReady) (THIS_
  219. HX_RESULT status,
  220. IHXValues* pHeader) PURE;
  221.     STDMETHOD(StreamHeaderReady) (THIS_
  222. HX_RESULT status,
  223. IHXValues* pHeader) PURE;
  224.     STDMETHOD(StreamDone) (THIS_
  225. UINT16 unStreamNumber) PURE;
  226. };
  227. /****************************************************************************
  228.  * 
  229.  *  Interface:
  230.  * 
  231.  * IHXFormatReuse
  232.  * 
  233.  *  Purpose:
  234.  * 
  235.  *  The Controller may reuse a File Format object for multiple sessions.
  236.  *  If the File Format object needs notification that it is being reused
  237.  *  (eg. to reset internal state), this interface may be implemented.  If
  238.  *  implemented, the Controller will only call Reinitialize().  It will
  239.  *  not unsubscribe from any ASM rules explicitly.  If not implemented,
  240.  *  the Controller will assume that unsubscribing from all ASM rules and
  241.  *  seeking to zero is sufficient.
  242.  * 
  243.  *  IID_IHXFormatReuse:
  244.  * 
  245.  *  {e55077c4-a299-11d7-864c-0002b3658720}
  246.  * 
  247.  */
  248. DEFINE_GUID(IID_IHXFormatReuse, 0xe55077c4, 0xa299, 0x11d7, 0x86, 0x4c, 0x0, 
  249. 0x2, 0xb3, 0x65, 0x87, 0x20);
  250. #undef  INTERFACE
  251. #define INTERFACE   IHXFormatReuse
  252. DECLARE_INTERFACE_(IHXFormatReuse, IUnknown)
  253. {
  254.     /* IUnknown methods */
  255.     STDMETHOD(QueryInterface)       (THIS_ REFIID riid, void** ppvObj) PURE;
  256.     STDMETHOD_(ULONG32,AddRef)      (THIS) PURE;
  257.     STDMETHOD_(ULONG32,Release)     (THIS) PURE;
  258.     /* IHXFormatReuse methods */
  259.     STDMETHOD_(BOOL,CanReuse)       (THIS_ IHXRequest* pRequest) PURE;
  260.     STDMETHOD(Reinitialize)         (THIS) PURE;
  261. };
  262. /****************************************************************************
  263.  * 
  264.  *  Interface:
  265.  * 
  266.  * IHXPacketFormat
  267.  * 
  268.  *  Purpose:
  269.  * 
  270.  * Interface that modifies the behavior of an IHXFileFormat by defining
  271.  * the packet format it will be creating.
  272.  * 
  273.  *  IID_IHXPacketFormat:
  274.  * 
  275.  * {00000F03-0901-11d1-8B06-00A024406D59}
  276.  * 
  277.  */
  278. DEFINE_GUID(IID_IHXPacketFormat, 0x00000F03, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  279. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  280. #undef  INTERFACE
  281. #define INTERFACE   IHXPacketFormat
  282. DECLARE_INTERFACE_(IHXPacketFormat, IUnknown)
  283. {
  284.     /*
  285.      * IUnknown methods
  286.      */
  287.     STDMETHOD(QueryInterface) (THIS_
  288. REFIID riid,
  289. void** ppvObj) PURE;
  290.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  291.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  292.     /*
  293.      * IHXPacketFormat methods
  294.      */
  295.     STDMETHOD(GetSupportedPacketFormats)
  296.      (THIS_
  297. REF(const char**) pFormats) PURE;
  298.     STDMETHOD(SetPacketFormat) (THIS_
  299. const char* pFormat) PURE;
  300. };
  301. /****************************************************************************
  302.  * 
  303.  *  Interface:
  304.  * 
  305.  * IHXPacketTimeOffsetHandler
  306.  * 
  307.  *  Purpose:
  308.  * 
  309.  * Provides methods for handling the changing of a packets timestamp.
  310.  * 
  311.  *  IID_IHXPacketTimeOffsetHandler:
  312.  * 
  313.  * {00000F04-0901-11d1-8B06-00A024406D59}
  314.  * 
  315.  */
  316. DEFINE_GUID(IID_IHXPacketTimeOffsetHandler, 0x00000F04, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  317. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  318. DECLARE_INTERFACE_(IHXPacketTimeOffsetHandler, IUnknown)
  319. {
  320.     /*
  321.      * IUnknown methods
  322.      */
  323.     STDMETHOD(QueryInterface) (THIS_
  324. REFIID riid,
  325. void** ppvObj) PURE;
  326.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  327.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  328.     /*
  329.      * IHXPacketTimeOffsetHandler methods
  330.      */
  331.     /************************************************************************
  332.      * Method:
  333.      *     IHXPacketTimeOffsetHandler::Init
  334.      * Purpose:
  335.      *     Initialize the IHXPacketTimeOffsetHandler and set the response.
  336.      *      Implementors should look up the MimeType.
  337.      */
  338.     STDMETHOD(Init) (THIS_
  339. IHXPacketTimeOffsetHandlerResponse* pResponse,
  340. IHXValues* pHeader,
  341. IUnknown* pContext) PURE;
  342.     /************************************************************************
  343.      * Method:
  344.      *     IHXPacketTimeOffsetHandler::SetTimeOffset
  345.      * Purpose:
  346.      *     Called to set the time offset.  Uses a bool and a UINT32 instead
  347.      *      of and INT32 so that the time offset wraps around after 47 days
  348.      *      instead of 24.  bPlus says whether to add or subtract.
  349.      */
  350.     STDMETHOD(SetTimeOffset) (THIS_
  351. UINT32 ulTimeOffset,
  352. BOOL bPlus) PURE;
  353.     /************************************************************************
  354.      * Method:
  355.      *     IHXPacketTimeOffsetHandler::HandlePacket
  356.      * Purpose:
  357.      *     give the IHXPacketTimeOffsetHandler a packet to modify for the
  358.      *      time offset.
  359.      */
  360.     STDMETHOD(HandlePacket) (THIS_
  361. IHXPacket* pPacket) PURE;
  362. };
  363. /****************************************************************************
  364.  * 
  365.  *  Interface:
  366.  * 
  367.  * IHXPacketTimeOffsetHandlerResponse
  368.  * 
  369.  *  Purpose:
  370.  * 
  371.  * Provides methods for the IHXPacketTimeOffsetHandler to respond to.
  372.  * 
  373.  *  IID_IHXPacketTimeOffsetHandlerResponse:
  374.  * 
  375.  * {00000F05-0901-11d1-8B06-00A024406D59}
  376.  * 
  377.  */
  378. DEFINE_GUID(IID_IHXPacketTimeOffsetHandlerResponse, 0x00000F05, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  379. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  380. DECLARE_INTERFACE_(IHXPacketTimeOffsetHandlerResponse, IUnknown)
  381. {
  382.     /*
  383.      * IUnknown methods
  384.      */
  385.     STDMETHOD(QueryInterface) (THIS_
  386. REFIID riid,
  387. void** ppvObj) PURE;
  388.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  389.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  390.     /*
  391.      * IHXPacketTimeOffsetHandler methods
  392.      */
  393.     /************************************************************************
  394.      * Method:
  395.      *     IHXPacketTimeOffsetHandler::PacketReady
  396.      * Purpose:
  397.      *     Called by IHXPacketTimeOffsetHandler to pass back the packet 
  398.      *      when it is done with it.
  399.      */
  400.     STDMETHOD(TimeOffsetPacketReady) (THIS_
  401. IHXPacket* pPacket) PURE;
  402. };
  403. /****************************************************************************
  404.  * 
  405.  *  Interface:
  406.  * 
  407.  * IHXLiveFileFormatInfo
  408.  * 
  409.  *  Purpose:
  410.  * 
  411.  * Provides miscellaneous information needed to transmit a live stream.
  412.  * Optionally implemented by the file format object.
  413.  * 
  414.  *  IID_IHXLiveFileFormatInfo:
  415.  * 
  416.  * {00000F06-0901-11d1-8B06-00A024406D59}
  417.  * 
  418.  */
  419. DEFINE_GUID(IID_IHXLiveFileFormatInfo, 0x00000F06, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  420. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  421. #undef  INTERFACE
  422. #define INTERFACE   IHXLiveFileFormatInfo
  423. DECLARE_INTERFACE_(IHXLiveFileFormatInfo, IUnknown)
  424. {
  425.     /*
  426.      * IUnknown methods
  427.      */
  428.     STDMETHOD(QueryInterface) (THIS_
  429. REFIID riid,
  430. void** ppvObj) PURE;
  431.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  432.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  433.     /*
  434.      * IHXLiveFileFormatInfo methods
  435.      */
  436.     /************************************************************************
  437.      * Method:
  438.      *     IHXLiveFileFormatInfo::VerifyFileCompatibility
  439.      * Purpose:
  440.      *     Compares two file headers and returns HXR_OK if these two 
  441.      *     files can be transmitted sequentially in a single live 
  442.      *     presentation.
  443.      */
  444.     STDMETHOD(VerifyFileCompatibility)     (THIS_
  445.     IHXValues* pFileHeader1,
  446.     IHXValues* pFileHeader2) PURE;
  447.     /************************************************************************
  448.      * Method:
  449.      *     IHXLiveFileFormatInfo::VerifyStreamCompatibility
  450.      * Purpose:
  451.      *     Compares two stream headers and returns HXR_OK if these two  
  452.      *     streams can be transmitted sequentially in a single live 
  453.      *     presentation.
  454.      */
  455.     STDMETHOD(VerifyStreamCompatibility)    (THIS_
  456.     IHXValues* pStreamHeader1,
  457.     IHXValues* pStreamHeader2) PURE;
  458.     /************************************************************************
  459.      * Method:
  460.      *     IHXLiveFileFormatInfo::IsLiveResendRequired
  461.      * Purpose:
  462.      *     Returns TRUE if this stream requires the latest packet to be
  463.      *     resent periodically in a live presentation.
  464.      */
  465.     STDMETHOD_(BOOL,IsLiveResendRequired)   (THIS_
  466.     UINT16 unStreamNumber) PURE;
  467.     /************************************************************************
  468.      * Method:
  469.      *     IHXLiveFileFormatInfo::GetResendBitrate
  470.      * Purpose:
  471.      *     If periodic live resends are required for this stream, this
  472.      *     method returns the rate at which we should resend packets. The 
  473.      *     resend rate is measured in bits per second.
  474.      */
  475.     STDMETHOD(GetResendBitrate)     (THIS_
  476.     UINT16 unStreamNumber,
  477.     REF(UINT32) ulBitrate) PURE;
  478.     /************************************************************************
  479.      * Method:
  480.      *     IHXLiveFileFormatInfo::GetResendDuration
  481.      * Purpose:
  482.      *     If periodic live resends are required for this stream, this
  483.      *     method returns the number of milliseconds for which this packet 
  484.      *     should be resent.
  485.      */
  486.     STDMETHOD(GetResendDuration)     (THIS_
  487.     IHXPacket* pPacket,
  488.     REF(UINT32) ulDuration) PURE;
  489.     /************************************************************************
  490.      * Method:
  491.      *     IHXLiveFileFormatInfo::FormResendPacket
  492.      * Purpose:
  493.      *     Forms a live resend packet based upon the original packet passed
  494.      *     as the first parameter. This allows the file format plugin to
  495.      *     make resend packets distinguishable from original packets.
  496.      */
  497.     STDMETHOD(FormResendPacket) (THIS_
  498. IHXPacket* pOriginalPacket,
  499. REF(IHXPacket*) pResendPacket) PURE;
  500. };
  501. /****************************************************************************
  502.  * 
  503.  *  Interface:
  504.  * 
  505.  * IHXSyncFileFormatObject
  506.  * 
  507.  *  Purpose:
  508.  * 
  509.  * Simple syncronized file format interface
  510.  * 
  511.  *  IID_IHXSyncFileFormatObject:
  512.  * 
  513.  * {00000F0C-0901-11d1-8B06-00A024406D59}
  514.  * 
  515.  */
  516. DEFINE_GUID(IID_IHXSyncFileFormatObject, 0x00000F0C, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  517. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  518. #define CLSID_IHXSyncFileFormatObject IID_IHXSyncFileFormatObject
  519. #undef  INTERFACE
  520. #define INTERFACE   IHXSyncFileFormatObject
  521. DECLARE_INTERFACE_(IHXSyncFileFormatObject, IUnknown)
  522. {
  523.     /*
  524.      * IUnknown methods
  525.      */
  526.     STDMETHOD(QueryInterface) (THIS_
  527. REFIID riid,
  528. void** ppvObj) PURE;
  529.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  530.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  531.     /*
  532.      * IHXSyncFileFormatObject methods
  533.      */
  534.     STDMETHOD(GetFileFormatInfo) (THIS_
  535. REF(const char**) /*OUT*/ pFileMimeTypes,
  536. REF(const char**) /*OUT*/ pFileExtensions,
  537. REF(const char**) /*OUT*/ pFileOpenNames
  538. ) PURE;
  539.     STDMETHOD(InitFileFormat)
  540. (THIS_
  541. IHXRequest* /*IN*/ pRequest) PURE;
  542.     STDMETHOD(GetFileHeader) (THIS_ 
  543. REF(IHXValues*) /*OUT*/ pHeader) PURE;
  544.     STDMETHOD(GetStreamHeader) (THIS_ 
  545. REF(IHXValues*) /*OUT*/ pStreamHeader,
  546. UINT16          /*IN*/  unStreamNumber) PURE;
  547.     STDMETHOD(GetPacket) (THIS_ 
  548. REF(IHXPacket*) /*OUT*/ pPacket) PURE;
  549.     STDMETHOD(Seek) (THIS_
  550. ULONG32 /*IN*/ ulSeekTime) PURE;
  551.     
  552.     STDMETHOD(Close) (THIS) PURE;
  553. };
  554. // $Private:
  555. /****************************************************************************
  556.  * 
  557.  *  Interface:
  558.  * 
  559.  * IHXBroadcastLatency
  560.  * 
  561.  *  Purpose:
  562.  * 
  563.  * Provides information on latency requirements of broadcast streams.
  564.  * Optionally implemented by the broadcast format objec.
  565.  * 
  566.  *  IID_IHXBroadcastLatency:
  567.  * 
  568.  * {00000F08-0901-11d1-8B06-00A024406D59}
  569.  * 
  570.  */
  571. DEFINE_GUID(IID_IHXBroadcastLatency, 0x00000F08, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  572. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  573. #undef  INTERFACE
  574. #define INTERFACE   IHXBroadcastLatency
  575. DECLARE_INTERFACE_(IHXBroadcastLatency, IUnknown)
  576. {
  577.     /*
  578.      * IUnknown methods
  579.      */
  580.     STDMETHOD(QueryInterface) (THIS_
  581. REFIID riid,
  582. void** ppvObj) PURE;
  583.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  584.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  585.     /*
  586.      * IHXBroadcastLatency methods
  587.      */
  588.     /************************************************************************
  589.      * Method:
  590.      *     IHXBroadcastLatency::GetLatencyRequirements
  591.      * Purpose:
  592.      *     Get latency reqruirements from broadcast format object.
  593.      *
  594.      *     ulBackOff: the amount of time in mS that packet flow from
  595.      *      the broadcast format object should backoff when no data is available.
  596.      *
  597.      *     bUsePreBuffer: TRUE means that there will be some realtime latency
  598.      *      between the packets sent to clients at time now, and the live packets
  599.      *      that are available at time now. FALSE means there will be no realtime 
  600.      *      latency.
  601.      */
  602.     STDMETHOD(GetLatencyRequirements)     (THIS_
  603.     REF(UINT32) ulBackoff,
  604.     REF(BOOL)   bUsePreBuffer) PURE;
  605. };
  606. /****************************************************************************
  607.  * 
  608.  *  Interface:
  609.  * 
  610.  * IHXPayloadFormatObject
  611.  * 
  612.  *  Purpose:
  613.  * 
  614.  * Object that knows how to properly convert data into a particular
  615.  * payload format
  616.  * 
  617.  *  IID_IHXPayloadFormatObject:
  618.  * 
  619.  * {00000F07-0901-11d1-8B06-00A024406D59}
  620.  * 
  621.  */
  622. DEFINE_GUID(IID_IHXPayloadFormatObject, 0x00000F07, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  623. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  624. #undef  INTERFACE
  625. #define INTERFACE   IHXPayloadFormatObject
  626. DECLARE_INTERFACE_(IHXPayloadFormatObject, IUnknown)
  627. {
  628.     /*
  629.      * IUnknown methods
  630.      */
  631.     STDMETHOD(QueryInterface) (THIS_
  632. REFIID riid,
  633. void** ppvObj) PURE;
  634.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  635.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  636.     /*
  637.      * IHXPayloadFormatObject methods
  638.      */
  639.     STDMETHOD(Init) (THIS_
  640. IUnknown* pContext,
  641. BOOL bPacketize) PURE;
  642.     STDMETHOD(Close) (THIS) PURE;
  643.     STDMETHOD(Reset) (THIS) PURE;
  644.     STDMETHOD(SetStreamHeader) (THIS_
  645. IHXValues* pHeader) PURE;
  646.     STDMETHOD(GetStreamHeader) (THIS_
  647. REF(IHXValues*) pHeader) PURE;
  648.     STDMETHOD(SetPacket) (THIS_
  649. IHXPacket* pPacket) PURE;
  650.     STDMETHOD(GetPacket) (THIS_
  651. REF(IHXPacket*) pPacket) PURE;
  652.     STDMETHOD(Flush) (THIS) PURE;
  653. };
  654. // $EndPrivate.
  655. // $Private:
  656. /****************************************************************************
  657.  * 
  658.  *  Interface:
  659.  * 
  660.  * IHXBlockFormatObject
  661.  * 
  662.  *  Purpose:
  663.  * 
  664.  * Object that knows how to properly convert data into a particular
  665.  * payload format
  666.  * 
  667.  *  IID_IHXBlockFormatObject:
  668.  * 
  669.  * {00000F08-0901-11d1-8B06-00A024406D59}
  670.  * 
  671.  */
  672. DEFINE_GUID(IID_IHXBlockFormatObject, 0x00000F09, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  673. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  674. #undef  INTERFACE
  675. #define INTERFACE   IHXBlockFormatObject
  676. DECLARE_INTERFACE_(IHXBlockFormatObject, IUnknown)
  677. {
  678.     /*
  679.      * IUnknown methods
  680.      */
  681.     STDMETHOD(QueryInterface) (THIS_
  682. REFIID riid,
  683. void** ppvObj) PURE;
  684.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  685.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  686.     /*
  687.      * IHXBlockFormatObject methods
  688.      */
  689.     STDMETHOD(SetByteRange) (THIS_
  690.                                 UINT64    ulFrom,
  691.                                 UINT64    ulTo) PURE;
  692. };
  693. typedef enum _HX_CLIENT_MESSAGE_TYPE
  694. {
  695.     CM_RTSP_UNKNOWN,
  696.     CM_RTSP_OPTIONS,
  697.     CM_RTSP_DESCRIBE,
  698.     CM_RTSP_ANNOUNCE,
  699.     CM_RTSP_SETUP,
  700.     CM_RTSP_PLAY,
  701.     CM_RTSP_PAUSE,
  702.     CM_RTSP_TEARDOWN,
  703.     CM_RTSP_GET_PARAMETER,
  704.     CM_RTSP_SET_PARAMETER,
  705.     CM_RTSP_REDIRECT,
  706.     CM_RTSP_RECORD
  707. } HX_CLIENT_MESSAGE_TYPE;
  708. /****************************************************************************
  709.  * 
  710.  *  Interface:
  711.  * 
  712.  * IHXFileFormatHeaderAdvise
  713.  * 
  714.  *  Purpose:
  715.  * 
  716.  * File format wants notification when headers arrive from client.
  717.  * 
  718.  *  IID_IHXFileFormatHeaderAdvise:
  719.  * 
  720.  * {00000F0A-0901-11d1-8B06-00A024406D59}
  721.  * 
  722.  */
  723. DEFINE_GUID(IID_IHXFileFormatHeaderAdvise, 0x00000F0A, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  724. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  725. #undef  INTERFACE
  726. #define INTERFACE   IHXFileFormatHeaderAdvise
  727. DECLARE_INTERFACE_(IHXFileFormatHeaderAdvise, IUnknown)
  728. {
  729.     /*
  730.      * IUnknown methods
  731.      */
  732.     STDMETHOD(QueryInterface) (THIS_
  733. REFIID riid,
  734. void** ppvObj) PURE;
  735.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  736.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  737.     /*
  738.      * IHXFileFormatHeaderAdvise methods
  739.      *
  740.      *  Only implemented for SETUP, other messages may be added later.
  741.      */
  742.     STDMETHOD(OnHeaders) (THIS_
  743.  HX_CLIENT_MESSAGE_TYPE pMessageType,
  744.  IHXValues* pRequestHeaders,
  745.  IHXFileFormatHeaderAdviseResponse* pResp
  746. ) PURE;
  747. };
  748. /****************************************************************************
  749.  * 
  750.  *  Interface:
  751.  * 
  752.  * IHXFileFormatHeaderAdviseResponse
  753.  * 
  754.  *  Purpose:
  755.  * 
  756.  * Response for RTSP header advise.
  757.  * 
  758.  *  IID_IHXFileFormatHeaderAdviseResponse:
  759.  * 
  760.  * {00000F0B-0901-11d1-8B06-00A024406D59}
  761.  * 
  762.  */
  763. DEFINE_GUID(IID_IHXFileFormatHeaderAdviseResponse, 0x00000F0B, 0x901, 0x11d1, 
  764.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  765. #undef  INTERFACE
  766. #define INTERFACE   IHXFileFormatHeaderAdviseResponse
  767. DECLARE_INTERFACE_(IHXFileFormatHeaderAdviseResponse, IUnknown)
  768. {
  769.     /*
  770.      * IUnknown methods
  771.      */
  772.     STDMETHOD(QueryInterface) (THIS_
  773. REFIID riid,
  774. void** ppvObj) PURE;
  775.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  776.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  777.     /*
  778.      * IHXFileFormatHeaderAdviseResponse methods
  779.      *
  780.      *  If file format returns error in status, server will disconnect 
  781.      *  from client.  Optional RTSP error code will be returned to client, 
  782.      *  if non-zero; else 461 will be used.
  783.      */
  784.     STDMETHOD(OnHeadersDone) (THIS_
  785.  HX_RESULT status,
  786.  UINT32 ulErrNo) PURE;
  787. };
  788. typedef enum _HX_PLAY_PARAM
  789. {
  790.     HX_PLAYPARAM_SCALE  // cast ulValues to FIXED32 and use macro
  791. } HX_PLAY_PARAM;
  792. /****************************************************************************
  793.  * 
  794.  *  Interface:
  795.  * 
  796.  * IHXSetPlayParam
  797.  * 
  798.  *  Purpose:
  799.  *
  800.  *
  801.  * 
  802.  *  IID_IHXSetPlayParam:
  803.  * 
  804.  *      {0x503c212c-413f-478b-9fc8daa7b145b8a9}
  805.  * 
  806.  */
  807. DEFINE_GUID(IID_IHXSetPlayParam,     
  808.     0x503c212c, 0x413f, 0x478b, 0x9f, 0xc8, 0xda, 0xa7, 0xb1, 0x45, 0xb8, 0xa9);
  809. #undef  INTERFACE
  810. #define INTERFACE   IHXSetPlayParam
  811. DECLARE_INTERFACE_(IHXSetPlayParam, IUnknown)
  812. {
  813.     /*
  814.      * IUnknown methods
  815.      */
  816.     STDMETHOD(QueryInterface) (THIS_
  817. REFIID riid,
  818. void** ppvObj) PURE;
  819.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  820.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  821.     /*
  822.      * IHXSetPlayParam methods
  823.      */
  824.     STDMETHOD(SetParam) (THIS_ 
  825. HX_PLAY_PARAM param,
  826.      UINT32 ulValue,
  827.      IHXSetPlayParamResponse* pResp) PURE;
  828. };
  829. /****************************************************************************
  830.  * 
  831.  *  Interface:
  832.  * 
  833.  * IHXSetPlayParamResponse
  834.  * 
  835.  *  Purpose:
  836.  * 
  837.  *     
  838.  * 
  839.  *  IID_IHXSetPlayParamResponse:
  840.  * 
  841.  *      {0x750008af-5588-4838-85faaa203a32c799}
  842.  * 
  843.  */
  844. DEFINE_GUID(IID_IHXSetPlayParamResponse,   
  845.     0x750008af, 0x5588, 0x4838, 0x85, 0xfa, 0xaa, 0x20, 0x3a, 0x32, 0xc7, 0x99);
  846. #undef  INTERFACE
  847. #define INTERFACE   IHXSetPlayParamResponse
  848. DECLARE_INTERFACE_(IHXSetPlayParamResponse, IUnknown)
  849. {
  850.     /*
  851.      * IUnknown methods
  852.      */
  853.     STDMETHOD(QueryInterface) (THIS_
  854. REFIID riid,
  855. void** ppvObj) PURE;
  856.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  857.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  858.     /*
  859.      * IHXSetPlayParamResponse methods
  860.      */
  861.     STDMETHOD(SetParamDone) (THIS_ 
  862. HX_RESULT status,
  863. HX_PLAY_PARAM param,
  864.      UINT32 ulValue) PURE;
  865. };
  866. /****************************************************************************
  867.  * 
  868.  *  Interface:
  869.  * 
  870.  *     IHXSeekByPacket
  871.  * 
  872.  *  Purpose:
  873.  *     
  874.  *     
  875.  * 
  876.  *  IID_IHXSeekByPacket:
  877.  * 
  878.  *      {0x171c3c4e-c4ea-46fd-b47b-c3b82dbb9517}
  879.  * 
  880.  */
  881. DEFINE_GUID(IID_IHXSeekByPacket,          
  882.     0x171c3c4e, 0xc4ea, 0x46fd, 0xb4, 0x7b, 0xc3, 0xb8, 0x2d, 0xbb, 0x95, 0x17);
  883. #undef  INTERFACE
  884. #define INTERFACE   IHXSeekByPacket
  885. DECLARE_INTERFACE_(IHXSeekByPacket, IUnknown)
  886. {
  887.     /*
  888.      * IUnknown methods
  889.      */
  890.     STDMETHOD(QueryInterface)          (THIS_
  891.                                        REFIID riid,
  892.                                        void** ppvObj) PURE;
  893.     STDMETHOD_(ULONG32,AddRef)         (THIS) PURE;
  894.     STDMETHOD_(ULONG32,Release)                (THIS) PURE;
  895.     /*
  896.      * IHXSeekByPacket methods
  897.      */
  898.     STDMETHOD(SeekToPacket)            (THIS_ 
  899.                                        UINT32 ulPacketNumber,
  900.                                        IHXSeekByPacketResponse* pResp) PURE;
  901. };
  902. /****************************************************************************
  903.  * 
  904.  *  Interface:
  905.  * 
  906.  *     IHXSeekByPacketResponse
  907.  * 
  908.  *  Purpose:
  909.  * 
  910.  *         
  911.  * 
  912.  *  IID_IHXSeekByPacketResponse:
  913.  * 
  914.  *      {0xe978476d-6c99-4dc6-9279-7525c693dc34}
  915.  * 
  916.  */
  917. DEFINE_GUID(IID_IIHXSeekByPacketResponse,   
  918.     0xe978476d, 0x6c99, 0x4dc6, 0x92, 0x79, 0x75, 0x25, 0xc6, 0x93, 0xdc, 0x34);
  919. #undef  INTERFACE
  920. #define INTERFACE   IHXSeekByPacketResponse
  921. DECLARE_INTERFACE_(IHXSeekByPacketResponse, IUnknown)
  922. {
  923.     /*
  924.      * IUnknown methods
  925.      */
  926.     STDMETHOD(QueryInterface)          (THIS_
  927.                                        REFIID riid,
  928.                                        void** ppvObj) PURE;
  929.     STDMETHOD_(ULONG32,AddRef)         (THIS) PURE;
  930.     STDMETHOD_(ULONG32,Release)                (THIS) PURE;
  931.     /*
  932.      * IHXSeekByPacketResponse methods
  933.      */
  934.     STDMETHOD(SeekToPacketDone)                (THIS_ 
  935.                                        HX_RESULT status,
  936.                                        UINT32 ulStartingTimestamp) PURE;
  937.  };
  938. // $EndPrivate.
  939. #endif  /* _HXFORMT_H_ */