X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_examiner.cc;h=3fb9a53e4618f49e6f4aedb82780e9f10de541b3;hb=3b31d2d8a129ae6d8d267427bd6b5bc444b40b2a;hp=382b71b83442a36e2fe4910310131190fbfcb84f;hpb=c4403784febdbdd42e9c32e67fadb147f11fe566;p=dcpomatic.git diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 382b71b83..3fb9a53e4 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -166,6 +166,13 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr c, shared_ptrmetadata, SWAROOP_ID_TAG, 0, 0); + if (e) { + _id = e->value; + } +#endif } void @@ -381,3 +388,16 @@ FFmpegExaminer::has_video () const { return static_cast (_video_stream); } + +VideoRange +FFmpegExaminer::range () const +{ + switch (color_range()) { + case AVCOL_RANGE_MPEG: + case AVCOL_RANGE_UNSPECIFIED: + return VIDEO_RANGE_VIDEO; + case AVCOL_RANGE_JPEG: + default: + return VIDEO_RANGE_FULL; + } +}