[FFmpeg-devel] [PATCH 1/7] lavfi/tile: allow named arguments.

Nicolas George nicolas.george at normalesup.org
Fri Nov 9 00:06:33 CET 2012


L'octidi 18 brumaire, an CCXXI, Clément Bœsch a écrit :
> ---
>  libavfilter/vf_tile.c | 29 ++++++++++++++++++++++-------
>  1 file changed, 22 insertions(+), 7 deletions(-)
> 
> diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c
> index 52d53eb..716cc46 100644
> --- a/libavfilter/vf_tile.c
> +++ b/libavfilter/vf_tile.c
> @@ -23,6 +23,7 @@
>   * tile video filter
>   */
>  
> +#include "libavutil/opt.h"
>  #include "libavutil/pixdesc.h"
>  #include "avfilter.h"
>  #include "drawutils.h"
> @@ -31,6 +32,7 @@
>  #include "internal.h"
>  
>  typedef struct {
> +    const AVClass *class;
>      unsigned w, h;
>      unsigned current;
>      FFDrawContext draw;
> @@ -39,17 +41,29 @@ typedef struct {
>  
>  #define REASONABLE_SIZE 1024
>  
> +#define OFFSET(x) offsetof(TileContext, x)
> +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
> +
> +static const AVOption tile_options[] = {
> +    { "size", "set tile size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "6x5"}, 0, 0, FLAGS },
> +    { "s",    "set tile size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "6x5"}, 0, 0, FLAGS },

I would prefer if this file stays below the 80 columns limit. Breaking both
these lines before {.str} seems to be enough.

Apart from that, LGTM.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121109/5ca03b79/attachment.asc>


More information about the ffmpeg-devel mailing list