Merge master.
[dcpomatic.git] / src / tools / server_test.cc
index ba16697564705fe25afe03dc2458522e4de9899a..5997caab67c61b86212d3f010fb5445fcf086d69 100644 (file)
@@ -34,7 +34,7 @@
 #include "lib/log.h"
 #include "lib/video_decoder.h"
 #include "lib/player.h"
-#include "lib/dcp_video.h"
+#include "lib/player_video_frame.h"
 
 using std::cout;
 using std::cerr;
@@ -48,19 +48,10 @@ static shared_ptr<FileLog> log_ (new FileLog ("servomatictest.log"));
 static int frame_count = 0;
 
 void
-process_video (shared_ptr<DCPVideo> frame)
+process_video (shared_ptr<PlayerVideoFrame> pvf)
 {
-       shared_ptr<DCPVideoFrame> local  (
-               new DCPVideoFrame (
-                       frame->image (PIX_FMT_RGB24, false), frame_count, frame->eyes(), frame->conversion(), film->video_frame_rate(), 250000000, RESOLUTION_2K, log_
-                       )
-               );
-       
-       shared_ptr<DCPVideoFrame> remote (
-               new DCPVideoFrame (
-                       frame->image (PIX_FMT_RGB24, false), frame_count, frame->eyes(), frame->conversion(), film->video_frame_rate(), 250000000, RESOLUTION_2K, log_
-                       )
-               );
+       shared_ptr<DCPVideoFrame> local  (new DCPVideoFrame (pvf, frame_count, film->video_frame_rate(), 250000000, RESOLUTION_2K, log_));
+       shared_ptr<DCPVideoFrame> remote (new DCPVideoFrame (pvf, frame_count, film->video_frame_rate(), 250000000, RESOLUTION_2K, log_));
 
        cout << "Frame " << frame_count << ": ";
        cout.flush ();
@@ -112,7 +103,7 @@ main (int argc, char* argv[])
        string film_dir;
        string server_host;
 
-       while (1) {
+       while (true) {
                static struct option long_options[] = {
                        { "help", no_argument, 0, 'h'},
                        { "server", required_argument, 0, 's'},