[Ffmpeg-devel] Re: [PATCH] Configure selectable video grab format
Wed Jan 31 16:25:22 CET 2007
Ramiro Polla said:
> Diego Biurrun wrote:
>> On Wed, Jan 31, 2007 at 02:17:52AM -0200, Ramiro Polla wrote:
>>> Diego Biurrun wrote:
>>>> On Sun, Jan 28, 2007 at 05:51:02PM -0200, Ramiro Polla wrote:
>>>>> Ok. I used --default-grabber and default_grabber as the variable, as
>>>>> there isn't more than one audio grab format.
>>>> While I like the idea of setting the grab device in configure instead of
>>>> using #ifdef in ffmpeg.c, I don't see why the device should be
>>>> selectable. Just hardcode it in configure and be done with it.
>>> Attached patch just moves #ifdefs from ffmpeg.c to configure.
>>> --- configure (revision 7760)
>>> +++ configure (working copy)
>>> @@ -670,6 +670,7 @@
> Starts off disabled.
>>> @@ -1802,6 +1803,12 @@
>>> add_extralibs -lX11 -lXext ||
>>> disable x11_grab_device_demuxer
>>> +# Set default video grab format
>>> +enabled bktr && video_grab_format=bktr
> The first time it doesn't check wheter it's disabled (we know it is).
>>> +disabled video_grab_format && enabled video4linux2 &&
> If it has not been set (bktr was disabled), check for video4linux2.
>>> +disabled video_grab_format && video_grab_format=video4linux
> If it still hasn't been set, set to video4linux (the same things that
> happens in ffmpeg.c).
Something like this would do the same thing:
enabled bktr && video_grab_format=bktr ||
enabled video4linux2 && video_grab_format=video4linux2 ||
That said, I don't like the design of the grabbing code at all. IMHO it would
be much cleaner to simply run ffmpeg -f v4l2 -i /dev/video0 or whatever,
dropping the whole concept of a default grabbing device used if no input is
mru at inprovide.com
More information about the ffmpeg-devel