return {};
}
+ bool has_alpha() const override {
+ return false;
+ }
+
std::string name() const {
return _name;
}
PixelQuanta pixel_quanta () const override;
+ bool has_alpha() const override;
+
AVColorRange color_range () const {
return video_codec_context()->color_range;
}
boost::optional<int> bits_per_pixel () const;
- bool has_alpha() const;
boost::optional<double> rotation () const {
return _rotation;
}
} else {
FFmpegImageProxy proxy(content->path(0));
- _video_size = proxy.image(Image::Alignment::COMPACT).image->size();
+ auto image = proxy.image(Image::Alignment::COMPACT);
+ _video_size = image.image->size();
+ _has_alpha = image.image->has_alpha();
}
if (content->still ()) {
/* See ::yuv - we're assuming the image is not YUV and so not subsampled */
return {};
}
+ bool has_alpha() const override {
+ return _has_alpha;
+ }
private:
std::weak_ptr<const Film> _film;
std::shared_ptr<const ImageContent> _image_content;
boost::optional<dcp::Size> _video_size;
Frame _video_length;
+ bool _has_alpha = false;
};
_burnt_subtitle_language = dcp::LanguageTag(*burnt);
}
+ _has_alpha = node->optional_bool_child("HasAlpha").get_value_or(false);
}
}
_pixel_quanta = max(_pixel_quanta, c[i]->video->_pixel_quanta);
+ _has_alpha = _has_alpha | c[i]->video->_has_alpha;
}
_use = ref->use();
if (_burnt_subtitle_language) {
cxml::add_text_child(element, "BurntSubtitleLanguage", _burnt_subtitle_language->as_string());
}
+ cxml::add_text_child(element, "HasAlpha", _has_alpha ? "1" : "0");
}
void
auto const yuv = d->yuv();
auto const range = d->range();
auto const pixel_quanta = d->pixel_quanta();
+ auto const has_alpha = d->has_alpha();
ContentChangeSignaller cc1(_parent, VideoContentProperty::SIZE);
ContentChangeSignaller cc2(_parent, ContentProperty::LENGTH);
_yuv = yuv;
_range = range;
_pixel_quanta = pixel_quanta;
+ _has_alpha = has_alpha;
}
LOG_GENERAL("Video length obtained from header as %1 frames", _length);
return _pixel_quanta;
}
+ bool has_alpha() const {
+ boost::mutex::scoped_lock lm(_mutex);
+ return _has_alpha;
+ }
+
bool use() const {
boost::mutex::scoped_lock lm(_mutex);
return _use;
VideoRange _range;
PixelQuanta _pixel_quanta;
boost::optional<dcp::LanguageTag> _burnt_subtitle_language;
+ bool _has_alpha = false;
};
virtual bool yuv() const = 0;
virtual VideoRange range() const = 0;
virtual PixelQuanta pixel_quanta() const = 0;
+ virtual bool has_alpha() const = 0;
};
PixelQuanta pixel_quanta () const override {
return {};
}
+ bool has_alpha() const override {
+ return false;
+ }
private:
std::shared_ptr<dcp::PictureAsset> _asset;