summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-23 16:51:07 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-23 16:51:07 +0100
commit38fda7888663429d452b9c71902e8bb5239dd720 (patch)
tree93d05ef9dc1e3d04d198452393dd626717f6346c /src/lib
parent89ea093ab1ed7a526b9332922c674d9eca42d7f2 (diff)
Remove some dcp prefixes; better logging of content on DCP creation.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/analyse_audio_job.cc4
-rw-r--r--src/lib/audio_content.cc6
-rw-r--r--src/lib/audio_content.h1
-rw-r--r--src/lib/content.cc6
-rw-r--r--src/lib/content.h1
-rw-r--r--src/lib/encoder.cc2
-rw-r--r--src/lib/ffmpeg_content.cc32
-rw-r--r--src/lib/ffmpeg_content.h1
-rw-r--r--src/lib/film.cc83
-rw-r--r--src/lib/film.h43
-rw-r--r--src/lib/player.cc24
-rw-r--r--src/lib/sndfile_content.cc10
-rw-r--r--src/lib/sndfile_content.h1
-rw-r--r--src/lib/still_image_content.cc10
-rw-r--r--src/lib/still_image_content.h1
-rw-r--r--src/lib/still_image_examiner.cc2
-rw-r--r--src/lib/video_content.cc6
-rw-r--r--src/lib/video_content.h1
-rw-r--r--src/lib/writer.cc24
19 files changed, 161 insertions, 97 deletions
diff --git a/src/lib/analyse_audio_job.cc b/src/lib/analyse_audio_job.cc
index 2848c1ed7..3902ec537 100644
--- a/src/lib/analyse_audio_job.cc
+++ b/src/lib/analyse_audio_job.cc
@@ -70,8 +70,8 @@ AnalyseAudioJob::run ()
_samples_per_point = max (int64_t (1), _film->time_to_audio_frames (_film->length()) / _num_points);
- _current.resize (_film->dcp_audio_channels ());
- _analysis.reset (new AudioAnalysis (_film->dcp_audio_channels ()));
+ _current.resize (_film->audio_channels ());
+ _analysis.reset (new AudioAnalysis (_film->audio_channels ()));
_done = 0;
while (!player->pass ()) {
diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc
index 4814f8244..100264d44 100644
--- a/src/lib/audio_content.cc
+++ b/src/lib/audio_content.cc
@@ -112,3 +112,9 @@ AudioContent::audio_analysis_path () const
return film->audio_analysis_path (dynamic_pointer_cast<const AudioContent> (shared_from_this ()));
}
+
+string
+AudioContent::technical_summary () const
+{
+ return String::compose ("audio: channels %1, length %2, raw rate %3, out rate %4", audio_channels(), audio_length(), content_audio_frame_rate(), output_audio_frame_rate());
+}
diff --git a/src/lib/audio_content.h b/src/lib/audio_content.h
index 58d00e686..73919105d 100644
--- a/src/lib/audio_content.h
+++ b/src/lib/audio_content.h
@@ -48,6 +48,7 @@ public:
AudioContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>);
void as_xml (xmlpp::Node *) const;
+ std::string technical_summary () const;
virtual int audio_channels () const = 0;
virtual AudioContent::Frame audio_length () const = 0;
diff --git a/src/lib/content.cc b/src/lib/content.cc
index cca4d56de..0db93d5e3 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -109,3 +109,9 @@ Content::clone () const
as_xml (node);
return content_factory (film, shared_ptr<cxml::Node> (new cxml::Node (node)));
}
+
+string
+Content::technical_summary () const
+{
+ return String::compose ("%1 %2 %3", file(), digest(), start());
+}
diff --git a/src/lib/content.h b/src/lib/content.h
index 26e115354..33af0a624 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -52,6 +52,7 @@ public:
virtual void examine (boost::shared_ptr<Job>);
virtual std::string summary () const = 0;
+ virtual std::string technical_summary () const;
virtual std::string information () const = 0;
virtual void as_xml (xmlpp::Node *) const;
virtual Time length () const = 0;
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index 7959fda6f..0c7434220 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -205,7 +205,7 @@ Encoder::process_video (shared_ptr<const Image> image, Eyes eyes, bool same)
TIMING ("adding to queue of %1", _queue.size ());
_queue.push_back (shared_ptr<DCPVideoFrame> (
new DCPVideoFrame (
- image, _video_frames_out, eyes, _film->dcp_video_frame_rate(),
+ image, _video_frames_out, eyes, _film->video_frame_rate(),
_film->j2k_bandwidth(), _film->log()
)
));
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 8419fd31f..00499cf13 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -34,6 +34,7 @@ using std::stringstream;
using std::vector;
using std::list;
using std::cout;
+using std::pair;
using boost::shared_ptr;
using boost::lexical_cast;
@@ -169,6 +170,28 @@ FFmpegContent::summary () const
}
string
+FFmpegContent::technical_summary () const
+{
+ string as = "none";
+ if (_audio_stream) {
+ as = String::compose ("id %1", _audio_stream->id);
+ }
+
+ string ss = "none";
+ if (_subtitle_stream) {
+ ss = String::compose ("id %1", _subtitle_stream->id);
+ }
+
+ pair<string, string> filt = Filter::ffmpeg_strings (_filters);
+
+ return Content::technical_summary() + " - "
+ + VideoContent::technical_summary() + " - "
+ + String::compose (
+ "ffmpeg: audio %1, subtitle %2, filters %3 %4", as, ss, filt.first, filt.second
+ );
+}
+
+string
FFmpegContent::information () const
{
if (video_length() == 0 || video_frame_rate() == 0) {
@@ -253,7 +276,7 @@ FFmpegContent::output_audio_frame_rate () const
/* Resample to a DCI-approved sample rate */
double t = dcp_audio_frame_rate (content_audio_frame_rate ());
- FrameRateConversion frc (video_frame_rate(), film->dcp_video_frame_rate());
+ FrameRateConversion 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
@@ -262,7 +285,7 @@ FFmpegContent::output_audio_frame_rate () const
*/
if (frc.change_speed) {
- t *= video_frame_rate() * frc.factor() / film->dcp_video_frame_rate();
+ t *= video_frame_rate() * frc.factor() / film->video_frame_rate();
}
return rint (t);
@@ -326,8 +349,8 @@ FFmpegContent::length () const
shared_ptr<const Film> film = _film.lock ();
assert (film);
- FrameRateConversion frc (video_frame_rate (), film->dcp_video_frame_rate ());
- return video_length() * frc.factor() * TIME_HZ / film->dcp_video_frame_rate ();
+ FrameRateConversion frc (video_frame_rate (), film->video_frame_rate ());
+ return video_length() * frc.factor() * TIME_HZ / film->video_frame_rate ();
}
AudioMapping
@@ -379,3 +402,4 @@ FFmpegContent::identifier () const
return s.str ();
}
+
diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h
index 1af586a71..96d8c1727 100644
--- a/src/lib/ffmpeg_content.h
+++ b/src/lib/ffmpeg_content.h
@@ -104,6 +104,7 @@ public:
void examine (boost::shared_ptr<Job>);
std::string summary () const;
+ std::string technical_summary () const;
std::string information () const;
void as_xml (xmlpp::Node *) const;
Time length () const;
diff --git a/src/lib/film.cc b/src/lib/film.cc
index e9c60429d..b8a26501e 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -93,9 +93,9 @@ Film::Film (string d)
, _with_subtitles (false)
, _j2k_bandwidth (Config::instance()->default_j2k_bandwidth ())
, _dci_metadata (Config::instance()->default_dci_metadata ())
- , _dcp_video_frame_rate (24)
- , _dcp_audio_channels (MAX_AUDIO_CHANNELS)
- , _dcp_3d (false)
+ , _video_frame_rate (24)
+ , _audio_channels (MAX_AUDIO_CHANNELS)
+ , _three_d (false)
, _sequence_video (true)
, _dirty (false)
{
@@ -138,11 +138,11 @@ Film::video_identifier () const
s << container()->id()
<< "_" << resolution_to_string (_resolution)
<< "_" << _playlist->video_identifier()
- << "_" << _dcp_video_frame_rate
+ << "_" << _video_frame_rate
<< "_" << scaler()->id()
<< "_" << j2k_bandwidth();
- if (_dcp_3d) {
+ if (_three_d) {
s << "_3D";
}
@@ -172,13 +172,13 @@ Film::internal_video_mxf_filename () const
}
string
-Film::dcp_video_mxf_filename () const
+Film::video_mxf_filename () const
{
return filename_safe_name() + "_video.mxf";
}
string
-Film::dcp_audio_mxf_filename () const
+Film::audio_mxf_filename () const
{
return filename_safe_name() + "_audio.mxf";
}
@@ -224,13 +224,12 @@ Film::make_dcp ()
gethostname (buffer, sizeof (buffer));
log()->log (String::compose ("Starting to make DCP on %1", buffer));
}
-
-// log()->log (String::compose ("Content is %1; type %2", content_path(), (content_type() == STILL ? _("still") : _("video"))));
-// if (length()) {
-// log()->log (String::compose ("Content length %1", length().get()));
-// }
-// log()->log (String::compose ("Content digest %1", content_digest()));
-// log()->log (String::compose ("Content at %1 fps, DCP at %2 fps", source_frame_rate(), dcp_frame_rate()));
+
+ ContentList cl = content ();
+ for (ContentList::const_iterator i = cl.begin(); i != cl.end(); ++i) {
+ log()->log (String::compose ("Content: %1", (*i)->technical_summary()));
+ }
+ log()->log (String::compose ("DCP video rate %2 fps", video_frame_rate()));
log()->log (String::compose ("%1 threads", Config::instance()->num_local_encoding_threads()));
log()->log (String::compose ("J2K bandwidth %1", j2k_bandwidth()));
#ifdef DCPOMATIC_DEBUG
@@ -329,10 +328,10 @@ Film::write_metadata () const
root->add_child("WithSubtitles")->add_child_text (_with_subtitles ? "1" : "0");
root->add_child("J2KBandwidth")->add_child_text (lexical_cast<string> (_j2k_bandwidth));
_dci_metadata.as_xml (root->add_child ("DCIMetadata"));
- root->add_child("DCPVideoFrameRate")->add_child_text (lexical_cast<string> (_dcp_video_frame_rate));
+ root->add_child("VideoFrameRate")->add_child_text (lexical_cast<string> (_video_frame_rate));
root->add_child("DCIDate")->add_child_text (boost::gregorian::to_iso_string (_dci_date));
- root->add_child("DCPAudioChannels")->add_child_text (lexical_cast<string> (_dcp_audio_channels));
- root->add_child("DCP3D")->add_child_text (_dcp_3d ? "1" : "0");
+ root->add_child("AudioChannels")->add_child_text (lexical_cast<string> (_audio_channels));
+ root->add_child("3D")->add_child_text (_three_d ? "1" : "0");
root->add_child("SequenceVideo")->add_child_text (_sequence_video ? "1" : "0");
_playlist->as_xml (root->add_child ("Playlist"));
@@ -376,11 +375,11 @@ Film::read_metadata ()
_with_subtitles = f.bool_child ("WithSubtitles");
_j2k_bandwidth = f.number_child<int> ("J2KBandwidth");
_dci_metadata = DCIMetadata (f.node_child ("DCIMetadata"));
- _dcp_video_frame_rate = f.number_child<int> ("DCPVideoFrameRate");
+ _video_frame_rate = f.number_child<int> ("VideoFrameRate");
_dci_date = boost::gregorian::from_undelimited_string (f.string_child ("DCIDate"));
- _dcp_audio_channels = f.number_child<int> ("DCPAudioChannels");
+ _audio_channels = f.number_child<int> ("AudioChannels");
_sequence_video = f.bool_child ("SequenceVideo");
- _dcp_3d = f.bool_child ("DCP3D");
+ _three_d = f.bool_child ("3D");
_playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"));
@@ -446,12 +445,12 @@ Film::dci_name (bool if_created_now) const
d << "_" << dcp_content_type()->dci_name();
}
- if (dcp_3d ()) {
+ if (three_d ()) {
d << "-3D";
}
- if (dcp_video_frame_rate() != 24) {
- d << "-" << dcp_video_frame_rate();
+ if (video_frame_rate() != 24) {
+ d << "-" << video_frame_rate();
}
if (container()) {
@@ -476,7 +475,7 @@ Film::dci_name (bool if_created_now) const
}
}
- switch (dcp_audio_channels ()) {
+ switch (audio_channels ()) {
case 1:
d << "_10";
break;
@@ -631,33 +630,33 @@ Film::set_dci_metadata (DCIMetadata m)
}
void
-Film::set_dcp_video_frame_rate (int f)
+Film::set_video_frame_rate (int f)
{
{
boost::mutex::scoped_lock lm (_state_mutex);
- _dcp_video_frame_rate = f;
+ _video_frame_rate = f;
}
- signal_changed (DCP_VIDEO_FRAME_RATE);
+ signal_changed (VIDEO_FRAME_RATE);
}
void
-Film::set_dcp_audio_channels (int c)
+Film::set_audio_channels (int c)
{
{
boost::mutex::scoped_lock lm (_state_mutex);
- _dcp_audio_channels = c;
+ _audio_channels = c;
}
- signal_changed (DCP_AUDIO_CHANNELS);
+ signal_changed (AUDIO_CHANNELS);
}
void
-Film::set_dcp_3d (bool t)
+Film::set_three_d (bool t)
{
{
boost::mutex::scoped_lock lm (_state_mutex);
- _dcp_3d = t;
+ _three_d = t;
}
- signal_changed (DCP_3D);
+ signal_changed (THREE_D);
}
void
@@ -670,9 +669,9 @@ Film::signal_changed (Property p)
switch (p) {
case Film::CONTENT:
- set_dcp_video_frame_rate (_playlist->best_dcp_frame_rate ());
+ set_video_frame_rate (_playlist->best_dcp_frame_rate ());
break;
- case Film::DCP_VIDEO_FRAME_RATE:
+ case Film::VIDEO_FRAME_RATE:
case Film::SEQUENCE_VIDEO:
_playlist->maybe_sequence_video ();
break;
@@ -833,7 +832,7 @@ Film::has_subtitles () const
}
OutputVideoFrame
-Film::best_dcp_video_frame_rate () const
+Film::best_video_frame_rate () const
{
return _playlist->best_dcp_frame_rate ();
}
@@ -842,7 +841,7 @@ void
Film::playlist_content_changed (boost::weak_ptr<Content> c, int p)
{
if (p == VideoContentProperty::VIDEO_FRAME_RATE) {
- set_dcp_video_frame_rate (_playlist->best_dcp_frame_rate ());
+ set_video_frame_rate (_playlist->best_dcp_frame_rate ());
}
if (ui_signaller) {
@@ -859,29 +858,29 @@ Film::playlist_changed ()
OutputAudioFrame
Film::time_to_audio_frames (Time t) const
{
- return t * dcp_audio_frame_rate () / TIME_HZ;
+ return t * audio_frame_rate () / TIME_HZ;
}
OutputVideoFrame
Film::time_to_video_frames (Time t) const
{
- return t * dcp_video_frame_rate () / TIME_HZ;
+ return t * video_frame_rate () / TIME_HZ;
}
Time
Film::audio_frames_to_time (OutputAudioFrame f) const
{
- return f * TIME_HZ / dcp_audio_frame_rate ();
+ return f * TIME_HZ / audio_frame_rate ();
}
Time
Film::video_frames_to_time (OutputVideoFrame f) const
{
- return f * TIME_HZ / dcp_video_frame_rate ();
+ return f * TIME_HZ / video_frame_rate ();
}
OutputAudioFrame
-Film::dcp_audio_frame_rate () const
+Film::audio_frame_rate () const
{
/* XXX */
return 48000;
diff --git a/src/lib/film.h b/src/lib/film.h
index 5aff6f0be..7279541e4 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -61,8 +61,8 @@ public:
std::string internal_video_mxf_filename () const;
boost::filesystem::path audio_analysis_path (boost::shared_ptr<const AudioContent>) const;
- std::string dcp_video_mxf_filename () const;
- std::string dcp_audio_mxf_filename () const;
+ std::string video_mxf_filename () const;
+ std::string audio_mxf_filename () const;
void send_dcp_to_tms ();
void make_dcp ();
@@ -97,7 +97,7 @@ public:
boost::shared_ptr<Player> make_player () const;
boost::shared_ptr<Playlist> playlist () const;
- OutputAudioFrame dcp_audio_frame_rate () const;
+ OutputAudioFrame audio_frame_rate () const;
OutputAudioFrame time_to_audio_frames (Time) const;
OutputVideoFrame time_to_video_frames (Time) const;
@@ -110,7 +110,7 @@ public:
Time length () const;
bool has_subtitles () const;
- OutputVideoFrame best_dcp_video_frame_rate () const;
+ OutputVideoFrame best_video_frame_rate () const;
/** Identifiers for the parts of our state;
used for signalling changes.
@@ -128,10 +128,10 @@ public:
WITH_SUBTITLES,
J2K_BANDWIDTH,
DCI_METADATA,
- DCP_VIDEO_FRAME_RATE,
- DCP_AUDIO_CHANNELS,
- /** The setting of _dcp_3d has been changed */
- DCP_3D,
+ VIDEO_FRAME_RATE,
+ AUDIO_CHANNELS,
+ /** The setting of _three_d has been changed */
+ THREE_D,
SEQUENCE_VIDEO,
};
@@ -188,20 +188,20 @@ public:
return _dci_metadata;
}
- /* XXX: -> "video_frame_rate" */
- int dcp_video_frame_rate () const {
+ /** @return The frame rate of the DCP */
+ int video_frame_rate () const {
boost::mutex::scoped_lock lm (_state_mutex);
- return _dcp_video_frame_rate;
+ return _video_frame_rate;
}
- int dcp_audio_channels () const {
+ int audio_channels () const {
boost::mutex::scoped_lock lm (_state_mutex);
- return _dcp_audio_channels;
+ return _audio_channels;
}
- bool dcp_3d () const {
+ bool three_d () const {
boost::mutex::scoped_lock lm (_state_mutex);
- return _dcp_3d;
+ return _three_d;
}
bool sequence_video () const {
@@ -225,9 +225,9 @@ public:
void set_with_subtitles (bool);
void set_j2k_bandwidth (int);
void set_dci_metadata (DCIMetadata);
- void set_dcp_video_frame_rate (int);
- void set_dcp_audio_channels (int);
- void set_dcp_3d (bool);
+ void set_video_frame_rate (int);
+ void set_audio_channels (int);
+ void set_three_d (bool);
void set_dci_date_today ();
void set_sequence_video (bool);
@@ -279,14 +279,15 @@ private:
/** DCI naming stuff */
DCIMetadata _dci_metadata;
/** Frames per second to run our DCP at */
- int _dcp_video_frame_rate;
+ int _video_frame_rate;
/** The date that we should use in a DCI name */
boost::gregorian::date _dci_date;
- int _dcp_audio_channels;
+ /** Number of audio channels to put in the DCP */
+ int _audio_channels;
/** If true, the DCP will be written in 3D mode; otherwise in 2D.
This will be regardless of what content is on the playlist.
*/
- bool _dcp_3d;
+ bool _three_d;
bool _sequence_video;
/** true if our state has changed since we last saved it */
diff --git a/src/lib/player.cc b/src/lib/player.cc
index e1173a36b..e50f26534 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -95,7 +95,7 @@ Player::Player (shared_ptr<const Film> f, shared_ptr<const Playlist> p)
, _have_valid_pieces (false)
, _video_position (0)
, _audio_position (0)
- , _audio_buffers (f->dcp_audio_channels(), 0)
+ , _audio_buffers (f->audio_channels(), 0)
{
_playlist->Changed.connect (bind (&Player::playlist_changed, this));
_playlist->ContentChanged.connect (bind (&Player::content_changed, this, _1, _2, _3));
@@ -213,7 +213,7 @@ Player::process_video (weak_ptr<Piece> weak_piece, shared_ptr<const Image> image
shared_ptr<VideoContent> content = dynamic_pointer_cast<VideoContent> (piece->content);
assert (content);
- FrameRateConversion frc (content->video_frame_rate(), _film->dcp_video_frame_rate());
+ FrameRateConversion frc (content->video_frame_rate(), _film->video_frame_rate());
if (frc.skip && (frame % 2) == 1) {
return;
}
@@ -224,7 +224,7 @@ Player::process_video (weak_ptr<Piece> weak_piece, shared_ptr<const Image> image
work_image = work_image->scale_and_convert_to_rgb (image_size, _film->scaler(), true);
- Time time = content->start() + (frame * frc.factor() * TIME_HZ / _film->dcp_video_frame_rate());
+ Time time = content->start() + (frame * frc.factor() * TIME_HZ / _film->video_frame_rate());
if (_film->with_subtitles () && _out_subtitle.image && time >= _out_subtitle.from && time <= _out_subtitle.to) {
work_image->alpha_blend (_out_subtitle.image, _out_subtitle.position);
@@ -244,11 +244,11 @@ Player::process_video (weak_ptr<Piece> weak_piece, shared_ptr<const Image> image
#endif
Video (work_image, eyes, same, time);
- time += TIME_HZ / _film->dcp_video_frame_rate();
+ time += TIME_HZ / _film->video_frame_rate();
if (frc.repeat) {
Video (work_image, eyes, true, time);
- time += TIME_HZ / _film->dcp_video_frame_rate();
+ time += TIME_HZ / _film->video_frame_rate();
}
_video_position = piece->video_position = time;
@@ -272,7 +272,7 @@ Player::process_audio (weak_ptr<Piece> weak_piece, shared_ptr<const AudioBuffers
}
/* Remap channels */
- shared_ptr<AudioBuffers> dcp_mapped (new AudioBuffers (_film->dcp_audio_channels(), audio->frames()));
+ shared_ptr<AudioBuffers> dcp_mapped (new AudioBuffers (_film->audio_channels(), audio->frames()));
dcp_mapped->make_silent ();
list<pair<int, libdcp::Channel> > map = content->audio_mapping().content_to_dcp ();
for (list<pair<int, libdcp::Channel> >::iterator i = map.begin(); i != map.end(); ++i) {
@@ -283,11 +283,11 @@ Player::process_audio (weak_ptr<Piece> weak_piece, shared_ptr<const AudioBuffers
audio = dcp_mapped;
- Time time = content->start() + (frame * TIME_HZ / _film->dcp_audio_frame_rate()) + (content->audio_delay() * TIME_HZ / 1000);
+ Time time = content->start() + (frame * TIME_HZ / _film->audio_frame_rate()) + (content->audio_delay() * TIME_HZ / 1000);
/* We must cut off anything that comes before the start of all time */
if (time < 0) {
- int const frames = - time * _film->dcp_audio_frame_rate() / TIME_HZ;
+ int const frames = - time * _film->audio_frame_rate() / TIME_HZ;
if (frames >= audio->frames ()) {
return;
}
@@ -381,12 +381,12 @@ Player::seek (Time t, bool accurate)
(*i)->video_position = (*i)->audio_position = vc->start() + s;
- FrameRateConversion frc (vc->video_frame_rate(), _film->dcp_video_frame_rate());
+ FrameRateConversion frc (vc->video_frame_rate(), _film->video_frame_rate());
/* Here we are converting from time (in the DCP) to a frame number in the content.
Hence we need to use the DCP's frame rate and the double/skip correction, not
the source's rate.
*/
- VideoContent::Frame f = s * _film->dcp_video_frame_rate() / (frc.factor() * TIME_HZ);
+ VideoContent::Frame f = s * _film->video_frame_rate() / (frc.factor() * TIME_HZ);
dynamic_pointer_cast<VideoDecoder>((*i)->decoder)->seek (f, accurate);
}
@@ -529,8 +529,8 @@ Player::emit_black ()
void
Player::emit_silence (OutputAudioFrame most)
{
- OutputAudioFrame N = min (most, _film->dcp_audio_frame_rate() / 2);
- shared_ptr<AudioBuffers> silence (new AudioBuffers (_film->dcp_audio_channels(), N));
+ OutputAudioFrame N = min (most, _film->audio_frame_rate() / 2);
+ shared_ptr<AudioBuffers> silence (new AudioBuffers (_film->audio_channels(), N));
silence->make_silent ();
Audio (silence, _audio_position);
_audio_position += _film->audio_frames_to_time (N);
diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc
index e5491480f..ee55ede91 100644
--- a/src/lib/sndfile_content.cc
+++ b/src/lib/sndfile_content.cc
@@ -59,6 +59,14 @@ SndfileContent::summary () const
}
string
+SndfileContent::technical_summary () const
+{
+ return Content::technical_summary() + " - "
+ + AudioContent::technical_summary ()
+ + "sndfile";
+}
+
+string
SndfileContent::information () const
{
if (_audio_frame_rate == 0) {
@@ -141,7 +149,7 @@ SndfileContent::output_audio_frame_rate () const
shared_ptr<const Film> film = _film.lock ();
assert (film);
- return film->dcp_audio_frame_rate ();
+ return film->audio_frame_rate ();
}
void
diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h
index 3b61eee64..27e0ca21d 100644
--- a/src/lib/sndfile_content.h
+++ b/src/lib/sndfile_content.h
@@ -41,6 +41,7 @@ public:
void examine (boost::shared_ptr<Job>);
std::string summary () const;
+ std::string technical_summary () const;
std::string information () const;
void as_xml (xmlpp::Node *) const;
Time length () const;
diff --git a/src/lib/still_image_content.cc b/src/lib/still_image_content.cc
index 3a30ccf87..804a5c0f6 100644
--- a/src/lib/still_image_content.cc
+++ b/src/lib/still_image_content.cc
@@ -51,6 +51,14 @@ StillImageContent::summary () const
return String::compose (_("%1 [still]"), file().filename().string());
}
+string
+StillImageContent::technical_summary () const
+{
+ return Content::technical_summary() + " - "
+ + VideoContent::technical_summary() + " - "
+ + "still";
+}
+
bool
StillImageContent::valid_file (boost::filesystem::path f)
{
@@ -98,7 +106,7 @@ StillImageContent::length () const
shared_ptr<const Film> film = _film.lock ();
assert (film);
- FrameRateConversion frc (video_frame_rate(), film->dcp_video_frame_rate ());
+ FrameRateConversion frc (video_frame_rate(), film->video_frame_rate ());
return video_length() * frc.factor() * TIME_HZ / video_frame_rate();
}
diff --git a/src/lib/still_image_content.h b/src/lib/still_image_content.h
index 02921f4e2..b81879279 100644
--- a/src/lib/still_image_content.h
+++ b/src/lib/still_image_content.h
@@ -39,6 +39,7 @@ public:
void examine (boost::shared_ptr<Job>);
std::string summary () const;
+ std::string technical_summary () const;
void as_xml (xmlpp::Node *) const;
Time length () const;
diff --git a/src/lib/still_image_examiner.cc b/src/lib/still_image_examiner.cc
index 71357e5ef..07848d7b9 100644
--- a/src/lib/still_image_examiner.cc
+++ b/src/lib/still_image_examiner.cc
@@ -58,6 +58,6 @@ StillImageExaminer::video_frame_rate () const
return 24;
}
- return f->dcp_video_frame_rate ();
+ return f->video_frame_rate ();
}
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index 076cd6ec6..d70ece340 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -237,3 +237,9 @@ VideoContent::set_video_frame_type (VideoFrameType t)
signal_changed (VideoContentProperty::VIDEO_FRAME_TYPE);
}
+
+string
+VideoContent::technical_summary () const
+{
+ return String::compose ("video: length %1, size %2x%3, rate %4", video_length(), video_size().width, video_size().height, video_frame_rate());
+}
diff --git a/src/lib/video_content.h b/src/lib/video_content.h
index 348e2ce8b..513e1f598 100644
--- a/src/lib/video_content.h
+++ b/src/lib/video_content.h
@@ -45,6 +45,7 @@ public:
VideoContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>);
void as_xml (xmlpp::Node *) const;
+ std::string technical_summary () const;
virtual std::string information () const;
virtual std::string identifier () const;
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 939a2906d..522ecc1c1 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -73,12 +73,12 @@ Writer::Writer (shared_ptr<const Film> f, shared_ptr<Job> j)
it into the DCP later.
*/
- if (f->dcp_3d ()) {
+ if (f->three_d ()) {
_picture_asset.reset (
new libdcp::StereoPictureAsset (
_film->internal_video_mxf_dir (),
_film->internal_video_mxf_filename (),
- _film->dcp_video_frame_rate (),
+ _film->video_frame_rate (),
_film->container()->size (_film->full_frame ())
)
);
@@ -88,7 +88,7 @@ Writer::Writer (shared_ptr<const Film> f, shared_ptr<Job> j)
new libdcp::MonoPictureAsset (
_film->internal_video_mxf_dir (),
_film->internal_video_mxf_filename (),
- _film->dcp_video_frame_rate (),
+ _film->video_frame_rate (),
_film->container()->size (_film->full_frame ())
)
);
@@ -100,10 +100,10 @@ Writer::Writer (shared_ptr<const Film> f, shared_ptr<Job> j)
_sound_asset.reset (
new libdcp::SoundAsset (
_film->dir (_film->dcp_name()),
- _film->dcp_audio_mxf_filename (),
- _film->dcp_video_frame_rate (),
- _film->dcp_audio_channels (),
- _film->dcp_audio_frame_rate ()
+ _film->audio_mxf_filename (),
+ _film->video_frame_rate (),
+ _film->audio_channels (),
+ _film->audio_frame_rate ()
)
);
@@ -122,7 +122,7 @@ Writer::write (shared_ptr<const EncodedData> encoded, int frame, Eyes eyes)
qi.encoded = encoded;
qi.frame = frame;
- if (_film->dcp_3d() && eyes == EYES_BOTH) {
+ if (_film->three_d() && eyes == EYES_BOTH) {
/* 2D material in a 3D DCP; fake the 3D */
qi.eyes = EYES_LEFT;
_queue.push_back (qi);
@@ -345,7 +345,7 @@ Writer::finish ()
boost::filesystem::path to;
to /= _film->dir (_film->dcp_name());
- to /= _film->dcp_video_mxf_filename ();
+ to /= _film->video_mxf_filename ();
boost::system::error_code ec;
boost::filesystem::create_hard_link (from, to, ec);
@@ -358,7 +358,7 @@ Writer::finish ()
/* And update the asset */
_picture_asset->set_directory (_film->dir (_film->dcp_name ()));
- _picture_asset->set_file_name (_film->dcp_video_mxf_filename ());
+ _picture_asset->set_file_name (_film->video_mxf_filename ());
_sound_asset->set_duration (frames);
libdcp::DCP dcp (_film->dir (_film->dcp_name()));
@@ -369,7 +369,7 @@ Writer::finish ()
_film->dcp_name(),
_film->dcp_content_type()->libdcp_kind (),
frames,
- _film->dcp_video_frame_rate ()
+ _film->video_frame_rate ()
)
);
@@ -445,7 +445,7 @@ Writer::check_existing_picture_mxf ()
while (1) {
- if (_film->dcp_3d ()) {
+ if (_film->three_d ()) {
if (!check_existing_picture_mxf_frame (mxf, _first_nonexistant_frame, EYES_LEFT)) {
break;
}