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/media_codec_bridge.cc

Issue 1422643002: Pass DecryptConfig parameters over IPC and use it in AVDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed MediaCodec.CodecException that was added only at level 21 (Android L) Created 5 years, 1 month 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/media_codec_bridge.h ('k') | media/base/bitstream_buffer.h » ('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 #include "media/base/android/media_codec_bridge.h" 5 #include "media/base/android/media_codec_bridge.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 0, 338 0,
339 data_size, 339 data_size,
340 presentation_time.InMicroseconds(), 340 presentation_time.InMicroseconds(),
341 0)); 341 0));
342 } 342 }
343 343
344 MediaCodecStatus MediaCodecBridge::QueueSecureInputBuffer( 344 MediaCodecStatus MediaCodecBridge::QueueSecureInputBuffer(
345 int index, 345 int index,
346 const uint8* data, 346 const uint8* data,
347 size_t data_size, 347 size_t data_size,
348 const std::string& key_id,
349 const std::string& iv,
350 const std::vector<SubsampleEntry>& subsamples,
351 const base::TimeDelta& presentation_time) {
352 return QueueSecureInputBuffer(
353 index, data, data_size, reinterpret_cast<const uint8_t*>(key_id.data()),
354 key_id.size(), reinterpret_cast<const uint8_t*>(iv.data()), iv.size(),
355 subsamples.empty() ? nullptr : &subsamples[0], subsamples.size(),
356 presentation_time);
357 }
358
359 // TODO(timav): Combine this and above methods together keeping only the first
360 // interface after we switch to Spitzer pipeline.
361 MediaCodecStatus MediaCodecBridge::QueueSecureInputBuffer(
362 int index,
363 const uint8* data,
364 size_t data_size,
348 const uint8* key_id, 365 const uint8* key_id,
349 int key_id_size, 366 int key_id_size,
350 const uint8* iv, 367 const uint8* iv,
351 int iv_size, 368 int iv_size,
352 const SubsampleEntry* subsamples, 369 const SubsampleEntry* subsamples,
353 int subsamples_size, 370 int subsamples_size,
354 const base::TimeDelta& presentation_time) { 371 const base::TimeDelta& presentation_time) {
355 DVLOG(3) << __PRETTY_FUNCTION__ << index << ": " << data_size; 372 DVLOG(3) << __PRETTY_FUNCTION__ << index << ": " << data_size;
356 if (data_size > base::checked_cast<size_t>(kint32max)) 373 if (data_size > base::checked_cast<size_t>(kint32max))
357 return MEDIA_CODEC_ERROR; 374 return MEDIA_CODEC_ERROR;
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 JNIEnv* env = AttachCurrentThread(); 885 JNIEnv* env = AttachCurrentThread();
869 return Java_MediaCodecBridge_isAdaptivePlaybackSupported( 886 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(
870 env, media_codec(), width, height); 887 env, media_codec(), width, height);
871 } 888 }
872 889
873 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) { 890 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) {
874 return RegisterNativesImpl(env); 891 return RegisterNativesImpl(env);
875 } 892 }
876 893
877 } // namespace media 894 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/bitstream_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698