- stringstream s;
- s << N_("encode please\n")
- << N_("width ") << _image->size().width << N_("\n")
- << N_("height ") << _image->size().height << N_("\n")
- << N_("frame ") << _frame << N_("\n")
- << N_("frames_per_second ") << _frames_per_second << N_("\n")
- << N_("j2k_bandwidth ") << _j2k_bandwidth << N_("\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);