X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_examiner.h;h=6e218512917813a5fe91ddbb7501c1b2ed3345a9;hb=ffa5a512112809e2256cae7a01afcd14c99c83a6;hp=7b64b508aff864661aa56b8cea8cd392a9f64c05;hpb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;p=dcpomatic.git diff --git a/src/lib/ffmpeg_examiner.h b/src/lib/ffmpeg_examiner.h index 7b64b508a..6e2185129 100644 --- a/src/lib/ffmpeg_examiner.h +++ b/src/lib/ffmpeg_examiner.h @@ -21,6 +21,8 @@ #include "video_examiner.h" #include +struct AVStream; + class FFmpegAudioStream; class FFmpegSubtitleStream; @@ -29,10 +31,11 @@ class FFmpegExaminer : public FFmpeg, public VideoExaminer public: FFmpegExaminer (boost::shared_ptr, boost::shared_ptr job = boost::shared_ptr ()); - boost::optional video_frame_rate () const; + boost::optional video_frame_rate () const; dcp::Size video_size () const; Frame video_length () const; - boost::optional sample_aspect_ratio () const; + boost::optional sample_aspect_ratio () const; + bool yuv () const; std::vector > subtitle_streams () const { return _subtitle_streams; @@ -46,6 +49,24 @@ public: return _first_video; } + AVColorRange color_range () const { + return video_codec_context()->color_range; + } + + AVColorPrimaries color_primaries () const { + return video_codec_context()->color_primaries; + } + + AVColorTransferCharacteristic color_trc () const { + return video_codec_context()->color_trc; + } + + AVColorSpace colorspace () const { + return video_codec_context()->colorspace; + } + + int bits_per_pixel () const; + private: void video_packet (AVCodecContext *); void audio_packet (AVCodecContext *, boost::shared_ptr); @@ -65,5 +86,6 @@ private: Frame _video_length; bool _need_video_length; - boost::optional _last_subtitle_start; + typedef std::map, boost::optional > LastSubtitleMap; + LastSubtitleMap _last_subtitle_start; };