projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
41daefc
)
Change re{set,fresh}_metadata to take a film and a size from the player.
author
Carl Hetherington
<cth@carlh.net>
Mon, 30 Nov 2020 22:38:39 +0000
(23:38 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 30 Nov 2020 23:20:39 +0000
(
00:20
+0100)
src/lib/player_video.cc
patch
|
blob
|
history
src/lib/player_video.h
patch
|
blob
|
history
src/wx/film_viewer.cc
patch
|
blob
|
history
src/wx/video_view.cc
patch
|
blob
|
history
src/wx/video_view.h
patch
|
blob
|
history
diff --git
a/src/lib/player_video.cc
b/src/lib/player_video.cc
index 8c1b95bba37917422d0b89a0ad04c84673ccd48f..4f8acd5e2e0e59435b4f203d12bac2e97220a7a1 100644
(file)
--- a/
src/lib/player_video.cc
+++ b/
src/lib/player_video.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013-20
18
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-20
20
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-25,6
+25,7
@@
#include "image_proxy.h"
#include "j2k_image_proxy.h"
#include "film.h"
#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>
#include <dcp/raw_convert.h>
extern "C" {
#include <libavutil/pixfmt.h>
@@
-330,7
+331,7
@@
PlayerVideo::shallow_copy () const
* @return true if this was possible, false if not.
*/
bool
* @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) {
{
shared_ptr<Content> content = _content.lock();
if (!content || !_video_frame) {
@@
-339,8
+340,8
@@
PlayerVideo::reset_metadata (shared_ptr<const Film> film, dcp::Size video_contai
_crop = content->video->crop();
_fade = content->video->fade(film, _video_frame.get());
_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();
_colour_conversion = content->video->colour_conversion();
_video_range = content->video->range();
diff --git
a/src/lib/player_video.h
b/src/lib/player_video.h
index 56cfbd1005912a00b879f7263205a1017f980c7b..0952eafb95ea880d47d9874a62fd1b58ece7820f 100644
(file)
--- a/
src/lib/player_video.h
+++ b/
src/lib/player_video.h
@@
-76,7
+76,7
@@
public:
void add_metadata (xmlpp::Node* node) const;
void write_to_socket (boost::shared_ptr<Socket> socket) const;
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;
bool has_j2k () const;
boost::shared_ptr<const dcp::Data> j2k () const;
diff --git
a/src/wx/film_viewer.cc
b/src/wx/film_viewer.cc
index ee0322d6f0450a6a11dc97ddd30614fe0901219b..e91cdc9a063c90bb2da61492771e6404b506f7ff 100644
(file)
--- a/
src/wx/film_viewer.cc
+++ b/
src/wx/film_viewer.cc
@@
-441,7
+441,7
@@
FilmViewer::quick_refresh ()
if (!_video_view || !_film || !_player) {
return true;
}
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
}
void
diff --git
a/src/wx/video_view.cc
b/src/wx/video_view.cc
index aa3a469dab5267cfb5b9aed3eba70db604c7bdc2..08b7d2912f39f1593eeac0d76b8558ce91ed2a15 100644
(file)
--- a/
src/wx/video_view.cc
+++ b/
src/wx/video_view.cc
@@
-125,14
+125,14
@@
VideoView::start ()
}
bool
}
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;
}
{
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;
}
return false;
}
diff --git
a/src/wx/video_view.h
b/src/wx/video_view.h
index 4e0b89ed767b3891e2a98360d490c4efc1d56b7c..ef5e8107d508bdb46785cb3de521228950902cd7 100644
(file)
--- a/
src/wx/video_view.h
+++ b/
src/wx/video_view.h
@@
-33,6
+33,7
@@
class Image;
class wxWindow;
class FilmViewer;
class Image;
class wxWindow;
class FilmViewer;
+class Player;
class PlayerVideo;
class VideoView : public ExceptionStore, public boost::noncopyable
class PlayerVideo;
class VideoView : public ExceptionStore, public boost::noncopyable
@@
-53,7
+54,7
@@
public:
virtual bool display_next_frame (bool) = 0;
void clear ();
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;
/** Emitted from the GUI thread when our display changes in size */
boost::signals2::signal<void()> Sized;