diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-08-14 13:44:58 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-13 20:23:29 +0200 |
| commit | d89f53b1ad09cf0f739533483915b702a26594b4 (patch) | |
| tree | 133813acde125aa371b0a30f75af2812e6459aa9 /src/tools/server_test.cc | |
| parent | 50e85cf64504b7fc38b4129aa750c2def28b95fd (diff) | |
wip: encoding; crashes on startup.
Diffstat (limited to 'src/tools/server_test.cc')
| -rw-r--r-- | src/tools/server_test.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/server_test.cc b/src/tools/server_test.cc index 4f8d0b4d1..931b27082 100644 --- a/src/tools/server_test.cc +++ b/src/tools/server_test.cc @@ -42,6 +42,7 @@ using std::cout; using std::cerr; using std::string; using std::pair; +using std::vector; using boost::shared_ptr; using boost::optional; using boost::bind; @@ -58,7 +59,11 @@ void process_video (shared_ptr<PlayerVideo> pvf) { shared_ptr<DCPVideo> local (new DCPVideo (pvf, frame_count, film->video_frame_rate(), 250000000, RESOLUTION_2K)); + vector<shared_ptr<DCPVideo> > locals; + locals.push_back (local); shared_ptr<DCPVideo> remote (new DCPVideo (pvf, frame_count, film->video_frame_rate(), 250000000, RESOLUTION_2K)); + vector<shared_ptr<DCPVideo> > remotes; + remotes.push_back (remote); cout << "Frame " << frame_count << ": "; cout.flush (); @@ -66,13 +71,13 @@ process_video (shared_ptr<PlayerVideo> pvf) ++frame_count; J2KEncoderCPUBackend cpu_backend; - Data local_encoded = *cpu_backend.encode (local); + Data local_encoded = cpu_backend.encode(locals).front(); Data remote_encoded; string remote_error; try { J2KEncoderRemoteBackend remote_backend(*server); - remote_encoded = *remote_backend.encode (remote); + remote_encoded = remote_backend.encode(remotes).front(); } catch (NetworkError& e) { remote_error = e.what (); } |
