Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Andreas Frisch
gst-plugins-bad
Commits
bbdb392a
Commit
bbdb392a
authored
Jan 10, 2020
by
Sebastian Dröge
🍵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timecodestamper: Fix waiting for the first video frame in case of live video input
parent
d7bb5b8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
gst/timecode/gsttimecodestamper.c
gst/timecode/gsttimecodestamper.c
+11
-5
No files found.
gst/timecode/gsttimecodestamper.c
View file @
bbdb392a
...
@@ -1238,14 +1238,20 @@ gst_timecodestamper_transform_ip (GstBaseTransform * vfilter,
...
@@ -1238,14 +1238,20 @@ gst_timecodestamper_transform_ip (GstBaseTransform * vfilter,
GstClockID
clock_id
;
GstClockID
clock_id
;
GstClockTime
base_time
=
GstClockTime
base_time
=
gst_element_get_base_time
(
GST_ELEMENT_CAST
(
timecodestamper
));
gst_element_get_base_time
(
GST_ELEMENT_CAST
(
timecodestamper
));
GstClockTime
wait_time
;
/* If we have no latency yet then wait at least 8 frames durations.
* See LATENCY query handling for details. */
if
(
timecodestamper
->
latency
==
GST_CLOCK_TIME_NONE
)
{
wait_time
=
base_time
+
running_time
+
8
*
frame_duration
;
}
else
{
wait_time
=
base_time
+
running_time
+
timecodestamper
->
latency
;
}
GST_TRACE_OBJECT
(
timecodestamper
,
GST_TRACE_OBJECT
(
timecodestamper
,
"Waiting for clock to reach %"
GST_TIME_FORMAT
,
"Waiting for clock to reach %"
GST_TIME_FORMAT
,
GST_TIME_ARGS
(
base_time
+
running_time
+
GST_TIME_ARGS
(
wait_time
));
timecodestamper
->
latency
));
clock_id
=
gst_clock_new_single_shot_id
(
clock
,
wait_time
);
clock_id
=
gst_clock_new_single_shot_id
(
clock
,
base_time
+
running_time
+
timecodestamper
->
latency
);
timecodestamper
->
video_clock_id
=
clock_id
;
timecodestamper
->
video_clock_id
=
clock_id
;
g_mutex_unlock
(
&
timecodestamper
->
mutex
);
g_mutex_unlock
(
&
timecodestamper
->
mutex
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment