int const VideoContentProperty::CUSTOM_RATIO = 8;
int const VideoContentProperty::CUSTOM_SIZE = 9;
int const VideoContentProperty::BURNT_SUBTITLE_LANGUAGE = 10;
+int const VideoContentProperty::TYPE = 11;
using std::cout;
: ContentPart (parent)
, _use (true)
, _length (0)
+ , _type(VideoType::MAIN)
, _frame_type (VideoFrameType::TWO_D)
, _yuv (true)
, _fade_in (0)
_use = node->optional_bool_child("Use").get_value_or(true);
_length = node->number_child<Frame> ("VideoLength");
+ _type = string_to_video_type(node->optional_string_child("VideoType").get_value_or("main"));
+
if (version <= 34) {
/* Snapshot of the VideoFrameType enum at version 34 */
switch (node->number_child<int> ("VideoFrameType")) {
throw JoinError (_("Content to be joined must have the same picture size."));
}
+ if (c[i]->video->type() != ref->type()) {
+ throw JoinError(_("Content to be joined must have the same video type."));
+ }
+
if (c[i]->video->frame_type() != ref->frame_type()) {
throw JoinError (_("Content to be joined must have the same video frame type."));
}
_use = ref->use ();
_size = ref->size ();
+ _type = ref->type();
_frame_type = ref->frame_type ();
_crop = ref->requested_crop ();
_custom_ratio = ref->custom_ratio ();
node->add_child("VideoLength")->add_child_text (raw_convert<string> (_length));
node->add_child("VideoWidth")->add_child_text (raw_convert<string> (_size.width));
node->add_child("VideoHeight")->add_child_text (raw_convert<string> (_size.height));
+ node->add_child("VideoType")->add_child_text(video_type_to_string(_type));
node->add_child("VideoFrameType")->add_child_text (video_frame_type_to_string (_frame_type));
if (_sample_aspect_ratio) {
node->add_child("SampleAspectRatio")->add_child_text (raw_convert<string> (_sample_aspect_ratio.get ()));
}
+void
+VideoContent::set_type(VideoType type)
+{
+ maybe_set(_type, type, VideoContentProperty::TYPE);
+}
+
+
void
VideoContent::set_frame_type (VideoFrameType t)
{