summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_examiner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-05-24 23:29:39 +0100
committerCarl Hetherington <cth@carlh.net>2019-05-24 23:29:39 +0100
commit92784c9c28c48859578cd6e75aa01d5657d0c341 (patch)
tree595a34ecd2c59bf9d3dbcfa0c6f0a91b17ecfa5b /src/lib/ffmpeg_examiner.cc
parent6c78f6d31a457ad34fb14b7c926fb418b4d6790d (diff)
Basic ability to set video range (JPEG/MPEG) at least for YUV content. May not work for RGB. See #1509.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
-rw-r--r--src/lib/ffmpeg_examiner.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc
index a4c5eb128..3fb9a53e4 100644
--- a/src/lib/ffmpeg_examiner.cc
+++ b/src/lib/ffmpeg_examiner.cc
@@ -388,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;
+ }
+}