summaryrefslogtreecommitdiffstats
path: root/remoting/test/test_video_renderer.h
diff options
context:
space:
mode:
authorbenwells <benwells@chromium.org>2015-06-28 20:26:06 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-29 03:26:56 +0000
commitdafa9ae370cbf14a9612200bf9369a96f7e00e55 (patch)
tree3d1582017ab23cbdfb0d3b989f5e3cb2578ffaa9 /remoting/test/test_video_renderer.h
parentf2d1ea00bc13c6e742c9c3bffa78d4c009c63e7e (diff)
downloadchromium_src-dafa9ae370cbf14a9612200bf9369a96f7e00e55.zip
chromium_src-dafa9ae370cbf14a9612200bf9369a96f7e00e55.tar.gz
chromium_src-dafa9ae370cbf14a9612200bf9369a96f7e00e55.tar.bz2
Revert of Adding decoding capabilities to the TestVideoRenderer class (patchset #7 id:120001 of https://codereview.chromium.org/1190383007/)
Reason for revert: The new tests are failing on the DrMemory bots: see http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%28DrMemory%20full%29%20%283%29/builds/7009 for more details. An example of the failure: d:\src\chromium\src\remoting\test\test_video_renderer_unittest.cc(119): error: Expected: (error) < (error_limit), actual: 0.406962 vs 0.02 The problem is due to hard coded times in the test, at line 110. Tests shouldn't rely on waiting 'long enough' for something to happen, as 'long enough' is too variable / flaky. The test should ideally be rewritten to wait for a quit task to be posted instead. Original issue's description: > Updated Test Driver with video decoding capabilities so that when a video sample is received from remote host, it can be decoded and rendered to buffer in memory. > > BUG= > > Committed: https://crrev.com/497e9a05decbcd344d774e52c1b89cdece525d99 > Cr-Commit-Position: refs/heads/master@{#336445} TBR=joedow@chromium.org,liaoyuke@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1219633002 Cr-Commit-Position: refs/heads/master@{#336526}
Diffstat (limited to 'remoting/test/test_video_renderer.h')
-rw-r--r--remoting/test/test_video_renderer.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/remoting/test/test_video_renderer.h b/remoting/test/test_video_renderer.h
index acaa739..fcf122a 100644
--- a/remoting/test/test_video_renderer.h
+++ b/remoting/test/test_video_renderer.h
@@ -5,22 +5,11 @@
#ifndef REMOTING_TEST_TEST_VIDEO_RENDERER_H_
#define REMOTING_TEST_TEST_VIDEO_RENDERER_H_
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
-#include "base/threading/thread_checker.h"
-#include "media/base/video_frame.h"
#include "remoting/client/video_renderer.h"
-#include "remoting/protocol/session_config.h"
#include "remoting/protocol/video_stub.h"
-namespace base {
-class Thread;
-class SingleThreadTaskRunner;
-}
-
-namespace webrtc {
-class DesktopFrame;
-}
-
namespace remoting {
namespace test {
@@ -35,26 +24,13 @@ class TestVideoRenderer : public VideoRenderer, public protocol::VideoStub {
ChromotingStats* GetStats() override;
protocol::VideoStub* GetVideoStub() override;
+ private:
// protocol::VideoStub interface.
void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
const base::Closure& done) override;
- // Returns a copy of the current buffer.
- scoped_ptr<webrtc::DesktopFrame> GetBufferForTest() const;
-
- private:
- // The actual implementation resides in Core class.
- class Core;
- scoped_ptr<Core> core_;
-
- // Used to ensure TestVideoRenderer methods are called on the same thread.
- base::ThreadChecker thread_checker_;
-
- // Used to decode and process video packets.
- scoped_ptr<base::Thread> video_decode_thread_;
-
- // Used to post tasks to video decode thread.
- scoped_refptr<base::SingleThreadTaskRunner> video_decode_task_runner_;
+ // Track the number of populated video frames which have been received.
+ int video_frames_processed_;
DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer);
};