On date Friday 2011-05-27 10:44:05 +0200, Anton Khirnov encoded: > On Fri, 27 May 2011 10:30:47 +0200, Stefano Sabatini > <[email protected]> wrote: > > On date Friday 2011-05-27 07:43:09 +0200, Anton Khirnov encoded: > > > --- > > > libavdevice/libdc1394.c | 14 +++++++++++++- > > > 1 files changed, 13 insertions(+), 1 deletions(-) > > > > > > diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c > > > index 4462262..3692ee8 100644 > > > --- a/libavdevice/libdc1394.c > > > +++ b/libavdevice/libdc1394.c > > > @@ -25,6 +25,7 @@ > > > #include "libavutil/log.h" > > > #include "libavutil/opt.h" > > > #include "libavutil/parseutils.h" > > > +#include "libavutil/pixdesc.h" > > > > > > #if HAVE_LIBDC1394_2 > > > #include <dc1394/dc1394.h> > > > @@ -61,6 +62,7 @@ typedef struct dc1394_data { > > > int current_frame; > > > int fps; > > > char *video_size; /**< String describing video size, set by a > > > private option. */ > > > + char *pixel_format; /**< Set by a private option. */ > > > > > > AVPacket packet; > > > } dc1394_data; > > > @@ -99,6 +101,7 @@ static const AVOption options[] = { > > > { "channel", "", offsetof(dc1394_data, channel), FF_OPT_TYPE_INT, > > > {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, > > > #endif > > > { "video_size", "A string describing frame size, such as 640x480 or > > > hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = "qvga"}, 0, 0, > > > DEC }, > > > + { "pixel_format", "", OFFSET(pixel_format), FF_OPT_TYPE_STRING, > > > {.str = "UYVY422"}, 0, 0, DEC }, > > > > Maybe pix_fmt (for consistency with the current -pix_fmt option). > > > > Conflict!
It was my guess, but I find pretty confusing using an arbitrary name variant for such purpose, this problem should be fixed or you'll endup with many funny variants of the same name (e.g.: how are you going to call a pix_fmt option in a *decoder*?). > How is ffmpeg.c supposed to know to distinguish between the two? Is it currently required to override the -pix_fmt option? When AVFormatParameters is still supported ffmpeg will use ap.pix_fmt, and will directly use the pix_fmt option defined in the private context when it will be dropped. Alternatively: ffmpeg -f bktr -format_opts pix_fmt=rgb24 INPUT ... Another solution was proposed in mpegts options: prefix each private option with the name of the corresponding element, so we'd have: bktr_pix_fmt (but I don't like this solution very much because of its verbosity). Anyway private options can be easily changed, so if you want to temporarily ignore the namespace problem I'm not against this solution. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
