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

Side by Side Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 669623004: Switch to Lollipop APIs for MediaCodec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove getInputBufferCount() call Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_decode_accelerator.h" 5 #include "content/common/gpu/media/android_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // expecting clients to Reset() as appropriate to avoid this. 252 // expecting clients to Reset() as appropriate to avoid this.
253 // b/7093648 253 // b/7093648
254 RETURN_ON_FAILURE(size_ == gfx::Size(width, height), 254 RETURN_ON_FAILURE(size_ == gfx::Size(width, height),
255 "Dynamic resolution change is not supported.", 255 "Dynamic resolution change is not supported.",
256 PLATFORM_FAILURE); 256 PLATFORM_FAILURE);
257 } 257 }
258 return; 258 return;
259 } 259 }
260 260
261 case media::MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED: 261 case media::MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED:
262 RETURN_ON_FAILURE(media_codec_->GetOutputBuffers(),
263 "Cannot get output buffer from MediaCodec.",
264 PLATFORM_FAILURE);
265 break; 262 break;
266 263
267 case media::MEDIA_CODEC_OK: 264 case media::MEDIA_CODEC_OK:
268 DCHECK_GE(buf_index, 0); 265 DCHECK_GE(buf_index, 0);
269 break; 266 break;
270 267
271 default: 268 default:
272 NOTREACHED(); 269 NOTREACHED();
273 break; 270 break;
274 } 271 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 void AndroidVideoDecodeAccelerator::NotifyResetDone() { 550 void AndroidVideoDecodeAccelerator::NotifyResetDone() {
554 client_->NotifyResetDone(); 551 client_->NotifyResetDone();
555 } 552 }
556 553
557 void AndroidVideoDecodeAccelerator::NotifyError( 554 void AndroidVideoDecodeAccelerator::NotifyError(
558 media::VideoDecodeAccelerator::Error error) { 555 media::VideoDecodeAccelerator::Error error) {
559 client_->NotifyError(error); 556 client_->NotifyError(error);
560 } 557 }
561 558
562 } // namespace content 559 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698