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

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: A better linking issue fix 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
« no previous file with comments | « no previous file | media/base/android/sdk_media_codec_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // MediaCodecBridge. 95 // MediaCodecBridge.
96 class MEDIA_EXPORT AudioCodecBridge : public SdkMediaCodecBridge { 96 class MEDIA_EXPORT AudioCodecBridge : public SdkMediaCodecBridge {
97 public: 97 public:
98 // Returns an AudioCodecBridge instance if |codec| is supported, or a NULL 98 // Returns an AudioCodecBridge instance if |codec| is supported, or a NULL
99 // pointer otherwise. 99 // pointer otherwise.
100 static AudioCodecBridge* Create(const AudioCodec& codec); 100 static AudioCodecBridge* Create(const AudioCodec& codec);
101 101
102 // See MediaCodecUtil::IsKnownUnaccelerated(). 102 // See MediaCodecUtil::IsKnownUnaccelerated().
103 static bool IsKnownUnaccelerated(const AudioCodec& codec); 103 static bool IsKnownUnaccelerated(const AudioCodec& codec);
104 104
105 // Start the audio codec bridge. 105 // Start the audio codec bridge. If |play_audio| is true this method creates
106 // Android AudioTrack object for the actual audio playback
107 // (http://developer.android.com/reference/android/media/AudioTrack.html).
108 bool ConfigureAndStart(const AudioDecoderConfig& config,
109 bool play_audio,
110 jobject media_crypto);
111
112 // An overloaded variant used by AudioDecoderJob and AudioMediaCodecDecoder.
113 // TODO(timav): Modify the above mentioned classes to pass parameters as
114 // AudioDecoderConfig and remove this method.
106 bool ConfigureAndStart(const AudioCodec& codec, 115 bool ConfigureAndStart(const AudioCodec& codec,
107 int sample_rate, 116 int sample_rate,
108 int channel_count, 117 int channel_count,
109 const uint8_t* extra_data, 118 const uint8_t* extra_data,
110 size_t extra_data_size, 119 size_t extra_data_size,
111 int64_t codec_delay_ns, 120 int64_t codec_delay_ns,
112 int64_t seek_preroll_ns, 121 int64_t seek_preroll_ns,
113 bool play_audio, 122 bool play_audio,
114 jobject media_crypto) WARN_UNUSED_RESULT; 123 jobject media_crypto) WARN_UNUSED_RESULT;
115 124
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 VideoCodecBridge(const std::string& mime, 197 VideoCodecBridge(const std::string& mime,
189 bool is_secure, 198 bool is_secure,
190 MediaCodecDirection direction); 199 MediaCodecDirection direction);
191 200
192 int adaptive_playback_supported_for_testing_; 201 int adaptive_playback_supported_for_testing_;
193 }; 202 };
194 203
195 } // namespace media 204 } // namespace media
196 205
197 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 206 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698