projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8109f84
)
Fix rebase onto master.
author
Carl Hetherington
<cth@carlh.net>
Sat, 16 Apr 2016 00:19:38 +0000
(
01:19
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 18 May 2016 10:50:29 +0000
(11:50 +0100)
src/lib/audio_content.cc
patch
|
blob
|
history
src/lib/audio_content.h
patch
|
blob
|
history
src/lib/sndfile_content.cc
patch
|
blob
|
history
src/wx/audio_panel.cc
patch
|
blob
|
history
src/wx/timing_panel.cc
patch
|
blob
|
history
diff --git
a/src/lib/audio_content.cc
b/src/lib/audio_content.cc
index 983d502b82434e943203c3282f73c83fa4e002f4..a903cfb9a4b7211d58f7f07a15b8be0293c05f5e 100644
(file)
--- a/
src/lib/audio_content.cc
+++ b/
src/lib/audio_content.cc
@@
-44,16
+44,10
@@
using boost::dynamic_pointer_cast;
using boost::optional;
/** Something stream-related has changed */
using boost::optional;
/** Something stream-related has changed */
-<<<<<<< 17dbd967c18aff2f3007eb86b5eee5b43f23bc4b
-int const AudioContentProperty::AUDIO_STREAMS = 200;
-int const AudioContentProperty::AUDIO_GAIN = 201;
-int const AudioContentProperty::AUDIO_DELAY = 202;
-int const AudioContentProperty::AUDIO_VIDEO_FRAME_RATE = 203;
-=======
int const AudioContentProperty::STREAMS = 200;
int const AudioContentProperty::GAIN = 201;
int const AudioContentProperty::DELAY = 202;
int const AudioContentProperty::STREAMS = 200;
int const AudioContentProperty::GAIN = 201;
int const AudioContentProperty::DELAY = 202;
->>>>>>> Rename video/audio/subtitle part methods.
+int const AudioContentProperty::VIDEO_FRAME_RATE = 203;
AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film)
: ContentPart (parent, film)
AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film)
: ContentPart (parent, film)
@@
-86,15
+80,15
@@
AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film, vector
throw JoinError (_("Content to be joined must have the same audio delay."));
}
throw JoinError (_("Content to be joined must have the same audio delay."));
}
- if (
ac->audio_video_frame_rate() != ref->audio_
video_frame_rate()) {
+ if (
c[i]->audio->video_frame_rate() != ref->
video_frame_rate()) {
throw JoinError (_("Content to be joined must have the same video frame rate."));
}
}
throw JoinError (_("Content to be joined must have the same video frame rate."));
}
}
- _gain = ref->
audio_
gain ();
- _delay = ref->
audio_
delay ();
+ _gain = ref->gain ();
+ _delay = ref->delay ();
/* Preserve the optional<> part of this */
/* Preserve the optional<> part of this */
- _video_frame_rate = ref->_
audio_
video_frame_rate;
+ _video_frame_rate = ref->_video_frame_rate;
_streams = ref->streams ();
}
_streams = ref->streams ();
}
@@
-104,8
+98,8
@@
AudioContent::as_xml (xmlpp::Node* node) const
boost::mutex::scoped_lock lm (_mutex);
node->add_child("AudioGain")->add_child_text (raw_convert<string> (_gain));
node->add_child("AudioDelay")->add_child_text (raw_convert<string> (_delay));
boost::mutex::scoped_lock lm (_mutex);
node->add_child("AudioGain")->add_child_text (raw_convert<string> (_gain));
node->add_child("AudioDelay")->add_child_text (raw_convert<string> (_delay));
- if (_
audio_
video_frame_rate) {
- node->add_child("AudioVideoFrameRate")->add_child_text (raw_convert<string> (_
audio_
video_frame_rate.get()));
+ if (_video_frame_rate) {
+ node->add_child("AudioVideoFrameRate")->add_child_text (raw_convert<string> (_video_frame_rate.get()));
}
}
}
}
@@
-190,7
+184,7
@@
AudioContent::resampled_frame_rate () const
shared_ptr<const Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
shared_ptr<const Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
- FrameRateChange frc (
audio_
video_frame_rate(), film->video_frame_rate());
+ FrameRateChange frc (video_frame_rate(), film->video_frame_rate());
/* Compensate if the DCP is being run at a different frame rate
to the source; that is, if the video is run such that it will
/* Compensate if the DCP is being run at a different frame rate
to the source; that is, if the video is run such that it will
@@
-301,7
+295,7
@@
AudioContent::add_properties (list<UserProperty>& p) const
shared_ptr<const Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
shared_ptr<const Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
- FrameRateChange const frc (
audio_
video_frame_rate(), film->video_frame_rate());
+ FrameRateChange const frc (video_frame_rate(), film->video_frame_rate());
ContentTime const c (_parent->full_length(), frc);
p.push_back (
ContentTime const c (_parent->full_length(), frc);
p.push_back (
@@
-333,32
+327,30
@@
AudioContent::add_properties (list<UserProperty>& p) const
}
void
}
void
-AudioContent::set_
audio_
video_frame_rate (double r)
+AudioContent::set_video_frame_rate (double r)
{
{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _audio_video_frame_rate = r;
- }
-
- signal_changed (AudioContentProperty::AUDIO_VIDEO_FRAME_RATE);
+ maybe_set (_video_frame_rate, r, AudioContentProperty::VIDEO_FRAME_RATE);
}
double
}
double
-AudioContent::
audio_
video_frame_rate () const
+AudioContent::video_frame_rate () const
{
{
boost::mutex::scoped_lock lm (_mutex);
{
{
boost::mutex::scoped_lock lm (_mutex);
- if (_
audio_
video_frame_rate) {
- return _
audio_
video_frame_rate.get ();
+ if (_video_frame_rate) {
+ return _video_frame_rate.get ();
}
}
/* No frame rate specified, so assume this content has been
prepared for any concurrent video content.
*/
}
}
/* No frame rate specified, so assume this content has been
prepared for any concurrent video content.
*/
- return film()->active_frame_rate_change(position()).source;
+ shared_ptr<const Film> film = _film.lock ();
+ DCPOMATIC_ASSERT (film);
+ return film->active_frame_rate_change(_parent->position()).source;
}
}
+void
AudioContent::set_streams (vector<AudioStreamPtr> streams)
{
{
AudioContent::set_streams (vector<AudioStreamPtr> streams)
{
{
diff --git
a/src/lib/audio_content.h
b/src/lib/audio_content.h
index 09e7a0d12d1978812be8268b7991a59143d58854..cfce3fb835c5ae75c52a6b63a011c5d4ecdf7458 100644
(file)
--- a/
src/lib/audio_content.h
+++ b/
src/lib/audio_content.h
@@
-34,16
+34,10
@@
class AudioContentProperty
{
public:
class AudioContentProperty
{
public:
-<<<<<<< 17dbd967c18aff2f3007eb86b5eee5b43f23bc4b
- static int const AUDIO_STREAMS;
- static int const AUDIO_GAIN;
- static int const AUDIO_DELAY;
- static int const AUDIO_VIDEO_FRAME_RATE;
-=======
static int const STREAMS;
static int const GAIN;
static int const DELAY;
static int const STREAMS;
static int const GAIN;
static int const DELAY;
->>>>>>> Rename video/audio/subtitle part methods.
+ static int const VIDEO_FRAME_RATE;
};
class AudioContent : public ContentPart
};
class AudioContent : public ContentPart
@@
-75,8
+69,8
@@
public:
return _delay;
}
return _delay;
}
- double
audio_
video_frame_rate () const;
- void set_
audio_
video_frame_rate (double r);
+ double video_frame_rate () const;
+ void set_video_frame_rate (double r);
std::string processing_description () const;
std::string processing_description () const;
diff --git
a/src/lib/sndfile_content.cc
b/src/lib/sndfile_content.cc
index a51a7be1d1969a3b1bbb494ef4038c80e5e8f577..f8e58885ed4876d0559d29ac8375b58f6c7adf66 100644
(file)
--- a/
src/lib/sndfile_content.cc
+++ b/
src/lib/sndfile_content.cc
@@
-114,6
+114,6
@@
SndfileContent::examine (shared_ptr<Job> job)
DCPTime
SndfileContent::full_length () const
{
DCPTime
SndfileContent::full_length () const
{
- FrameRateChange const frc (audio->
audio_video_frame_rate(), film
->video_frame_rate());
+ FrameRateChange const frc (audio->
video_frame_rate(), film()
->video_frame_rate());
return DCPTime::from_frames (audio_length() / frc.speed_up, audio->stream()->frame_rate ());
}
return DCPTime::from_frames (audio_length() / frc.speed_up, audio->stream()->frame_rate ());
}
diff --git
a/src/wx/audio_panel.cc
b/src/wx/audio_panel.cc
index f6a29da2aaade9448f82e0e7116672af6c9a52ee..28d81d07b8a3810a797d744cff3d7ba8733b555a 100644
(file)
--- a/
src/wx/audio_panel.cc
+++ b/
src/wx/audio_panel.cc
@@
-170,7
+170,7
@@
AudioPanel::film_content_changed (int property)
}
setup_sensitivity ();
}
setup_sensitivity ();
- } else if (property == AudioContentProperty::
AUDIO_
VIDEO_FRAME_RATE) {
+ } else if (property == AudioContentProperty::VIDEO_FRAME_RATE) {
setup_description ();
}
}
setup_description ();
}
}
diff --git
a/src/wx/timing_panel.cc
b/src/wx/timing_panel.cc
index 191106471c839c662f9bd6f416ba6e96f54e5db0..8e253c0709742e31ca042adb6644a1d3655f3ca2 100644
(file)
--- a/
src/wx/timing_panel.cc
+++ b/
src/wx/timing_panel.cc
@@
-270,10
+270,9
@@
TimingPanel::film_content_changed (int property)
check_vc.insert (i->video->frame_rate ());
vc = i;
}
check_vc.insert (i->video->frame_rate ());
vc = i;
}
- shared_ptr<const AudioContent> at = dynamic_pointer_cast<const AudioContent> (i);
if (i->audio) {
++count_ac;
if (i->audio) {
++count_ac;
- ac =
at
;
+ ac =
i
;
}
if (i->subtitle) {
++count_sc;
}
if (i->subtitle) {
++count_sc;
@@
-286,7
+285,7
@@
TimingPanel::film_content_changed (int property)
if ((check_vc.size() == 1 || count_ac == 1 || count_sc == 1) && !single_frame_image_content) {
if (vc) {
if ((check_vc.size() == 1 || count_ac == 1 || count_sc == 1) && !single_frame_image_content) {
if (vc) {
- checked_set (_video_frame_rate, raw_convert<string> (vc->video->
video_
frame_rate (), 5));
+ checked_set (_video_frame_rate, raw_convert<string> (vc->video->frame_rate (), 5));
} else if (ac) {
checked_set (_video_frame_rate, raw_convert<string> (ac->audio->video_frame_rate (), 5));
} else if (sc) {
} else if (ac) {
checked_set (_video_frame_rate, raw_convert<string> (ac->audio->video_frame_rate (), 5));
} else if (sc) {
@@
-410,7
+409,7
@@
TimingPanel::set_video_frame_rate ()
i->video->set_frame_rate (fr);
} else if (i->audio) {
/* Audio but not video, i.e. SndfileContent */
i->video->set_frame_rate (fr);
} else if (i->audio) {
/* Audio but not video, i.e. SndfileContent */
- i->audio->set_
audio_
video_frame_rate (fr);
+ i->audio->set_video_frame_rate (fr);
} else if (dsc) {
dsc->subtitle->set_video_frame_rate (fr);
} else if (tsc) {
} else if (dsc) {
dsc->subtitle->set_video_frame_rate (fr);
} else if (tsc) {