summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-19 11:05:10 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-19 11:05:10 +0100
commit9e758fddfb8bbadb1fc84e393daa815445d5e9d5 (patch)
tree291005ebf01a66f07ab05b09e72f634ddd1ac45a /test
parent362ed9ee4f73bee21b3ef8d3b449bb8e8877f501 (diff)
parent69c08e8bbd5028a65cbddd2aa5f10632bd059191 (diff)
Merge delay-decode-take2 branch into master.
Diffstat (limited to 'test')
-rw-r--r--test/client_server_test.cc24
-rw-r--r--test/play_test.cc7
2 files changed, 23 insertions, 8 deletions
diff --git a/test/client_server_test.cc b/test/client_server_test.cc
index 1ad156ae3..c8a2b49ef 100644
--- a/test/client_server_test.cc
+++ b/test/client_server_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,6 +23,9 @@
#include "lib/image.h"
#include "lib/cross.h"
#include "lib/dcp_video_frame.h"
+#include "lib/scaler.h"
+#include "lib/player_video_frame.h"
+#include "lib/image_proxy.h"
using std::list;
using boost::shared_ptr;
@@ -67,16 +70,27 @@ BOOST_AUTO_TEST_CASE (client_server_test)
p += sub_image->stride()[0];
}
-// shared_ptr<Subtitle> subtitle (new Subtitle (Position<int> (50, 60), sub_image));
+ shared_ptr<PlayerVideoFrame> pvf (
+ new PlayerVideoFrame (
+ shared_ptr<ImageProxy> (new RawImageProxy (image)),
+ Crop (),
+ libdcp::Size (1998, 1080),
+ libdcp::Size (1998, 1080),
+ Scaler::from_id ("bicubic"),
+ EYES_BOTH,
+ PART_WHOLE,
+ ColourConversion ()
+ )
+ );
+
+ pvf->set_subtitle (sub_image, Position<int> (50, 60));
shared_ptr<FileLog> log (new FileLog ("build/test/client_server_test.log"));
shared_ptr<DCPVideoFrame> frame (
new DCPVideoFrame (
- image,
+ pvf,
0,
- EYES_BOTH,
- ColourConversion (),
24,
200000000,
RESOLUTION_2K,
diff --git a/test/play_test.cc b/test/play_test.cc
index 51e227256..1ba2e7d88 100644
--- a/test/play_test.cc
+++ b/test/play_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
#include "lib/player.h"
#include "lib/ratio.h"
#include "lib/dcp_content_type.h"
+#include "lib/player_video_frame.h"
#include "test.h"
/* This test needs stuff in Player that is only included in debug mode */
@@ -43,10 +44,10 @@ public:
PlayerWrapper (shared_ptr<Player> p)
: _player (p)
{
- _player->Video.connect (bind (&PlayerWrapper::process_video, this, _1, _2, _5));
+ _player->Video.connect (bind (&PlayerWrapper::process_video, this, _1, _3));
}
- void process_video (shared_ptr<PlayerImage> i, bool, Time t)
+ void process_video (shared_ptr<PlayerVideoFrame> i, Time t)
{
Video v;
v.content = _player->_last_video;