hxformt.h
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:30k
源码类别:

Symbian

开发平台:

Visual C++

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