mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
playbin: set custom text sink properties
Set the custom sink async=FALSE to not make it participate in preroll because we are dealing with sparse streams. Try to set sync=TRUE on the custom text sink.
This commit is contained in:
parent
e8a9b98819
commit
5021c930ba
1 changed files with 9 additions and 3 deletions
|
@ -928,7 +928,8 @@ gen_text_chain (GstPlaySink * playsink)
|
||||||
if (chain->sink) {
|
if (chain->sink) {
|
||||||
elem = gst_play_sink_find_property_sinks (playsink, chain->sink, "async");
|
elem = gst_play_sink_find_property_sinks (playsink, chain->sink, "async");
|
||||||
if (elem) {
|
if (elem) {
|
||||||
g_object_set (elem, "async", TRUE, NULL);
|
/* make sure the sparse subtitles don't participate in the preroll */
|
||||||
|
g_object_set (elem, "async", FALSE, NULL);
|
||||||
/* we have a custom sink, this will be our textsinkpad */
|
/* we have a custom sink, this will be our textsinkpad */
|
||||||
textsinkpad = gst_element_get_static_pad (chain->sink, "sink");
|
textsinkpad = gst_element_get_static_pad (chain->sink, "sink");
|
||||||
if (textsinkpad) {
|
if (textsinkpad) {
|
||||||
|
@ -941,6 +942,11 @@ gen_text_chain (GstPlaySink * playsink)
|
||||||
gst_object_unref (chain->sink);
|
gst_object_unref (chain->sink);
|
||||||
chain->sink = NULL;
|
chain->sink = NULL;
|
||||||
}
|
}
|
||||||
|
/* try to set sync to true but it's no biggie when we can't */
|
||||||
|
if ((elem =
|
||||||
|
gst_play_sink_find_property_sinks (playsink, chain->sink,
|
||||||
|
"async")))
|
||||||
|
g_object_set (elem, "sync", TRUE, NULL);
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING_OBJECT (playsink,
|
GST_WARNING_OBJECT (playsink,
|
||||||
"can't find async property in custom text sink");
|
"can't find async property in custom text sink");
|
||||||
|
@ -1537,8 +1543,8 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
||||||
if (playsink->vischain) {
|
if (playsink->vischain) {
|
||||||
GST_DEBUG_OBJECT (playsink, "setting up vis chain");
|
GST_DEBUG_OBJECT (playsink, "setting up vis chain");
|
||||||
srcpad =
|
srcpad =
|
||||||
gst_element_get_static_pad (GST_ELEMENT_CAST (playsink->vischain->
|
gst_element_get_static_pad (GST_ELEMENT_CAST (playsink->
|
||||||
chain.bin), "src");
|
vischain->chain.bin), "src");
|
||||||
add_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
|
add_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
|
||||||
gst_pad_link (playsink->audio_tee_vissrc, playsink->vischain->sinkpad);
|
gst_pad_link (playsink->audio_tee_vissrc, playsink->vischain->sinkpad);
|
||||||
gst_pad_link (srcpad, playsink->videochain->sinkpad);
|
gst_pad_link (srcpad, playsink->videochain->sinkpad);
|
||||||
|
|
Loading…
Reference in a new issue