Merge "Don't hide NDK types behind API level guards." am: 37dc3d2136

am: 23ac59ad8d

Change-Id: I54f89f274a755bcd0815c8437cb25cf1070e81f9
gugelfrei
Dan Albert 7 years ago committed by android-build-merger
commit d32aab8c29

@ -44,11 +44,7 @@
#include <android/hardware_buffer.h>
#endif /* __ANDROID_API__ >= 26 */
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 24
__BEGIN_DECLS
/**
* AImage is an opaque type that provides access to image generated by {@link AImageReader}.
@ -513,6 +509,8 @@ typedef struct AImageCropRect {
int32_t bottom;
} AImageCropRect;
#if __ANDROID_API__ >= 24
/**
* Return the image back the the system and delete the AImage object from memory.
*
@ -758,9 +756,7 @@ media_status_t AImage_getHardwareBuffer(const AImage* image, /*out*/AHardwareBuf
#endif /* __ANDROID_API__ >= 26 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif //_NDK_IMAGE_H

@ -42,11 +42,7 @@
#include "NdkMediaError.h"
#include "NdkImage.h"
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 24
__BEGIN_DECLS
/**
* AImage is an opaque type that allows direct application access to image data rendered into a
@ -54,6 +50,8 @@ extern "C" {
*/
typedef struct AImageReader AImageReader;
#if __ANDROID_API__ >= 24
/**
* Create a new reader for images of the desired size and format.
*
@ -436,10 +434,7 @@ media_status_t AImageReader_setBufferRemovedListener(
#endif /* __ANDROID_API__ >= 26 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif //_NDK_IMAGE_READER_H

@ -34,14 +34,11 @@
#include "NdkMediaError.h"
#include "NdkMediaFormat.h"
#ifdef __cplusplus
extern "C" {
#endif
__BEGIN_DECLS
struct ANativeWindow;
typedef struct ANativeWindow ANativeWindow;
#if __ANDROID_API__ >= 21
struct AMediaCodec;
typedef struct AMediaCodec AMediaCodec;
@ -63,6 +60,8 @@ enum {
AMEDIACODEC_INFO_TRY_AGAIN_LATER = -1
};
#if __ANDROID_API__ >= 21
/**
* Create codec by name. Use this if you know the exact codec you want to use.
* When configuring, you will need to specify whether to use the codec as an
@ -364,8 +363,6 @@ media_status_t AMediaCodecCryptoInfo_getEncryptedBytes(AMediaCodecCryptoInfo*, s
#endif /* __ANDROID_API__ >= 21 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif //_NDK_MEDIA_CODEC_H

@ -32,17 +32,15 @@
#include <sys/types.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 21
__BEGIN_DECLS
struct AMediaCrypto;
typedef struct AMediaCrypto AMediaCrypto;
typedef uint8_t AMediaUUID[16];
#if __ANDROID_API__ >= 21
bool AMediaCrypto_isCryptoSchemeSupported(const AMediaUUID uuid);
bool AMediaCrypto_requiresSecureDecoderComponent(const char *mime);
@ -53,8 +51,6 @@ void AMediaCrypto_delete(AMediaCrypto* crypto);
#endif /* __ANDROID_API__ >= 21 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif // _NDK_MEDIA_CRYPTO_H

@ -33,11 +33,7 @@
#include "NdkMediaError.h"
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 21
__BEGIN_DECLS
struct AMediaDrm;
typedef struct AMediaDrm AMediaDrm;
@ -52,7 +48,6 @@ typedef AMediaDrmByteArray AMediaDrmScope;
typedef AMediaDrmByteArray AMediaDrmKeySetId;
typedef AMediaDrmByteArray AMediaDrmSecureStop;
typedef enum AMediaDrmEventType {
/**
* This event type indicates that the app needs to request a certificate from
@ -83,6 +78,7 @@ typedef enum AMediaDrmEventType {
typedef void (*AMediaDrmEventListener)(AMediaDrm *, const AMediaDrmSessionId *sessionId,
AMediaDrmEventType eventType, int extra, const uint8_t *data, size_t dataSize);
#if __ANDROID_API__ >= 21
/**
* Query if the given scheme identified by its UUID is supported on this device, and
@ -452,8 +448,6 @@ media_status_t AMediaDrm_verify(AMediaDrm *, const AMediaDrmSessionId *sessionId
#endif /* __ANDROID_API__ >= 21 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif //_NDK_MEDIA_DRM_H

@ -30,11 +30,7 @@
#include <sys/cdefs.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 21
__BEGIN_DECLS
typedef enum {
AMEDIA_OK = 0,
@ -67,10 +63,6 @@ typedef enum {
} media_status_t;
#endif /* __ANDROID_API__ >= 21 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif // _NDK_MEDIA_ERROR_H

@ -35,15 +35,12 @@
#include "NdkMediaFormat.h"
#include "NdkMediaCrypto.h"
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 21
__BEGIN_DECLS
struct AMediaExtractor;
typedef struct AMediaExtractor AMediaExtractor;
#if __ANDROID_API__ >= 21
/**
* Create new media extractor
@ -163,8 +160,6 @@ enum {
#endif /* __ANDROID_API__ >= 21 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif // _NDK_MEDIA_EXTRACTOR_H

@ -32,15 +32,13 @@
#include "NdkMediaError.h"
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 21
__BEGIN_DECLS
struct AMediaFormat;
typedef struct AMediaFormat AMediaFormat;
#if __ANDROID_API__ >= 21
AMediaFormat *AMediaFormat_new();
media_status_t AMediaFormat_delete(AMediaFormat*);
@ -109,8 +107,6 @@ extern const char* AMEDIAFORMAT_KEY_STRIDE;
#endif /* __ANDROID_API__ >= 21 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif // _NDK_MEDIA_FORMAT_H

@ -35,11 +35,7 @@
#include "NdkMediaError.h"
#include "NdkMediaFormat.h"
#ifdef __cplusplus
extern "C" {
#endif
#if __ANDROID_API__ >= 21
__BEGIN_DECLS
struct AMediaMuxer;
typedef struct AMediaMuxer AMediaMuxer;
@ -49,6 +45,8 @@ typedef enum {
AMEDIAMUXER_OUTPUT_FORMAT_WEBM = 1,
} OutputFormat;
#if __ANDROID_API__ >= 21
/**
* Create new media muxer
*/
@ -117,8 +115,6 @@ media_status_t AMediaMuxer_writeSampleData(AMediaMuxer *muxer,
#endif /* __ANDROID_API__ >= 21 */
#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS
#endif // _NDK_MEDIA_MUXER_H

Loading…
Cancel
Save