X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_audio_stream.h;h=84882e89c89c3a9f1057368c35da603b1d708edb;hb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;hp=1587afcae4528a8f979e92aeaedd111b7aa4c08e;hpb=946dbad9821e676f1d8fdc5abba459da54b8e84c;p=dcpomatic.git diff --git a/src/lib/ffmpeg_audio_stream.h b/src/lib/ffmpeg_audio_stream.h index 1587afcae..84882e89c 100644 --- a/src/lib/ffmpeg_audio_stream.h +++ b/src/lib/ffmpeg_audio_stream.h @@ -19,42 +19,25 @@ #include "ffmpeg_stream.h" #include "audio_mapping.h" +#include "audio_stream.h" #include "dcpomatic_time.h" 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 () const { - return _frame_rate; - } - - int channels () const { - return _channels; - } - - AudioMapping mapping () const { - return _mapping; - } + /* XXX: should probably be locked */ - void set_mapping (AudioMapping m) { - _mapping = m; - } - boost::optional first_audio; private: @@ -63,12 +46,6 @@ private: /* Constructor for tests */ FFmpegAudioStream () : FFmpegStream ("", 0) - , _frame_rate (0) - , _channels (0) - , _mapping (1) + , AudioStream (0, 0) {} - - int _frame_rate; - int _channels; - AudioMapping _mapping; };