⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rmaformt.pas

📁 Delphi源码REAlRMSDK.rar
💻 PAS
字号:
unit RmaFormt;

interface

uses
  PnResult, PnTypes, RmaFiles, RmaPckts;

(****************************************************************************
 *
 *  $Id: rmaformt.h,v 1.33 2000/04/22 22:39:27 darrens Exp $
 *
 *  Copyright (C) 1995-1999 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 Broadcast Format Plug-in Interfaces.
 *
 *)

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMAFormatResponse
 *
 *  Purpose:
 *
 *	Object that allows a specific File Format Object to communicate
 *	with its user
 *
 *  IID_IRMAFormatResponse:
 *
 *	{00000F02-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAFormatResponse: TGUID = '{00000F02-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAFormatResponse}

type
  IRMAFormatResponse = interface (IUnknown)
  ['{00000F02-0901-11d1-8B06-00A024406D59}']

    function InitDone(status: PN_RESULT): HRESULT; stdcall;

    function PacketReady(status: PN_RESULT; pPacket: IRMAPacket): HRESULT; stdcall;

    function SeekDone(status: PN_RESULT): HRESULT; stdcall;

    function FileHeaderReady(status: PN_RESULT; pHeader: IRMAValues): HRESULT; stdcall;

    function StreamHeaderReady(status: PN_RESULT; pHeader: IRMAValues): HRESULT; stdcall;

    function StreamDone(unStreamNumber: UINT16): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAFormatResponse}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMAFileFormatObject
 *
 *  Purpose:
 *
 *	Object that allows a Controller to communicate with a specific
 *	File Format plug-in session
 *
 *  IID_IRMAFileFormatObject:
 *
 *	{00000F00-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAFileFormatObject: TGUID = '{00000F00-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAFileFormatObject}

type
  IRMAFileFormatObject = interface (IUnknown)
  ['{00000F00-0901-11d1-8B06-00A024406D59}']

    (************************************************************************
     *	Method:
     *	    IRMAFileFormatObject::GetFileFormatInfo
     *	Purpose:
     *	    Returns information vital to the instantiation of file format
     *	    plugins.
     *)

    function GetFileFormatInfo(out pFileMimeTypes, pFileExtensions, pFileOpenNames: PPChar): HRESULT; stdcall;

    function InitFileFormat(pRequest: IRMARequest; pFormatResponse: IRMAFormatResponse;
      pFileObject: IRMAFileObject): HRESULT; stdcall;

    function GetFileHeader: HRESULT; stdcall;

    function GetStreamHeader(unStreamNumber: UINT16): HRESULT; stdcall;

    function GetPacket(unStreamNumber: UINT16): HRESULT; stdcall;

    function Seek(ulOffset: ULONG32): HRESULT; stdcall;

    function Close: HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAFileFormatObject}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMABroadcastFormatObject
 *
 *  Purpose:
 *
 *	Object that allows a Controller to communicate with a specific
 *	Broadcast Format plug-in session
 *
 *  IID_IRMABroadcastFormatObject:
 *
 *	{00000F01-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMABroadcastFormatObject: TGUID = '{00000F01-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMABroadcastFormatObject}

type
  IRMABroadcastFormatObject = interface (IUnknown)
  ['{00000F01-0901-11d1-8B06-00A024406D59}']

    (************************************************************************
     *	Method:
     *	    IRMABroadcastFormatObject::GetBroadcastFormatInfo
     *	Purpose:
     *	    Returns information vital to the instantiation of broadcast format
     *	    plugins.
     *)

    function GetBroadcastFormatInfo(out pToken: PChar): HRESULT; stdcall;

    function InitBroadcastFormat(pURL: PChar; pFormatRespons: IRMAFormatResponse): HRESULT; stdcall;

    function GetFileHeader: HRESULT; stdcall;

    function GetStreamHeader(unStreamNumber: UINT16): HRESULT; stdcall;

    function StartPackets(unStreamNumber: UINT16): HRESULT; stdcall;

    function StopPackets(unStreamNumber: UINT16): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMABroadcastFormatObject}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMAPacketFormat
 *
 *  Purpose:
 *
 *	Interface that modifies the behavior of an IRMAFileFormat by defining
 *	the packet format it will be creating.
 *
 *  IID_IRMAPacketFormat:
 *
 *	{00000F03-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAPacketFormat: TGUID = '{00000F03-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAPacketFormat}

type
  IRMAPacketFormat = interface (IUnknown)
  ['{00000F03-0901-11d1-8B06-00A024406D59}']

    function GetSupportedPacketFormats(out pFormats: PPChar): HRESULT; stdcall;

    function SetPacketFormat(pFormat: PChar): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAPacketFormat}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMAPacketTimeOffsetHandlerResponse
 *
 *  Purpose:
 *
 *	Provides methods for the IRMAPacketTimeOffsetHandler to respond to.
 *
 *  IID_IRMAPacketTimeOffsetHandlerResponse:
 *
 *	{00000F05-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAPacketTimeOffsetHandlerResponse: TGUID = '{00000F05-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAPacketTimeOffsetHandlerResponse}

type
  IRMAPacketTimeOffsetHandlerResponse = interface (IUnknown)
  ['{00000F05-0901-11d1-8B06-00A024406D59}']

    (************************************************************************
     *	Method:
     *	    IRMAPacketTimeOffsetHandler::PacketReady
     *	Purpose:
     *	    Called by IRMAPacketTimeOffsetHandler to pass back the packet
     *      when it is done with it.
     *)

    function TimeOffsetPacketReady(pPacket: IRMAPacket): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAPacketTimeOffsetHandlerResponse}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMAPacketTimeOffsetHandler
 *
 *  Purpose:
 *
 *	Provides methods for handling the changing of a packets timestamp.
 *
 *  IID_IRMAPacketTimeOffsetHandler:
 *
 *	{00000F04-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAPacketTimeOffsetHandler: TGUID = '{00000F04-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAPacketTimeOffsetHandler}

type
  IRMAPacketTimeOffsetHandler = interface (IUnknown)
  ['{00000F04-0901-11d1-8B06-00A024406D59}']

    (************************************************************************
     *	Method:
     *	    IRMAPacketTimeOffsetHandler::Init
     *	Purpose:
     *	    Initialize the IRMAPacketTimeOffsetHandler and set the response.
     *      Implementors should look up the MimeType.
     *)

    function Init(pResponse: IRMAPacketTimeOffsetHandlerResponse; pHeader: IRMAValues;
      pContext: IUnknown): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPacketTimeOffsetHandler::SetTimeOffset
     *	Purpose:
     *	    Called to set the time offset.  Uses a bool and a UINT32 instead
     *      of and INT32 so that the time offset wraps around after 47 days
     *      instead of 24.  bPlus says whether to add or subtract.
     *)

    function SetTimeOffset(ulTimeOffset: UINT32; bPlus: BOOL): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPacketTimeOffsetHandler::HandlePacket
     *	Purpose:
     *	    give the IRMAPacketTimeOffsetHandler a packet to modify for the
     *      time offset.
     *)

    function HandlePacket(pPacket: IRMAPacket): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAPacketTimeOffsetHandler}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMALiveFileFormatInfo
 *
 *  Purpose:
 *
 *	Provides miscellaneous information needed to transmit a live stream.
 *	Optionally implemented by the file format object.
 *
 *  IID_IRMALiveFileFormatInfo:
 *
 *	{00000F06-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMALiveFileFormatInfo: TGUID = '{00000F06-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMALiveFileFormatInfo}

type
  IRMALiveFileFormatInfo = interface (IUnknown)
  ['{00000F06-0901-11d1-8B06-00A024406D59}']

    (************************************************************************
     *	Method:
     *	    IRMALiveFileFormatInfo::VerifyFileCompatibility
     *	Purpose:
     *	    Compares two file headers and returns PNR_OK if these two
     *	    files can be transmitted sequentially in a single live
     *	    presentation.
     *)

    function VerifyFileCompatibility(pFileHeader1, pFileHeader2: IRMAValues): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMALiveFileFormatInfo::VerifyStreamCompatibility
     *	Purpose:
     *	    Compares two stream headers and returns PNR_OK if these two
     *	    streams can be transmitted sequentially in a single live
     *	    presentation.
     *)

    function VerifyStreamCompatibility(pStreamHeader1, pStreamHeader2: IRMAValues): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMALiveFileFormatInfo::IsLiveResendRequired
     *	Purpose:
     *	    Returns TRUE if this stream requires the latest packet to be
     *	    resent periodically in a live presentation.
     *)

    function IsLiveResendRequired(unStreamNumber: UINT16): BOOL; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMALiveFileFormatInfo::GetResendBitrate
     *	Purpose:
     *	    If periodic live resends are required for this stream, this
     *	    method returns the rate at which we should resend packets. The
     *	    resend rate is measured in bits per second.
     *)

    function GetResendBitrate(unStreamNumber: UINT16; var ulBitrate: UINT32): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMALiveFileFormatInfo::GetResendDuration
     *	Purpose:
     *	    If periodic live resends are required for this stream, this
     *	    method returns the number of milliseconds for which this packet
     *	    should be resent.
     *)

    function GetResendDuration(pPacket: IRMAPacket; var ulDuration: UINT32): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMALiveFileFormatInfo::FormResendPacket
     *	Purpose:
     *	    Forms a live resend packet based upon the original packet passed
     *	    as the first parameter. This allows the file format plugin to
     *	    make resend packets distinguishable from original packets.
     *)

    function FormResendPacket(pOriginalPacket: IRMAPacket; out pResendPacket: IRMAPacket): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMALiveFileFormatInfo}

implementation

end.

⌨️ 快捷键说明

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