Commit 6928ea7e authored by Ben Hagen's avatar Ben Hagen Committed by Michael Niedermayer

cinedec: add shutter and crop metadata

parent e7f3b507
......@@ -225,7 +225,11 @@ static int cine_read_header(AVFormatContext *avctx)
return AVERROR_INVALIDDATA;
}
avio_skip(pb, 696); // Conv8Min ... ImHeightAcq
avio_skip(pb, 668); // Conv8Min ... Sensor
set_metadata_int(&st->metadata, "shutter_ns", avio_rl32(pb));
avio_skip(pb, 24); // EDRShutterNs ... ImHeightAcq
#define DESCRIPTION_SIZE 4096
description = av_malloc(DESCRIPTION_SIZE + 1);
......@@ -239,6 +243,14 @@ static int cine_read_header(AVFormatContext *avctx)
else
av_free(description);
avio_skip(pb, 1176); // RisingEdge ... cmUser
set_metadata_int(&st->metadata, "enable_crop", avio_rl32(pb));
set_metadata_int(&st->metadata, "crop_left", avio_rl32(pb));
set_metadata_int(&st->metadata, "crop_top", avio_rl32(pb));
set_metadata_int(&st->metadata, "crop_right", avio_rl32(pb));
set_metadata_int(&st->metadata, "crop_bottom", avio_rl32(pb));
/* parse image offsets */
avio_seek(pb, offImageOffsets, SEEK_SET);
for (i = 0; i < st->duration; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment