mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
camerabin2: micro optimize linking some more
This commit is contained in:
parent
9eb79984a8
commit
f6d47a4206
2 changed files with 6 additions and 3 deletions
|
@ -125,7 +125,8 @@ gst_camerabin_try_add_element (GstBin * bin, const gchar * srcpad,
|
|||
GST_DEBUG_PAD_NAME (bin_pad));
|
||||
bin_elem = gst_pad_get_parent_element (bin_pad);
|
||||
gst_object_unref (bin_pad);
|
||||
if (!gst_element_link_pads (bin_elem, srcpad, new_elem, dstpad)) {
|
||||
if (!gst_element_link_pads_full (bin_elem, srcpad, new_elem, dstpad,
|
||||
GST_PAD_LINK_CHECK_CAPS)) {
|
||||
gst_object_ref (new_elem);
|
||||
gst_bin_remove (bin, new_elem);
|
||||
ret = FALSE;
|
||||
|
|
|
@ -1794,8 +1794,10 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
|
|||
gst_bin_add (GST_BIN_CAST (camera),
|
||||
gst_object_ref (camera->audio_capsfilter));
|
||||
|
||||
gst_element_link_many (camera->audio_src, camera->audio_volume,
|
||||
camera->audio_capsfilter, NULL);
|
||||
gst_element_link_pads_full (camera->audio_src, "src",
|
||||
camera->audio_volume, "sink", GST_PAD_LINK_CHECK_CAPS);
|
||||
gst_element_link_pads_full (camera->audio_volume, "src",
|
||||
camera->audio_capsfilter, "sink", GST_PAD_LINK_CHECK_CAPS);
|
||||
|
||||
srcpad = gst_element_get_static_pad (camera->audio_src, "src");
|
||||
|
||||
|
|
Loading…
Reference in a new issue