#include <libcxml/cxml.h>
using std::string;
+using boost::optional;
FFmpegAudioStream::FFmpegAudioStream (cxml::ConstNodePtr node, int version)
: FFmpegStream (node)
, AudioStream (node->number_child<int> ("FrameRate"), AudioMapping (node->node_child ("Mapping"), version))
{
- first_audio = node->optional_number_child<int64_t> ("FirstAudio");
+ optional<ContentTime::Type> const f = node->optional_number_child<ContentTime::Type> ("FirstAudio");
+ if (f) {
+ first_audio = ContentTime (f.get ());
+ }
}
void
SndfileContent::SndfileContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
, SingleStreamAudioContent (film, node, version)
- , _audio_length (node->number_child<int64_t> ("AudioLength"))
+ , _audio_length (node->number_child<Frame> ("AudioLength"))
{
}
FrameRateChange const frc = film->active_frame_rate_change (position ());
return DCPTime::from_frames (audio_length() / frc.speed_up, audio_stream()->frame_rate ());
}
-