diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-11-02 23:58:34 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-11-02 23:58:34 +0000 |
commit | 20bf3c992909e83e5af53cf00d87b7cbaef0d1a6 (patch) | |
tree | 0120d448ed644678411423a38e02a42fa2b017ae /mediaplugin/src/media | |
parent | 5000060b04bed23cbbd88ba43ed546220c4b7c69 (diff) | |
download | usdx-20bf3c992909e83e5af53cf00d87b7cbaef0d1a6.tar.gz usdx-20bf3c992909e83e5af53cf00d87b7cbaef0d1a6.tar.xz usdx-20bf3c992909e83e5af53cf00d87b7cbaef0d1a6.zip |
- Support for media interface priorities
- all media interfaces classes have to explicitly implement IMediaInterface, otherwise access to the priority and name will fail
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2707 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'mediaplugin/src/media')
-rw-r--r-- | mediaplugin/src/media/UAudioConverterPlugin.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UAudioConverter_SDL.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UAudioConverter_SRC.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UAudioDecoderPlugin.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UAudioDecoder_Bass.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UAudioPlaybackBase.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UMedia_dummy.pas | 46 | ||||
-rw-r--r-- | mediaplugin/src/media/UVideo.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UVideoDecoderPlugin.pas | 2 | ||||
-rw-r--r-- | mediaplugin/src/media/UVisualizer.pas | 4 |
10 files changed, 52 insertions, 14 deletions
diff --git a/mediaplugin/src/media/UAudioConverterPlugin.pas b/mediaplugin/src/media/UAudioConverterPlugin.pas index 389681ad..5e69e8ca 100644 --- a/mediaplugin/src/media/UAudioConverterPlugin.pas +++ b/mediaplugin/src/media/UAudioConverterPlugin.pas @@ -41,7 +41,7 @@ uses SysUtils; type - TAudioConverterPlugin = class(TInterfacedObject, IAudioConverter) + TAudioConverterPlugin = class(TInterfacedObject, IMediaInterface, IAudioConverter) private fPluginInfo: PMediaPluginInfo; public diff --git a/mediaplugin/src/media/UAudioConverter_SDL.pas b/mediaplugin/src/media/UAudioConverter_SDL.pas index faed8abb..89163fcc 100644 --- a/mediaplugin/src/media/UAudioConverter_SDL.pas +++ b/mediaplugin/src/media/UAudioConverter_SDL.pas @@ -43,7 +43,7 @@ uses Math; type - TAudioConverter_SDL = class(TInterfacedObject, IAudioConverter) + TAudioConverter_SDL = class(TInterfacedObject, IMediaInterface, IAudioConverter) public function GetName(): string; function GetPriority(): integer; diff --git a/mediaplugin/src/media/UAudioConverter_SRC.pas b/mediaplugin/src/media/UAudioConverter_SRC.pas index c4bf4358..964d1035 100644 --- a/mediaplugin/src/media/UAudioConverter_SRC.pas +++ b/mediaplugin/src/media/UAudioConverter_SRC.pas @@ -42,7 +42,7 @@ uses Math; type - TAudioConverter_SRC = class(TInterfacedObject, IAudioConverter) + TAudioConverter_SRC = class(TInterfacedObject, IMediaInterface, IAudioConverter) public function GetName(): string; function GetPriority(): integer; diff --git a/mediaplugin/src/media/UAudioDecoderPlugin.pas b/mediaplugin/src/media/UAudioDecoderPlugin.pas index e518277c..0d23a368 100644 --- a/mediaplugin/src/media/UAudioDecoderPlugin.pas +++ b/mediaplugin/src/media/UAudioDecoderPlugin.pas @@ -50,7 +50,7 @@ uses UPath; type - TAudioDecoderPlugin = class(TInterfacedObject, IAudioDecoder) + TAudioDecoderPlugin = class(TInterfacedObject, IMediaInterface, IAudioDecoder) private fPluginInfo: PMediaPluginInfo; public diff --git a/mediaplugin/src/media/UAudioDecoder_Bass.pas b/mediaplugin/src/media/UAudioDecoder_Bass.pas index e08b91ff..5ef4138b 100644 --- a/mediaplugin/src/media/UAudioDecoder_Bass.pas +++ b/mediaplugin/src/media/UAudioDecoder_Bass.pas @@ -70,7 +70,7 @@ type end; type - TAudioDecoder_Bass = class( TInterfacedObject, IAudioDecoder ) + TAudioDecoder_Bass = class(TInterfacedObject, IMediaInterface, IAudioDecoder) public function GetName: string; function GetPriority: integer; diff --git a/mediaplugin/src/media/UAudioPlaybackBase.pas b/mediaplugin/src/media/UAudioPlaybackBase.pas index 65528430..293dd92a 100644 --- a/mediaplugin/src/media/UAudioPlaybackBase.pas +++ b/mediaplugin/src/media/UAudioPlaybackBase.pas @@ -39,7 +39,7 @@ uses UPath; type - TAudioPlaybackBase = class(TInterfacedObject, IAudioPlayback) + TAudioPlaybackBase = class(TInterfacedObject, IMediaInterface, IAudioPlayback) protected OutputDeviceList: TAudioOutputDeviceList; MusicStream: TAudioPlaybackStream; diff --git a/mediaplugin/src/media/UMedia_dummy.pas b/mediaplugin/src/media/UMedia_dummy.pas index 1ada6603..d5e99aa3 100644 --- a/mediaplugin/src/media/UMedia_dummy.pas +++ b/mediaplugin/src/media/UMedia_dummy.pas @@ -43,7 +43,7 @@ uses UPath; type - TAudio_Dummy = class( TInterfacedObject, IAudioPlayback, IAudioInput ) + TAudio_Dummy = class( TInterfacedObject, IMediaInterface, IAudioPlayback, IAudioInput ) private DummyOutputDeviceList: TAudioOutputDeviceList; public @@ -99,7 +99,7 @@ type procedure CloseVoiceStream(var VoiceStream: TAudioVoiceStream); end; - TVideo_Dummy = class( TInterfacedObject, IVideo ) + TVideo_Dummy = class(TInterfacedObject, IVideo) public procedure Close; @@ -154,7 +154,8 @@ type property Position: real read GetPosition write SetPosition; end; - TVideoPlayback_Dummy = class( TInterfacedObject, IVideoPlayback, IVideoVisualization ) + TVideoPlayback_Dummy = class(TInterfacedObject, IMediaInterface, + IVideoPlayback, IVideoVisualization) public constructor Create(); function GetName: string; @@ -166,6 +167,16 @@ type function Open(const FileName: IPath): IVideo; end; + TVideoDecoder_Dummy = class(TInterfacedObject, IMediaInterface, IVideoDecoder) + public + function GetName: string; + function GetPriority: integer; + + function InitializeDecoder(): boolean; + function FinalizeDecoder(): boolean; + function Open(const FileName: IPath): TVideoDecodeStream; + end; + function TAudio_Dummy.GetName: string; begin Result := 'AudioDummy'; @@ -473,7 +484,7 @@ end; function TVideoPlayback_Dummy.GetName: string; begin - Result := 'VideoDummy'; + Result := 'VideoPlaybackDummy'; end; function TVideoPlayback_Dummy.GetPriority: integer; @@ -496,9 +507,36 @@ begin Result := TVideo_Dummy.Create; end; +{ TVideoDecoder_Dummy } + +function TVideoDecoder_Dummy.GetName: string; +begin + Result := 'VideoDecoderDummy'; +end; + +function TVideoDecoder_Dummy.GetPriority: integer; +begin + Result := -100; +end; + +function TVideoDecoder_Dummy.InitializeDecoder(): boolean; +begin + Result := true; +end; + +function TVideoDecoder_Dummy.FinalizeDecoder(): boolean; +begin + Result := true; +end; + +function TVideoDecoder_Dummy.Open(const FileName: IPath): TVideoDecodeStream; +begin + Result := nil; +end; initialization MediaManager.Add(TAudio_Dummy.Create); MediaManager.Add(TVideoPlayback_Dummy.Create); + MediaManager.Add(TVideoDecoder_Dummy.Create); end. diff --git a/mediaplugin/src/media/UVideo.pas b/mediaplugin/src/media/UVideo.pas index d7fab209..776d9f33 100644 --- a/mediaplugin/src/media/UVideo.pas +++ b/mediaplugin/src/media/UVideo.pas @@ -167,7 +167,7 @@ type procedure DrawReflection(); end; - TVideoPlayback_FFmpeg = class( TInterfacedObject, IVideoPlayback ) + TVideoPlayback_FFmpeg = class(TInterfacedObject, IMediaInterface, IVideoPlayback) public function GetName: String; function GetPriority: integer; diff --git a/mediaplugin/src/media/UVideoDecoderPlugin.pas b/mediaplugin/src/media/UVideoDecoderPlugin.pas index d513a0b3..1655f325 100644 --- a/mediaplugin/src/media/UVideoDecoderPlugin.pas +++ b/mediaplugin/src/media/UVideoDecoderPlugin.pas @@ -39,7 +39,7 @@ uses UPath; type - TVideoDecoderPlugin = class( TInterfacedObject, IVideoDecoder ) + TVideoDecoderPlugin = class(TInterfacedObject, IMediaInterface, IVideoDecoder) private fPluginInfo: PMediaPluginInfo; public diff --git a/mediaplugin/src/media/UVisualizer.pas b/mediaplugin/src/media/UVisualizer.pas index d7fc460c..9497aa55 100644 --- a/mediaplugin/src/media/UVisualizer.pas +++ b/mediaplugin/src/media/UVisualizer.pas @@ -103,7 +103,7 @@ type TGLMatrixStack = array of TGLMatrix; type - TVideo_ProjectM = class( TInterfacedObject, IVideo ) + TVideo_ProjectM = class(TInterfacedObject, IVideo) private fPm: TProjectM; fProjectMPath : string; @@ -177,7 +177,7 @@ type procedure DrawReflection(); end; - TVideoPlayback_ProjectM = class( TInterfacedObject, IVideoVisualization ) + TVideoPlayback_ProjectM = class( TInterfacedObject, IMediaInterface, IVideoVisualization ) private fInitialized: boolean; |