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

Side by Side Diff: media/base/android/sdk_media_codec_bridge.h

Issue 1651673002: Add MediaCodecAudioDecoder implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 10 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 #ifndef MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // MediaCodecBridge. 97 // MediaCodecBridge.
98 class MEDIA_EXPORT AudioCodecBridge : public SdkMediaCodecBridge { 98 class MEDIA_EXPORT AudioCodecBridge : public SdkMediaCodecBridge {
99 public: 99 public:
100 // Returns an AudioCodecBridge instance if |codec| is supported, or a NULL 100 // Returns an AudioCodecBridge instance if |codec| is supported, or a NULL
101 // pointer otherwise. 101 // pointer otherwise.
102 static AudioCodecBridge* Create(const AudioCodec& codec); 102 static AudioCodecBridge* Create(const AudioCodec& codec);
103 103
104 // See MediaCodecUtil::IsKnownUnaccelerated(). 104 // See MediaCodecUtil::IsKnownUnaccelerated().
105 static bool IsKnownUnaccelerated(const AudioCodec& codec); 105 static bool IsKnownUnaccelerated(const AudioCodec& codec);
106 106
107 // Start the audio codec bridge. 107 // Start the audio codec bridge. If |play_audio| is true this method creates
108 // Android AudioTrack object for the actual audio playback
109 // (http://developer.android.com/reference/android/media/AudioTrack.html).
110 bool ConfigureAndStart(const AudioDecoderConfig& config,
111 bool play_audio,
112 jobject media_crypto);
113
114 // An overloaded variant used by AudioDecoderJob and AudioMediaCodecDecoder.
115 // We might want to remove this method when these classes go away.
qinmin 2016/02/16 19:25:09 can we remove this method? We can pack in all the
Tima Vaisburd 2016/02/16 21:23:26 One way to do this would be to make a method that
108 bool ConfigureAndStart(const AudioCodec& codec, 116 bool ConfigureAndStart(const AudioCodec& codec,
109 int sample_rate, 117 int sample_rate,
110 int channel_count, 118 int channel_count,
111 const uint8_t* extra_data, 119 const uint8_t* extra_data,
112 size_t extra_data_size, 120 size_t extra_data_size,
113 int64_t codec_delay_ns, 121 int64_t codec_delay_ns,
114 int64_t seek_preroll_ns, 122 int64_t seek_preroll_ns,
115 bool play_audio, 123 bool play_audio,
116 jobject media_crypto) WARN_UNUSED_RESULT; 124 jobject media_crypto) WARN_UNUSED_RESULT;
117 125
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 VideoCodecBridge(const std::string& mime, 198 VideoCodecBridge(const std::string& mime,
191 bool is_secure, 199 bool is_secure,
192 MediaCodecDirection direction); 200 MediaCodecDirection direction);
193 201
194 int adaptive_playback_supported_for_testing_; 202 int adaptive_playback_supported_for_testing_;
195 }; 203 };
196 204
197 } // namespace media 205 } // namespace media
198 206
199 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 207 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/android/sdk_media_codec_bridge.cc » ('j') | media/filters/android/media_codec_audio_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698