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

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

Issue 238053004: Revert of Fix an issue that audio and video may run out of sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 // See MediaCodecBridge::IsKnownUnaccelerated(). 216 // See MediaCodecBridge::IsKnownUnaccelerated().
217 static bool IsKnownUnaccelerated(const AudioCodec& codec); 217 static bool IsKnownUnaccelerated(const AudioCodec& codec);
218 218
219 // Start the audio codec bridge. 219 // Start the audio codec bridge.
220 bool Start(const AudioCodec& codec, int sample_rate, int channel_count, 220 bool Start(const AudioCodec& codec, int sample_rate, int channel_count,
221 const uint8* extra_data, size_t extra_data_size, 221 const uint8* extra_data, size_t extra_data_size,
222 bool play_audio, jobject media_crypto) WARN_UNUSED_RESULT; 222 bool play_audio, jobject media_crypto) WARN_UNUSED_RESULT;
223 223
224 // Play the output buffer. This call must be called after 224 // Play the output buffer. This call must be called after
225 // DequeueOutputBuffer() and before ReleaseOutputBuffer. Returns the playback 225 // DequeueOutputBuffer() and before ReleaseOutputBuffer.
226 // head position expressed in frames. 226 void PlayOutputBuffer(int index, size_t size);
227 int64 PlayOutputBuffer(int index, size_t size);
228 227
229 // Set the volume of the audio output. 228 // Set the volume of the audio output.
230 void SetVolume(double volume); 229 void SetVolume(double volume);
231 230
232 private: 231 private:
233 explicit AudioCodecBridge(const std::string& mime); 232 explicit AudioCodecBridge(const std::string& mime);
234 233
235 // Configure the java MediaFormat object with the extra codec data passed in. 234 // Configure the java MediaFormat object with the extra codec data passed in.
236 bool ConfigureMediaFormat(jobject j_format, const AudioCodec& codec, 235 bool ConfigureMediaFormat(jobject j_format, const AudioCodec& codec,
237 const uint8* extra_data, size_t extra_data_size); 236 const uint8* extra_data, size_t extra_data_size);
(...skipping 27 matching lines...) Expand all
265 264
266 private: 265 private:
267 VideoCodecBridge(const std::string& mime, 266 VideoCodecBridge(const std::string& mime,
268 bool is_secure, 267 bool is_secure,
269 MediaCodecDirection direction); 268 MediaCodecDirection direction);
270 }; 269 };
271 270
272 } // namespace media 271 } // namespace media
273 272
274 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 273 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecBridge.java ('k') | media/base/android/media_codec_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698