diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-10-17 17:43:41 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-10-17 17:43:41 +0000 |
commit | 3bb1499e2dd8f9e63494259343968ae71060f6cb (patch) | |
tree | 208a51acd986b4f60aa90e6a61771e9633bbf44f /src/demuxers | |
parent | 76450053c7fa0b7dac22b5a0d77c287ac1410fca (diff) | |
download | xine-lib-3bb1499e2dd8f9e63494259343968ae71060f6cb.tar.gz xine-lib-3bb1499e2dd8f9e63494259343968ae71060f6cb.tar.bz2 |
move open_plugin function (used to create new plugin instances) from the plugin info
struct to the plugin class struct
small nerby change in libffmpeg decoder plugin:
access to video_out/audio_out in decoders should now be done via the
appropriate members in xine_stream_t
CVS patchset: 2843
CVS date: 2002/10/17 17:43:41
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/demux.h | 10 | ||||
-rw-r--r-- | src/demuxers/demux_avi.c | 13 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h index 7234a64fd..c5c74896e 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux.h,v 1.20 2002/10/14 15:47:12 guenter Exp $ + * $Id: demux.h,v 1.21 2002/10/17 17:43:42 mroi Exp $ */ #ifndef HAVE_DEMUX_H @@ -43,10 +43,16 @@ #define METHOD_BY_EXTENSION 2 typedef struct demux_class_s demux_class_t ; +typedef struct demux_plugin_s demux_plugin_t; struct demux_class_s { /* + * open a new instance of this plugin class + */ + demux_plugin_t* (*open_plugin) (demux_class_t *this, xine_stream_t *stream, input_plugin_t *input); + + /* * return human readable (verbose = 1 line) description for this plugin */ char* (*get_description) (demux_class_t *this); @@ -83,8 +89,6 @@ struct demux_class_s { * any demux plugin must implement these functions */ -typedef struct demux_plugin_s demux_plugin_t; - struct demux_plugin_s { /* diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 3f7d7d224..3205f6d71 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_avi.c,v 1.115 2002/10/16 14:09:12 guenter Exp $ + * $Id: demux_avi.c,v 1.116 2002/10/17 17:43:42 mroi Exp $ * * demultiplexer for avi streams * @@ -1508,8 +1508,8 @@ static int demux_avi_get_stream_length (demux_plugin_t *this_gen) { return 0; } -static void* open_plugin (void *class_gen, xine_stream_t *stream, - const void *input_gen) { +static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *stream, + input_plugin_t *input_gen) { input_plugin_t *input = (input_plugin_t *) input_gen; demux_avi_t *this; @@ -1593,7 +1593,7 @@ static void* open_plugin (void *class_gen, xine_stream_t *stream, printf ("demux_avi: %ld frames\n", this->avi->video_idx.video_frames); - return this; + return &this->demux_plugin; } static char *get_description (demux_class_t *this_gen) { @@ -1628,6 +1628,7 @@ static void *init_plugin (xine_t *xine, void *data) { this->config = xine->config; this->xine = xine; + this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; this->demux_class.get_identifier = get_identifier; this->demux_class.get_mimetypes = get_mimetypes; @@ -1643,6 +1644,6 @@ static void *init_plugin (xine_t *xine, void *data) { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 14, "avi", XINE_VERSION_CODE, NULL, init_plugin, open_plugin }, - { PLUGIN_NONE, 0, "", 0, NULL, NULL, NULL } + { PLUGIN_DEMUX, 14, "avi", XINE_VERSION_CODE, NULL, init_plugin }, + { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |