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

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

Issue 555563003: Cast: Flow hw encoder initialization error to extensions API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed compile Created 6 years, 3 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
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/fake_video_encode_accelerator.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>
(...skipping 27 matching lines...) Expand all
38 bool force_keyframe) OVERRIDE; 38 bool force_keyframe) OVERRIDE;
39 39
40 virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE; 40 virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE;
41 41
42 virtual void RequestEncodingParametersChange(uint32 bitrate, 42 virtual void RequestEncodingParametersChange(uint32 bitrate,
43 uint32 framerate) OVERRIDE; 43 uint32 framerate) OVERRIDE;
44 44
45 virtual void Destroy() OVERRIDE; 45 virtual void Destroy() OVERRIDE;
46 46
47 void SendDummyFrameForTesting(bool key_frame); 47 void SendDummyFrameForTesting(bool key_frame);
48 void SetWillInitializationSucceed(bool will_initialization_succeed) {
49 will_initialization_succeed_ = will_initialization_succeed;
50 }
48 51
49 private: 52 private:
50 void DoRequireBitstreamBuffers(unsigned int input_count, 53 void DoRequireBitstreamBuffers(unsigned int input_count,
51 const gfx::Size& input_coded_size, 54 const gfx::Size& input_coded_size,
52 size_t output_buffer_size) const; 55 size_t output_buffer_size) const;
53 void DoBitstreamBufferReady(int32 bitstream_buffer_id, 56 void DoBitstreamBufferReady(int32 bitstream_buffer_id,
54 size_t payload_size, 57 size_t payload_size,
55 bool key_frame) const; 58 bool key_frame) const;
56 59
57 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 60 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
58 std::vector<uint32>* const stored_bitrates_; 61 std::vector<uint32>* const stored_bitrates_;
59 VideoEncodeAccelerator::Client* client_; 62 VideoEncodeAccelerator::Client* client_;
60 bool first_; 63 bool first_;
64 bool will_initialization_succeed_;
61 65
62 std::list<int32> available_buffer_ids_; 66 std::list<int32> available_buffer_ids_;
63 67
64 base::WeakPtrFactory<FakeVideoEncodeAccelerator> weak_this_factory_; 68 base::WeakPtrFactory<FakeVideoEncodeAccelerator> weak_this_factory_;
65 69
66 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator); 70 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator);
67 }; 71 };
68 72
69 } // namespace test 73 } // namespace test
70 } // namespace cast 74 } // namespace cast
71 } // namespace media 75 } // namespace media
72 76
73 #endif // MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ 77 #endif // MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/cast/test/end2end_unittest.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