Tidy up test film naming.
[dcpomatic.git] / src / lib / ffmpeg_decoder.h
index 0d256b37e4b0152237c605744589f0f302ae95e2..26b5d69792f42084d8b72cbad9c6cac5415e6282 100644 (file)
@@ -25,6 +25,7 @@
 #include <string>
 #include <stdint.h>
 #include <boost/shared_ptr.hpp>
+#include <boost/optional.hpp>
 extern "C" {
 #include <libavcodec/avcodec.h>
 #include <libpostproc/postprocess.h>
@@ -56,8 +57,6 @@ public:
        ~FFmpegDecoder ();
 
        /* Methods to query our input video */
-       int length_in_frames () const;
-       int decoding_frames () const;
        float frames_per_second () const;
        Size native_size () const;
        int audio_channels () const;
@@ -65,13 +64,9 @@ public:
        AVSampleFormat audio_sample_format () const;
        int64_t audio_channel_layout () const;
        bool has_subtitles () const;
-       int bytes_per_audio_sample () const;
 
-       std::vector<Stream> audio_streams () const;
-       std::vector<Stream> subtitle_streams () const;
-
-       void set_audio_stream (int id);
-       void set_subtitle_stream (int id);
+       std::vector<AudioStream> audio_streams () const;
+       std::vector<SubtitleStream> subtitle_streams () const;
 
 private:
 
@@ -97,8 +92,8 @@ private:
        int _subtitle_stream; ///< may be < 0 if there is no subtitle
        AVFrame* _frame;
 
-       std::vector<Stream> _audio_streams;
-       std::vector<Stream> _subtitle_streams;
+       std::vector<AudioStream> _audio_streams;
+       std::vector<SubtitleStream> _subtitle_streams;
        
        AVCodecContext* _video_codec_context;
        AVCodec* _video_codec;
@@ -108,4 +103,7 @@ private:
        AVCodec* _subtitle_codec;                ///< may be 0 if there is no subtitle
 
        AVPacket _packet;
+
+       boost::optional<double> _first_video;
+       boost::optional<double> _first_audio;
 };