}
void
-FFmpegContent::as_xml (xmlpp::Node* node) const
+FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const
{
node->add_child("Type")->add_child_text ("FFmpeg");
- Content::as_xml (node);
+ Content::as_xml (node, with_paths);
if (video) {
video->as_xml (node);
if (examiner->has_video ()) {
video.reset (new VideoContent (this));
video->take_from_examiner (examiner);
- set_default_colour_conversion ();
}
boost::filesystem::path first_path = path (0);
}
+ if (examiner->has_video ()) {
+ set_default_colour_conversion ();
+ }
+
signal_changed (FFmpegContentProperty::SUBTITLE_STREAMS);
signal_changed (FFmpegContentProperty::SUBTITLE_STREAM);
}
s += "_" + video->identifier();
}
- if (subtitle) {
+ if (subtitle && subtitle->use() && subtitle->burn()) {
s += "_" + subtitle->identifier();
}
return s;
}
-list<ContentTimePeriod>
-FFmpegContent::image_subtitles_during (ContentTimePeriod period, bool starting) const
-{
- shared_ptr<FFmpegSubtitleStream> stream = subtitle_stream ();
- if (!stream) {
- return list<ContentTimePeriod> ();
- }
-
- return stream->image_subtitles_during (period, starting);
-}
-
-list<ContentTimePeriod>
-FFmpegContent::text_subtitles_during (ContentTimePeriod period, bool starting) const
-{
- shared_ptr<FFmpegSubtitleStream> stream = subtitle_stream ();
- if (!stream) {
- return list<ContentTimePeriod> ();
- }
-
- return stream->text_subtitles_during (period, starting);
-}
-
void
FFmpegContent::set_default_colour_conversion ()
{
boost::mutex::scoped_lock lm (_mutex);
- if (s.width < 1080) {
- video->set_colour_conversion (PresetColourConversion::from_id ("rec601").conversion);
- } else {
+ switch (_colorspace) {
+ case AVCOL_SPC_RGB:
+ video->set_colour_conversion (PresetColourConversion::from_id ("srgb").conversion);
+ break;
+ case AVCOL_SPC_BT709:
video->set_colour_conversion (PresetColourConversion::from_id ("rec709").conversion);
+ break;
+ case AVCOL_SPC_BT470BG:
+ case AVCOL_SPC_SMPTE170M:
+ case AVCOL_SPC_SMPTE240M:
+ video->set_colour_conversion (PresetColourConversion::from_id ("rec601").conversion);
+ break;
+ case AVCOL_SPC_BT2020_CL:
+ case AVCOL_SPC_BT2020_NCL:
+ video->set_colour_conversion (PresetColourConversion::from_id ("rec2020").conversion);
+ break;
+ default:
+ if (s.width < 1080) {
+ video->set_colour_conversion (PresetColourConversion::from_id ("rec601").conversion);
+ } else {
+ video->set_colour_conversion (PresetColourConversion::from_id ("rec709").conversion);
+ }
+ break;
}
}
_("SMPTE 240M"),
_("Film"),
_("BT2020"),
- _("SMPTE ST 428-1 (CIE 1931 XYZ)")
+ _("SMPTE ST 428-1 (CIE 1931 XYZ)"),
+ _("SMPTE ST 431-2 (2011)"),
+ _("SMPTE ST 432-1 D65 (2010)")
};
- DCPOMATIC_ASSERT (AVCOL_PRI_NB <= 11);
+ DCPOMATIC_ASSERT (AVCOL_PRI_NB <= 13);
p.push_back (UserProperty (UserProperty::VIDEO, _("Colour primaries"), primaries[_color_primaries]));
char const * transfers[] = {
_("YCOCG"),
_("BT2020 non-constant luminance"),
_("BT2020 constant luminance"),
+ _("SMPTE 2085, Y'D'zD'x"),
};
- DCPOMATIC_ASSERT (AVCOL_SPC_NB == 11);
+ DCPOMATIC_ASSERT (AVCOL_SPC_NB == 12);
p.push_back (UserProperty (UserProperty::VIDEO, _("Colourspace"), spaces[_colorspace]));
if (_bits_per_pixel) {
return fa;
}
+
+void
+FFmpegContent::take_settings_from (shared_ptr<const Content> c)
+{
+ Content::take_settings_from (c);
+
+ shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (c);
+ _filters = fc->_filters;
+}