X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fclient_server_test.cc;h=592a7e294fe2c55caa10804515d17a6de46f81b8;hb=ec97893127a2d59871d92c9e658b6b1ab3100b40;hp=744254fdb14f327204216fcbead025ab738c3bec;hpb=96f701cab4f397272b84200bc75bc6421d364e5b;p=dcpomatic.git diff --git a/test/client_server_test.cc b/test/client_server_test.cc index 744254fdb..592a7e294 100644 --- a/test/client_server_test.cc +++ b/test/client_server_test.cc @@ -43,13 +43,14 @@ using std::list; using boost::shared_ptr; using boost::thread; using boost::optional; +using boost::weak_ptr; using dcp::Data; void do_remote_encode (shared_ptr frame, EncodeServerDescription description, Data locally_encoded) { Data remotely_encoded; - BOOST_CHECK_NO_THROW (remotely_encoded = frame->encode_remotely (description, 60)); + BOOST_REQUIRE_NO_THROW (remotely_encoded = frame->encode_remotely (description, 60)); BOOST_REQUIRE_EQUAL (locally_encoded.size(), remotely_encoded.size()); BOOST_CHECK_EQUAL (memcmp (locally_encoded.data().get(), remotely_encoded.data().get(), locally_encoded.size()), 0); @@ -70,7 +71,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb) p += image->stride()[0]; } - shared_ptr sub_image (new Image (AV_PIX_FMT_RGBA, dcp::Size (100, 200), true)); + shared_ptr sub_image (new Image (AV_PIX_FMT_BGRA, dcp::Size (100, 200), true)); p = sub_image->data()[0]; for (int y = 0; y < 200; ++y) { uint8_t* q = p; @@ -94,11 +95,13 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb) dcp::Size (1998, 1080), EYES_BOTH, PART_WHOLE, - ColourConversion () + ColourConversion(), + weak_ptr(), + optional() ) ); - pvf->set_subtitle (PositionImage (sub_image, Position (50, 60))); + pvf->set_text (PositionImage (sub_image, Position (50, 60))); shared_ptr frame ( new DCPVideo ( @@ -120,7 +123,8 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb) /* Let the server get itself ready */ dcpomatic_sleep (1); - EncodeServerDescription description ("localhost", 2); + /* "localhost" rather than "127.0.0.1" here fails on docker; go figure */ + EncodeServerDescription description ("127.0.0.1", 1, SERVER_LINK_VERSION); list threads; for (int i = 0; i < 8; ++i) { @@ -152,7 +156,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv) } } - shared_ptr sub_image (new Image (AV_PIX_FMT_RGBA, dcp::Size (100, 200), true)); + shared_ptr sub_image (new Image (AV_PIX_FMT_BGRA, dcp::Size (100, 200), true)); uint8_t* p = sub_image->data()[0]; for (int y = 0; y < 200; ++y) { uint8_t* q = p; @@ -176,11 +180,13 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv) dcp::Size (1998, 1080), EYES_BOTH, PART_WHOLE, - ColourConversion () + ColourConversion(), + weak_ptr(), + optional() ) ); - pvf->set_subtitle (PositionImage (sub_image, Position (50, 60))); + pvf->set_text (PositionImage (sub_image, Position (50, 60))); shared_ptr frame ( new DCPVideo ( @@ -202,7 +208,8 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv) /* Let the server get itself ready */ dcpomatic_sleep (1); - EncodeServerDescription description ("localhost", 2); + /* "localhost" rather than "127.0.0.1" here fails on docker; go figure */ + EncodeServerDescription description ("127.0.0.1", 2, SERVER_LINK_VERSION); list threads; for (int i = 0; i < 8; ++i) { @@ -245,7 +252,9 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k) dcp::Size (1998, 1080), EYES_BOTH, PART_WHOLE, - ColourConversion () + ColourConversion(), + weak_ptr(), + optional() ) ); @@ -271,7 +280,9 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k) dcp::Size (1998, 1080), EYES_BOTH, PART_WHOLE, - PresetColourConversion::all().front().conversion + PresetColourConversion::all().front().conversion, + weak_ptr(), + optional() ) ); @@ -295,7 +306,8 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k) /* Let the server get itself ready */ dcpomatic_sleep (1); - EncodeServerDescription description ("localhost", 2); + /* "localhost" rather than "127.0.0.1" here fails on docker; go figure */ + EncodeServerDescription description ("127.0.0.1", 2, SERVER_LINK_VERSION); list threads; for (int i = 0; i < 8; ++i) {