Allow command-line configuration of config location (#1284).
[dcpomatic.git] / test / client_server_test.cc
index cb1aba3895680144ff2bccb3ae87562b003dc4b0..d77ed4c15e4462bf0132895b192957e002f86aea 100644 (file)
@@ -43,6 +43,7 @@ using std::list;
 using boost::shared_ptr;
 using boost::thread;
 using boost::optional;
+using boost::weak_ptr;
 using dcp::Data;
 
 void
@@ -70,7 +71,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb)
                p += image->stride()[0];
        }
 
-       shared_ptr<Image> sub_image (new Image (AV_PIX_FMT_RGBA, dcp::Size (100, 200), true));
+       shared_ptr<Image> 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,7 +95,9 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb)
                        dcp::Size (1998, 1080),
                        EYES_BOTH,
                        PART_WHOLE,
-                       ColourConversion ()
+                       ColourConversion(),
+                       weak_ptr<Content>(),
+                       optional<Frame>()
                        )
                );
 
@@ -121,7 +124,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb)
        dcpomatic_sleep (1);
 
        /* "localhost" rather than "127.0.0.1" here fails on docker; go figure */
-       EncodeServerDescription description ("127.0.0.1", 1);
+       EncodeServerDescription description ("127.0.0.1", 1, SERVER_LINK_VERSION);
 
        list<thread*> threads;
        for (int i = 0; i < 8; ++i) {
@@ -153,7 +156,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv)
                }
        }
 
-       shared_ptr<Image> sub_image (new Image (AV_PIX_FMT_RGBA, dcp::Size (100, 200), true));
+       shared_ptr<Image> 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;
@@ -177,7 +180,9 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv)
                        dcp::Size (1998, 1080),
                        EYES_BOTH,
                        PART_WHOLE,
-                       ColourConversion ()
+                       ColourConversion(),
+                       weak_ptr<Content>(),
+                       optional<Frame>()
                        )
                );
 
@@ -204,7 +209,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv)
        dcpomatic_sleep (1);
 
        /* "localhost" rather than "127.0.0.1" here fails on docker; go figure */
-       EncodeServerDescription description ("127.0.0.1", 2);
+       EncodeServerDescription description ("127.0.0.1", 2, SERVER_LINK_VERSION);
 
        list<thread*> threads;
        for (int i = 0; i < 8; ++i) {
@@ -247,7 +252,9 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k)
                        dcp::Size (1998, 1080),
                        EYES_BOTH,
                        PART_WHOLE,
-                       ColourConversion ()
+                       ColourConversion(),
+                       weak_ptr<Content>(),
+                       optional<Frame>()
                        )
                );
 
@@ -273,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<Content>(),
+                       optional<Frame>()
                        )
                );
 
@@ -298,7 +307,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k)
        dcpomatic_sleep (1);
 
        /* "localhost" rather than "127.0.0.1" here fails on docker; go figure */
-       EncodeServerDescription description ("127.0.0.1", 2);
+       EncodeServerDescription description ("127.0.0.1", 2, SERVER_LINK_VERSION);
 
        list<thread*> threads;
        for (int i = 0; i < 8; ++i) {