- socket->connect (*endpoint_iterator, 30);
-
- stringstream s;
- s << "encode please\n"
- << "input_width " << _input->size().width << "\n"
- << "input_height " << _input->size().height << "\n"
- << "input_pixel_format " << _input->pixel_format() << "\n"
- << "output_width " << _out_size.width << "\n"
- << "output_height " << _out_size.height << "\n"
- << "padding " << _padding << "\n"
- << "subtitle_offset " << _subtitle_offset << "\n"
- << "subtitle_scale " << _subtitle_scale << "\n"
- << "scaler " << _scaler->id () << "\n"
- << "frame " << _frame << "\n"
- << "frames_per_second " << _frames_per_second << "\n";
-
- if (!_post_process.empty()) {
- s << "post_process " << _post_process << "\n";
- }
-
- s << "colour_lut " << _colour_lut << "\n"
- << "j2k_bandwidth " << _j2k_bandwidth << "\n";
-
- if (_subtitle) {
- s << "subtitle_x " << _subtitle->position().x << "\n"
- << "subtitle_y " << _subtitle->position().y << "\n"
- << "subtitle_width " << _subtitle->image()->size().width << "\n"
- << "subtitle_height " << _subtitle->image()->size().height << "\n";
- }
-
- _log->log (String::compose (
- "Sending to remote; pixel format %1, components %2, lines (%3,%4,%5), line sizes (%6,%7,%8)",
- _input->pixel_format(), _input->components(),
- _input->lines(0), _input->lines(1), _input->lines(2),
- _input->line_size()[0], _input->line_size()[1], _input->line_size()[2]
- ));
-
- socket->write ((uint8_t *) s.str().c_str(), s.str().length() + 1, 30);
-
- _input->write_to_socket (socket);
- if (_subtitle) {
- _subtitle->image()->write_to_socket (socket);
- }
-
- char buffer[32];
- socket->read_indefinite ((uint8_t *) buffer, sizeof (buffer), 30);
- socket->consume (strlen (buffer) + 1);
- shared_ptr<EncodedData> e (new RemotelyEncodedData (atoi (buffer)));