summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 02:23:31 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 02:23:31 +0000
commitf37619e85e12e0692fe106e1f6b3a8ac6267fc74 (patch)
treebc9b9737feaea32c90d3e137c787ce7661b43e77 /media
parent91bfaaef281c73e3792a3c96df37920c8a5370a5 (diff)
downloadchromium_src-f37619e85e12e0692fe106e1f6b3a8ac6267fc74.zip
chromium_src-f37619e85e12e0692fe106e1f6b3a8ac6267fc74.tar.gz
chromium_src-f37619e85e12e0692fe106e1f6b3a8ac6267fc74.tar.bz2
Implement video frame exchange in GpuVideoDecoder and tests
Implement ProduceVideoFrame() in GpuVideoDecoder and unit tests for testing the loginc in GpuVideoDecoder. BUG=53714 TEST=unit_tests --gtest_filter=GpuVideoDecoder* Review URL: http://codereview.chromium.org/3414003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/video/mock_objects.h34
-rw-r--r--media/video/video_decode_context.h2
2 files changed, 35 insertions, 1 deletions
diff --git a/media/video/mock_objects.h b/media/video/mock_objects.h
new file mode 100644
index 0000000..a975ea8
--- /dev/null
+++ b/media/video/mock_objects.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_VIDEO_MOCK_OBJECTS_H_
+#define MEDIA_VIDEO_MOCK_OBJECTS_H_
+
+#include "media/video/video_decode_engine.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace media {
+
+class MockVideoDecodeEngine : public VideoDecodeEngine {
+ public:
+ MockVideoDecodeEngine() {}
+ virtual ~MockVideoDecodeEngine() {}
+
+ MOCK_METHOD4(Initialize, void(MessageLoop* message_loop,
+ EventHandler* event_handler,
+ VideoDecodeContext* context,
+ const VideoCodecConfig& config));
+ MOCK_METHOD0(Uninitialize, void());
+ MOCK_METHOD0(Flush, void());
+ MOCK_METHOD0(Seek, void());
+ MOCK_METHOD1(ConsumeVideoSample, void(scoped_refptr<Buffer> buffer));
+ MOCK_METHOD1(ProduceVideoFrame, void(scoped_refptr<VideoFrame> frame));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeEngine);
+};
+
+} // namespace media
+
+#endif // MEDIA_VIDEO_MOCK_OBJECTS_H_
diff --git a/media/video/video_decode_context.h b/media/video/video_decode_context.h
index f768a0a..f1e678d 100644
--- a/media/video/video_decode_context.h
+++ b/media/video/video_decode_context.h
@@ -29,7 +29,7 @@ class VideoFrame;
// in the VideoDecodeEngine and VideoDecodeContext pair.
class VideoDecodeContext {
public:
- virtual ~VideoDecodeContext() {};
+ virtual ~VideoDecodeContext() {}
// Obtain a handle to the hardware video decoder device. The type of the
// handle is a contract between the implementation of VideoDecodeContext and