hxformt.h

来自「symbian 下的helix player源代码」· C头文件 代码 · 共 1,107 行 · 第 1/3 页

H
1,107
字号
/* ***** BEGIN LICENSE BLOCK *****
 * Source last modified: $Id: hxformt.h,v 1.4.8.3 2004/07/09 01:45:08 hubbe Exp $
 * 
 * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
 * 
 * The contents of this file, and the files included with this file,
 * are subject to the current version of the RealNetworks Public
 * Source License (the "RPSL") available at
 * http://www.helixcommunity.org/content/rpsl unless you have licensed
 * the file under the current version of the RealNetworks Community
 * Source License (the "RCSL") available at
 * http://www.helixcommunity.org/content/rcsl, in which case the RCSL
 * will apply. You may also obtain the license terms directly from
 * RealNetworks.  You may not use this file except in compliance with
 * the RPSL or, if you have a valid RCSL with RealNetworks applicable
 * to this file, the RCSL.  Please see the applicable RPSL or RCSL for
 * the rights, obligations and limitations governing use of the
 * contents of the file.
 * 
 * Alternatively, the contents of this file may be used under the
 * terms of the GNU General Public License Version 2 or later (the
 * "GPL") in which case the provisions of the GPL are applicable
 * instead of those above. If you wish to allow use of your version of
 * this file only under the terms of the GPL, and not to allow others
 * to use your version of this file under the terms of either the RPSL
 * or RCSL, indicate your decision by deleting the provisions above
 * and replace them with the notice and other provisions required by
 * the GPL. If you do not delete the provisions above, a recipient may
 * use your version of this file under the terms of any one of the
 * RPSL, the RCSL or the GPL.
 * 
 * This file is part of the Helix DNA Technology. RealNetworks is the
 * developer of the Original Code and owns the copyrights in the
 * portions it created.
 * 
 * This file, and the files included with this file, is distributed
 * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
 * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
 * ENJOYMENT OR NON-INFRINGEMENT.
 * 
 * Technology Compatibility Kit Test Suite(s) Location:
 *    http://www.helixcommunity.org/content/tck
 * 
 * Contributor(s):
 * 
 * ***** END LICENSE BLOCK ***** */

#ifndef _HXFORMT_H_
#define _HXFORMT_H_

#include "hxfiles.h"

/*
 * Forward declarations of some interfaces defined here-in.
 */
typedef _INTERFACE	IHXFileFormatObject	    IHXFileFormatObject;
typedef _INTERFACE      IHXBroadcastFormatObject   IHXBroadcastFormatObject;
typedef _INTERFACE	IHXFormatResponse       IHXFormatResponse;
typedef _INTERFACE	IHXFormatReuse          IHXFormatReuse;
typedef _INTERFACE	IHXFileObject		    IHXFileObject;
typedef _INTERFACE      IHXNetworkServices	    IHXNetworkServices;
typedef _INTERFACE      IHXPacket                  IHXPacket;
typedef _INTERFACE      IHXValues                  IHXValues;
typedef _INTERFACE	IHXPacketTimeOffsetHandler IHXPacketTimeOffsetHandler;
typedef _INTERFACE	IHXPacketTimeOffsetHandlerResponse
						    IHXPacketTimeOffsetHandlerResponse;
typedef _INTERFACE	IHXLiveFileFormatInfo	    IHXLiveFileFormatInfo;
// $Private:
typedef _INTERFACE	IHXBroadcastLatency	    IHXBroadcastLatency;
typedef _INTERFACE	IHXPayloadFormatObject	    IHXPayloadFormatObject;
typedef _INTERFACE	IHXBlockFormatObject	    IHXBlockFormatObject;
typedef _INTERFACE	IHXFileFormatHeaderAdvise  IHXFileFormatHeaderAdvise;
typedef _INTERFACE	IHXFileFormatHeaderAdviseResponse
						    IHXFileFormatHeaderAdviseResponse;
typedef _INTERFACE	IHXSetPlayParam	    IHXSetPlayParam;
typedef _INTERFACE	IHXSetPlayParamResponse    IHXSetPlayParamResponse;
typedef _INTERFACE	IHXSeekByPacket         IHXSeekByPacket;
typedef _INTERFACE	IHXSeekByPacketResponse    IHXSeekByPacketResponse;
// $EndPrivate.


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXFileFormatObject
 * 
 *  Purpose:
 * 
 *	Object that allows a Controller to communicate with a specific
 *	File Format plug-in session
 * 
 *  IID_IHXFileFormatObject:
 * 
 *	{00000F00-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXFileFormatObject, 0x00000F00, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXFileFormatObject

DECLARE_INTERFACE_(IHXFileFormatObject, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)		(THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)		(THIS) PURE;

    STDMETHOD_(ULONG32,Release)		(THIS) PURE;

    /*
     *	IHXFileFormatObject methods
     */

    /************************************************************************
     *	Method:
     *	    IHXFileFormatObject::GetFileFormatInfo
     *	Purpose:
     *	    Returns information vital to the instantiation of file format 
     *	    plugins.
     */
    STDMETHOD(GetFileFormatInfo)(THIS_
				REF(const char**) /*OUT*/ pFileMimeTypes,
				REF(const char**) /*OUT*/ pFileExtensions,
				REF(const char**) /*OUT*/ pFileOpenNames
				) PURE;

    STDMETHOD(InitFileFormat)	
			(THIS_
		        IHXRequest*		/*IN*/	pRequest, 
			IHXFormatResponse*	/*IN*/	pFormatResponse,
			IHXFileObject*		/*IN*/  pFileObject) PURE;

    STDMETHOD(GetFileHeader)	(THIS) PURE;

    STDMETHOD(GetStreamHeader)	(THIS_
				UINT16 unStreamNumber) PURE;

    STDMETHOD(GetPacket)	(THIS_
				UINT16 unStreamNumber) PURE;

    STDMETHOD(Seek)		(THIS_
				ULONG32 ulOffset) PURE;

    STDMETHOD(Close)		(THIS) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXBroadcastFormatObject
 * 
 *  Purpose:
 * 
 *	Object that allows a Controller to communicate with a specific
 *	Broadcast Format plug-in session
 * 
 *  IID_IHXBroadcastFormatObject:
 * 
 *	{00000F01-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXBroadcastFormatObject, 0x00000F01, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXBroadcastFormatObject

DECLARE_INTERFACE_(IHXBroadcastFormatObject, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)		(THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)		(THIS) PURE;

    STDMETHOD_(ULONG32,Release)		(THIS) PURE;

    /*
     *	IHXBroadcastFormatObject methods
     */

    /************************************************************************
     *	Method:
     *	    IHXBroadcastFormatObject::GetBroadcastFormatInfo
     *	Purpose:
     *	    Returns information vital to the instantiation of broadcast format 
     *	    plugins.
     */
    STDMETHOD(GetBroadcastFormatInfo)(THIS_
				REF(const char*) /*OUT*/ pToken) PURE;

    STDMETHOD(InitBroadcastFormat) (THIS_
				 const char*		/*IN*/	pURL, 
				 IHXFormatResponse*	/*IN*/	pFormatResponse
				) PURE;

    STDMETHOD(GetFileHeader)	(THIS) PURE;

    STDMETHOD(GetStreamHeader)	(THIS_
				UINT16 unStreamNumber) PURE;

    STDMETHOD(StartPackets)	(THIS_
				UINT16 unStreamNumber) PURE;

    STDMETHOD(StopPackets)	(THIS_
				UINT16 unStreamNumber) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXFormatResponse
 * 
 *  Purpose:
 * 
 *	Object that allows a specific File Format Object to communicate 
 *	with its user
 * 
 *  IID_IHXFormatResponse:
 * 
 *	{00000F02-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXFormatResponse, 0x00000F02, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXFormatResponse

DECLARE_INTERFACE_(IHXFormatResponse, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)		(THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)		(THIS) PURE;

    STDMETHOD_(ULONG32,Release)		(THIS) PURE;

    /*
     *	IHXFormatResponse methods
     */
    STDMETHOD(InitDone)			(THIS_
					HX_RESULT	status) PURE;

    STDMETHOD(PacketReady)		(THIS_
					HX_RESULT	status,
					IHXPacket*	pPacket) PURE;

    STDMETHOD(SeekDone)			(THIS_
					HX_RESULT	status) PURE;

    STDMETHOD(FileHeaderReady)		(THIS_
					HX_RESULT	status,
					IHXValues*	pHeader) PURE;

    STDMETHOD(StreamHeaderReady)	(THIS_
					HX_RESULT	status,
					IHXValues*	pHeader) PURE;

    STDMETHOD(StreamDone)		(THIS_
					UINT16		unStreamNumber) PURE;
};

/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXFormatReuse
 * 
 *  Purpose:
 * 
 *  The Controller may reuse a File Format object for multiple sessions.
 *  If the File Format object needs notification that it is being reused
 *  (eg. to reset internal state), this interface may be implemented.  If
 *  implemented, the Controller will only call Reinitialize().  It will
 *  not unsubscribe from any ASM rules explicitly.  If not implemented,
 *  the Controller will assume that unsubscribing from all ASM rules and
 *  seeking to zero is sufficient.
 * 
 *  IID_IHXFormatReuse:
 * 
 *  {e55077c4-a299-11d7-864c-0002b3658720}
 * 
 */
DEFINE_GUID(IID_IHXFormatReuse, 0xe55077c4, 0xa299, 0x11d7, 0x86, 0x4c, 0x0, 
			0x2, 0xb3, 0x65, 0x87, 0x20);

#undef  INTERFACE
#define INTERFACE   IHXFormatReuse

DECLARE_INTERFACE_(IHXFormatReuse, IUnknown)
{
    /* IUnknown methods */
    STDMETHOD(QueryInterface)       (THIS_ REFIID riid, void** ppvObj) PURE;
    STDMETHOD_(ULONG32,AddRef)      (THIS) PURE;
    STDMETHOD_(ULONG32,Release)     (THIS) PURE;

    /* IHXFormatReuse methods */
    STDMETHOD_(BOOL,CanReuse)       (THIS_ IHXRequest* pRequest) PURE;
    STDMETHOD(Reinitialize)         (THIS) PURE;
};

/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXPacketFormat
 * 
 *  Purpose:
 * 
 *	Interface that modifies the behavior of an IHXFileFormat by defining
 *	the packet format it will be creating.
 * 
 *  IID_IHXPacketFormat:
 * 
 *	{00000F03-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXPacketFormat, 0x00000F03, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXPacketFormat

DECLARE_INTERFACE_(IHXPacketFormat, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)		(THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)		(THIS) PURE;

    STDMETHOD_(ULONG32,Release)		(THIS) PURE;

    /*
     *	IHXPacketFormat methods
     */
    STDMETHOD(GetSupportedPacketFormats)			
    					(THIS_
					REF(const char**) pFormats) PURE;

    STDMETHOD(SetPacketFormat)		(THIS_
					const char*	pFormat) PURE;
};

/****************************************************************************

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?