OLD | NEW |
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 #include "content/common/gpu/media/android_video_encode_accelerator.h" | 5 #include "content/common/gpu/media/android_video_encode_accelerator.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 AndroidVideoEncodeAccelerator::AndroidVideoEncodeAccelerator() | 97 AndroidVideoEncodeAccelerator::AndroidVideoEncodeAccelerator() |
98 : num_buffers_at_codec_(0), | 98 : num_buffers_at_codec_(0), |
99 num_output_buffers_(-1), | 99 num_output_buffers_(-1), |
100 output_buffers_capacity_(0), | 100 output_buffers_capacity_(0), |
101 last_set_bitrate_(0) {} | 101 last_set_bitrate_(0) {} |
102 | 102 |
103 AndroidVideoEncodeAccelerator::~AndroidVideoEncodeAccelerator() { | 103 AndroidVideoEncodeAccelerator::~AndroidVideoEncodeAccelerator() { |
104 DCHECK(thread_checker_.CalledOnValidThread()); | 104 DCHECK(thread_checker_.CalledOnValidThread()); |
105 } | 105 } |
106 | 106 |
107 std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 107 media::VideoEncodeAccelerator::SupportedProfiles |
108 AndroidVideoEncodeAccelerator::GetSupportedProfiles() { | 108 AndroidVideoEncodeAccelerator::GetSupportedProfiles() { |
109 std::vector<SupportedProfile> profiles; | 109 SupportedProfiles profiles; |
110 | 110 |
111 #if defined(ENABLE_WEBRTC) | 111 #if defined(ENABLE_WEBRTC) |
112 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 112 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
113 if (cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) | 113 if (cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) |
114 return profiles; | 114 return profiles; |
115 #endif | 115 #endif |
116 | 116 |
117 const struct { | 117 const struct { |
118 const media::VideoCodec codec; | 118 const media::VideoCodec codec; |
119 const media::VideoCodecProfile profile; | 119 const media::VideoCodecProfile profile; |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 base::MessageLoop::current()->PostTask( | 447 base::MessageLoop::current()->PostTask( |
448 FROM_HERE, | 448 FROM_HERE, |
449 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady, | 449 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady, |
450 client_ptr_factory_->GetWeakPtr(), | 450 client_ptr_factory_->GetWeakPtr(), |
451 bitstream_buffer.id(), | 451 bitstream_buffer.id(), |
452 size, | 452 size, |
453 key_frame)); | 453 key_frame)); |
454 } | 454 } |
455 | 455 |
456 } // namespace content | 456 } // namespace content |
OLD | NEW |