[FFmpeg-devel] Notes about avdevice

Don Moir donmoir at comcast.net
Sun Nov 25 14:29:19 CET 2012

On Sun, Nov 25, 2012 at 01:59:36PM +0100, Michael Niedermayer wrote:
> On Sun, Nov 25, 2012 at 01:47:37PM +0100, Reimar Döffinger wrote:
> > On Sun, Nov 25, 2012 at 07:20:00AM -0500, Don Moir wrote:
> > > >On Sun, Nov 25, 2012 at 03:38:20AM -0500, Don Moir wrote:
> > > >>>Don Moir <donmoir <at> comcast.net> writes:
> [...]
> > > Cameras
> > > get plugged in and unplugged and would need to update list
> > > periodically. I am not going to do something like try to read the
> > > av_log just so I can use avdevice. But getting the list in a modern
> > > way is easy along with the device resolutions and should be
> > > implemented in a modern way instead of something that goes back 30
> > > years.
> >
> > If it's so easy then design and propose an API. Hyperbole just
> > pisses people off and doesn't get anything done.
> > My suggestion would be to think if the avoption stuff could be extended
> > to query valid option values even for more complex options like a
> > device parameter.
> Thats an interresting idea

> Note that for handling the resolution case you would have to be able
> to specify some options while querying the other ones.
> Admittedly some special-case query functions are probably a quicker
> and easier to implement solution...

How would using avoption give you back the output in a reasonable way ? I think it would be good to add some functions to avdevice 
for dealing directly with this rather then going thru avformat_open_input with some option type. avformat_open_input also returns 
with some error code when you do this which is not great.

In my own implementation of getting the devices and device resolutions I generally use a thread and allow abort because it can be 
take some time to enumerate the devices and sometimes I might need abort out of the device getting process. 

More information about the ffmpeg-devel mailing list