From: GStreamer (bugzilla.gnome.org) <bug...@bu...> - 2006-01-06 14:12:27
|
Do not reply to this via email (we are currently unable to handle email responses and they get discarded). You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=3D325984 GStreamer | gst-plugins-base | Ver: HEAD CVS Summary: [playbin] cannot handle sources that produce raw audio/video Product: GStreamer Version: HEAD CVS Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: gst-plugins-base AssignedTo: gst...@li... ReportedBy: t....@ze... QAContact: gst...@li... GNOME version: Unspecified GNOME milestone: Unspecified Playbin currently doesn't handle sources that produce raw audio/video cor= rectly at the moment. This is required e.g. for Audio CD playback using cdparanoiasrc. My local patch currently looks like this, but needs cleaning up/review: Index: gstplaybasebin.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.c,v retrieving revision 1.94 diff -u -p -r1.94 gstplaybasebin.c --- gstplaybasebin.c 15 Dec 2005 09:48:19 -0000 1.94 +++ gstplaybasebin.c 6 Jan 2006 14:08:31 -0000 @@ -1255,12 +1266,71 @@ setup_source (GstPlayBaseBin * play_base #endif } +#if 1 /* now see if the source element emits raw audio/video all by itself, * if so, we can create streams for the pads and be done with it. * Also check that is has source pads, if not, we assume it will * do everything itself. */ { + GstIterator *pads_iter; + gboolean done =3D FALSE; + gboolean no_out, is_raw =3D FALSE; + + pads_iter =3D gst_element_iterate_pads (play_base_bin->source); + while (!done) { + gpointer data; + + switch (gst_iterator_next (pads_iter, &data)) { + case GST_ITERATOR_DONE: + done =3D TRUE; + case GST_ITERATOR_ERROR: + case GST_ITERATOR_RESYNC: + break; + case GST_ITERATOR_OK: + { + GstCaps *caps; + GstPad *pad =3D GST_PAD (data); + guint i, num_raw =3D 0; + + if (GST_PAD_IS_SINK (pad)) + break; + + no_out =3D FALSE; + + caps =3D gst_pad_get_caps (pad); + if (caps =3D=3D NULL || gst_caps_is_empty (caps) || + gst_caps_get_size (caps) =3D=3D 0) { + if (caps) + gst_caps_unref (caps); + break; + } + + for (i =3D 0; i < gst_caps_get_size (caps); ++i) { + GstStructure *s; + const gchar *mime_type; + + s =3D gst_caps_get_structure (caps, i); + mime_type =3D gst_structure_get_name (s); + + if (g_str_has_prefix (mime_type, "audio/x-raw") || + g_str_has_prefix (mime_type, "video/x-raw")) { + ++num_raw; + } + } + + if (num_raw =3D=3D gst_caps_get_size (caps)) { + new_decoded_pad (play_base_bin->source, pad, FALSE /*g_list_= next (pads) =3D=3D NULL*/, + play_base_bin); + is_raw =3D TRUE; + return TRUE; /////// fixme: added shortcut, remove again / /= // + } + + break; + } + } + } + #if 0 const GList *pads; gboolean is_raw =3D FALSE, no_out =3D TRUE; @@ -1312,6 +1382,7 @@ setup_source (GstPlayBaseBin * play_base } #endif } +#endif /* now create the decoder element */ if (!(play_base_bin->decoder =3D --=20 Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |