X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_decoder.h;h=c383b8d1325ef8eb82d8b20e16ddc2168a822407;hb=62365221dd3cd80d6b771e9bf22b4f9365ee096a;hp=1db46a4230c7390b908ea651684be5d9b06820c7;hpb=7fd2aff3af82d3e573934d046be26b72a67a93e6;p=dcpomatic.git diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index 1db46a423..c383b8d13 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -58,7 +58,7 @@ public: , _name (n) , _id (i) {} - + std::string to_string () const; std::string name () const { @@ -86,11 +86,12 @@ private: class FFmpegDecoder : public VideoDecoder, public AudioDecoder { public: - FFmpegDecoder (boost::shared_ptr, boost::shared_ptr, Job *); + FFmpegDecoder (boost::shared_ptr, DecodeOptions); ~FFmpegDecoder (); float frames_per_second () const; - Size native_size () const; + libdcp::Size native_size () const; + SourceFrame length () const; int time_base_numerator () const; int time_base_denominator () const; int sample_aspect_ratio_numerator () const; @@ -99,17 +100,20 @@ public: void set_audio_stream (boost::shared_ptr); void set_subtitle_stream (boost::shared_ptr); - bool seek (SourceFrame); + bool seek (double); + bool seek_to_last (); private: bool pass (); + bool do_seek (double p, bool); PixelFormat pixel_format () const; AVSampleFormat audio_sample_format () const; int bytes_per_audio_sample () const; void out_with_sync (); void filter_and_emit_video (AVFrame *); + double frame_time () const; void setup_general (); void setup_video (); @@ -117,10 +121,9 @@ private: void setup_subtitle (); void maybe_add_subtitle (); - boost::shared_ptr deinterleave_audio (uint8_t* data, int size); + boost::shared_ptr deinterleave_audio (uint8_t** data, int size); void film_changed (Film::Property); - boost::signals2::scoped_connection _film_connection; std::string stream_name (AVStream* s) const;