diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-29 23:17:34 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-29 23:17:34 +0100 |
| commit | 714aa61dd8a0dac8a7625c4c66806685b36a05d0 (patch) | |
| tree | c4bf062325f8226d45f00ead295897fc71670e95 | |
| parent | dbc52b7e48d7f59f74cc36b61d8ec774fcae8e88 (diff) | |
Add VideoContent::rotate_size().
| -rw-r--r-- | src/lib/video_content.cc | 9 | ||||
| -rw-r--r-- | src/lib/video_content.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 91ed11855..6c027ff11 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -722,3 +722,12 @@ VideoContent::actual_crop () const ); } + +void +VideoContent::rotate_size() +{ + if (_size) { + std::swap(_size->width, _size->height); + } +} + diff --git a/src/lib/video_content.h b/src/lib/video_content.h index e7e8eb1b3..495d000e1 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -220,6 +220,8 @@ public: void modify_position (std::shared_ptr<const Film> film, dcpomatic::DCPTime& pos) const; void modify_trim_start (dcpomatic::ContentTime& pos) const; + void rotate_size(); + static std::shared_ptr<VideoContent> from_xml (Content* parent, cxml::ConstNodePtr node, int version, VideoRange video_range_hint); private: |
