/*
- 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 "player.h"
#include <dcp/raw_convert.h>
extern "C" {
#include <libavutil/pixfmt.h>
* @return true if this was possible, false if not.
*/
bool
-PlayerVideo::reset_metadata (shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size)
+PlayerVideo::reset_metadata (shared_ptr<const Film> film, dcp::Size player_video_container_size)
{
shared_ptr<Content> content = _content.lock();
if (!content || !_video_frame) {
_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);
- _out_size = video_container_size;
+ _inter_size = scale_for_display(content->video->scaled_size(film->frame_size()), player_video_container_size, film->frame_size());
+ _out_size = player_video_container_size;
_colour_conversion = content->video->colour_conversion();
_video_range = content->video->range();
void add_metadata (xmlpp::Node* node) const;
void write_to_socket (boost::shared_ptr<Socket> socket) const;
- bool reset_metadata (boost::shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size);
+ bool reset_metadata (boost::shared_ptr<const Film> film, dcp::Size player_video_container_size);
bool has_j2k () const;
boost::shared_ptr<const dcp::Data> j2k () const;
if (!_video_view || !_film || !_player) {
return true;
}
- return _video_view->refresh_metadata (_film, _player->video_container_size(), _film->frame_size());
+ return _video_view->refresh_metadata (_film, _player->video_container_size());
}
void
}
bool
-VideoView::refresh_metadata (shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size)
+VideoView::refresh_metadata (shared_ptr<const Film> film, dcp::Size player_video_container_size)
{
pair<shared_ptr<PlayerVideo>, dcpomatic::DCPTime> pv = player_video ();
if (!pv.first) {
return false;
}
- if (!pv.first->reset_metadata (film, video_container_size, film_frame_size)) {
+ if (!pv.first->reset_metadata(film, player_video_container_size)) {
return false;
}
class Image;
class wxWindow;
class FilmViewer;
+class Player;
class PlayerVideo;
class VideoView : public ExceptionStore, public boost::noncopyable
virtual bool display_next_frame (bool) = 0;
void clear ();
- bool refresh_metadata (boost::shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size);
+ bool refresh_metadata (boost::shared_ptr<const Film> film, dcp::Size player_video_container_size);
/** Emitted from the GUI thread when our display changes in size */
boost::signals2::signal<void()> Sized;