diff options
Diffstat (limited to 'src/demuxers/demux_mpeg.c')
-rw-r--r-- | src/demuxers/demux_mpeg.c | 64 |
1 files changed, 13 insertions, 51 deletions
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 85b62f48e..3640fc516 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -39,9 +39,9 @@ #define LOG */ -#include "xine_internal.h" -#include "demux.h" -#include "xineutils.h" +#include <xine/xine_internal.h> +#include <xine/demux.h> +#include <xine/xineutils.h> #define NUM_PREVIEW_BUFFERS 150 #define SCRATCH_SIZE 256 @@ -1054,11 +1054,6 @@ static int demux_mpeg_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpeg_dispose (demux_plugin_t *this_gen) { - - free (this_gen); -} - static int demux_mpeg_get_stream_length (demux_plugin_t *this_gen) { demux_mpeg_t *this = (demux_mpeg_t *) this_gen; @@ -1090,7 +1085,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpeg_send_headers; this->demux_plugin.send_chunk = demux_mpeg_send_chunk; this->demux_plugin.seek = demux_mpeg_seek; - this->demux_plugin.dispose = demux_mpeg_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpeg_get_status; this->demux_plugin.get_stream_length = demux_mpeg_get_stream_length; this->demux_plugin.get_capabilities = demux_mpeg_get_capabilities; @@ -1212,19 +1207,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return NULL; } - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -1236,40 +1219,19 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "MPEG program stream demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG"; -} - -static const char *get_extensions (demux_class_t *this_gen) { - return "mpg mpeg"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "video/mpeg: mpeg, mpg, mpe: MPEG animation;" - "video/x-mpeg: mpeg, mpg, mpe: MPEG animation;"; -} - -static void class_dispose (demux_class_t *this_gen) { - demux_mpeg_class_t *this = (demux_mpeg_class_t *) this_gen; - - free (this); - } - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_class_t *this; this = calloc(1, sizeof(demux_mpeg_class_t)); 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; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("MPEG program stream demux plugin"); + this->demux_class.identifier = "MPEG"; + this->demux_class.mimetypes = + "video/mpeg: mpeg, mpg, mpe: MPEG animation;" + "video/x-mpeg: mpeg, mpg, mpe: MPEG animation;"; + this->demux_class.extensions = "mpg mpeg"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -1283,6 +1245,6 @@ static const demuxer_info_t demux_info_mpeg = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "mpeg", XINE_VERSION_CODE, &demux_info_mpeg, init_plugin }, + { PLUGIN_DEMUX, 27, "mpeg", XINE_VERSION_CODE, &demux_info_mpeg, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |