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

Unified Diff: media/base/android/webaudio_media_codec_bridge.h

Issue 14522002: Handle decoding of vorbis files better on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: media/base/android/webaudio_media_codec_bridge.h
diff --git a/media/base/android/webaudio_media_codec_bridge.h b/media/base/android/webaudio_media_codec_bridge.h
index cd87669d16a4e2dd136b169e6a2b9b6b1e5b4a9f..76de6677e2fa7ca318c35ff4c7bfa82530fd67a5 100644
--- a/media/base/android/webaudio_media_codec_bridge.h
+++ b/media/base/android/webaudio_media_codec_bridge.h
@@ -23,7 +23,8 @@ class MEDIA_EXPORT WebAudioMediaCodecBridge {
// information and decoded PCM samples are written to |pcm_output|.
// We also take ownership of |pcm_output|.
WebAudioMediaCodecBridge(base::SharedMemoryHandle encoded_audio_handle,
- base::FileDescriptor pcm_output);
+ base::FileDescriptor pcm_output,
+ size_t data_size);
~WebAudioMediaCodecBridge();
// Inform JNI about this bridge. Returns true if registration
@@ -34,7 +35,8 @@ class MEDIA_EXPORT WebAudioMediaCodecBridge {
// |encoded_audio_handle|. The PCM samples are sent to |pcm_output|.
static void RunWebAudioMediaCodec(
base::SharedMemoryHandle encoded_audio_handle,
- base::FileDescriptor pcm_output);
+ base::FileDescriptor pcm_output,
+ size_t data_size);
void OnChunkDecoded(JNIEnv* env,
jobject /*java object*/,
@@ -45,8 +47,7 @@ class MEDIA_EXPORT WebAudioMediaCodecBridge {
jobject /*java object*/,
jint channel_count,
jint sample_rate,
- jlong duration_us,
- jboolean is_vorbis);
+ jlong duration_us);
private:
// Handles MediaCodec processing of the encoded data in
@@ -62,6 +63,9 @@ class MEDIA_EXPORT WebAudioMediaCodecBridge {
// this file descriptor. We take ownership of this descriptor.
int pcm_output_;
+ // The length of the encoded data.
+ size_t data_size_;
+
DISALLOW_COPY_AND_ASSIGN(WebAudioMediaCodecBridge);
};

Powered by Google App Engine
This is Rietveld 408576698