Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-03-14 08:42:19 +0300
committerMark Thompson <sw@jkqxz.net>2018-03-18 23:32:45 +0300
commit840f5b3e5ba12b26f53bf8539cb5f0f14c4a6d40 (patch)
tree011d490761da66f21b87354044014867cec49800 /libavcodec/h264_metadata_bsf.c
parenta094e7f16abffd2b0ed7bb4ce2edfeaf0d066691 (diff)
lavc/h264_metadata_bsf: support dump options.
Signed-off-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/h264_metadata_bsf.c')
-rw-r--r--libavcodec/h264_metadata_bsf.c66
1 files changed, 38 insertions, 28 deletions
diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index da37115b5d..3dc4affddd 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -591,82 +591,92 @@ static void h264_metadata_close(AVBSFContext *bsf)
}
#define OFFSET(x) offsetof(H264MetadataContext, x)
+#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
static const AVOption h264_metadata_options[] = {
{ "aud", "Access Unit Delimiter NAL units",
OFFSET(aud), AV_OPT_TYPE_INT,
- { .i64 = PASS }, PASS, REMOVE, 0, "aud" },
- { "pass", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PASS }, .unit = "aud" },
- { "insert", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = INSERT }, .unit = "aud" },
- { "remove", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE }, .unit = "aud" },
+ { .i64 = PASS }, PASS, REMOVE, FLAGS, "aud" },
+ { "pass", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = PASS }, .flags = FLAGS, .unit = "aud" },
+ { "insert", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = INSERT }, .flags = FLAGS, .unit = "aud" },
+ { "remove", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = REMOVE }, .flags = FLAGS, .unit = "aud" },
{ "sample_aspect_ratio", "Set sample aspect ratio (table E-1)",
OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL,
- { .dbl = 0.0 }, 0, 65535 },
+ { .dbl = 0.0 }, 0, 65535, FLAGS },
{ "video_format", "Set video format (table E-2)",
OFFSET(video_format), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 7 },
+ { .i64 = -1 }, -1, 7, FLAGS},
{ "video_full_range_flag", "Set video full range flag",
OFFSET(video_full_range_flag), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 1 },
+ { .i64 = -1 }, -1, 1, FLAGS },
{ "colour_primaries", "Set colour primaries (table E-3)",
OFFSET(colour_primaries), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 255 },
+ { .i64 = -1 }, -1, 255, FLAGS },
{ "transfer_characteristics", "Set transfer characteristics (table E-4)",
OFFSET(transfer_characteristics), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 255 },
+ { .i64 = -1 }, -1, 255, FLAGS },
{ "matrix_coefficients", "Set matrix coefficients (table E-5)",
OFFSET(matrix_coefficients), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 255 },
+ { .i64 = -1 }, -1, 255, FLAGS },
{ "chroma_sample_loc_type", "Set chroma sample location type (figure E-1)",
OFFSET(chroma_sample_loc_type), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 6 },
+ { .i64 = -1 }, -1, 6, FLAGS },
{ "tick_rate", "Set VUI tick rate (num_units_in_tick / time_scale)",
OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL,
- { .dbl = 0.0 }, 0, UINT_MAX },
+ { .dbl = 0.0 }, 0, UINT_MAX, FLAGS },
{ "fixed_frame_rate_flag", "Set VUI fixed frame rate flag",
OFFSET(fixed_frame_rate_flag), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 1 },
+ { .i64 = -1 }, -1, 1, FLAGS },
{ "crop_left", "Set left border crop offset",
OFFSET(crop_left), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, H264_MAX_WIDTH },
+ { .i64 = -1 }, -1, H264_MAX_WIDTH, FLAGS },
{ "crop_right", "Set right border crop offset",
OFFSET(crop_right), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, H264_MAX_WIDTH },
+ { .i64 = -1 }, -1, H264_MAX_WIDTH, FLAGS },
{ "crop_top", "Set top border crop offset",
OFFSET(crop_top), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, H264_MAX_HEIGHT },
+ { .i64 = -1 }, -1, H264_MAX_HEIGHT, FLAGS },
{ "crop_bottom", "Set bottom border crop offset",
OFFSET(crop_bottom), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, H264_MAX_HEIGHT },
+ { .i64 = -1 }, -1, H264_MAX_HEIGHT, FLAGS },
{ "sei_user_data", "Insert SEI user data (UUID+string)",
- OFFSET(sei_user_data), AV_OPT_TYPE_STRING, { .str = NULL } },
+ OFFSET(sei_user_data), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = FLAGS },
{ "delete_filler", "Delete all filler (both NAL and SEI)",
- OFFSET(delete_filler), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1 },
+ OFFSET(delete_filler), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS},
{ "display_orientation", "Display orientation SEI",
OFFSET(display_orientation), AV_OPT_TYPE_INT,
- { .i64 = PASS }, PASS, EXTRACT, 0, "disp_or" },
- { "pass", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PASS }, .unit = "disp_or" },
- { "insert", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = INSERT }, .unit = "disp_or" },
- { "remove", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE }, .unit = "disp_or" },
- { "extract", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = EXTRACT }, .unit = "disp_or" },
+ { .i64 = PASS }, PASS, EXTRACT, FLAGS, "disp_or" },
+ { "pass", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = PASS }, .flags = FLAGS, .unit = "disp_or" },
+ { "insert", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = INSERT }, .flags = FLAGS, .unit = "disp_or" },
+ { "remove", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = REMOVE }, .flags = FLAGS, .unit = "disp_or" },
+ { "extract", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = EXTRACT }, .flags = FLAGS, .unit = "disp_or" },
{ "rotate", "Set rotation in display orientation SEI (anticlockwise angle in degrees)",
OFFSET(rotate), AV_OPT_TYPE_DOUBLE,
- { .dbl = NAN }, -360.0, +360.0 },
+ { .dbl = NAN }, -360.0, +360.0, FLAGS },
{ "flip", "Set flip in display orientation SEI",
OFFSET(flip), AV_OPT_TYPE_FLAGS,
- { .i64 = 0 }, 0, FLIP_HORIZONTAL | FLIP_VERTICAL, .unit ="flip" },
+ { .i64 = 0 }, 0, FLIP_HORIZONTAL | FLIP_VERTICAL, FLAGS, "flip" },
{ "horizontal", "Set hor_flip",
- 0, AV_OPT_TYPE_CONST, { .i64 = FLIP_HORIZONTAL }, .unit ="flip" },
+ 0, AV_OPT_TYPE_CONST,
+ { .i64 = FLIP_HORIZONTAL }, .flags = FLAGS, .unit = "flip" },
{ "vertical", "Set ver_flip",
- 0, AV_OPT_TYPE_CONST, { .i64 = FLIP_VERTICAL }, .unit ="flip" },
+ 0, AV_OPT_TYPE_CONST,
+ { .i64 = FLIP_VERTICAL }, .flags = FLAGS, .unit = "flip" },
{ NULL }
};