projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a03ea83
)
Add a couple more audio properties.
author
Carl Hetherington
<cth@carlh.net>
Thu, 18 Feb 2016 00:11:44 +0000
(
00:11
+0000)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 18 Feb 2016 00:11:44 +0000
(
00:11
+0000)
src/lib/audio_content.cc
patch
|
blob
|
history
src/lib/audio_content.h
patch
|
blob
|
history
src/lib/ffmpeg_content.cc
patch
|
blob
|
history
src/lib/single_stream_audio_content.cc
patch
|
blob
|
history
diff --git
a/src/lib/audio_content.cc
b/src/lib/audio_content.cc
index 6d9c85ca20201c2719931216b114428163abb9ad..87a1d180343f563bb5fccb17926c7be2b8dbb84e 100644
(file)
--- a/
src/lib/audio_content.cc
+++ b/
src/lib/audio_content.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013-201
5
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-201
6
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
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::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;
using std::setprecision;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
@@
-292,3
+294,9
@@
AudioContent::audio_channel_names () const
return n;
}
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 82c95a513a3ca475d7d3312551fed1255000aeba..95231a7d742382990057e0ddf644e76d693ae9ae 100644
(file)
--- a/
src/lib/audio_content.h
+++ b/
src/lib/audio_content.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013-201
5
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-201
6
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
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;
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;
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 5cd5d3729b9ef9fdafa0d3cf8bf1c6b471b8841a..f2fe06f36aca3b182b892fc719654aeda96bcb82 100644
(file)
--- a/
src/lib/ffmpeg_content.cc
+++ b/
src/lib/ffmpeg_content.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013-201
5
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-201
6
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
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);
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);
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 4c59420cbfe16b3c350e13235ff01926dbde1251..b3c74d901e58f25fcd2709a4d4868a0f9829f330 100644
(file)
--- 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
{
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 (_("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);
}
}