2008-03-27 23:30:14 +01:00
|
|
|
Index: src/input/input_dvd.c
|
|
|
|
===================================================================
|
|
|
|
--- src/input/input_dvd.c.orig
|
|
|
|
+++ src/input/input_dvd.c
|
|
|
|
@@ -1385,7 +1385,12 @@ check_solaris_vold_device(dvd_input_clas
|
2008-01-31 14:59:26 +01:00
|
|
|
|
|
|
|
static int dvd_parse_try_open(dvd_input_plugin_t *this, const char *locator)
|
|
|
|
{
|
|
|
|
- const char *intended_dvd_device;
|
|
|
|
+ const char *intended_dvd_device;
|
|
|
|
+ dvd_input_class_t *class = (dvd_input_class_t *)
|
|
|
|
+ this->input_plugin.input_class;
|
|
|
|
+ xine_sarray_t **plgs = class->xine->plugin_catalog->plugin_lists;
|
|
|
|
+ plugin_node_t *node;
|
|
|
|
+ int i;
|
|
|
|
|
|
|
|
/* FIXME: we temporarily special-case "dvd:/" for compatibility;
|
|
|
|
* actually "dvd:/" should play a DVD image stored in /, but for
|
2008-03-27 23:30:14 +01:00
|
|
|
@@ -1401,7 +1406,6 @@ static int dvd_parse_try_open(dvd_input_
|
2008-01-31 14:59:26 +01:00
|
|
|
xine_setenv("DVDCSS_RAW_DEVICE", "", 1);
|
|
|
|
} else {
|
|
|
|
/* use default DVD device */
|
|
|
|
- dvd_input_class_t *class = (dvd_input_class_t*)this->input_plugin.input_class;
|
|
|
|
xine_cfg_entry_t raw_device;
|
|
|
|
if (xine_config_lookup_entry(this->stream->xine,
|
|
|
|
"media.dvd.raw_device", &raw_device))
|
2008-03-27 23:30:14 +01:00
|
|
|
@@ -1409,6 +1413,23 @@ static int dvd_parse_try_open(dvd_input_
|
2008-01-31 14:59:26 +01:00
|
|
|
intended_dvd_device = class->dvd_device;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ for (i = 0; (node = xine_sarray_get (plgs[PLUGIN_VIDEO_DECODER-1], i)); i++)
|
|
|
|
+ if (strcmp (node->info->id, "mpeg2") == 0)
|
|
|
|
+ break;
|
|
|
|
+ if (node)
|
|
|
|
+ for (i = 0; (node = xine_sarray_get (plgs[PLUGIN_SPU_DECODER-1], i)); i++)
|
|
|
|
+ if (strcmp (node->info->id, "spudec") == 0)
|
|
|
|
+ break;
|
|
|
|
+ if (! node) {
|
|
|
|
+ _x_message (this->stream, XINE_MSG_GENERAL_WARNING,
|
|
|
|
+ "This version of Xine lacks support for playing DVD discs "
|
|
|
|
+ "for legal reasons.\n"
|
|
|
|
+ "Please go to http://www.opensuse.org/XINE#Legal_Matters "
|
|
|
|
+ "for further details.",
|
|
|
|
+ NULL);
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
/* attempt to open DVD */
|
|
|
|
if (this->opened) {
|
|
|
|
if (intended_dvd_device == this->current_dvd_device) {
|
2008-03-27 23:30:14 +01:00
|
|
|
@@ -1471,8 +1492,11 @@ static int dvd_parse_mrl(dvd_input_plugi
|
2008-01-31 14:59:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static int dvd_plugin_open (input_plugin_t *this_gen) {
|
|
|
|
- dvd_input_plugin_t *this = (dvd_input_plugin_t*)this_gen;
|
|
|
|
+ dvd_input_plugin_t *this = (dvd_input_plugin_t*)this_gen;
|
|
|
|
dvd_input_class_t *class = (dvd_input_class_t*)this_gen->input_class;
|
|
|
|
+ xine_sarray_t **plgs = class->xine->plugin_catalog->plugin_lists;
|
|
|
|
+ plugin_node_t *node;
|
|
|
|
+ int i;
|
|
|
|
|
2008-03-27 23:30:14 +01:00
|
|
|
char *locator, *locator_orig;
|
2008-01-31 14:59:26 +01:00
|
|
|
char *title_part;
|
2008-03-27 23:30:14 +01:00
|
|
|
@@ -1481,6 +1505,23 @@ static int dvd_plugin_open (input_plugin
|
2008-01-31 14:59:26 +01:00
|
|
|
|
|
|
|
trace_print("Called\n");
|
|
|
|
|
|
|
|
+ for (i = 0; (node = xine_sarray_get (plgs[PLUGIN_VIDEO_DECODER-1], i)); i++)
|
|
|
|
+ if (strcmp (node->info->id, "mpeg2") == 0)
|
|
|
|
+ break;
|
|
|
|
+ if (node)
|
|
|
|
+ for (i = 0; (node = xine_sarray_get (plgs[PLUGIN_SPU_DECODER-1], i)); i++)
|
|
|
|
+ if (strcmp (node->info->id, "spudec") == 0)
|
|
|
|
+ break;
|
|
|
|
+ if (! node) {
|
|
|
|
+ _x_message (this->stream, XINE_MSG_GENERAL_WARNING,
|
|
|
|
+ "This version of Xine lacks support for playing DVD discs "
|
|
|
|
+ "for legal reasons.\n"
|
|
|
|
+ "Please go to http://www.opensuse.org/XINE#Legal_Matters "
|
|
|
|
+ "for further details.",
|
|
|
|
+ NULL);
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
/* we already checked the "dvd:/" MRL before */
|
2008-03-27 23:30:14 +01:00
|
|
|
locator_orig = locator = strdup (this->mrl + (sizeof("dvd:") - 1));
|
2008-01-31 14:59:26 +01:00
|
|
|
|