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 package org.chromium.media; | 5 package org.chromium.media; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.media.MediaCodec; | 8 import android.media.MediaCodec; |
9 import android.media.MediaCodec.BufferInfo; | 9 import android.media.MediaCodec.BufferInfo; |
10 import android.media.MediaExtractor; | 10 import android.media.MediaExtractor; |
11 import android.media.MediaFormat; | 11 import android.media.MediaFormat; |
12 import android.os.ParcelFileDescriptor; | 12 import android.os.ParcelFileDescriptor; |
13 | 13 |
14 import org.chromium.base.CalledByNative; | |
15 import org.chromium.base.JNINamespace; | |
16 import org.chromium.base.Log; | 14 import org.chromium.base.Log; |
| 15 import org.chromium.base.annotations.CalledByNative; |
| 16 import org.chromium.base.annotations.JNINamespace; |
17 | 17 |
18 import java.io.File; | 18 import java.io.File; |
19 import java.nio.ByteBuffer; | 19 import java.nio.ByteBuffer; |
20 | 20 |
21 @JNINamespace("media") | 21 @JNINamespace("media") |
22 class WebAudioMediaCodecBridge { | 22 class WebAudioMediaCodecBridge { |
23 private static final String TAG = "cr.media"; | 23 private static final String TAG = "cr.media"; |
24 // TODO(rtoy): What is the correct timeout value for reading | 24 // TODO(rtoy): What is the correct timeout value for reading |
25 // from a file in memory? | 25 // from a file in memory? |
26 static final long TIMEOUT_MICROSECONDS = 500; | 26 static final long TIMEOUT_MICROSECONDS = 500; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 private static native void nativeOnChunkDecoded( | 275 private static native void nativeOnChunkDecoded( |
276 long nativeWebAudioMediaCodecBridge, ByteBuffer buf, int size, | 276 long nativeWebAudioMediaCodecBridge, ByteBuffer buf, int size, |
277 int inputChannelCount, int outputChannelCount); | 277 int inputChannelCount, int outputChannelCount); |
278 | 278 |
279 private static native void nativeInitializeDestination( | 279 private static native void nativeInitializeDestination( |
280 long nativeWebAudioMediaCodecBridge, | 280 long nativeWebAudioMediaCodecBridge, |
281 int inputChannelCount, | 281 int inputChannelCount, |
282 int sampleRate, | 282 int sampleRate, |
283 long durationMicroseconds); | 283 long durationMicroseconds); |
284 } | 284 } |
OLD | NEW |