mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
osxaudiosrc: Allow caps renegotiation
The ringbuffer does allow renegotiation, so we do not have to report fixed caps once it is acquired (based on a similar patch for the sink side by Ilya Konstantinov <ilya.konstantinov@gmail.com>).
This commit is contained in:
parent
fd25ef137e
commit
995ba701b7
1 changed files with 4 additions and 7 deletions
|
@ -318,12 +318,7 @@ gst_osx_audio_src_get_caps (GstBaseSrc * src, GstCaps * filter)
|
||||||
if (buf) {
|
if (buf) {
|
||||||
GST_OBJECT_LOCK (buf);
|
GST_OBJECT_LOCK (buf);
|
||||||
|
|
||||||
if (buf->acquired && buf->spec.caps) {
|
if (buf->open && !osxsrc->cached_caps) {
|
||||||
/* Caps are fixed, use what we have */
|
|
||||||
ret = gst_caps_ref (buf->spec.caps);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ret && buf->open && !osxsrc->cached_caps) {
|
|
||||||
/* Device is open, let's probe its caps */
|
/* Device is open, let's probe its caps */
|
||||||
gst_osx_audio_src_probe_caps (osxsrc);
|
gst_osx_audio_src_probe_caps (osxsrc);
|
||||||
}
|
}
|
||||||
|
@ -332,8 +327,10 @@ gst_osx_audio_src_get_caps (GstBaseSrc * src, GstCaps * filter)
|
||||||
gst_object_unref (buf);
|
gst_object_unref (buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ret && osxsrc->cached_caps)
|
if (osxsrc->cached_caps)
|
||||||
ret = gst_caps_ref (osxsrc->cached_caps);
|
ret = gst_caps_ref (osxsrc->cached_caps);
|
||||||
|
else
|
||||||
|
ret = gst_pad_get_pad_template_caps (GST_AUDIO_BASE_SRC_PAD (osxsrc));
|
||||||
|
|
||||||
if (filter) {
|
if (filter) {
|
||||||
GstCaps *tmp;
|
GstCaps *tmp;
|
||||||
|
|
Loading…
Reference in a new issue