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;
->>>>>>> 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)
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."));
}
}
- _gain = ref->audio_gain ();
- _delay = ref->audio_delay ();
+ _gain = ref->gain ();
+ _delay = ref->delay ();
/* Preserve the optional<> part of this */
- _video_frame_rate = ref->_audio_video_frame_rate;
+ _video_frame_rate = ref->_video_frame_rate;
_streams = ref->streams ();
}
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()));
}
}
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
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 (
}
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
-AudioContent::audio_video_frame_rate () const
+AudioContent::video_frame_rate () const
{
{
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.
*/
- 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)
{
{
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;
->>>>>>> Rename video/audio/subtitle part methods.
+ static int const VIDEO_FRAME_RATE;
};
class AudioContent : public ContentPart
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;
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;
- ac = at;
+ ac = i;
}
if (i->subtitle) {
++count_sc;
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) {
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) {