diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-25 09:25:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-25 09:25:09 +0100 |
| commit | 97e09772b91038e223f16f9bbfd5fdef1a6cd552 (patch) | |
| tree | 46f3c1456997c2c5ac6ee03fa512ba6f16df53ee /src/lib/ffmpeg_audio_stream.h | |
| parent | e8eec728447f63439281edd623e586e99251f352 (diff) | |
Put some get/sets in FFmpegAudioStream.
Diffstat (limited to 'src/lib/ffmpeg_audio_stream.h')
| -rw-r--r-- | src/lib/ffmpeg_audio_stream.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/src/lib/ffmpeg_audio_stream.h b/src/lib/ffmpeg_audio_stream.h index 8a9525422..1587afcae 100644 --- a/src/lib/ffmpeg_audio_stream.h +++ b/src/lib/ffmpeg_audio_stream.h @@ -28,20 +28,33 @@ class FFmpegAudioStream : public FFmpegStream public: FFmpegAudioStream (std::string n, int i, int f, int c) : FFmpegStream (n, i) - , frame_rate (f) - , channels (c) - , mapping (c) + , _frame_rate (f) + , _channels (c) + , _mapping (c) { - mapping.make_default (); + _mapping.make_default (); } FFmpegAudioStream (cxml::ConstNodePtr, int); void as_xml (xmlpp::Node *) const; - int frame_rate; - int channels; - AudioMapping mapping; + int frame_rate () const { + return _frame_rate; + } + + int channels () const { + return _channels; + } + + AudioMapping mapping () const { + return _mapping; + } + + void set_mapping (AudioMapping m) { + _mapping = m; + } + boost::optional<ContentTime> first_audio; private: @@ -50,8 +63,12 @@ private: /* Constructor for tests */ FFmpegAudioStream () : FFmpegStream ("", 0) - , frame_rate (0) - , channels (0) - , mapping (1) + , _frame_rate (0) + , _channels (0) + , _mapping (1) {} + + int _frame_rate; + int _channels; + AudioMapping _mapping; }; |
