gstcefsrc icon indicating copy to clipboard operation
gstcefsrc copied to clipboard

Ideas on making src element only generate frames when a fresh buffer is created

Open aiden-jeffrey opened this issue 9 months ago • 3 comments

I'm looking to add a vsync type functionality to the cefsrc element that would only push buffers when a fresh one is painted in the RenderHandler.OnPaint method. Ultimately I want to be able to record webgl applications that may have a variable frame rate into a constant frame rate video. In other words, I want one frame in my mp4 file per requestAnimationFrame in js land.

Currently it's clear that (baring some initial paints), there is 1 OnPaint call per animation frame.

I can sort of get there by controlling the duration and pts time in gst_cef_src_create, but I was wondering if you had some better idea. Is the answer something to do with making the element non-live for this vsync use case?

aiden-jeffrey avatar May 21 '24 14:05 aiden-jeffrey