xref: /haiku/src/add-ons/media/plugins/ffmpeg/FFmpegPlugin.h (revision 83b1a68c52ba3e0e8796282759f694b7fdddf06d)
1 /*
2  * Copyright (C) 2001 Carlos Hasan. All Rights Reserved.
3  * Copyright (C) 2001 François Revol. All Rights Reserved.
4  * Copyright (C) 2001 Axel Dörfler. All Rights Reserved.
5  * Copyright (C) 2004 Marcus Overhagen. All Rights Reserved.
6  *
7  * Distributed under the terms of the MIT License.
8  */
9 #ifndef FFMPEG_PLUGIN_H
10 #define FFMPEG_PLUGIN_H
11 
12 
13 #include <MediaFormats.h>
14 
15 #include "DecoderPlugin.h"
16 #include "EncoderPlugin.h"
17 #include "ReaderPlugin.h"
18 #include "WriterPlugin.h"
19 
20 
21 class FFmpegPlugin : public ReaderPlugin, public DecoderPlugin,
22 	public WriterPlugin, public EncoderPlugin {
23 public:
24 	virtual	Reader*				NewReader();
25 
26 	virtual	Decoder*			NewDecoder(uint index);
27 	virtual	status_t			GetSupportedFormats(media_format** _formats,
28 									size_t* _count);
29 
30 	virtual	Writer*				NewWriter();
31 	virtual	status_t			GetSupportedFileFormats(
32 									const media_file_format** _fileFormats,
33 									size_t* _count);
34 
35 	virtual	Encoder*			NewEncoder(
36 									const media_codec_info& codecInfo);
37 	virtual	status_t			RegisterNextEncoder(int32* cookie,
38 									media_codec_info* codecInfo,
39 									media_format_family* formatFamily,
40 									media_format* inputFormat,
41 									media_format* outputFormat);
42 
43 private:
44 	class GlobalInitilizer {
45 		public:
46 								GlobalInitilizer();
47 								~GlobalInitilizer();
48 	};
49 
50 	static	GlobalInitilizer	sInitilizer;
51 };
52 
53 
54 #endif // FFMPEG_PLUGIN_H
55