summaryrefslogtreecommitdiffstats
path: root/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'media/video')
-rw-r--r--media/video/mock_objects.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/media/video/mock_objects.h b/media/video/mock_objects.h
index a975ea8..24cd4d3 100644
--- a/media/video/mock_objects.h
+++ b/media/video/mock_objects.h
@@ -5,6 +5,7 @@
#ifndef MEDIA_VIDEO_MOCK_OBJECTS_H_
#define MEDIA_VIDEO_MOCK_OBJECTS_H_
+#include "media/video/video_decode_context.h"
#include "media/video/video_decode_engine.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -29,6 +30,25 @@ class MockVideoDecodeEngine : public VideoDecodeEngine {
DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeEngine);
};
+class MockVideoDecodeContext : public VideoDecodeContext {
+ public:
+ MockVideoDecodeContext() {}
+ virtual ~MockVideoDecodeContext() {}
+
+ MOCK_METHOD0(GetDevice, void*());
+ MOCK_METHOD6(AllocateVideoFrames, void(
+ int n, size_t width, size_t height, VideoFrame::Format format,
+ std::vector<scoped_refptr<VideoFrame> >* frames,
+ Task* task));
+ MOCK_METHOD0(ReleaseAllVideoFrames, void());
+ MOCK_METHOD3(UploadToVideoFrame, void(
+ void* buffer, scoped_refptr<VideoFrame> frame, Task* task));
+ MOCK_METHOD1(Destroy, void(Task* task));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeContext);
+};
+
} // namespace media
#endif // MEDIA_VIDEO_MOCK_OBJECTS_H_