]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_format.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavfilter / vf_format.c
index d8b3a40a7d347462931d561b6927acd6e987f7af..ccd829f13c5bd59b1ca3479312d27a5b0f328373 100644 (file)
  * format and noformat video filters
  */
 
+#include <string.h>
+
+#include "libavutil/internal.h"
+#include "libavutil/mem.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "internal.h"
+#include "formats.h"
+#include "internal.h"
 #include "video.h"
 
 typedef struct {
@@ -38,7 +44,7 @@ typedef struct {
 
 #define PIX_FMT_NAME_MAXSIZE 32
 
-static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
+static av_cold int init(AVFilterContext *ctx, const char *args)
 {
     FormatContext *format = ctx->priv;
     const char *cur, *sep;
@@ -87,7 +93,7 @@ static AVFilterFormats *make_format_list(FormatContext *format, int flag)
 #if CONFIG_FORMAT_FILTER
 static int query_formats_format(AVFilterContext *ctx)
 {
-    avfilter_set_common_pixel_formats(ctx, make_format_list(ctx->priv, 1));
+    ff_set_common_formats(ctx, make_format_list(ctx->priv, 1));
     return 0;
 }
 
@@ -101,23 +107,23 @@ AVFilter avfilter_vf_format = {
 
     .priv_size = sizeof(FormatContext),
 
-    .inputs    = (const AVFilterPad[]) {{ .name      = "default",
-                                    .type            = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer= ff_null_get_video_buffer,
-                                    .start_frame     = ff_null_start_frame,
-                                    .draw_slice      = ff_null_draw_slice,
-                                    .end_frame       = ff_null_end_frame, },
-                                  { .name = NULL}},
-    .outputs   = (const AVFilterPad[]) {{ .name      = "default",
-                                    .type            = AVMEDIA_TYPE_VIDEO },
-                                  { .name = NULL}},
+    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
+                                          .type            = AVMEDIA_TYPE_VIDEO,
+                                          .get_video_buffer= ff_null_get_video_buffer,
+                                          .start_frame     = ff_null_start_frame,
+                                          .draw_slice      = ff_null_draw_slice,
+                                          .end_frame       = ff_null_end_frame, },
+                                        { .name = NULL}},
+    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
+                                          .type            = AVMEDIA_TYPE_VIDEO },
+                                        { .name = NULL}},
 };
 #endif /* CONFIG_FORMAT_FILTER */
 
 #if CONFIG_NOFORMAT_FILTER
 static int query_formats_noformat(AVFilterContext *ctx)
 {
-    avfilter_set_common_pixel_formats(ctx, make_format_list(ctx->priv, 0));
+    ff_set_common_formats(ctx, make_format_list(ctx->priv, 0));
     return 0;
 }
 
@@ -131,15 +137,15 @@ AVFilter avfilter_vf_noformat = {
 
     .priv_size = sizeof(FormatContext),
 
-    .inputs    = (const AVFilterPad[]) {{ .name      = "default",
-                                    .type            = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer= ff_null_get_video_buffer,
-                                    .start_frame     = ff_null_start_frame,
-                                    .draw_slice      = ff_null_draw_slice,
-                                    .end_frame       = ff_null_end_frame, },
-                                  { .name = NULL}},
-    .outputs   = (const AVFilterPad[]) {{ .name      = "default",
-                                    .type            = AVMEDIA_TYPE_VIDEO },
-                                  { .name = NULL}},
+    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
+                                          .type            = AVMEDIA_TYPE_VIDEO,
+                                          .get_video_buffer= ff_null_get_video_buffer,
+                                          .start_frame     = ff_null_start_frame,
+                                          .draw_slice      = ff_null_draw_slice,
+                                          .end_frame       = ff_null_end_frame, },
+                                        { .name = NULL}},
+    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
+                                          .type            = AVMEDIA_TYPE_VIDEO },
+                                        { .name = NULL}},
 };
 #endif /* CONFIG_NOFORMAT_FILTER */