1 // MediaHandlerFfmpeg.h: FFMPEG media handler, for Gnash
3 // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef GNASH_MEDIAHANDLERFFMPEG_H
20 #define GNASH_MEDIAHANDLERFFMPEG_H
22 #include "MediaHandler.h" // for inheritance
30 /// FFMPEG-based media handler module
32 /// The module implements the MediaHandler factory as required
33 /// by Gnash core for a loadable media handler module.
35 /// It uses libavformat and libavcodec:
36 /// http://www.irisa.fr/texmex/people/dufouil/ffmpegdoxy/index.html
38 /// Starting point is MediaHandlerFfmpeg.
42 /// FFMPEG based MediaHandler
43 class MediaHandlerFfmpeg
: public MediaHandler
47 std::string
description() const;
49 virtual std::auto_ptr
<MediaParser
>
50 createMediaParser(std::auto_ptr
<IOChannel
> stream
);
52 virtual std::auto_ptr
<VideoDecoder
>
53 createVideoDecoder(const VideoInfo
& info
);
55 virtual std::auto_ptr
<VideoConverter
>
56 createVideoConverter(ImgBuf::Type4CC srcFormat
,
57 ImgBuf::Type4CC dstFormat
);
59 virtual std::auto_ptr
<AudioDecoder
>
60 createAudioDecoder(const AudioInfo
& info
);
62 virtual size_t getInputPaddingSize() const;
64 virtual VideoInput
* getVideoInput(size_t index
);
66 virtual AudioInput
* getAudioInput(size_t index
);
68 virtual void cameraNames(std::vector
<std::string
>& names
) const;
73 } // gnash.media.ffmpeg namespace
74 } // gnash.media namespace