X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_examiner.h;h=3852f51a5fca2d83c87f6286050b8fe2d7537d8c;hb=a332bd6be323f03dad5b180fb237afe54f1bf81e;hp=5cd70d979cd6722f22fdebc3a22bef7f28a64c12;hpb=81a93ab80d04a0d01783266139cac982eb342421;p=dcpomatic.git diff --git a/src/lib/ffmpeg_examiner.h b/src/lib/ffmpeg_examiner.h index 5cd70d979..3852f51a5 100644 --- a/src/lib/ffmpeg_examiner.h +++ b/src/lib/ffmpeg_examiner.h @@ -49,10 +49,12 @@ public: return _audio_streams; } - boost::optional first_video () const { + boost::optional first_video () const { return _first_video; } + VideoRange range () const; + AVColorRange color_range () const { return video_codec_context()->color_range; } @@ -71,26 +73,37 @@ public: boost::optional bits_per_pixel () const; + boost::optional rotation () const { + return _rotation; + } + + bool pulldown () const { + return _pulldown; + } + private: - void video_packet (AVCodecContext *); + void video_packet (AVCodecContext *, std::string& temporal_reference); void audio_packet (AVCodecContext *, boost::shared_ptr); std::string stream_name (AVStream* s) const; std::string subtitle_stream_name (AVStream* s) const; - boost::optional frame_time (AVStream* s) const; + boost::optional frame_time (AVStream* s) const; std::vector > _subtitle_streams; std::vector > _audio_streams; - boost::optional _first_video; + boost::optional _first_video; /** Video length, either obtained from the header or derived by running * through the whole file. */ Frame _video_length; bool _need_video_length; + boost::optional _rotation; + bool _pulldown; + struct SubtitleStart { - SubtitleStart (std::string id_, bool image_, ContentTime time_) + SubtitleStart (std::string id_, bool image_, dcpomatic::ContentTime time_) : id (id_) , image (image_) , time (time_) @@ -99,7 +112,7 @@ private: std::string id; /** true if it's an image subtitle, false for text */ bool image; - ContentTime time; + dcpomatic::ContentTime time; }; typedef std::map, boost::optional > LastSubtitleMap;