mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
cinedec: add shutter and crop metadata
This commit is contained in:
parent
e7f3b507a3
commit
6928ea7eb0
@ -225,7 +225,11 @@ static int cine_read_header(AVFormatContext *avctx)
|
|||||||
return AVERROR_INVALIDDATA;
|
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
|
#define DESCRIPTION_SIZE 4096
|
||||||
description = av_malloc(DESCRIPTION_SIZE + 1);
|
description = av_malloc(DESCRIPTION_SIZE + 1);
|
||||||
@ -239,6 +243,14 @@ static int cine_read_header(AVFormatContext *avctx)
|
|||||||
else
|
else
|
||||||
av_free(description);
|
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 */
|
/* parse image offsets */
|
||||||
avio_seek(pb, offImageOffsets, SEEK_SET);
|
avio_seek(pb, offImageOffsets, SEEK_SET);
|
||||||
for (i = 0; i < st->duration; i++)
|
for (i = 0; i < st->duration; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user