projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused Player::_ignore_audio. Ignore position
[dcpomatic.git]
/
src
/
lib
/
dcp_video.cc
diff --git
a/src/lib/dcp_video.cc
b/src/lib/dcp_video.cc
index 6d270dab2613a1881e851ca747a935d95c3ab84a..655c373822ea750aedda3669a52fcccec4db913c 100644
(file)
--- a/
src/lib/dcp_video.cc
+++ b/
src/lib/dcp_video.cc
@@
-37,17
+37,15
@@
#include "log.h"
#include "cross.h"
#include "player_video.h"
#include "log.h"
#include "cross.h"
#include "player_video.h"
-#include "raw_convert.h"
#include "compose.hpp"
#include <libcxml/cxml.h>
#include "compose.hpp"
#include <libcxml/cxml.h>
+#include <dcp/raw_convert.h>
#include <dcp/openjpeg_image.h>
#include <dcp/rgb_xyz.h>
#include <dcp/j2k.h>
#include <dcp/openjpeg_image.h>
#include <dcp/rgb_xyz.h>
#include <dcp/j2k.h>
-#include <dcp/colour_matrix.h>
#include <libxml++/libxml++.h>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <libxml++/libxml++.h>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
-#include <boost/make_shared.hpp>
#include <stdint.h>
#include <iomanip>
#include <iostream>
#include <stdint.h>
#include <iomanip>
#include <iostream>
@@
-61,9
+59,9
@@
using std::string;
using std::cout;
using boost::shared_ptr;
using std::string;
using std::cout;
using boost::shared_ptr;
-using boost::make_shared;
using dcp::Size;
using dcp::Data;
using dcp::Size;
using dcp::Data;
+using dcp::raw_convert;
#define DCI_COEFFICENT (48.0 / 52.37)
#define DCI_COEFFICENT (48.0 / 52.37)
@@
-111,7
+109,7
@@
DCPVideo::convert_to_xyz (shared_ptr<const PlayerVideo> frame, dcp::NoteHandler
note
);
} else {
note
);
} else {
- xyz
= dcp::xyz_to_xyz (image->data()[0], image->size(), image->stride()[0]
);
+ xyz
.reset (new dcp::OpenJPEGImage (image->data()[0], image->size(), image->stride()[0])
);
}
return xyz;
}
return xyz;
@@
-150,6
+148,7
@@
DCPVideo::encode_locally (dcp::NoteHandler note)
/** Send this frame to a remote server for J2K encoding, then read the result.
* @param serv Server to send to.
/** Send this frame to a remote server for J2K encoding, then read the result.
* @param serv Server to send to.
+ * @param timeout timeout in seconds.
* @return Encoded data.
*/
Data
* @return Encoded data.
*/
Data
@@
-157,10
+156,10
@@
DCPVideo::encode_remotely (EncodeServerDescription serv, int timeout)
{
boost::asio::io_service io_service;
boost::asio::ip::tcp::resolver resolver (io_service);
{
boost::asio::io_service io_service;
boost::asio::ip::tcp::resolver resolver (io_service);
- boost::asio::ip::tcp::resolver::query query (serv.host_name(), raw_convert<string> (
Config::instance()->server_port_base ()
));
+ boost::asio::ip::tcp::resolver::query query (serv.host_name(), raw_convert<string> (
ENCODE_FRAME_PORT
));
boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve (query);
boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve (query);
- shared_ptr<Socket> socket
= make_shared<Socket> (timeout
);
+ shared_ptr<Socket> socket
(new Socket (timeout)
);
socket->connect (*endpoint_iterator);
socket->connect (*endpoint_iterator);
@@
-178,17
+177,17
@@
DCPVideo::encode_remotely (EncodeServerDescription serv, int timeout)
socket->write ((uint8_t *) xml.c_str(), xml.length() + 1);
/* Send binary data */
socket->write ((uint8_t *) xml.c_str(), xml.length() + 1);
/* Send binary data */
- LOG_TIMING("start-remote-send thread=%1",
boost::this_thread::get_id
());
+ LOG_TIMING("start-remote-send thread=%1",
thread_id
());
_frame->send_binary (socket);
/* Read the response (JPEG2000-encoded data); this blocks until the data
is ready and sent back.
*/
_frame->send_binary (socket);
/* Read the response (JPEG2000-encoded data); this blocks until the data
is ready and sent back.
*/
- LOG_TIMING("start-remote-encode thread=%1",
boost::this_thread::get
_id ());
+ LOG_TIMING("start-remote-encode thread=%1",
thread
_id ());
Data e (socket->read_uint32 ());
Data e (socket->read_uint32 ());
- LOG_TIMING("start-remote-receive thread=%1",
boost::this_thread::get
_id ());
+ LOG_TIMING("start-remote-receive thread=%1",
thread
_id ());
socket->read (e.data().get(), e.size());
socket->read (e.data().get(), e.size());
- LOG_TIMING("finish-remote-receive thread=%1",
boost::this_thread::get
_id ());
+ LOG_TIMING("finish-remote-receive thread=%1",
thread
_id ());
LOG_DEBUG_ENCODE (N_("Finished remotely-encoded frame %1"), _index);
LOG_DEBUG_ENCODE (N_("Finished remotely-encoded frame %1"), _index);