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

Side by Side Diff: media/cast/test/fake_video_encode_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
6 #define MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include "media/video/video_encode_accelerator.h" 8 #include "media/video/video_encode_accelerator.h"
9 9
10 #include <list> 10 #include <list>
11 11
12 #include "media/base/bitstream_buffer.h" 12 #include "media/base/bitstream_buffer.h"
13 13
14 namespace media { 14 namespace media {
15 namespace cast { 15 namespace cast {
16 namespace test { 16 namespace test {
17 17
18 class FakeVideoEncodeAccelerator : public VideoEncodeAccelerator { 18 class FakeVideoEncodeAccelerator : public VideoEncodeAccelerator {
19 public: 19 public:
20 explicit FakeVideoEncodeAccelerator(VideoEncodeAccelerator::Client* client); 20 FakeVideoEncodeAccelerator();
21 21
22 virtual void Initialize(media::VideoFrame::Format input_format, 22 virtual void Initialize(media::VideoFrame::Format input_format,
23 const gfx::Size& input_visible_size, 23 const gfx::Size& input_visible_size,
24 VideoCodecProfile output_profile, 24 VideoCodecProfile output_profile,
25 uint32 initial_bitrate) OVERRIDE; 25 uint32 initial_bitrate,
26 Client* client) OVERRIDE;
26 27
27 virtual void Encode(const scoped_refptr<VideoFrame>& frame, 28 virtual void Encode(const scoped_refptr<VideoFrame>& frame,
28 bool force_keyframe) OVERRIDE; 29 bool force_keyframe) OVERRIDE;
29 30
30 virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE; 31 virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE;
31 32
32 virtual void RequestEncodingParametersChange(uint32 bitrate, 33 virtual void RequestEncodingParametersChange(uint32 bitrate,
33 uint32 framerate) OVERRIDE; 34 uint32 framerate) OVERRIDE;
34 35
35 virtual void Destroy() OVERRIDE; 36 virtual void Destroy() OVERRIDE;
36 37
37 private: 38 private:
38 virtual ~FakeVideoEncodeAccelerator(); 39 virtual ~FakeVideoEncodeAccelerator();
39 40
40 VideoEncodeAccelerator::Client* client_; 41 VideoEncodeAccelerator::Client* client_;
41 bool first_; 42 bool first_;
42 43
43 std::list<int32> available_buffer_ids_; 44 std::list<int32> available_buffer_ids_;
44 45
45 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator); 46 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator);
46 }; 47 };
47 48
48 } // namespace test 49 } // namespace test
49 } // namespace cast 50 } // namespace cast
50 } // namespace media 51 } // namespace media
51 52
52 #endif // MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ 53 #endif // MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/cast/test/fake_gpu_video_accelerator_factories.cc ('k') | media/cast/test/fake_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698