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

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

Issue 2506263003: Revert of Add GN build rules to allow java_assertion_enabler to enable Java asserts. (Closed)
Patch Set: 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 // TODO(crbug.com/665478) 459 assert Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT;
460 // assert Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT;
461 mOutputBuffers = mMediaCodec.getOutputBuffers(); 460 mOutputBuffers = mMediaCodec.getOutputBuffers();
462 status = MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED; 461 status = MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED;
463 } else if (indexOrStatus == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) { 462 } else if (indexOrStatus == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {
464 status = MEDIA_CODEC_OUTPUT_FORMAT_CHANGED; 463 status = MEDIA_CODEC_OUTPUT_FORMAT_CHANGED;
465 MediaFormat newFormat = mMediaCodec.getOutputFormat(); 464 MediaFormat newFormat = mMediaCodec.getOutputFormat();
466 } else if (indexOrStatus == MediaCodec.INFO_TRY_AGAIN_LATER) { 465 } else if (indexOrStatus == MediaCodec.INFO_TRY_AGAIN_LATER) {
467 status = MEDIA_CODEC_DEQUEUE_OUTPUT_AGAIN_LATER; 466 status = MEDIA_CODEC_DEQUEUE_OUTPUT_AGAIN_LATER;
468 } else { 467 } else {
469 Log.e(TAG, "Unexpected index_or_status: " + indexOrStatus); 468 Log.e(TAG, "Unexpected index_or_status: " + indexOrStatus);
470 assert false; 469 assert false;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 677 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
679 return AudioFormat.CHANNEL_OUT_7POINT1_SURROUND; 678 return AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
680 } else { 679 } else {
681 return AudioFormat.CHANNEL_OUT_7POINT1; 680 return AudioFormat.CHANNEL_OUT_7POINT1;
682 } 681 }
683 default: 682 default:
684 return AudioFormat.CHANNEL_OUT_DEFAULT; 683 return AudioFormat.CHANNEL_OUT_DEFAULT;
685 } 684 }
686 } 685 }
687 } 686 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | media/midi/java/src/org/chromium/midi/MidiManagerAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698