PART_WHOLE,
PresetColourConversion::all().front().conversion,
VIDEO_RANGE_FULL,
- boost::weak_ptr<Content>(),
optional<dcpomatic::DCPTime>(),
_film->video_frame_rate()
)
video.part,
piece->content->video->colour_conversion(),
piece->content->video->range(),
- piece->content,
time,
_film->video_frame_rate()
)
*/
#include "player_video.h"
-#include "content.h"
-#include "video_content.h"
#include "image.h"
#include "image_proxy.h"
#include "j2k_image_proxy.h"
Part part,
optional<ColourConversion> colour_conversion,
VideoRange video_range,
- weak_ptr<Content> content,
optional<dcpomatic::DCPTime> time,
int video_frame_rate
)
, _part (part)
, _colour_conversion (colour_conversion)
, _video_range (video_range)
- , _content (content)
, _time (time)
, _video_frame_rate (video_frame_rate)
{
_part,
_colour_conversion,
_video_range,
- _content,
_time,
_video_frame_rate
)
);
}
-/** Re-read crop, fade, inter/out size, colour conversion and video range from our content.
- * @return true if this was possible, false if not.
- */
-bool
+/** Mark our image as dirty to say it needs to be re-made */
+void
PlayerVideo::reset_metadata (dcp::Size video_container_size)
{
- shared_ptr<Content> content = _content.lock();
- if (!content) {
- return false;
- }
-
boost::mutex::scoped_lock lm (_mutex);
_out_size = video_container_size;
_image_dirty = true;
-
- return true;
}
Part,
boost::optional<ColourConversion>,
VideoRange video_range,
- boost::weak_ptr<Content>,
boost::optional<dcpomatic::DCPTime>,
int video_frame_rate
);
void add_metadata (xmlpp::Node* node) const;
void send_binary (boost::shared_ptr<Socket> socket) const;
- bool reset_metadata (dcp::Size video_container_size);
+ void reset_metadata (dcp::Size video_container_size);
bool has_j2k () const;
dcp::Data j2k () const;
size_t memory_used () const;
- boost::weak_ptr<Content> content () const {
- return _content;
- }
-
private:
void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
boost::optional<ColourConversion> _colour_conversion;
VideoRange _video_range;
std::list<PlayerText> _text;
- /** Content 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::optional<dcpomatic::DCPTime> _time;
int _video_frame_rate;
return false;
}
- if (!pv.first->reset_metadata (video_container_size)) {
- return false;
- }
-
+ pv.first->reset_metadata (video_container_size);
update ();
return true;
}
PART_WHOLE,
ColourConversion(),
VIDEO_RANGE_FULL,
- weak_ptr<Content>(),
optional<dcpomatic::DCPTime>(),
24
)
PART_WHOLE,
ColourConversion(),
VIDEO_RANGE_FULL,
- weak_ptr<Content>(),
boost::optional<dcpomatic::DCPTime>(),
24
)
PART_WHOLE,
ColourConversion(),
VIDEO_RANGE_FULL,
- weak_ptr<Content>(),
boost::optional<dcpomatic::DCPTime>(),
24
)
PART_WHOLE,
PresetColourConversion::all().front().conversion,
VIDEO_RANGE_FULL,
- weak_ptr<Content>(),
boost::optional<dcpomatic::DCPTime>(),
24
)