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

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

Issue 805273007: Android: Propagate sample rate change to audio decoder job (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // and ready to be StartAudio/Video()ed again. HOWEVER, due to the buggy 100 // and ready to be StartAudio/Video()ed again. HOWEVER, due to the buggy
101 // vendor's implementation , b/8125974, Stop() -> StartAudio/Video() may not 101 // vendor's implementation , b/8125974, Stop() -> StartAudio/Video() may not
102 // work on some devices. For reliability, Stop() -> delete and recreate new 102 // work on some devices. For reliability, Stop() -> delete and recreate new
103 // instance -> StartAudio/Video() is recommended. 103 // instance -> StartAudio/Video() is recommended.
104 void Stop(); 104 void Stop();
105 105
106 // Used for getting output format. This is valid after DequeueInputBuffer() 106 // Used for getting output format. This is valid after DequeueInputBuffer()
107 // returns a format change by returning INFO_OUTPUT_FORMAT_CHANGED 107 // returns a format change by returning INFO_OUTPUT_FORMAT_CHANGED
108 void GetOutputFormat(int* width, int* height); 108 void GetOutputFormat(int* width, int* height);
109 109
110 // Used for checking for new sampling rate after DequeueInputBuffer() returns
111 // INFO_OUTPUT_FORMAT_CHANGED
112 void GetOutputSamplingRate(int* sampling_rate);
113
110 // Submits a byte array to the given input buffer. Call this after getting an 114 // Submits a byte array to the given input buffer. Call this after getting an
111 // available buffer from DequeueInputBuffer(). If |data| is NULL, assume the 115 // available buffer from DequeueInputBuffer(). If |data| is NULL, assume the
112 // input buffer has already been populated (but still obey |size|). 116 // input buffer has already been populated (but still obey |size|).
113 // |data_size| must be less than kint32max (because Java). 117 // |data_size| must be less than kint32max (because Java).
114 MediaCodecStatus QueueInputBuffer(int index, 118 MediaCodecStatus QueueInputBuffer(int index,
115 const uint8* data, 119 const uint8* data,
116 size_t data_size, 120 size_t data_size,
117 const base::TimeDelta& presentation_time); 121 const base::TimeDelta& presentation_time);
118 122
119 // Similar to the above call, but submits a buffer that is encrypted. Note: 123 // Similar to the above call, but submits a buffer that is encrypted. Note:
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 VideoCodecBridge(const std::string& mime, 291 VideoCodecBridge(const std::string& mime,
288 bool is_secure, 292 bool is_secure,
289 MediaCodecDirection direction); 293 MediaCodecDirection direction);
290 294
291 int adaptive_playback_supported_for_testing_; 295 int adaptive_playback_supported_for_testing_;
292 }; 296 };
293 297
294 } // namespace media 298 } // namespace media
295 299
296 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 300 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698