summaryrefslogtreecommitdiffstats
path: root/ext/resindvd/resindvdbin.c
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2008-06-17 19:52:00 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2008-06-17 19:52:00 +0000
commitfc19ab1ded25b25481b7562f5033b563da3e1f4f (patch)
tree9ce8fdfd780a917b095eeaba01af41a0f876d6c9 /ext/resindvd/resindvdbin.c
parentfe76d3be8dceaa6170a3c479987496941f1ed2a2 (diff)
downloadgst-plugins-bad-fc19ab1ded25b25481b7562f5033b563da3e1f4f.tar.gz
gst-plugins-bad-fc19ab1ded25b25481b7562f5033b563da3e1f4f.tar.bz2
gst-plugins-bad-fc19ab1ded25b25481b7562f5033b563da3e1f4f.zip
ext/resindvd/resindvdbin.c: Parse the URI argument into the device name so dvd:///path/to/image works.
Original commit message from CVS: * ext/resindvd/resindvdbin.c: Parse the URI argument into the device name so dvd:///path/to/image works. * ext/resindvd/resindvdsrc.c: Implement a trivial duration query reporting the current PGC length. * gst/dvdspu/gstdvdspu.c: Rename typo in the function name.
Diffstat (limited to 'ext/resindvd/resindvdbin.c')
-rw-r--r--ext/resindvd/resindvdbin.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c
index 9fe091f2..81d511a0 100644
--- a/ext/resindvd/resindvdbin.c
+++ b/ext/resindvd/resindvdbin.c
@@ -191,7 +191,7 @@ rsn_dvdbin_uri_get_uri (GstURIHandler * handler)
static gboolean
rsn_dvdbin_uri_set_uri (GstURIHandler * handler, const gchar * uri)
{
- // RsnDvdBin *dvdbin = RESINDVDBIN (handler);
+ RsnDvdBin *dvdbin = RESINDVDBIN (handler);
gboolean ret;
gchar *protocol, *location;
@@ -208,9 +208,14 @@ rsn_dvdbin_uri_set_uri (GstURIHandler * handler, const gchar * uri)
location = gst_uri_get_location (uri);
if (!location)
return ret;
+
/*
- * Parse out the device name
+ * URI structure: dvd:///path/to/device
*/
+ if (g_str_has_prefix (uri, "dvd://")) {
+ g_free (dvdbin->device);
+ dvdbin->device = g_strdup (uri + 6);
+ }
#if 0
/*
* Parse out the new t/c/a and seek to them
@@ -220,11 +225,6 @@ rsn_dvdbin_uri_set_uri (GstURIHandler * handler, const gchar * uri)
gchar **strcur;
gint pos = 0;
- location = gst_uri_get_location (uri);
-
- if (!location)
- return ret;
-
strcur = strs = g_strsplit (location, ",", 0);
while (strcur && *strcur) {
gint val;
@@ -527,6 +527,7 @@ remove_elements (RsnDvdBin * dvdbin)
DVDBIN_LOCK (dvdbin);
if (dvdbin->pieces[i] != NULL) {
GstElement *piece = dvdbin->pieces[i];
+
dvdbin->pieces[i] = NULL;
DVDBIN_UNLOCK (dvdbin);