📄 rmadtcvt.pas
字号:
unit RmaDtCvt;
interface
uses
PnResult, RmaPckts;
(****************************************************************************
*
* $Id: rmadtcvt.h,v 1.2 2000/05/12 01:26:14 paulm Exp $
*
* Copyright (C) 1995-2000 RealNetworks, Inc. All rights reserved..
*
* http://www.real.com/devzone
*
* This program contains proprietary
* information of Progressive Networks, Inc, and is licensed
* subject to restrictions on use and distribution.
*
*
* RealMedia Architecture Stream Data Conversion Interfaces.
*
*)
(****************************************************************************
*
* Interface:
*
* IRMADataConvertSystemObject
*
* Purpose:
*
* Object that allows Controller to communicate with a specific
* Data Convert plugin session (similar to IRMAFileSystemObject)
*
* Implemented by:
*
* Server side plugin.
*
* IID_IMADataConvertSystemObject:
*
* {00003900-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMADataConvertSystemObject: TGUID = '{00003900-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMADataConvertSystemObject}
type
IRMADataConvertSystemObject = interface (IUnknown)
['{00003900-0901-11d1-8B06-00A024406D59}']
(***********************************************************************
* Method: GetDataConvertInfo
*
* Purpose:
* Returns information needed for proper instantiation of data
* convert plugin. pShortName should be a short, human readable
* name in the form of "company-dcname". For example:
* pShortName = "rn-dataconvert"
*)
function GetDataConvertInfo(var pShortName: PChar): HRESULT; stdcall;
(***********************************************************************
* Method: InitDataConvertSystem
*
* Purpose:
* Pass in options from config file from under DataConvertMount
* for this specific plugin.
*)
function InitDataConvertSystem(pOptions: IRMAValues): HRESULT; stdcall;
(***********************************************************************
* Method: CreateDataConvert
*
* Purpose:
* Purpose:
* System is requesting an IRMADataConvert object for this mount
* point.
*)
function CreateDataConvert(out ppConvObj: IUnknown): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMADataConvertSystemObject}
(****************************************************************************
*
* Interface:
*
* IRMADataConvertResponse
*
* Purpose:
*
* Response object for IRMADataConvert.
*
* Implemented by:
*
* Server Core.
*
* IID_IMADataConvertResponse:
*
* {00003902-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMADataConvertResponse: TGUID = '{00003902-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMADataConvertResponse}
type
IRMADataConvertResponse = interface (IUnknown)
['{00003902-0901-11d1-8B06-00A024406D59}']
(*
* NOTE: for each of ConvertFileHeader, ConvertStreamHeader,
* ConvertData, you can call the appropriate done method on
* the response object with a result of PNR_OK and a NULL buffer
* and the system will use the original header/packet. Do this
* if you aren't going to change things in the header/packet.
*)
(************************************************************************
* Method: DataConvertInitDone
*
* Purpose:
* Async notification that the IRMADataConvert is done with
* intialization.
*)
function DataConvertInitDone(status: PN_RESULT): HRESULT; stdcall;
(************************************************************************
* Method: ConvertedFileHeaderReady
*
* Purpose:
* Async notification that the IRMADataCovert is done converting the
* file header.
*)
function ConvertedFileHeaderReady(status: PN_RESULT; pFileHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: ConvertedStreamHeaderReady
*
* Purpose:
* Async notification that the IRMADataConvert is done converting the
* stream header.
*)
function ConvertedStreamHeaderReady(status: PN_RESULT; pStreamHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: ConvertedDataReady
*
* Purpose:
* Async notification that the IRMADataConvert is done converting
* the stream data packet.
*)
function ConvertedDataReady(status: PN_RESULT; pPacket: IRMAPacket): HRESULT; stdcall;
(************************************************************************
* Method: SendControlBuffer
*
* Purpose:
* Provided to allow IRMADataConvert to send an arbitrary buffer
* to the IRMADataRevert on the other side (player).
*)
function SendControlBuffer(pBuffer: IRMABuffer): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMADataConvertResponse}
(****************************************************************************
*
* Interface:
*
* IRMADataConvert
*
* Purpose:
*
* Per connection object to handle the actual data and header
* conversions.
*
* Implemented by:
*
* Server side plugin.
*
* IID_IMADataConvert:
*
* {00003901-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMADataConvert: TGUID = '{00003901-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMADataConvert}
type
IRMADataConvert = interface (IUnknown)
['{00003901-0901-11d1-8B06-00A024406D59}']
(*
* NOTE: for each of ConvertFileHeader, ConvertStreamHeader,
* ConvertData, you can call the appropriate done method on
* the response object with a result of PNR_OK and a NULL buffer
* and the system will use the original header/packet. Do this
* if you aren't going to change things in the header/packet.
*)
(************************************************************************
* Method: DataConvertInit
*
*Purpose:
* Basic initialization, mainly just to pass in response object.
*)
function DataConvertInit(pResponse: IRMADataConvertResponse): HRESULT; stdcall;
(************************************************************************
* Method: ConvertFileHeader
*
* Purpose:
* Pass in file headers for data conversion.
*)
function ConvertFileHeader(pFileHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: ConvertStreamHeader
*
* Purpose:
* Pass in stream headers for data conversion.
*)
function ConvertStreamHeader(pStreamHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: GetConversionMimeType
*
* Purpose:
* Tell the server what converstion type you are using for the
* session.
*)
function GetConversionMimeType(var pConversionType: PChar): HRESULT; stdcall;
(************************************************************************
* Method: ConvertData
*
* Purpose:
* Pass in data to be converted.
*)
function ConvertData(pPacket: IRMAPacket): HRESULT; stdcall;
(************************************************************************
* Method: ControlBufferReady
*
* Purpose:
* Pass in a control channel buffer sent from the IRMADataRevert
* on the other side (player).
*)
function ControlBufferReady(pBuffer: IRMABuffer): HRESULT; stdcall;
(************************************************************************
* Method: SetMulticastTransportConverter
*
* Purpose:
* In this case the IRMADataConvert is only handling the header
* conversions per player and this call is handing you the data
* converter which is doing the data. This will a different
* instance of the same object.
*)
function SetMulticastTransportConverter(pConverter: IRMADataConvert): HRESULT; stdcall;
(************************************************************************
* Method: AddMulticastControlConverter
*
* Purpose:
* In this case the IRMADataConvert is only handling the data
* conversions for all of the players (but only once because it's
* multicast). This call is handing you one of a possible many
* IRMADataConvert objects which will be handling the header
* conversions.
*)
function AddMulticastControlConverter(pConverter: IRMADataConvert): HRESULT; stdcall;
(************************************************************************
* Method: Done
*
* Purpose:
* Let IRMADataConvert know that it is done. This is mainly to clear
* circular refs between multicast transport and controllers.
*)
function Done: HRESULT; stdcall;
end;
{$EXTERNALSYM IRMADataConvert}
(****************************************************************************
*
* Interface:
*
* IRMADataRevertResponse
*
* Purpose:
*
* Response ojbect for IRMADataRevert.
*
* Implemented by:
*
* Player core.
*
* IID_IMADataRevertResponse:
*
* {00003904-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMADataRevertResponse: TGUID = '{00003904-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMADataRevertResponse}
type
IRMADataRevertResponse = interface (IUnknown)
['{00003904-0901-11d1-8B06-00A024406D59}']
(************************************************************************
* Method: DataRevertInitDone
*
* Purpose:
* Async notification that the IRMADataRevert is done intializing
* and can begin processing headers.
*)
function DataRevertInitDone(status: PN_RESULT): HRESULT; stdcall;
(************************************************************************
* Method: RevertedFileHeaderReady
*
* Purpose:
* Async notification that the IRMADataRevert is done reverting the
* file headers.
*)
function RevertedFileHeaderReady(status: PN_RESULT; pHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: RevertedStreamHeaderReady
*
* Purpose:
* Async notification that the IRMADataRevert is done reverting the
* stream headers.
*)
function RevertedStreamHeaderReady(status: PN_RESULT; pHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: RevertedDataReady
*
* Purpose:
* Async notification that the IRMADataRevert is done reverting the
* stream data.
*)
function RevertedDataReady(status: PN_RESULT; pPacket: IRMAPacket): HRESULT; stdcall;
(************************************************************************
* Method: SendControlBuffer
*
* Purpose:
* Provided to allow IRMADataRevert to send an arbitrary control
* buffer to the IRMADataConvert on the other side (server).
*)
function SendControlBuffer(pBuffer: IRMABuffer): HRESULT; stdcall;
end;
{$EXTERNALSYM IID_IRMADataRevertResponse}
(****************************************************************************
*
* Interface:
*
* IRMADataRevert
*
* Purpose:
*
* Revert data coming from coresponding IRMADataConvert on server.
*
* Implemented by:
*
* Player side plugin.
*
* IID_IMADataRevert:
*
* {00003903-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMADataRevert: TGUID = '{00003903-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMADataRevert}
type
IRMADataRevert = interface (IUnknown)
['{00003903-0901-11d1-8B06-00A024406D59}']
(************************************************************************
* Method: DataRevertInit
*
* Purpose:
* Basic inialization of IRMADataRevert. Mainly just to pass in
* response object.
*)
function DataRevertInit(pResponse: IRMADataRevertResponse): HRESULT; stdcall;
(************************************************************************
* Method: GetDataRevertInfo
*
* Purpose:
* Allow IRMADataRevert to notify player core about which data
* conversion mime types it is willing to handle.
*)
function GetDataRevertInfo(var ppConversionMimeTypes: PChar): HRESULT; stdcall;
(************************************************************************
* Method: RevertFileHeader
*
* Purpose:
* Pass in converted FileHeader to allow IRMADataRevert to revert
* the header.
*)
function RevertFileHeader(pFileHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: RevertStreamHeader
*
* Purpose:
* Pass in converted StreamHeader to allow IRMADataRevert to revert
* the header.
*)
function RevertStreamHeader(pStreamHeader: IRMAValues): HRESULT; stdcall;
(************************************************************************
* Method: RevertData
*
* Purpose:
* Pass in converted stream data to allow IRMADataRevert to
* revert the data.
*)
function RevertData(pPacket: IRMAPacket): HRESULT; stdcall;
(************************************************************************
* Method: ControlBufferReady
*
* Purpose:
* Pass in control channel buffer received from corresponding
* IRMADataConvert on server side.
*)
function ControlBufferReady(pBuffer: IRMABuffer): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMADataRevert}
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -