[FFmpeg-devel] Notes about avdevice
Reimar.Doeffinger at gmx.de
Sun Nov 25 16:09:26 CET 2012
On 25 Nov 2012, at 14:29, "Don Moir" <donmoir at comcast.net> wrote:
> 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.
You misunderstood I think. The idea in principle would be to have some avoption_query_ranges function, which would return an array of all allowed values/ranges for that option.
Getting the details right will be a bit tricky though, but it would be more flexible and scalable than adding a new function for device name, one for resolutions etc. pp.
More information about the ffmpeg-devel