[Bug 738131] New: playbin: Bogus results from GST_STATE_NULL (audio-)sink

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Oct 7 23:54:33 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=738131
  GStreamer | gst-plugins-base | unspecified

           Summary: playbin: Bogus results from GST_STATE_NULL
                    (audio-)sink
    Classification: Platform
           Product: GStreamer
           Version: unspecified
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: bilboed at bilboed.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


I'm currently investigating playbin being used to switch from A+V files to
Video only and back to A+V.

The problem I'm encountering is the following:
1) Play a A+V file, two sinks are chosen (or specified, doesn't matter),
configured, linked, set to PLAYING ...
2) The source switches from A+V to Video-only (by emitting no-more-pads, adding
a new video pad, and removing the old ones), eventually playbin switches to
that new group, disables the audio sink on playsink (reconfiguring it), sets
the cached audio_sink to GST_STATE_NULL. Everything plays fine.
3) The problem arises when switching back to A+V. As decodebin tries to
autoplug the new audio and video pads, it will emit the autoplug-continue
signal, which playsink will try to answer ... by querying the cached sinks.
3.1) So far, so good (your sink might be able to handle compressed formats,
such as AC3) ... except that the cached sink (in playbin's
GstSourceGroup->*_sink) is NOT the one used and NOT in a state >=
GST_STATE_READY
3.2) As a result, when asking whether the sink accepts the given caps (say AC3)
the sink might say yes (like pulsesink has ac3 in its pad templates and since
it's in GST_STATE_NULL it will accept it), which will result in playbin telling
decodebin it should stop auto-plugging on those caps (ac3)
3.3) decodebin exposes the ac3 pad, playbin tries to link it to a compatible
sink (at this point it *will* set the sink to >= READY before linking)...
except it fails because the (hardware/device backing the) audio sink doesn't
accept AC3 => negotiation fails

I have temporarily worked around the issue in playbin's autoplug_continue_cb
and autoplug_select_cb by only checking whether a sink accepts the given caps
iif it's in GST_STATE(sink) >= GST_STATE_READY ... but it feels hackish.

Any comments/ideas ?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list