Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: media/video/mock_video_decode_accelerator.h

Issue 170843004: Pass Client pointer in Initialize() for VDA/VEA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 50e826de Rebase. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_VIDEO_MOCK_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_MOCK_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_MOCK_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_MOCK_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include "video_decode_accelerator.h" 8 #include "video_decode_accelerator.h"
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "media/base/bitstream_buffer.h" 13 #include "media/base/bitstream_buffer.h"
14 #include "media/base/video_decoder_config.h" 14 #include "media/base/video_decoder_config.h"
15 #include "media/video/picture.h" 15 #include "media/video/picture.h"
16 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
17 17
18 namespace media { 18 namespace media {
19 19
20 // Remember to use the default action of Destroy() when using EXPECT_CALL. 20 // Remember to use the default action of Destroy() when using EXPECT_CALL.
21 // Otherwise, the mock will be leaked and the test runner will complain. 21 // Otherwise, the mock will be leaked and the test runner will complain.
22 class MockVideoDecodeAccelerator : public VideoDecodeAccelerator { 22 class MockVideoDecodeAccelerator : public VideoDecodeAccelerator {
23 public: 23 public:
24 MockVideoDecodeAccelerator(); 24 MockVideoDecodeAccelerator();
25 virtual ~MockVideoDecodeAccelerator(); 25 virtual ~MockVideoDecodeAccelerator();
26 26
27 MOCK_METHOD1(Initialize, bool(VideoCodecProfile profile)); 27 MOCK_METHOD2(Initialize, bool(VideoCodecProfile profile, Client* client));
28 MOCK_METHOD1(Decode, void(const BitstreamBuffer& bitstream_buffer)); 28 MOCK_METHOD1(Decode, void(const BitstreamBuffer& bitstream_buffer));
29 MOCK_METHOD1(AssignPictureBuffers, 29 MOCK_METHOD1(AssignPictureBuffers,
30 void(const std::vector<PictureBuffer>& buffers)); 30 void(const std::vector<PictureBuffer>& buffers));
31 MOCK_METHOD1(ReusePictureBuffer, void(int32 picture_buffer_id)); 31 MOCK_METHOD1(ReusePictureBuffer, void(int32 picture_buffer_id));
32 MOCK_METHOD0(Flush, void()); 32 MOCK_METHOD0(Flush, void());
33 MOCK_METHOD0(Reset, void()); 33 MOCK_METHOD0(Reset, void());
34 MOCK_METHOD0(Destroy, void()); 34 MOCK_METHOD0(Destroy, void());
35 35
36 private: 36 private:
37 void DeleteThis(); 37 void DeleteThis();
38 DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeAccelerator); 38 DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeAccelerator);
39 }; 39 };
40 40
41 } // namespace media 41 } // namespace media
42 42
43 #endif // MEDIA_VIDEO_MOCK_VIDEO_DECODE_ACCELERATOR_H_ 43 #endif // MEDIA_VIDEO_MOCK_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/filters/mock_gpu_video_accelerator_factories.cc ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698