[Ffmpeg-devel] [PATCH] support v4l2 video source and normid input

Michael Niedermayer michaelni
Fri Mar 23 13:36:20 CET 2007


Hi

On Fri, Mar 23, 2007 at 01:01:53PM +0100, Luca Abeni wrote:
> Hi Limin,
> 
> Limin Wang wrote:
> >Hi,
> >
> >After the patch, ffmpeg don't need depend on other applications like 
> >tvtime,
> >xawtv etc to set them.
> as I said last time a similar change was discussed, I do not like this 
> idea too much (I like more the idea of using different applications for 
> doing different things). But since everyone seem to want this feature in 
> ffmpeg, let's put it in.
> 
> I have some comments:
> 
> [...]
> >Index: ffmpeg.c
> >===================================================================
> >--- ffmpeg.c	(revision 8487)
> >+++ ffmpeg.c	(working copy)
> >@@ -181,6 +181,9 @@
> > static int  video_channel = 0;
> > static char *video_standard = "ntsc";
> > 
> >+static int  tv_video_input = 0;
> >+static int  tv_normid = 0;
> I do not like this. Global variables do not need to be initialized to 0 
> (yes, I see that the existing code already contains initializations to 0 
> for other global variables... But let's try to avoid initializing to 0 
> new variables). But Michael is the maintainer, so let's see his opinion.

i hate the senseless = 0 init too ...


[...]
> >Index: libavformat/avformat.h
> >===================================================================
> >--- libavformat/avformat.h	(revision 8487)
> >+++ libavformat/avformat.h	(working copy)
> >@@ -144,6 +144,8 @@
> > #if LIBAVFORMAT_VERSION_INT < (52<<16)
> >     const char *device; /**< video, audio or DV device */
> > #endif
> >+    int tv_video_input; /**< tv video source input */
> AVFormatParameters already contains a "channel" field that seems to be 
> used only by DV input. Can we reuse it instead of introducing a new 
> "tv_video_input" field?
> 
> In the same way, the "video_channel" variable and "-vc" option in 
> ffmpeg.c can be used for selecting the v4l2 input.
> (as I said, I believe that the "tv_normid" field can be avoided too, and 
> "standard" can be used instead).

whatever you guys decide, dont put more fields in AVFormatParameters please!

as most of the time putting things into AVFormatContext is simpler and leads
to simpler code ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070323/c9132992/attachment.pgp>



More information about the ffmpeg-devel mailing list