7611
|
1 |
--- gst-plugins-base-0.10.8/gst-libs/gst/cdda/gstcddabasesrc.c-orig 2006-07-12 12:59:11.642456000 -0500
|
|
2 |
+++ gst-plugins-base-0.10.8/gst-libs/gst/cdda/gstcddabasesrc.c 2006-07-12 13:53:37.699805000 -0500
|
|
3 |
@@ -130,7 +130,7 @@ static void gst_cdda_base_src_set_index
|
|
4 |
static GstIndex *gst_cdda_base_src_get_index (GstElement * src);
|
|
5 |
|
|
6 |
GST_BOILERPLATE_FULL (GstCddaBaseSrc, gst_cdda_base_src, GstPushSrc,
|
|
7 |
- GST_TYPE_PUSH_SRC, gst_cdda_base_src_setup_interfaces);
|
|
8 |
+ GST_TYPE_PUSH_SRC, gst_cdda_base_src_setup_interfaces)
|
|
9 |
|
|
10 |
#define SRC_CAPS \
|
|
11 |
"audio/x-raw-int, " \
|
|
12 |
@@ -949,6 +949,39 @@ gst_cdda_base_src_uri_set_uri (GstURIHan
|
|
13 |
location = g_strdup ("1");
|
|
14 |
}
|
|
15 |
|
|
16 |
+ if (strncmp (location, "/dev/", 5) == 0 ||
|
|
17 |
+ strncmp (location, "dev/", 4) == 0) {
|
|
18 |
+
|
|
19 |
+ gchar **uri_split;
|
|
20 |
+#ifdef __sun
|
|
21 |
+ /*
|
|
22 |
+ * On Solaris, /dev/rdsk is used for accessing the CD device, but some
|
|
23 |
+ * applications pass in /dev/dsk, so correct.
|
|
24 |
+ */
|
|
25 |
+ gchar *test_for_dsk;
|
|
26 |
+
|
|
27 |
+ test_for_dsk = g_strrstr (location, "dev/dsk");
|
|
28 |
+
|
|
29 |
+ if (test_for_dsk != NULL)
|
|
30 |
+ location = g_strdup_printf ("/dev/rdsk%s", test_for_dsk + strlen ("dev/dsk"));
|
|
31 |
+#endif
|
|
32 |
+
|
|
33 |
+ uri_split = g_strsplit (location, "#", 0);
|
|
34 |
+
|
|
35 |
+ if (strncmp (location, "/dev/", 5) == 0)
|
|
36 |
+ src->device = g_strdup (uri_split[0]);
|
|
37 |
+ else
|
|
38 |
+ src->device = g_strdup_printf ("/%s", uri_split[0]);
|
|
39 |
+
|
|
40 |
+ if (uri_split[1] != NULL) {
|
|
41 |
+ location = uri_split[1];
|
|
42 |
+ } else {
|
|
43 |
+ location = g_strdup ("1");
|
|
44 |
+ }
|
|
45 |
+
|
|
46 |
+ g_strfreev (uri_split);
|
|
47 |
+ }
|
|
48 |
+
|
|
49 |
src->uri_track = strtol (location, NULL, 10);
|
|
50 |
g_free (location);
|
|
51 |
|