OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/renderer/pepper/video_encoder_shim.h" | 5 #include "content/renderer/pepper/video_encoder_shim.h" |
6 | 6 |
7 #include <inttypes.h> | 7 #include <inttypes.h> |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 | 10 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 VideoEncoderShim::~VideoEncoderShim() { | 173 VideoEncoderShim::~VideoEncoderShim() { |
174 DCHECK(RenderThreadImpl::current()); | 174 DCHECK(RenderThreadImpl::current()); |
175 | 175 |
176 media_task_runner_->PostTask( | 176 media_task_runner_->PostTask( |
177 FROM_HERE, base::Bind(&VideoEncoderShim::EncoderImpl::Stop, | 177 FROM_HERE, base::Bind(&VideoEncoderShim::EncoderImpl::Stop, |
178 base::Owned(encoder_impl_.release()))); | 178 base::Owned(encoder_impl_.release()))); |
179 } | 179 } |
180 | 180 |
181 std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 181 media::VideoEncodeAccelerator::SupportedProfiles |
182 VideoEncoderShim::GetSupportedProfiles() { | 182 VideoEncoderShim::GetSupportedProfiles() { |
183 media::VideoEncodeAccelerator::SupportedProfile profile = { | 183 media::VideoEncodeAccelerator::SupportedProfile profile; |
184 media::VP8PROFILE_ANY, | 184 profile.profile = media::VP8PROFILE_ANY; |
185 gfx::Size(kMaxWidth, kMaxHeight), | 185 profile.max_resolution = gfx::Size(kMaxWidth, kMaxHeight); |
186 media::cast::kDefaultMaxFrameRate, | 186 profile.max_framerate_numerator = media::cast::kDefaultMaxFrameRate; |
187 1}; | 187 profile.max_framerate_denominator = 1; |
188 std::vector<media::VideoEncodeAccelerator::SupportedProfile> profiles; | 188 media::VideoEncodeAccelerator::SupportedProfiles profiles; |
189 profiles.push_back(profile); | 189 profiles.push_back(profile); |
190 return profiles; | 190 return profiles; |
191 } | 191 } |
192 | 192 |
193 bool VideoEncoderShim::Initialize( | 193 bool VideoEncoderShim::Initialize( |
194 media::VideoFrame::Format input_format, | 194 media::VideoFrame::Format input_format, |
195 const gfx::Size& input_visible_size, | 195 const gfx::Size& input_visible_size, |
196 media::VideoCodecProfile output_profile, | 196 media::VideoCodecProfile output_profile, |
197 uint32 initial_bitrate, | 197 uint32 initial_bitrate, |
198 media::VideoEncodeAccelerator::Client* client) { | 198 media::VideoEncodeAccelerator::Client* client) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } | 270 } |
271 | 271 |
272 void VideoEncoderShim::OnNotifyError( | 272 void VideoEncoderShim::OnNotifyError( |
273 media::VideoEncodeAccelerator::Error error) { | 273 media::VideoEncodeAccelerator::Error error) { |
274 DCHECK(RenderThreadImpl::current()); | 274 DCHECK(RenderThreadImpl::current()); |
275 | 275 |
276 host_->NotifyError(error); | 276 host_->NotifyError(error); |
277 } | 277 } |
278 | 278 |
279 } // namespace content | 279 } // namespace content |
OLD | NEW |