#include "film.h"
#include "compose.hpp"
#include "job.h"
+#include "util.h"
#include "i18n.h"
}
-SndfileContent::SndfileContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node)
+SndfileContent::SndfileContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node, int version)
: Content (f, node)
, AudioContent (f, node)
- , _audio_mapping (node->node_child ("AudioMapping"))
+ , _audio_mapping (node->node_child ("AudioMapping"), version)
{
_audio_channels = node->number_child<int> ("AudioChannels");
- _audio_length = node->number_child<AudioContent::Frame> ("AudioLength");
+ _audio_length = ContentTime (node->number_child<int64_t> ("AudioLength"));
_audio_frame_rate = node->number_child<int> ("AudioFrameRate");
}
SndfileContent::summary () const
{
/* Get the string() here so that the name does not have quotes around it */
- return String::compose (_("%1 [audio]"), path().filename().string());
+ return String::compose (_("%1 [audio]"), path_summary ());
}
string
_audio_mapping.as_xml (node->add_child("AudioMapping"));
}
-Time
+DCPTime
SndfileContent::full_length () const
{
shared_ptr<const Film> film = _film.lock ();
assert (film);
-
- return film->audio_frames_to_time (audio_length ());
+ return DCPTime (audio_length(), film->active_frame_rate_change (position ()));
}
int