unit SubrenderIntf;
interface
uses
Windows;
// ---------------------------------------------------------------------------
// Forwards
type
ISubRenderConsumer =
interface;
ISubRenderProvider =
interface;
ISubRenderFrame =
interface;
LPCSTR = PAnsiChar;
LPCWSTR = PWideChar;
ULONG = Cardinal;
LPVOID = Pointer;
LPCVOID = Pointer;
// Eventuel ^Pointer bin ich jetzt nicht sicher in dem Context
REFERENCE_TIME = Double;
// Keine Ahnung ob das stimmt keine Referenz im *.h
RECT = TRect;
POINT = TPoint;
ISubRenderOptions =
interface(IUnknown)
['
{7CFD3728-235E-4430-9A2D-9F25F426BD70}']
function GetBool(field: LPCSTR;
out value: BOOL): HRESULT;
stdcall;
function GetInt(field: LPCSTR;
out value: Integer): HRESULT;
stdcall;
function GetSize(field: LPCSTR;
out value: TSize): HRESULT;
stdcall;
function GetRect(field: LPCSTR;
out value: TRect): HRESULT;
stdcall;
function GetUlonglong(field: LPCSTR;
out value: UInt64): HRESULT;
stdcall;
function GetDouble(field: LPCSTR;
out value: Double): HRESULT;
stdcall;
function GetString(field: LPCSTR; value: LPCSTR;
out chars: Integer): HRESULT;
stdcall;
function GetBin(field: LPCSTR; value: Pointer;
out size: Integer): HRESULT;
stdcall;
function SetBool(field: LPCSTR; value: BOOL): HRESULT;
stdcall;
function SetInt(field: LPCSTR; value: Integer): HRESULT;
stdcall;
function SetSize(field: LPCSTR; value: TSize): HRESULT;
stdcall;
function SetRect(field: LPCSTR; value: TRect): HRESULT;
stdcall;
function SetUlonglong(field: LPCSTR; value: UInt64): HRESULT;
stdcall;
function SetDouble(field: LPCSTR; value: Double): HRESULT;
stdcall;
function SetString(field: LPCSTR; value: LPCSTR;
out chars: Integer): HRESULT;
stdcall;
function SetBin(field: LPCSTR; value: Pointer; size: Integer): HRESULT;
stdcall;
end;
ISubRenderConsumer =
interface(ISubRenderOptions)
['
{9DF90966-FE9F-4F0E-881E-DAF8A572D900}']
function GetMerit(
var merit: ULONG): HRESULT;
stdcall;
function Connect(
var subtitleRenderer: ISubRenderProvider): HRESULT;
stdcall;
function Disconnect(): HRESULT;
stdcall;
function DeliverFrame(start: REFERENCE_TIME; stop: REFERENCE_TIME; context: LPVOID;
var subtitleFrame: ISubRenderFrame): HRESULT;
stdcall;
end;
ISubRenderConsumer2 =
interface(ISubRenderConsumer)
['
{9DF90966-FE9F-4F0E-881E-DAF8A572D900}']
function Clear(clearNewerThan: REFERENCE_TIME): HRESULT;
stdcall;
end;
ISubRenderProvider =
interface(ISubRenderOptions)
['
{20752113-C883-455A-BA7B-ABA4E9115CA8}']
function RequestFrame(start: REFERENCE_TIME; stop: REFERENCE_TIME; context: LPVOID): HRESULT;
stdcall;
function Disconnect(): HRESULT;
stdcall;
end;
ISubRenderFrame =
interface(IUnknown)
['
{81746AB5-9407-4B43-A014-1FAAC340F973}']
function GetOutputRect(
var outputRect: RECT): HRESULT;
stdcall;
function GetClipRect(
var clipRect: RECT): HRESULT;
stdcall;
function GetBitmapCount(
var count: Integer): HRESULT;
stdcall;
function GetBitmap(
index: Integer;
var position: POINT;
var size: TSize;
const pixels: LPCVOID;
var pitch: Integer): HRESULT;
stdcall;
end;
implementation
end.