Commit a55f7663 authored by Florent Thiery's avatar Florent Thiery

Merge branch 'videorate' into 'master'

detect: Handle missing video frame duration meta

See merge request !9
parents d1a9af95 346006cd
Pipeline #26710 passed with stages
in 10 minutes and 17 seconds
......@@ -176,7 +176,13 @@ class QrLipsyncDetector:
def on_video_fakesink_buffer(self, pad, info, data):
buf = info.get_buffer()
self._video_duration = buf.pts + buf.duration
duration = buf.duration
if duration == Gst.CLOCK_TIME_NONE:
if self.framerate:
duration = int(Gst.SECOND / self.framerate)
else:
duration = 0
self._video_duration = buf.pts + duration
return True
def _on_eos(self, bus, message):
......
......@@ -128,6 +128,9 @@ class QrLipsyncGenerator:
qroverlay_element_name = "qroverlay"
if not self.settings["disable_audio"]:
data_name = s.get("extra_data_name", "tickfreq")
qroverlay_element_name = "debugqroverlay"
if not Gst.ElementFactory.find(qroverlay_element_name):
qroverlay_element_name = "qroverlay"
qroverlay = (
'%s x=%s y=%s name=%s qrcode-error-correction=%s extra-data-span-buffers=%s extra-data-interval-buffers=%s extra-data-name=%s extra-data-array="%s" pixel-size=%s'
% (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment