diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-05-27 20:55:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-02 13:38:21 +0100 |
| commit | 0a93237cb5e4642d3b698ff9b7d0cfae5401478c (patch) | |
| tree | b0d5255ae2b90d1c9ef489e78239c2f081ea0a9e /src/lib/ffmpeg_audio_stream.h | |
| parent | 608c146eb09fac2a8fc60e1a72591f6bb8364e1f (diff) | |
Handle multiple audio streams in a single piece of content
in a similar way to the V1 patch.
Diffstat (limited to 'src/lib/ffmpeg_audio_stream.h')
| -rw-r--r-- | src/lib/ffmpeg_audio_stream.h | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/src/lib/ffmpeg_audio_stream.h b/src/lib/ffmpeg_audio_stream.h index 1587afcae..7fe3c4fda 100644 --- a/src/lib/ffmpeg_audio_stream.h +++ b/src/lib/ffmpeg_audio_stream.h @@ -19,41 +19,24 @@ #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; - } - - void set_mapping (AudioMapping m) { - _mapping = m; - } + /* XXX: should probably be locked */ boost::optional<ContentTime> first_audio; @@ -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; }; |
