[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/Player.h lib...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/Player.h lib... |
Date: |
Tue, 03 Jun 2008 14:48:56 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/06/03 14:48:55
Modified files:
. : ChangeLog
gui : Player.cpp Player.h
libmedia : Makefile.am MediaParser.h
server/parser : video_stream_def.cpp video_stream_def.h
Added files:
libmedia : MediaHandler.cpp MediaHandler.h
libmedia/ffmpeg: MediaHandlerFfmpeg.cpp MediaHandlerFfmpeg.h
libmedia/gst : MediaHandlerGst.cpp MediaHandlerGst.h
Log message:
* libmedia/MediaHandler.{cpp,h},
libmedia/gst/MediaHandlerGst.{cpp,h},
libmedia/ffmpeg/MediaHandlerFfmpeg.{cpp,h}
libmedia/Makefile.am:
First stub at a MediaHandler/factory class.
* gui/Player.{cpp,h}: register a MediaHandler
based on compile-time define.
* libmedia/MediaParser.h: comment header inclusion
* server/parser/video_stream_def.{cpp,h}: drop
compile time defines for media handler to use,
fetch whatever is currently registered instead.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6790&r2=1.6791
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.117&r2=1.118
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.h?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/Makefile.am?cvsroot=gnash&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/MediaParser.h?cvsroot=gnash&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/MediaHandler.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/MediaHandler.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/ffmpeg/MediaHandlerFfmpeg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/MediaHandlerGst.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/MediaHandlerGst.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.cpp?cvsroot=gnash&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.h?cvsroot=gnash&r1=1.28&r2=1.29
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6790
retrieving revision 1.6791
diff -u -b -r1.6790 -r1.6791
--- ChangeLog 3 Jun 2008 12:39:51 -0000 1.6790
+++ ChangeLog 3 Jun 2008 14:48:51 -0000 1.6791
@@ -1,5 +1,19 @@
2008-06-03 Sandro Santilli <address@hidden>
+ * libmedia/MediaHandler.{cpp,h},
+ libmedia/gst/MediaHandlerGst.{cpp,h},
+ libmedia/ffmpeg/MediaHandlerFfmpeg.{cpp,h}
+ libmedia/Makefile.am:
+ First stub at a MediaHandler/factory class.
+ * gui/Player.{cpp,h}: register a MediaHandler
+ based on compile-time define.
+ * libmedia/MediaParser.h: comment header inclusion
+ * server/parser/video_stream_def.{cpp,h}: drop
+ compile time defines for media handler to use,
+ fetch whatever is currently registered instead.
+
+2008-06-03 Sandro Santilli <address@hidden>
+
* libbase/FLVParser.{cpp,h} => libmedia/FLVParser.{cpp,h},
libbase/Makefile.am, libmedia/Makefile.am:
Moved FLVParser under libmedia and make it a MediaParser.
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- gui/Player.cpp 30 May 2008 20:23:50 -0000 1.117
+++ gui/Player.cpp 3 Jun 2008 14:48:52 -0000 1.118
@@ -43,6 +43,13 @@
#include "VM.h"
#include "SystemClock.h"
+#ifdef SOUND_SDL
+# include "MediaHandlerFfmpeg.h"
+#elif defined(SOUND_GST)
+# include "MediaHandlerGst.h"
+#endif
+
+
#include "log.h"
#include <iostream>
#include <sstream>
@@ -182,6 +189,21 @@
}
}
+void
+Player::init_media()
+{
+#ifdef SOUND_SDL
+ _mediaHandler.reset( new gnash::media::MediaHandlerFfmpeg() );
+#elif defined(SOUND_GST)
+ _mediaHandler.reset( new gnash::media::MediaHandlerGst() );
+#else
+ log_error(_("No media support compiled in"));
+ return;
+#endif
+
+ gnash::media::MediaHandler::set(_mediaHandler);
+}
+
void
Player::init_gui()
@@ -280,6 +302,7 @@
// (example: setDoSound(), setWindowId() etc.. )
init_logfile();
init_sound();
+ init_media();
init_gui();
// gnash.cpp should check that a filename is supplied.
Index: gui/Player.h
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- gui/Player.h 30 May 2008 20:23:50 -0000 1.33
+++ gui/Player.h 3 Jun 2008 14:48:53 -0000 1.34
@@ -25,6 +25,7 @@
#include "gnash.h" // needed for interface and fscommand callbacks
#include "sound_handler.h" // for visibility of sound_handler destructor
+#include "MediaHandler.h" // for visibility of MediaHandler destructor
#include "gui.h"
#include "movie_definition.h" // for visibility of movie_definition destructor
#include "smart_ptr.h" // for intrusive_ptr holding of top-level movie
@@ -156,6 +157,8 @@
void init_sound();
+ void init_media();
+
void init_logfile();
void init_gui();
@@ -204,6 +207,8 @@
std::auto_ptr<media::sound_handler> _soundHandler;
+ std::auto_ptr<media::MediaHandler> _mediaHandler;
+
std::string _url;
std::string _infile;
Index: libmedia/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/libmedia/Makefile.am,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- libmedia/Makefile.am 3 Jun 2008 12:39:53 -0000 1.22
+++ libmedia/Makefile.am 3 Jun 2008 14:48:53 -0000 1.23
@@ -73,6 +73,7 @@
$(NULL)
libgnashmedia_la_SOURCES = \
+ MediaHandler.cpp \
AudioDecoderNellymoser.cpp \
AudioDecoderSimple.cpp \
FLVParser.cpp \
@@ -84,6 +85,7 @@
AudioDecoder.h \
VideoDecoder.h \
MediaParser.h \
+ MediaHandler.h \
FLVParser.h \
AudioDecoderNellymoser.h \
AudioDecoderSimple.h \
@@ -95,6 +97,7 @@
if USE_SOUND_GST
libgnashmedia_la_SOURCES += \
+ gst/MediaHandlerGst.cpp \
gst/VideoDecoderGst.cpp \
gst/AudioDecoderGst.cpp \
gst/gstappsink.c \
@@ -107,6 +110,7 @@
gst/gstbuffersrc.c
noinst_HEADERS += \
+ gst/MediaHandlerGst.h \
gst/AudioDecoderGst.h \
gst/VideoDecoderGst.h \
gst/gstappsink.h \
@@ -129,12 +133,14 @@
if USE_FFMPEG_ENGINE
libgnashmedia_la_SOURCES += \
+ ffmpeg/MediaHandlerFfmpeg.cpp \
ffmpeg/AudioDecoderFfmpeg.cpp \
ffmpeg/VideoDecoderFfmpeg.cpp \
ffmpeg/sound_handler_sdl.cpp \
ffmpeg/ffmpegNetStreamUtil.cpp
noinst_HEADERS += \
+ ffmpeg/MediaHandlerFfmpeg.h \
ffmpeg/AudioDecoderFfmpeg.h \
ffmpeg/VideoDecoderFfmpeg.h \
ffmpeg/sound_handler_sdl.h \
Index: libmedia/MediaParser.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/MediaParser.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- libmedia/MediaParser.h 3 Jun 2008 12:39:53 -0000 1.16
+++ libmedia/MediaParser.h 3 Jun 2008 14:48:53 -0000 1.17
@@ -27,7 +27,7 @@
#include <boost/scoped_array.hpp>
#include <memory>
-#include "tu_file.h"
+#include "tu_file.h" // for inlines
namespace gnash {
namespace media {
Index: server/parser/video_stream_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/video_stream_def.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- server/parser/video_stream_def.cpp 3 Jun 2008 08:35:05 -0000 1.46
+++ server/parser/video_stream_def.cpp 3 Jun 2008 14:48:55 -0000 1.47
@@ -21,12 +21,7 @@
#include "video_stream_instance.h"
#include "render.h"
#include "BitsReader.h"
-
-#ifdef SOUND_GST
-# include "VideoDecoderGst.h"
-#elif defined(USE_FFMPEG)
-# include "VideoDecoderFfmpeg.h"
-#endif
+#include "MediaHandler.h"
#include <boost/bind.hpp>
@@ -87,11 +82,20 @@
return;
}
-#ifdef SOUND_GST
- _decoder.reset( new media::VideoDecoderGst(m_codec_id, _width, _height)
);
-#elif defined(USE_FFMPEG)
- _decoder.reset( new media::VideoDecoderFfmpeg(m_codec_id, _width,
_height) );
-#endif
+ media::MediaHandler* mh = media::MediaHandler::get();
+ if ( ! mh )
+ {
+ LOG_ONCE( log_error(_("No Media handler registered, "
+ "won't be able to decode embedded video")) );
+ return;
+ }
+
+ _decoder = mh->createVideoDecoder(m_codec_id, _width, _height);
+ if ( ! _decoder.get() )
+ {
+ log_error(_("Could not create video decoder for codec id %d"),
+ m_codec_id);
+ }
}
void
Index: server/parser/video_stream_def.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/video_stream_def.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- server/parser/video_stream_def.h 3 Jun 2008 12:39:55 -0000 1.28
+++ server/parser/video_stream_def.h 3 Jun 2008 14:48:55 -0000 1.29
@@ -37,10 +37,10 @@
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
-#include <boost/scoped_ptr.hpp>
-
#include <boost/thread/mutex.hpp>
+#include <memory> // for auto_ptr
+
namespace gnash {
@@ -176,7 +176,7 @@
boost::uint32_t _height;
/// The decoder used to decode the video frames
- boost::scoped_ptr<media::VideoDecoder> _decoder;
+ std::auto_ptr<media::VideoDecoder> _decoder;
};
} // end namespace gnash
Index: libmedia/MediaHandler.cpp
===================================================================
RCS file: libmedia/MediaHandler.cpp
diff -N libmedia/MediaHandler.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libmedia/MediaHandler.cpp 3 Jun 2008 14:48:53 -0000 1.1
@@ -0,0 +1,61 @@
+// MediaHandler.cpp: Default MediaHandler implementation, for Gnash.
+//
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+
+#include "MediaHandler.h"
+#include "FLVParser.h"
+#include "tu_file.h"
+#include "log.h"
+
+namespace gnash {
+namespace media {
+
+std::auto_ptr<MediaHandler> MediaHandler::_handler;
+
+std::auto_ptr<MediaParser>
+MediaHandler::createMediaParser(std::auto_ptr<tu_file> stream)
+{
+ std::auto_ptr<MediaParser> parser;
+
+ char head[4] = {0, 0, 0, 0};
+ size_t actuallyRead = stream->read_bytes(head, 3);
+ stream->set_position(0);
+
+ if (actuallyRead < 3)
+ {
+ log_error(_("MediaHandler::createMediaParser: Could not read 3
bytes from input stream"));
+ return parser;
+ }
+
+ if (std::string(head) != "FLV")
+ {
+ log_error(_("MediaHandler::createMediaParser: only FLV input is
supported by this MediaHandler"));
+ return parser;
+ }
+
+
+ parser.reset( new FLVParser(stream) );
+ assert(! stream.get() ); // TODO: when ownership will be transferred...
+
+ return parser;
+}
+
+} // end of gnash::media namespace
+} // end of gnash namespace
+
Index: libmedia/MediaHandler.h
===================================================================
RCS file: libmedia/MediaHandler.h
diff -N libmedia/MediaHandler.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libmedia/MediaHandler.h 3 Jun 2008 14:48:53 -0000 1.1
@@ -0,0 +1,102 @@
+// MediaHandler.h: Base class for media handlers
+//
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+#ifndef __MEDIAHANDLER_H__
+#define __MEDIAHANDLER_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "MediaParser.h" // for videoCodecType and audioCodecType enums
+
+#include <memory>
+
+// Forward declarations
+class tu_file;
+namespace gnash {
+ namespace media {
+ class VideoDecoder;
+ }
+}
+
+namespace gnash {
+namespace media {
+
+/// The MediaHandler class acts as a factory to provide parser and decoders
+class MediaHandler
+{
+public:
+
+ virtual ~MediaHandler() {}
+
+ /// Return currently registered MediaHandler, possibly null.
+ static MediaHandler* get()
+ {
+ return _handler.get();
+ }
+
+ /// Register a MediaHandler to use
+ static void set(std::auto_ptr<MediaHandler> mh)
+ {
+ _handler = mh;
+ }
+
+ /// Return an appropriate MediaParser for given input
+ //
+ /// @param stream
+ /// Input stream, ownership transferred
+ ///
+ /// @return 0 if no parser could be created for the input
+ ///
+ /// NOTE: the default implementation returns an FLVParser for FLV input
+ /// or 0 for others.
+ ///
+ virtual std::auto_ptr<MediaParser>
createMediaParser(std::auto_ptr<tu_file> stream);
+
+ /// Create a VideoDecoder for the specified codec_type
+ //
+ /// @param format
+ /// Video encoding.
+ ///
+ /// @param width
+ /// Video frame width
+ ///
+ /// @param height
+ /// Video frame height
+ ///
+ /// @return 0 if no decoder could be created for the specified encoding
+ ///
+ virtual std::auto_ptr<VideoDecoder> createVideoDecoder(
+ videoCodecType format, int width, int height)=0;
+
+protected:
+
+ MediaHandler() {}
+
+private:
+
+ static std::auto_ptr<MediaHandler> _handler;
+};
+
+
+} // gnash.media namespace
+} // namespace gnash
+
+#endif // __MEDIAHANDLER_H__
Index: libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
===================================================================
RCS file: libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
diff -N libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libmedia/ffmpeg/MediaHandlerFfmpeg.cpp 3 Jun 2008 14:48:54 -0000
1.1
@@ -0,0 +1,45 @@
+// MediaHandlerFfmpeg.cpp: FFMPEG media handler, for Gnash
+//
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+
+#include "MediaHandlerFfmpeg.h"
+#include "VideoDecoderFfmpeg.h"
+
+#include "tu_file.h" // for visibility of destructor
+#include "MediaParser.h" // for visibility of destructor
+
+namespace gnash {
+namespace media {
+
+std::auto_ptr<MediaParser>
+MediaHandlerFfmpeg::createMediaParser(std::auto_ptr<tu_file> stream)
+{
+ // TODO: support more then just FLV...
+ return MediaHandler::createMediaParser(stream);
+}
+
+std::auto_ptr<VideoDecoder>
+MediaHandlerFfmpeg::createVideoDecoder(videoCodecType format, int width, int
height)
+{
+ std::auto_ptr<VideoDecoder> ret( new VideoDecoderFfmpeg(format, width,
height) );
+ return ret;
+}
+
+} // gnash.media namespace
+} // gnash namespace
Index: libmedia/ffmpeg/MediaHandlerFfmpeg.h
===================================================================
RCS file: libmedia/ffmpeg/MediaHandlerFfmpeg.h
diff -N libmedia/ffmpeg/MediaHandlerFfmpeg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libmedia/ffmpeg/MediaHandlerFfmpeg.h 3 Jun 2008 14:48:54 -0000
1.1
@@ -0,0 +1,47 @@
+// MediaHandlerFfmpeg.h: FFMPEG media handler, for Gnash
+//
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+#ifndef __MEDIAHANDLERFFMPEG_H__
+#define __MEDIAHANDLERFFMPEG_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "MediaHandler.h" // for inheritance
+
+#include <memory>
+
+namespace gnash {
+namespace media {
+
+class MediaHandlerFfmpeg : public MediaHandler
+{
+public:
+
+ virtual std::auto_ptr<MediaParser>
createMediaParser(std::auto_ptr<tu_file> stream);
+
+ virtual std::auto_ptr<VideoDecoder> createVideoDecoder(videoCodecType
format, int width, int height);
+};
+
+
+} // gnash.media namespace
+} // namespace gnash
+
+#endif // __MEDIAHANDLERFFMPEG_H__
Index: libmedia/gst/MediaHandlerGst.cpp
===================================================================
RCS file: libmedia/gst/MediaHandlerGst.cpp
diff -N libmedia/gst/MediaHandlerGst.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libmedia/gst/MediaHandlerGst.cpp 3 Jun 2008 14:48:54 -0000 1.1
@@ -0,0 +1,45 @@
+// MediaHandlerGst.cpp: GST media handler, for Gnash
+//
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+
+#include "MediaHandlerGst.h"
+#include "VideoDecoderGst.h"
+
+#include "tu_file.h" // for visibility of destructor
+#include "MediaParser.h" // for visibility of destructor
+
+namespace gnash {
+namespace media {
+
+std::auto_ptr<MediaParser>
+MediaHandlerGst::createMediaParser(std::auto_ptr<tu_file> stream)
+{
+ // TODO: support more then just FLV...
+ return MediaHandler::createMediaParser(stream);
+}
+
+std::auto_ptr<VideoDecoder>
+MediaHandlerGst::createVideoDecoder(videoCodecType format, int width, int
height)
+{
+ std::auto_ptr<VideoDecoder> ret( new VideoDecoderGst(format, width,
height) );
+ return ret;
+}
+
+} // gnash.media namespace
+} // gnash namespace
Index: libmedia/gst/MediaHandlerGst.h
===================================================================
RCS file: libmedia/gst/MediaHandlerGst.h
diff -N libmedia/gst/MediaHandlerGst.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libmedia/gst/MediaHandlerGst.h 3 Jun 2008 14:48:55 -0000 1.1
@@ -0,0 +1,47 @@
+// MediaHandlerGst.h: GST media handler, for Gnash
+//
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+#ifndef __MEDIAHANDLERGST_H__
+#define __MEDIAHANDLERGST_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "MediaHandler.h" // for inheritance
+
+#include <memory>
+
+namespace gnash {
+namespace media {
+
+class MediaHandlerGst : public MediaHandler
+{
+public:
+
+ virtual std::auto_ptr<MediaParser>
createMediaParser(std::auto_ptr<tu_file> stream);
+
+ virtual std::auto_ptr<VideoDecoder> createVideoDecoder(videoCodecType
format, int width, int height);
+};
+
+
+} // gnash.media namespace
+} // namespace gnash
+
+#endif // __MEDIAHANDLERGST_H__
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/Player.cpp gui/Player.h lib...,
Sandro Santilli <=