From 1822c266c552a76cdbe75288515b5abfa9a41d5d Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 22 Dec 2010 18:21:41 +0000 Subject: support for video pixel format selection git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2767 b956fd51-792f-4845-bead-9b4dfca2ff2c --- mediaplugin/src/media/UMediaPlugin.pas | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mediaplugin/src/media/UMediaPlugin.pas') diff --git a/mediaplugin/src/media/UMediaPlugin.pas b/mediaplugin/src/media/UMediaPlugin.pas index cf25e033..8d4a8a7e 100644 --- a/mediaplugin/src/media/UMediaPlugin.pas +++ b/mediaplugin/src/media/UMediaPlugin.pas @@ -119,11 +119,22 @@ type getRatio: function(stream: PAudioConvertStream): double; cdecl; end; +type + TCVideoFrameFormat = cint; +const + FRAME_FORMAT_UNKNOWN = 0; + FRAME_FORMAT_RGB = 1; // packed RGB 24bpp (R:8,G:8,B:8) + FRAME_FORMAT_RGBA = 2; // packed RGBA 32bpp (R:8,G:8,B:8,A:8) + FRAME_FORMAT_BGR = 3; // packed RGB 24bpp (B:8,G:8,R:8) + FRAME_FORMAT_BGRA = 4; // packed BGRA 32bpp (B:8,G:8,R:8,A:8) + +type PVideoFrameInfo = ^TVideoFrameInfo; TVideoFrameInfo = record width: cint; height: cint; aspect: double; + format: TCVideoFrameFormat; end; PVideoDecoderInfo = ^TVideoDecoderInfo; @@ -131,7 +142,7 @@ type priority: cint; init: function(): cbool; cdecl; finalize: function(): cbool; cdecl; - open: function(filename: PAnsiChar): PVideoDecodeStream; cdecl; + open: function(filename: PAnsiChar; format: TCVideoFrameFormat): PVideoDecodeStream; cdecl; close: procedure(stream: PVideoDecodeStream); cdecl; setLoop: procedure(stream: PVideoDecodeStream; enable: cbool); cdecl; getLoop: function(stream: PVideoDecodeStream): cbool; cdecl; -- cgit v1.2.3