mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
encodebin: Don't try rate adjustment before the first buffer
With both audiorate and videorate, it seems more sensible to apply rate adjustments after the first buffer appears. For example, with v4l2src, there is often a small delay before the first video buffer turns up, and this can cause a stuttery start because of videorate trying to ensure a perfect stream.
This commit is contained in:
parent
08525d825d
commit
25e0b77bbe
1 changed files with 3 additions and 0 deletions
|
@ -1504,6 +1504,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
|
||||||
missing_element_name = "videorate";
|
missing_element_name = "videorate";
|
||||||
goto missing_element;
|
goto missing_element;
|
||||||
}
|
}
|
||||||
|
g_object_set (vrate, "skip-to-first", TRUE, NULL);
|
||||||
|
|
||||||
gst_bin_add ((GstBin *) ebin, vrate);
|
gst_bin_add ((GstBin *) ebin, vrate);
|
||||||
tosync = g_list_prepend (tosync, vrate);
|
tosync = g_list_prepend (tosync, vrate);
|
||||||
|
@ -1535,6 +1536,8 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
|
||||||
goto missing_element;
|
goto missing_element;
|
||||||
}
|
}
|
||||||
g_object_set (arate, "tolerance", (guint64) ebin->tolerance, NULL);
|
g_object_set (arate, "tolerance", (guint64) ebin->tolerance, NULL);
|
||||||
|
g_object_set (arate, "skip-to-first", TRUE, NULL);
|
||||||
|
|
||||||
aconv = gst_element_factory_make ("audioconvert", NULL);
|
aconv = gst_element_factory_make ("audioconvert", NULL);
|
||||||
aconv2 = gst_element_factory_make ("audioconvert", NULL);
|
aconv2 = gst_element_factory_make ("audioconvert", NULL);
|
||||||
ares = gst_element_factory_make ("audioresample", NULL);
|
ares = gst_element_factory_make ("audioresample", NULL);
|
||||||
|
|
Loading…
Reference in a new issue