Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / lib / ffmpeg_examiner.cc
index 382b71b83442a36e2fe4910310131190fbfcb84f..3fb9a53e4618f49e6f4aedb82780e9f10de541b3 100644 (file)
@@ -166,6 +166,13 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
 
                DCPOMATIC_ASSERT (fabs (*_rotation - 90 * round (*_rotation / 90)) < 2);
        }
+
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+       AVDictionaryEntry* e = av_dict_get (_format_context->metadata, SWAROOP_ID_TAG, 0, 0);
+       if (e) {
+               _id = e->value;
+       }
+#endif
 }
 
 void
@@ -381,3 +388,16 @@ FFmpegExaminer::has_video () const
 {
        return static_cast<bool> (_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;
+       }
+}