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

Side by Side Diff: media/video/fake_video_encode_accelerator.cc

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 5 years, 8 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/video/fake_video_encode_accelerator.h ('k') | media/video/video_decode_accelerator.h » ('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 #include "media/video/fake_video_encode_accelerator.h" 5 #include "media/video/fake_video_encode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 static const unsigned int kMinimumInputCount = 1; 14 static const unsigned int kMinimumInputCount = 1;
15 static const size_t kMinimumOutputBufferSize = 123456; 15 static const size_t kMinimumOutputBufferSize = 123456;
16 16
17 FakeVideoEncodeAccelerator::FakeVideoEncodeAccelerator( 17 FakeVideoEncodeAccelerator::FakeVideoEncodeAccelerator(
18 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) 18 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
19 : task_runner_(task_runner), 19 : task_runner_(task_runner),
20 will_initialization_succeed_(true), 20 will_initialization_succeed_(true),
21 client_(NULL), 21 client_(NULL),
22 next_frame_is_first_frame_(true), 22 next_frame_is_first_frame_(true),
23 weak_this_factory_(this) {} 23 weak_this_factory_(this) {}
24 24
25 FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() { 25 FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() {
26 weak_this_factory_.InvalidateWeakPtrs(); 26 weak_this_factory_.InvalidateWeakPtrs();
27 } 27 }
28 28
29 std::vector<VideoEncodeAccelerator::SupportedProfile> 29 VideoEncodeAccelerator::SupportedProfiles
30 FakeVideoEncodeAccelerator::GetSupportedProfiles() { 30 FakeVideoEncodeAccelerator::GetSupportedProfiles() {
31 std::vector<VideoEncodeAccelerator::SupportedProfile> profiles; 31 SupportedProfiles profiles;
32 SupportedProfile profile; 32 SupportedProfile profile;
33 profile.max_resolution.SetSize(1920, 1088); 33 profile.max_resolution.SetSize(1920, 1088);
34 profile.max_framerate_numerator = 30; 34 profile.max_framerate_numerator = 30;
35 profile.max_framerate_denominator = 1; 35 profile.max_framerate_denominator = 1;
36 36
37 profile.profile = media::H264PROFILE_MAIN; 37 profile.profile = media::H264PROFILE_MAIN;
38 profiles.push_back(profile); 38 profiles.push_back(profile);
39 profile.profile = media::VP8PROFILE_ANY; 39 profile.profile = media::VP8PROFILE_ANY;
40 profiles.push_back(profile); 40 profiles.push_back(profile);
41 return profiles; 41 return profiles;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( 131 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady(
132 int32 bitstream_buffer_id, 132 int32 bitstream_buffer_id,
133 size_t payload_size, 133 size_t payload_size,
134 bool key_frame) const { 134 bool key_frame) const {
135 client_->BitstreamBufferReady(bitstream_buffer_id, 135 client_->BitstreamBufferReady(bitstream_buffer_id,
136 payload_size, 136 payload_size,
137 key_frame); 137 key_frame);
138 } 138 }
139 139
140 } // namespace media 140 } // namespace media
OLDNEW
« no previous file with comments | « media/video/fake_video_encode_accelerator.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698