class BitmapText
{
public:
- BitmapText (std::shared_ptr<Image> i, dcpomatic::Rect<double> r)
+ BitmapText (std::shared_ptr<const Image> i, dcpomatic::Rect<double> r)
: image (i)
, rectangle (r)
{}
- std::shared_ptr<Image> image;
+ std::shared_ptr<const Image> image;
/** Area that the subtitle covers on its corresponding video, expressed in
* proportions of the image size; e.g. rectangle.x = 0.5 would mean that
* the rectangle starts half-way across the video.
class ContentBitmapText : public ContentText
{
public:
- ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<Image> im, dcpomatic::Rect<double> r)
+ ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<const Image> im, dcpomatic::Rect<double> r)
: ContentText (f)
, sub (im, r)
{}
ImageProxy& operator= (ImageProxy const&) = delete;
struct Result {
- Result (std::shared_ptr<Image> image_, int log2_scaling_)
+ Result (std::shared_ptr<const Image> image_, int log2_scaling_)
: image (image_)
, log2_scaling (log2_scaling_)
, error (false)
, error (error_)
{}
- /** Image (which will be aligned) */
- std::shared_ptr<Image> image;
+ std::shared_ptr<const Image> image;
/** log2 of any scaling down that has already been applied to the image;
* e.g. if the image is already half the size of the original, this value
* will be 1.
void prepare (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast, bool proxy_only);
std::shared_ptr<Image> image (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast) const;
- std::shared_ptr<Image> raw_image () const;
+ std::shared_ptr<const Image> raw_image () const;
static AVPixelFormat force (AVPixelFormat, AVPixelFormat);
static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
public:
PositionImage () {}
- PositionImage (std::shared_ptr<Image> i, Position<int> p)
+ PositionImage (std::shared_ptr<const Image> i, Position<int> p)
: image (i)
, position (p)
{}
- std::shared_ptr<Image> image;
+ std::shared_ptr<const Image> image;
Position<int> position;
bool same (PositionImage const & other) const;
* of the video frame)
*/
void
-TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr<Image> image, dcpomatic::Rect<double> rect)
+TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr<const Image> image, dcpomatic::Rect<double> rect)
{
BitmapStart (ContentBitmapText (from, image, rect));
_position = from;
* of the video frame)
*/
void
-TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr<Image> image, dcpomatic::Rect<double> rect)
+TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr<const Image> image, dcpomatic::Rect<double> rect)
{
emit_bitmap_start (period.from, image, rect);
emit_stop (period.to);
return _position;
}
- void emit_bitmap_start (dcpomatic::ContentTime from, std::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
- void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
+ void emit_bitmap_start (dcpomatic::ContentTime from, std::shared_ptr<const Image> image, dcpomatic::Rect<double> rect);
+ void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr<const Image> image, dcpomatic::Rect<double> rect);
void emit_plain_start (dcpomatic::ContentTime from, std::list<dcp::SubtitleString> s);
void emit_plain_start (dcpomatic::ContentTime from, sub::Subtitle const & subtitle);
void emit_plain (dcpomatic::ContentTimePeriod period, std::list<dcp::SubtitleString> s);