diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-01-13 00:19:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-01-13 00:19:41 +0100 |
| commit | 9979e28b2511c15982ca8d083947eedf513b14f3 (patch) | |
| tree | 1775e3c6fabe4b089d864b1389b6e2b38164c51b /src/lib/bitmap_text.cc | |
| parent | bbee721034df747169f7d75ef142e57a8a8ed646 (diff) | |
WIP: partially restore PlayerVideo transfer over network.faster-subtitle-moving
Diffstat (limited to 'src/lib/bitmap_text.cc')
| -rw-r--r-- | src/lib/bitmap_text.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/bitmap_text.cc b/src/lib/bitmap_text.cc index 6e690b313..21f733983 100644 --- a/src/lib/bitmap_text.cc +++ b/src/lib/bitmap_text.cc @@ -20,6 +20,11 @@ #include "bitmap_text.h" #include "image.h" +#include "dcpomatic_socket.h" +#include <dcp/raw_convert.h> + +using boost::shared_ptr; +using dcp::raw_convert; bool operator== (BitmapText const & a, BitmapText const & b) @@ -37,4 +42,20 @@ operator!= (BitmapText const & a, BitmapText const & b) return !(a == b); } +void +BitmapText::transfer_xml (xmlpp::Node* node) const +{ + node->add_child("Width")->add_child_text(raw_convert<std::string>(image->size().width)); + node->add_child("Height")->add_child_text(raw_convert<std::string>(image->size().height)); + node->add_child("RectX")->add_child_text(raw_convert<std::string>(rectangle.x)); + node->add_child("RectY")->add_child_text(raw_convert<std::string>(rectangle.y)); + node->add_child("RectWidth")->add_child_text(raw_convert<std::string>(rectangle.width)); + node->add_child("RectHeight")->add_child_text(raw_convert<std::string>(rectangle.height)); +} + +void +BitmapText::transfer_binary (shared_ptr<Socket> socket) const +{ + image->write_to_socket (socket); +} |
