Decreasing startup delay with v4lsrc

Nicolas Dufresne nicolas at ndufresne.ca
Mon Mar 27 23:54:42 UTC 2017


Le dimanche 15 janvier 2017 à 14:45 -0500, Kristian Kielhofner a
écrit :
> Hi Nicolas,
> 
>   Thank you for getting back to me so quickly.
> 
>   I've implemented something similar to your second option, I only
> enumerate for the formats I want and then I stop when Gstreamer
> probes
> one resolution and one frame rate. In my application this provides
> the
> exact capabilities I want and I've been able to reduce probe time
> from
> seven seconds to about 1.5.
> 
>   The third option you provide would be best for my application. I
> understand your hesitation about user confusion but perhaps there is
> a
> way to implement this without creating extra support efforts?

Just a follow up. I started working on a patch in which we create caps
(on get caps) only based on what can be enumerated, no TRY_FMT
initially. This helps because this information is part of the
descriptor in UVC. That is only possible for capture. Then in fixate()
function, we'll apply the information we have with some default, then
transform back the FMT to caps, and check if that intersect with
downstream. Most of the time it will, so we'll get 1 TRY_FMT and 1
S_FMT in the best case. This should drastrically reduce the start time.
I hope I'll have time to finish this in the next few days. It the case
it does not, we'll be doing a series of TRY_FMT to find something
supported, but that will be done only for one resolution/framerate. And
will be restricted by downstream caps. This is generic enough, and
won't require the application to care.

regards,
Nicolas

p.s. not enumerating at all would break existing app like cheese.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170327/8d3f060d/attachment.sig>


More information about the gstreamer-devel mailing list