[Libav-user] Querying v4l2 devices

Timur Guseynov s1.sam.1.93 at gmail.com
Sat Sep 17 10:49:48 EEST 2016


avdevice_list_input_sources works.

Thank you!

сб, 17 сент. 2016 г. в 1:33, Lukasz Marek <lukasz.m.luki2 at gmail.com>:

> On 17.09.2016 00:08, Lukasz Marek wrote:
> > I guess input device private data is not initialized, try to add this
> > code right after formatContext->iformat=inputFormat, just replace s with
> > formatContext
> >
> >     if (s->iformat->priv_data_size > 0) {
> >         s->priv_data = av_mallocz(s->iformat->priv_data_size);
> >         if (s->iformat->priv_class) {
> >             *(const AVClass**)s->priv_data= s->iformat->priv_class;
> >             av_opt_set_defaults(s->priv_data);
> >         }
> >     } else
> >         s->priv_data = NULL;
> >
> >
> > Maybe ff_alloc_input_device_context function should be moved to
> > libavdevice's public API
>
> Ignore this answer, it should work but manipulates private fields
> You should use avdevice_list_input_sources. If still not working then
> please attach some *.c file so i can test it locally.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160917/7efeced8/attachment.html>


More information about the Libav-user mailing list