1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * @addtogroup Media 19 * @{ 20 */ 21 22 /** 23 * @file NdkMediaCrypto.h 24 */ 25 26 /* 27 * This file defines an NDK API. 28 * Do not remove methods. 29 * Do not change method signatures. 30 * Do not change the value of constants. 31 * Do not change the size of any of the classes defined in here. 32 * Do not reference types that are not part of the NDK. 33 * Do not #include files that aren't part of the NDK. 34 */ 35 36 #ifndef _NDK_MEDIA_CRYPTO_H 37 #define _NDK_MEDIA_CRYPTO_H 38 39 #include <sys/cdefs.h> 40 #include <sys/types.h> 41 #include <stdbool.h> 42 43 __BEGIN_DECLS 44 45 struct AMediaCrypto; 46 typedef struct AMediaCrypto AMediaCrypto; 47 48 typedef uint8_t AMediaUUID[16]; 49 50 #if __ANDROID_API__ >= 21 51 52 bool AMediaCrypto_isCryptoSchemeSupported(const AMediaUUID uuid) __INTRODUCED_IN(21); 53 54 bool AMediaCrypto_requiresSecureDecoderComponent(const char *mime) __INTRODUCED_IN(21); 55 56 AMediaCrypto* AMediaCrypto_new(const AMediaUUID uuid, const void *initData, size_t initDataSize) __INTRODUCED_IN(21); 57 58 void AMediaCrypto_delete(AMediaCrypto* crypto) __INTRODUCED_IN(21); 59 60 #endif /* __ANDROID_API__ >= 21 */ 61 62 __END_DECLS 63 64 #endif // _NDK_MEDIA_CRYPTO_H 65 66 /** @} */ 67