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);
}
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;
}
}