diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/base/video_frame.h | 2 | ||||
-rw-r--r-- | media/video/mock_objects.h | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/media/base/video_frame.h b/media/base/video_frame.h index 88c11dd..33d3779 100644 --- a/media/base/video_frame.h +++ b/media/base/video_frame.h @@ -83,6 +83,7 @@ class VideoFrame : public StreamSample { scoped_refptr<VideoFrame>* frame_out); // Creates a new frame with GL textures. + // TODO(hclam): Remove timestamp and duration. static void CreateFrameGlTexture(Format format, size_t width, size_t height, @@ -92,6 +93,7 @@ class VideoFrame : public StreamSample { scoped_refptr<VideoFrame>* frame_out); // Creates a new frame with D3d textures. + // TODO(hclam): Remove timestamp and duration. static void CreateFrameD3dTexture(Format format, size_t width, size_t height, 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_ |