diff options
author | Ben Hagen <ben@kamerawerk.ch> | 2014-08-16 16:05:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-16 19:14:49 +0200 |
commit | 6928ea7eb0fbb12fa1d90075495fc910fbe16971 (patch) | |
tree | ec224a003f53a87b76590d86307106979e1655f2 /libavformat | |
parent | e7f3b507a3437db1f4157abffdda2218afd739e0 (diff) | |
download | ffmpeg-6928ea7eb0fbb12fa1d90075495fc910fbe16971.tar.gz |
cinedec: add shutter and crop metadata
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/cinedec.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index 7daf0e0190..8f450fa865 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -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++) |