mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
timecodestamper: Don't fail the latency query in LTC mode if we have no framerate
Only in LTC mode we introduce additional latency that is depending on only on a property and not on the framerate, so waiting for the framerate is not necessary. In all other modes no latency is introduced at all and the latency query can simply be proxied. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7831>
This commit is contained in:
parent
39b2dd1dd1
commit
d2d2a12aac
1 changed files with 20 additions and 24 deletions
|
@ -1037,9 +1037,11 @@ gst_timecodestamper_query (GstBaseTransform * trans,
|
||||||
res =
|
res =
|
||||||
gst_pad_query_default (GST_BASE_TRANSFORM_SRC_PAD (trans),
|
gst_pad_query_default (GST_BASE_TRANSFORM_SRC_PAD (trans),
|
||||||
GST_OBJECT_CAST (trans), query);
|
GST_OBJECT_CAST (trans), query);
|
||||||
g_mutex_lock (&timecodestamper->mutex);
|
if (!res)
|
||||||
if (res && timecodestamper->fps_n && timecodestamper->fps_d) {
|
return FALSE;
|
||||||
|
|
||||||
gst_query_parse_latency (query, &live, &min_latency, &max_latency);
|
gst_query_parse_latency (query, &live, &min_latency, &max_latency);
|
||||||
|
g_mutex_lock (&timecodestamper->mutex);
|
||||||
if (live && timecodestamper->ltcpad) {
|
if (live && timecodestamper->ltcpad) {
|
||||||
/* Introduce additional LTC for waiting for LTC timecodes. The
|
/* Introduce additional LTC for waiting for LTC timecodes. The
|
||||||
* LTC library introduces some as well as the encoding of the LTC
|
* LTC library introduces some as well as the encoding of the LTC
|
||||||
|
@ -1057,12 +1059,6 @@ gst_timecodestamper_query (GstBaseTransform * trans,
|
||||||
} else {
|
} else {
|
||||||
timecodestamper->latency = 0;
|
timecodestamper->latency = 0;
|
||||||
}
|
}
|
||||||
} else if (res) {
|
|
||||||
GST_ERROR_OBJECT (timecodestamper,
|
|
||||||
"Need a known, non-variable framerate to answer LATENCY query");
|
|
||||||
res = FALSE;
|
|
||||||
timecodestamper->latency = GST_CLOCK_TIME_NONE;
|
|
||||||
}
|
|
||||||
g_mutex_unlock (&timecodestamper->mutex);
|
g_mutex_unlock (&timecodestamper->mutex);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue