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

Side by Side Diff: media/cast/test/fake_video_encode_accelerator.h

Issue 207593002: Cast: Enable use of VideoEncodeAccelerator for hardware video encoding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typedef 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
« no previous file with comments | « media/cast/test/fake_gpu_video_accelerator_factories.cc ('k') | media/cast/test/sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 FakeVideoEncodeAccelerator(); 20 FakeVideoEncodeAccelerator();
21 virtual ~FakeVideoEncodeAccelerator();
21 22
22 virtual void Initialize(media::VideoFrame::Format input_format, 23 virtual void Initialize(media::VideoFrame::Format input_format,
23 const gfx::Size& input_visible_size, 24 const gfx::Size& input_visible_size,
24 VideoCodecProfile output_profile, 25 VideoCodecProfile output_profile,
25 uint32 initial_bitrate, 26 uint32 initial_bitrate,
26 Client* client) OVERRIDE; 27 Client* client) OVERRIDE;
27 28
28 virtual void Encode(const scoped_refptr<VideoFrame>& frame, 29 virtual void Encode(const scoped_refptr<VideoFrame>& frame,
29 bool force_keyframe) OVERRIDE; 30 bool force_keyframe) OVERRIDE;
30 31
31 virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE; 32 virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE;
32 33
33 virtual void RequestEncodingParametersChange(uint32 bitrate, 34 virtual void RequestEncodingParametersChange(uint32 bitrate,
34 uint32 framerate) OVERRIDE; 35 uint32 framerate) OVERRIDE;
35 36
36 virtual void Destroy() OVERRIDE; 37 virtual void Destroy() OVERRIDE;
37 38
38 private: 39 private:
39 virtual ~FakeVideoEncodeAccelerator();
40
41 VideoEncodeAccelerator::Client* client_; 40 VideoEncodeAccelerator::Client* client_;
42 bool first_; 41 bool first_;
43 42
44 std::list<int32> available_buffer_ids_; 43 std::list<int32> available_buffer_ids_;
45 44
46 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator); 45 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator);
47 }; 46 };
48 47
49 } // namespace test 48 } // namespace test
50 } // namespace cast 49 } // namespace cast
51 } // namespace media 50 } // namespace media
52 51
53 #endif // MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ 52 #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/sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698