- stringstream s;
- s << "encode please\n"
- << "width " << _image->size().width << "\n"
- << "height " << _image->size().height << "\n"
- << "eyes " << static_cast<int> (_eyes) << "\n"
- << "frame " << _frame << "\n"
- << "frames_per_second " << _frames_per_second << "\n"
- << "j2k_bandwidth " << _j2k_bandwidth << "\n";
-
- _log->log (String::compose (
- N_("Sending to remote; pixel format %1, components %2, lines (%3,%4,%5), line sizes (%6,%7,%8)"),
- _image->pixel_format(), _image->components(),
- _image->lines(0), _image->lines(1), _image->lines(2),
- _image->line_size()[0], _image->line_size()[1], _image->line_size()[2]
- ));
-
- socket->write (s.str().length() + 1);
- socket->write ((uint8_t *) s.str().c_str(), s.str().length() + 1);
-
- _image->write_to_socket (socket);
+ /* Collect all XML metadata */
+ xmlpp::Document doc;
+ xmlpp::Element* root = doc.create_root_node ("EncodingRequest");
+ root->add_child("Version")->add_child_text (raw_convert<string> (SERVER_LINK_VERSION));
+ add_metadata (root);