summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_slave.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers/demux_slave.c')
-rw-r--r--src/demuxers/demux_slave.c53
1 files changed, 11 insertions, 42 deletions
diff --git a/src/demuxers/demux_slave.c b/src/demuxers/demux_slave.c
index de530f224..553089206 100644
--- a/src/demuxers/demux_slave.c
+++ b/src/demuxers/demux_slave.c
@@ -42,10 +42,10 @@
#define LOG
*/
-#include "xine_internal.h"
-#include "xineutils.h"
-#include "compat.h"
-#include "demux.h"
+#include <xine/xine_internal.h>
+#include <xine/xineutils.h>
+#include <xine/compat.h>
+#include <xine/demux.h>
#define SCRATCH_SIZE 1024
#define CHECK_VPTS_INTERVAL 2*90000
@@ -334,16 +334,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
switch (stream->content_detection_method) {
- case METHOD_BY_EXTENSION: {
- const char *const mrl = input->get_mrl (input);
-
- if(!strncmp(mrl, "slave://", 8))
- break;
-
- free (this);
- return NULL;
- }
-
case METHOD_BY_CONTENT: {
if (_x_demux_read_header(input, this->scratch, SCRATCH_SIZE) > 0) {
@@ -355,6 +345,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
return NULL;
}
+ case METHOD_BY_MRL:
case METHOD_EXPLICIT:
break;
@@ -388,39 +379,17 @@ 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 "";
-}
-
-static const char *get_identifier (demux_class_t *this_gen) {
- return "slave";
-}
-
-static const char *get_extensions (demux_class_t *this_gen) {
- return "";
-}
-
-static const char *get_mimetypes (demux_class_t *this_gen) {
- return NULL;
-}
-
-static void class_dispose (demux_class_t *this_gen) {
- demux_slave_class_t *this = (demux_slave_class_t *) this_gen;
-
- free (this);
-}
-
static void *init_plugin (xine_t *xine, void *data) {
demux_slave_class_t *this;
this = calloc(1, sizeof(demux_slave_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 = "";
+ this->demux_class.identifier = "slave";
+ this->demux_class.mimetypes = NULL;
+ this->demux_class.extensions = "slave://";
+ this->demux_class.dispose = default_demux_class_dispose;
return this;
}
@@ -434,6 +403,6 @@ static const demuxer_info_t demux_info_slave = {
const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_DEMUX, 26, "slave", XINE_VERSION_CODE, &demux_info_slave, init_plugin },
+ { PLUGIN_DEMUX, 27, "slave", XINE_VERSION_CODE, &demux_info_slave, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};