urisourcebin: Set source element to READY before querying it
authorEdward Hervey <edward@centricular.com>
Tue, 31 Jan 2023 15:12:17 +0000 (16:12 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 18 Jul 2023 14:45:12 +0000 (14:45 +0000)
commit1ee26b0a7a366bb3052d8407c2fe0ffff0323817
treeddfd5dc03f4f219e87a2760551d21b6d49379b19
parent3e541953f89824c69ed79a73e640b98ab6aebec7
urisourcebin: Set source element to READY before querying it

Generating the source element is done when urisourcebin is doing the READY to
PAUSED state change, so it is reasonable to set the new source element to that
state.

This also allows detecting early failures with backing libraries or
hardware (checks done in NULL->READY).

Finally it makes more sense to have an element in READY when attempting to query
information from it (such as SCHEDULING queries or probing live-ness).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5058>
subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c