X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_audio_stream.h;h=7fe3c4fdaedd907df31ecdf5d06360eb8b41f43a;hb=0a93237cb5e4642d3b698ff9b7d0cfae5401478c;hp=5e455d18aa086f26d6ae9a644d07c2b5005ac0f5;hpb=f1d30fb114b3b2c6ccd8fdf5823e7cd6b26c1eef;p=dcpomatic.git diff --git a/src/lib/ffmpeg_audio_stream.h b/src/lib/ffmpeg_audio_stream.h index 5e455d18a..7fe3c4fda 100644 --- a/src/lib/ffmpeg_audio_stream.h +++ b/src/lib/ffmpeg_audio_stream.h @@ -19,39 +19,33 @@ #include "ffmpeg_stream.h" #include "audio_mapping.h" +#include "audio_stream.h" #include "dcpomatic_time.h" -class ffmpeg_pts_offset_test; +struct ffmpeg_pts_offset_test; -class FFmpegAudioStream : public FFmpegStream +class FFmpegAudioStream : public FFmpegStream, public AudioStream { public: - FFmpegAudioStream (std::string n, int i, int f, int c) - : FFmpegStream (n, i) - , frame_rate (f) - , channels (c) - , mapping (c) - { - mapping.make_default (); - } + FFmpegAudioStream (std::string name, int id, int frame_rate, int channels) + : FFmpegStream (name, id) + , AudioStream (frame_rate, channels) + {} FFmpegAudioStream (cxml::ConstNodePtr, int); void as_xml (xmlpp::Node *) const; - int frame_rate; - int channels; - AudioMapping mapping; + /* XXX: should probably be locked */ + boost::optional first_audio; private: - friend class ffmpeg_pts_offset_test; + friend struct ffmpeg_pts_offset_test; /* Constructor for tests */ FFmpegAudioStream () : FFmpegStream ("", 0) - , frame_rate (0) - , channels (0) - , mapping (1) + , AudioStream (0, 0) {} };