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

Side by Side Diff: media/base/android/java/src/org/chromium/media/MediaCodecBridge.java

Issue 2517203002: Reland of Add GN build rules to allow java_assertion_enabler to enable Java asserts. (Closed)
Patch Set: format nit Created 4 years, 1 month 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 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 package org.chromium.media; 5 package org.chromium.media;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.media.AudioFormat; 8 import android.media.AudioFormat;
9 import android.media.MediaCodec; 9 import android.media.MediaCodec;
10 import android.media.MediaCrypto; 10 import android.media.MediaCrypto;
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // to notify the native code the the frame has a wrong presentat ion 449 // to notify the native code the the frame has a wrong presentat ion
450 // timestamp and should be skipped. 450 // timestamp and should be skipped.
451 info.presentationTimeUs = mLastPresentationTimeUs; 451 info.presentationTimeUs = mLastPresentationTimeUs;
452 } 452 }
453 mLastPresentationTimeUs = info.presentationTimeUs; 453 mLastPresentationTimeUs = info.presentationTimeUs;
454 454
455 if (indexOrStatus >= 0) { // index! 455 if (indexOrStatus >= 0) { // index!
456 status = MEDIA_CODEC_OK; 456 status = MEDIA_CODEC_OK;
457 index = indexOrStatus; 457 index = indexOrStatus;
458 } else if (indexOrStatus == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) { 458 } else if (indexOrStatus == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {
459 assert Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT; 459 // TODO(crbug.com/665478)
460 // assert Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT;
460 mOutputBuffers = mMediaCodec.getOutputBuffers(); 461 mOutputBuffers = mMediaCodec.getOutputBuffers();
461 status = MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED; 462 status = MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED;
462 } else if (indexOrStatus == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) { 463 } else if (indexOrStatus == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {
463 status = MEDIA_CODEC_OUTPUT_FORMAT_CHANGED; 464 status = MEDIA_CODEC_OUTPUT_FORMAT_CHANGED;
464 MediaFormat newFormat = mMediaCodec.getOutputFormat(); 465 MediaFormat newFormat = mMediaCodec.getOutputFormat();
465 } else if (indexOrStatus == MediaCodec.INFO_TRY_AGAIN_LATER) { 466 } else if (indexOrStatus == MediaCodec.INFO_TRY_AGAIN_LATER) {
466 status = MEDIA_CODEC_DEQUEUE_OUTPUT_AGAIN_LATER; 467 status = MEDIA_CODEC_DEQUEUE_OUTPUT_AGAIN_LATER;
467 } else { 468 } else {
468 Log.e(TAG, "Unexpected index_or_status: " + indexOrStatus); 469 Log.e(TAG, "Unexpected index_or_status: " + indexOrStatus);
469 assert false; 470 assert false;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 678 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
678 return AudioFormat.CHANNEL_OUT_7POINT1_SURROUND; 679 return AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
679 } else { 680 } else {
680 return AudioFormat.CHANNEL_OUT_7POINT1; 681 return AudioFormat.CHANNEL_OUT_7POINT1;
681 } 682 }
682 default: 683 default:
683 return AudioFormat.CHANNEL_OUT_DEFAULT; 684 return AudioFormat.CHANNEL_OUT_DEFAULT;
684 } 685 }
685 } 686 }
686 } 687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698