PART_WHOLE,
PresetColourConversion::all().front().conversion,
VIDEO_RANGE_FULL,
- boost::weak_ptr<Content>(),
+ boost::weak_ptr<Piece>(),
boost::optional<Frame>(),
false
)
video.part,
piece->video_colour_conversion(),
piece->video_range(),
- piece->content,
+ piece,
video.frame,
false
)
/*
- Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "image_proxy.h"
#include "j2k_image_proxy.h"
#include "film.h"
+#include "piece.h"
#include <dcp/raw_convert.h>
extern "C" {
#include <libavutil/pixfmt.h>
Part part,
optional<ColourConversion> colour_conversion,
VideoRange video_range,
- weak_ptr<Content> content,
+ weak_ptr<Piece> piece,
optional<Frame> video_frame,
bool error
)
, _part (part)
, _colour_conversion (colour_conversion)
, _video_range (video_range)
- , _content (content)
+ , _piece (piece)
, _video_frame (video_frame)
, _error (error)
{
_part,
_colour_conversion,
_video_range,
- _content,
+ _piece,
_video_frame,
_error
)
bool
PlayerVideo::reset_metadata (shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size)
{
- shared_ptr<Content> content = _content.lock();
- if (!content || !_video_frame) {
+ shared_ptr<Piece> piece = _piece.lock();
+ if (!piece || !_video_frame) {
return false;
}
- _crop = content->video->crop();
- _fade = content->video->fade(film, _video_frame.get());
- _inter_size = scale_for_display(content->video->scaled_size(film_frame_size), video_container_size, film_frame_size);
+ _crop = piece->video_crop();
+ _fade = piece->video_fade(film, _video_frame.get());
+ _inter_size = scale_for_display(piece->video_scaled_size(film_frame_size), video_container_size, film_frame_size);
_out_size = video_container_size;
- _colour_conversion = content->video->colour_conversion();
- _video_range = content->video->range();
+ _colour_conversion = piece->video_colour_conversion();
+ _video_range = piece->video_range();
return true;
}
class ImageProxy;
class Film;
class Socket;
+class Piece;
/** Everything needed to describe a video frame coming out of the player, but with the
* bits still their raw form. We may want to combine the bits on a remote machine,
Part,
boost::optional<ColourConversion>,
VideoRange video_range,
- boost::weak_ptr<Content>,
+ boost::weak_ptr<Piece>,
boost::optional<Frame>,
bool error
);
size_t memory_used () const;
- boost::weak_ptr<Content> content () const {
- return _content;
+ boost::weak_ptr<Piece> piece () const {
+ return _piece;
}
bool error () const {
boost::optional<ColourConversion> _colour_conversion;
VideoRange _video_range;
boost::optional<PositionImage> _text;
- /** Content that we came from. This is so that reset_metadata() can work, and also
+ /** Piece that we came from. This is so that reset_metadata() can work, and also
* for variant:swaroop's non-skippable ads.
*/
- boost::weak_ptr<Content> _content;
+ boost::weak_ptr<Piece> _piece;
/** Video frame that we came from. Again, this is for reset_metadata() */
boost::optional<Frame> _video_frame;