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 /** 53 * Available since API level 21. 54 */ 55 bool AMediaCrypto_isCryptoSchemeSupported(const AMediaUUID uuid) __INTRODUCED_IN(21); 56 57 /** 58 * Available since API level 21. 59 */ 60 bool AMediaCrypto_requiresSecureDecoderComponent(const char *mime) __INTRODUCED_IN(21); 61 62 /** 63 * Available since API level 21. 64 */ 65 AMediaCrypto* AMediaCrypto_new(const AMediaUUID uuid, const void *initData, size_t initDataSize) __INTRODUCED_IN(21); 66 67 /** 68 * Available since API level 21. 69 */ 70 void AMediaCrypto_delete(AMediaCrypto* crypto) __INTRODUCED_IN(21); 71 72 #endif /* __ANDROID_API__ >= 21 */ 73 74 __END_DECLS 75 76 #endif // _NDK_MEDIA_CRYPTO_H 77 78 /** @} */ 79