diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-02-18 00:11:44 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-02-18 00:11:44 +0000 |
| commit | 017f8aef4be84cc76dcbf2acdf865409f5cae147 (patch) | |
| tree | e6475e77497b0bb05abda7db652fe6c8f18b4757 /src | |
| parent | a03ea8328cfe16eaad63ac442f38c48091d25c07 (diff) | |
Add a couple more audio properties.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/audio_content.cc | 10 | ||||
| -rw-r--r-- | src/lib/audio_content.h | 6 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 3 | ||||
| -rw-r--r-- | src/lib/single_stream_audio_content.cc | 4 |
4 files changed, 19 insertions, 4 deletions
diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc index 6d9c85ca2..87a1d1803 100644 --- a/src/lib/audio_content.cc +++ b/src/lib/audio_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,6 +36,8 @@ using std::cout; using std::vector; using std::stringstream; using std::fixed; +using std::list; +using std::pair; using std::setprecision; using boost::shared_ptr; using boost::dynamic_pointer_cast; @@ -292,3 +294,9 @@ AudioContent::audio_channel_names () const return n; } + +void +AudioContent::add_properties (list<pair<string, string> >& p) const +{ + p.push_back (make_pair (_("DCP audio frame rate"), raw_convert<string> (resampled_audio_frame_rate ()))); +} diff --git a/src/lib/audio_content.h b/src/lib/audio_content.h index 82c95a513..95231a7d7 100644 --- a/src/lib/audio_content.h +++ b/src/lib/audio_content.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -77,6 +77,10 @@ public: std::string processing_description () const; +protected: + + void add_properties (std::list<std::pair<std::string, std::string> > &) const; + private: /** Gain to apply to audio in dB */ double _audio_gain; diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 5cd5d3729..f2fe06f36 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -395,6 +395,7 @@ void FFmpegContent::add_properties (list<pair<string, string> >& p) const { VideoContent::add_properties (p); + AudioContent::add_properties (p); if (_bits_per_pixel) { int const sub = 219 * pow (2, _bits_per_pixel.get() - 8); diff --git a/src/lib/single_stream_audio_content.cc b/src/lib/single_stream_audio_content.cc index 4c59420cb..b3c74d901 100644 --- a/src/lib/single_stream_audio_content.cc +++ b/src/lib/single_stream_audio_content.cc @@ -88,6 +88,8 @@ SingleStreamAudioContent::audio_streams () const void SingleStreamAudioContent::add_properties (list<pair<string, string> >& p) const { - /* XXX: this could be better wrt audio streams */ p.push_back (make_pair (_("Audio channels"), raw_convert<string> (audio_stream()->channels ()))); + p.push_back (make_pair (_("Content audio frame rate"), raw_convert<string> (audio_stream()->frame_rate ()))); + + AudioContent::add_properties (p); } |
