#include "exceptions.h"
#include "config.h"
#include "frame_rate_change.h"
-#include "raw_convert.h"
#include "compose.hpp"
+#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
#include <boost/foreach.hpp>
using std::string;
using std::cout;
using std::vector;
-using std::stringstream;
using std::fixed;
using std::list;
using std::pair;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
+using dcp::raw_convert;
/** Something stream-related has changed */
int const AudioContentProperty::STREAMS = 200;
string
AudioContent::technical_summary () const
{
- string s = "audio :";
+ string s = "audio: ";
BOOST_FOREACH (AudioStreamPtr i, streams ()) {
- s += String::compose ("stream channels %1 rate %2", i->channels(), i->frame_rate());
+ s += String::compose ("stream channels %1 rate %2 ", i->channels(), i->frame_rate());
}
return s;
);
}
- p.push_back (UserProperty (UserProperty::AUDIO, _("DCP frame rate"), resampled_frame_rate (), _("Hz")));
+ p.push_back (UserProperty (UserProperty::AUDIO, _("DCP sample rate"), resampled_frame_rate (), _("Hz")));
p.push_back (UserProperty (UserProperty::LENGTH, _("Full length in video frames at DCP rate"), c.frames_round (frc.dcp)));
if (stream) {
_parent->signal_changed (AudioContentProperty::STREAMS);
}
+
+void
+AudioContent::use_template (shared_ptr<const AudioContent> c)
+{
+ _gain = c->_gain;
+ _delay = c->_delay;
+
+ size_t i = 0;
+ size_t j = 0;
+
+ while (i < _streams.size() && j < c->_streams.size()) {
+ _streams[i]->set_mapping (c->_streams[j]->mapping());
+ ++i;
+ ++j;
+ }
+}