📄 rmacore.pas
字号:
unit RmaCore;
interface
uses
PnResult, PnTypes, PnWinTyp, RmaClSnk, RmaFiles, RmaPckts;
(****************************************************************************
*
* $Id: rmacore.h,v 1.75 2000/04/04 21:37:39 ping 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.
*
*
* Client Core interfaces
*
*)
(****************************************************************************
*
* Interface:
*
* IRMAClientEngine
*
* Purpose:
*
* Interface to the basic client engine. Provided to the renderers and
* other client side components.
*
* IID_IRMAClientEngine:
*
* {00000403-0901-11d1-8B06-00A024406D59}
*)
const
IID_IRMAClientEngine: TGUID = '{00000403-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAClientEngine}
const
IID_IRMAPlayer: TGUID = '{00000402-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAPlayer}
type
IRmaPlayer = interface; // forward
IRMAClientEngine = interface (IUnknown)
['{00000403-0901-11d1-8B06-00A024406D59}']
(************************************************************************
* Method:
* IRMAClientEngine::CreatePlayer
* Purpose:
* Creates a new IRMAPlayer instance.
*
*)
function CreatePlayer(out pPlayer: IRMAPlayer): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAClientEngine::ClosePlayer
* Purpose:
* Called by the client when it is done using the player...
*
*)
function ClosePlayer(pPlayer: IRMAPlayer): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAClientEngine::GetPlayerCount
* Purpose:
* Returns the current number of IRMAPlayer instances supported by
* this client engine instance.
*)
function GetPlayerCount: UINT16; stdcall;
(************************************************************************
* Method:
* IRMAClientEngine::GetPlayer
* Purpose:
* Returns the Nth IRMAPlayer instances supported by this client
* engine instance.
*)
function GetPlayer(nPlayerNumber: UINT16; out pUnknown: IUnknown): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAClientEngine::EventOccurred
* Purpose:
* Clients call this to pass OS events to all players. PNxEvent
* defines a cross-platform event.
*)
function EventOccurred(const pEvent: PNxEvent): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAClientEngine}
(****************************************************************************
*
* Interface:
*
* IRMAPlayer
*
* Purpose:
*
* Interface provided by the client engine to the renderers. This
* interface allows access to player related information, properties,
* and operations.
*
* IID_IRMAPlayer:
*
* {00000402-0901-11d1-8B06-00A024406D59}
*
*)
//const
// IID_IRMAPlayer: TGUID = '{00000402-0901-11d1-8B06-00A024406D59}';
// {$EXTERNALSYM IID_IRMAPlayer}
//type
IRMAPlayer = interface (IUnknown)
['{00000402-0901-11d1-8B06-00A024406D59}']
(************************************************************************
* Method:
* IRMAPlayer::GetClientEngine
* Purpose:
* Get the interface to the client engine object of which the
* player is a part of.
*
*)
function GetClientEngine(out pEngine: IRMAClientEngine): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::IsDone
* Purpose:
* Ask the player if it is done with the current presentation
*
*)
function IsDone: BOOL; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::IsLive
* Purpose:
* Ask the player whether it contains the live source
*
*)
function IsLive: BOOL; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::GetCurrentPlayTime
* Purpose:
* Get the current time on the Player timeline
*
*)
function GetCurrentPlayTime: ULONG32; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::OpenURL
* Purpose:
* Tell the player to begin playback of all its sources.
*
*)
function OpenURL(pURL: PChar): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::Begin
* Purpose:
* Tell the player to begin playback of all its sources.
*
*)
function Begin_: HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::Stop
* Purpose:
* Tell the player to stop playback of all its sources.
*
*)
function Stop: HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::Pause
* Purpose:
* Tell the player to pause playback of all its sources.
*
*)
function Pause: HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::Seek
* Purpose:
* Tell the player to seek in the playback timeline of all its
* sources.
*
*)
function Seek(ulTime: ULONG32): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::GetSourceCount
* Purpose:
* Returns the current number of source instances supported by
* this player instance.
*)
function GetSourceCount: UINT16; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::GetSource
* Purpose:
* Returns the Nth source instance supported by this player.
*)
function GetSource(nIndex: UINT16; out pUnknown: IUnknown): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::SetClientContext
* Purpose:
* Called by the client to install itself as the provider of client
* services to the core. This is traditionally called by the top
* level client application.
*)
function SetClientContext(pUnknown: IUnknown): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::GetClientContext
* Purpose:
* Called to get the client context for this player. This is
* set by the top level client application.
*)
function GetClientContext(out pUnknown: IUnknown): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::AddAdviseSink
* Purpose:
* Call this method to add a client advise sink.
*
*)
function AddAdviseSink(pAdviseSink: IRMAClientAdviseSink): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPlayer::RemoveAdviseSink
* Purpose:
* Call this method to remove a client advise sink.
*)
function RemoveAdviseSink(pAdviseSink: IRMAClientAdviseSink): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAPlayer}
(* Used in renderer and advise sink interface *)
type
BUFFERING_REASON = (BUFFERING_START_UP, BUFFERING_SEEK, BUFFERING_CONGESTION, BUFFERING_LIVE_PAUSE);
{$EXTERNALSYM BUFFERING_REASON}
(****************************************************************************
*
* Function:
*
* CreateEngine()
*
* Purpose:
*
* Function implemented by the RMA core to return a pointer to the
* client engine. This function would be run by top level clients.
*)
function CreateEngine(out ppEngine: IRMAClientEngine): PN_RESULT; stdcall;
{$EXTERNALSYM CreateEngine}
(****************************************************************************
*
* Function:
*
* CloseEngine()
*
* Purpose:
*
* Function implemented by the RMA core to close the engine which
* was returned in CreateEngine().
*)
function CloseEngine(pEngine: IRMAClientEngine): PN_RESULT; stdcall;
{$EXTERNALSYM CloseEngine}
(*
* Definitions of Function Pointers to CreateEngine() and Close Engine().
* These types are provided as a convenince to authors of top level clients.
*)
type
FPRMCREATEENGINE = function (out ppEngine: IRMAClientEngine): PN_RESULT; stdcall;
{$EXTERNALSYM FPRMCREATEENGINE}
FPRMCLOSEENGINE = function (pEngine: IRMAClientEngine): PN_RESULT; stdcall;
{$EXTERNALSYM FPRMCLOSEENGINE}
(****************************************************************************
*
* Interface:
*
* IRMAStreamSource
*
* Purpose:
*
* Interface provided by the client engine to the renderers. This
* interface allows access to source related information and properties.
*
* IID_IRMAStreamSource:
*
* {00000401-0901-11d1-8B06-00A024406D59}
*
*)
const
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -