imagefreeze and base time

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

imagefreeze and base time

Matteo Valdina
Hi y'all,
I'm playing with imagefreeze and I have some issue with the presentation timestamp provided by imagefreeze.
I have a pipeline that can dynamically switch from camera (v4l) to an image (jpeg, png). I use the imagefreeze after the decodebin to provide a constant flow of frames to the renderer (vaapisink).

The problem is when I switch from v4l to decodebin/imagefreeze that imagefreeze will start a new segment from 0. The filesrc is setted to do-timestamp and before the imagefreeze frames are correctly timestamped.
The result is that imagefreeze will go in a busy loop to generate n-frames to catch up with the vaapisnik renderer time.
For example, I switch from v4l to decodebin/imagefreeze at 0:00:41.0 seconds, the image freeze will generate 41 seconds of data in less than a second. 

This doesn't cause a video issue but this is a spike in cpu utilization and a bit of pollution for logging.
I work around the issue adding a pad probe (imagefreeze src) for the buffer and changing the PTS values of each buffer.

From my understanding of the imagefreeze the code ignores the base time or running time. Should imagefreeze take into account the base time and running time?
There is another option aside imagefreeze?

Best
Matteo Valdina

--
“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”
- Tony Hoare

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: imagefreeze and base time

ShilVin
 do-timestamp on filesrc has no effect as filesource generate
GST_FORMAT_BYTES. I am not sure how manipulate the segment in filesrc. I
think there are 2 workarounds for this(As per me)

1. use input-selector in the pipeline, let both v4l2src and imagefreez be
active all the time. Switch input-selector active-pad as anwhen needed.

2. Use "identity" element with "single-segment" property true to generate
continous time stamp




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel