X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fserver_test.cc;h=5997caab67c61b86212d3f010fb5445fcf086d69;hb=05654d0e1799746a9df3ccab040c92e0ed825cac;hp=ad3cf94819be44dff7dd0a0c3ed49df9390473e8;hpb=ee77b3cf5f59f775e75e628aa28e8f2f9f941530;p=dcpomatic.git diff --git a/src/tools/server_test.cc b/src/tools/server_test.cc index ad3cf9481..5997caab6 100644 --- a/src/tools/server_test.cc +++ b/src/tools/server_test.cc @@ -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 log_ (new FileLog ("servomatictest.log")); static int frame_count = 0; void -process_video (shared_ptr frame) +process_video (shared_ptr pvf) { - shared_ptr 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 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 local (new DCPVideoFrame (pvf, frame_count, film->video_frame_rate(), 250000000, RESOLUTION_2K, log_)); + shared_ptr 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'}, @@ -156,7 +147,7 @@ main (int argc, char* argv[]) DCPTime const frame = DCPTime::from_frames (1, film->video_frame_rate ()); for (DCPTime t; t < film->length(); t += frame) { - process_video (player->get_video (t, true)); + process_video (player->get_video(t, true).front ()); } } catch (std::exception& e) { cerr << "Error: " << e.what() << "\n";