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

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

Issue 1681613002: Remove MediaCodecBridge::GetOutputBuffersCount() and GetOutputBuffersCapacity() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing 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
« no previous file with comments | « media/base/android/sdk_media_codec_bridge.h ('k') | no next file » | 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 #include "media/base/android/sdk_media_codec_bridge.h" 5 #include "media/base/android/sdk_media_codec_bridge.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 void SdkMediaCodecBridge::ReleaseOutputBuffer(int index, bool render) { 268 void SdkMediaCodecBridge::ReleaseOutputBuffer(int index, bool render) {
269 DVLOG(3) << __PRETTY_FUNCTION__ << ": " << index; 269 DVLOG(3) << __PRETTY_FUNCTION__ << ": " << index;
270 JNIEnv* env = AttachCurrentThread(); 270 JNIEnv* env = AttachCurrentThread();
271 CHECK(env); 271 CHECK(env);
272 272
273 Java_MediaCodecBridge_releaseOutputBuffer(env, j_media_codec_.obj(), index, 273 Java_MediaCodecBridge_releaseOutputBuffer(env, j_media_codec_.obj(), index,
274 render); 274 render);
275 } 275 }
276 276
277 int SdkMediaCodecBridge::GetOutputBuffersCount() {
278 JNIEnv* env = AttachCurrentThread();
279 return Java_MediaCodecBridge_getOutputBuffersCount(env, j_media_codec_.obj());
280 }
281
282 size_t SdkMediaCodecBridge::GetOutputBuffersCapacity() {
283 JNIEnv* env = AttachCurrentThread();
284 return Java_MediaCodecBridge_getOutputBuffersCapacity(env,
285 j_media_codec_.obj());
286 }
287
288 void SdkMediaCodecBridge::GetInputBuffer(int input_buffer_index, 277 void SdkMediaCodecBridge::GetInputBuffer(int input_buffer_index,
289 uint8_t** data, 278 uint8_t** data,
290 size_t* capacity) { 279 size_t* capacity) {
291 JNIEnv* env = AttachCurrentThread(); 280 JNIEnv* env = AttachCurrentThread();
292 ScopedJavaLocalRef<jobject> j_buffer(Java_MediaCodecBridge_getInputBuffer( 281 ScopedJavaLocalRef<jobject> j_buffer(Java_MediaCodecBridge_getInputBuffer(
293 env, j_media_codec_.obj(), input_buffer_index)); 282 env, j_media_codec_.obj(), input_buffer_index));
294 *data = static_cast<uint8_t*>(env->GetDirectBufferAddress(j_buffer.obj())); 283 *data = static_cast<uint8_t*>(env->GetDirectBufferAddress(j_buffer.obj()));
295 *capacity = 284 *capacity =
296 base::checked_cast<size_t>(env->GetDirectBufferCapacity(j_buffer.obj())); 285 base::checked_cast<size_t>(env->GetDirectBufferCapacity(j_buffer.obj()));
297 } 286 }
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 if (adaptive_playback_supported_for_testing_ == 0) 623 if (adaptive_playback_supported_for_testing_ == 0)
635 return false; 624 return false;
636 else if (adaptive_playback_supported_for_testing_ > 0) 625 else if (adaptive_playback_supported_for_testing_ > 0)
637 return true; 626 return true;
638 JNIEnv* env = AttachCurrentThread(); 627 JNIEnv* env = AttachCurrentThread();
639 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(env, media_codec(), 628 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(env, media_codec(),
640 width, height); 629 width, height);
641 } 630 }
642 631
643 } // namespace media 632 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/sdk_media_codec_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698