diff --git a/ndk/platforms/android-20/arch-arm/symbols/libmediandk.so.functions.txt b/ndk/platforms/android-20/arch-arm/symbols/libmediandk.so.functions.txt deleted file mode 100644 index c6f09592f..000000000 --- a/ndk/platforms/android-20/arch-arm/symbols/libmediandk.so.functions.txt +++ /dev/null @@ -1,91 +0,0 @@ -AMediaCodecCryptoInfo_delete -AMediaCodecCryptoInfo_getClearBytes -AMediaCodecCryptoInfo_getEncryptedBytes -AMediaCodecCryptoInfo_getIV -AMediaCodecCryptoInfo_getKey -AMediaCodecCryptoInfo_getMode -AMediaCodecCryptoInfo_getNumSubSamples -AMediaCodecCryptoInfo_new -AMediaCodec_configure -AMediaCodec_createCodecByName -AMediaCodec_createDecoderByType -AMediaCodec_createEncoderByType -AMediaCodec_delete -AMediaCodec_dequeueInputBuffer -AMediaCodec_dequeueOutputBuffer -AMediaCodec_flush -AMediaCodec_getInputBuffer -AMediaCodec_getOutputBuffer -AMediaCodec_getOutputFormat -AMediaCodec_queueInputBuffer -AMediaCodec_queueSecureInputBuffer -AMediaCodec_releaseOutputBuffer -AMediaCodec_releaseOutputBufferAtTime -AMediaCodec_start -AMediaCodec_stop -AMediaCrypto_delete -AMediaCrypto_isCryptoSchemeSupported -AMediaCrypto_new -AMediaCrypto_requiresSecureDecoderComponent -AMediaDrm_closeSession -AMediaDrm_createByUUID -AMediaDrm_decrypt -AMediaDrm_encrypt -AMediaDrm_getKeyRequest -AMediaDrm_getPropertyByteArray -AMediaDrm_getPropertyString -AMediaDrm_getProvisionRequest -AMediaDrm_getSecureStops -AMediaDrm_isCryptoSchemeSupported -AMediaDrm_openSession -AMediaDrm_provideKeyResponse -AMediaDrm_provideProvisionResponse -AMediaDrm_queryKeyStatus -AMediaDrm_release -AMediaDrm_releaseSecureStops -AMediaDrm_removeKeys -AMediaDrm_restoreKeys -AMediaDrm_setOnEventListener -AMediaDrm_setPropertyByteArray -AMediaDrm_setPropertyString -AMediaDrm_sign -AMediaDrm_verify -AMediaExtractor_advance -AMediaExtractor_delete -AMediaExtractor_getPsshInfo -AMediaExtractor_getSampleCryptoInfo -AMediaExtractor_getSampleFlags -AMediaExtractor_getSampleTime -AMediaExtractor_getSampleTrackIndex -AMediaExtractor_getTrackCount -AMediaExtractor_getTrackFormat -AMediaExtractor_new -AMediaExtractor_readSampleData -AMediaExtractor_seekTo -AMediaExtractor_selectTrack -AMediaExtractor_setDataSource -AMediaExtractor_setDataSourceFd -AMediaExtractor_unselectTrack -AMediaFormat_delete -AMediaFormat_getBuffer -AMediaFormat_getFloat -AMediaFormat_getInt32 -AMediaFormat_getInt64 -AMediaFormat_getSize -AMediaFormat_getString -AMediaFormat_new -AMediaFormat_setBuffer -AMediaFormat_setFloat -AMediaFormat_setInt32 -AMediaFormat_setInt64 -AMediaFormat_setString -AMediaFormat_toString -AMediaMuxer_addTrack -AMediaMuxer_delete -AMediaMuxer_new -AMediaMuxer_setLocation -AMediaMuxer_setOrientationHint -AMediaMuxer_start -AMediaMuxer_stop -AMediaMuxer_writeSampleData -__popcountdi2 diff --git a/ndk/platforms/android-20/arch-arm/symbols/libmediandk.so.variables.txt b/ndk/platforms/android-20/arch-arm/symbols/libmediandk.so.variables.txt deleted file mode 100644 index 6f59e1fc7..000000000 --- a/ndk/platforms/android-20/arch-arm/symbols/libmediandk.so.variables.txt +++ /dev/null @@ -1,24 +0,0 @@ -AMEDIAFORMAT_KEY_AAC_PROFILE -AMEDIAFORMAT_KEY_BIT_RATE -AMEDIAFORMAT_KEY_CHANNEL_COUNT -AMEDIAFORMAT_KEY_CHANNEL_MASK -AMEDIAFORMAT_KEY_COLOR_FORMAT -AMEDIAFORMAT_KEY_DURATION -AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL -AMEDIAFORMAT_KEY_FRAME_RATE -AMEDIAFORMAT_KEY_HEIGHT -AMEDIAFORMAT_KEY_IS_ADTS -AMEDIAFORMAT_KEY_IS_AUTOSELECT -AMEDIAFORMAT_KEY_IS_DEFAULT -AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE -AMEDIAFORMAT_KEY_I_FRAME_INTERVAL -AMEDIAFORMAT_KEY_LANGUAGE -AMEDIAFORMAT_KEY_MAX_HEIGHT -AMEDIAFORMAT_KEY_MAX_INPUT_SIZE -AMEDIAFORMAT_KEY_MAX_WIDTH -AMEDIAFORMAT_KEY_MIME -AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP -AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER -AMEDIAFORMAT_KEY_SAMPLE_RATE -AMEDIAFORMAT_KEY_STRIDE -AMEDIAFORMAT_KEY_WIDTH diff --git a/ndk/platforms/android-20/arch-arm64/symbols/libmediandk.so.functions.txt b/ndk/platforms/android-20/arch-arm64/symbols/libmediandk.so.functions.txt deleted file mode 100644 index c6f09592f..000000000 --- a/ndk/platforms/android-20/arch-arm64/symbols/libmediandk.so.functions.txt +++ /dev/null @@ -1,91 +0,0 @@ -AMediaCodecCryptoInfo_delete -AMediaCodecCryptoInfo_getClearBytes -AMediaCodecCryptoInfo_getEncryptedBytes -AMediaCodecCryptoInfo_getIV -AMediaCodecCryptoInfo_getKey -AMediaCodecCryptoInfo_getMode -AMediaCodecCryptoInfo_getNumSubSamples -AMediaCodecCryptoInfo_new -AMediaCodec_configure -AMediaCodec_createCodecByName -AMediaCodec_createDecoderByType -AMediaCodec_createEncoderByType -AMediaCodec_delete -AMediaCodec_dequeueInputBuffer -AMediaCodec_dequeueOutputBuffer -AMediaCodec_flush -AMediaCodec_getInputBuffer -AMediaCodec_getOutputBuffer -AMediaCodec_getOutputFormat -AMediaCodec_queueInputBuffer -AMediaCodec_queueSecureInputBuffer -AMediaCodec_releaseOutputBuffer -AMediaCodec_releaseOutputBufferAtTime -AMediaCodec_start -AMediaCodec_stop -AMediaCrypto_delete -AMediaCrypto_isCryptoSchemeSupported -AMediaCrypto_new -AMediaCrypto_requiresSecureDecoderComponent -AMediaDrm_closeSession -AMediaDrm_createByUUID -AMediaDrm_decrypt -AMediaDrm_encrypt -AMediaDrm_getKeyRequest -AMediaDrm_getPropertyByteArray -AMediaDrm_getPropertyString -AMediaDrm_getProvisionRequest -AMediaDrm_getSecureStops -AMediaDrm_isCryptoSchemeSupported -AMediaDrm_openSession -AMediaDrm_provideKeyResponse -AMediaDrm_provideProvisionResponse -AMediaDrm_queryKeyStatus -AMediaDrm_release -AMediaDrm_releaseSecureStops -AMediaDrm_removeKeys -AMediaDrm_restoreKeys -AMediaDrm_setOnEventListener -AMediaDrm_setPropertyByteArray -AMediaDrm_setPropertyString -AMediaDrm_sign -AMediaDrm_verify -AMediaExtractor_advance -AMediaExtractor_delete -AMediaExtractor_getPsshInfo -AMediaExtractor_getSampleCryptoInfo -AMediaExtractor_getSampleFlags -AMediaExtractor_getSampleTime -AMediaExtractor_getSampleTrackIndex -AMediaExtractor_getTrackCount -AMediaExtractor_getTrackFormat -AMediaExtractor_new -AMediaExtractor_readSampleData -AMediaExtractor_seekTo -AMediaExtractor_selectTrack -AMediaExtractor_setDataSource -AMediaExtractor_setDataSourceFd -AMediaExtractor_unselectTrack -AMediaFormat_delete -AMediaFormat_getBuffer -AMediaFormat_getFloat -AMediaFormat_getInt32 -AMediaFormat_getInt64 -AMediaFormat_getSize -AMediaFormat_getString -AMediaFormat_new -AMediaFormat_setBuffer -AMediaFormat_setFloat -AMediaFormat_setInt32 -AMediaFormat_setInt64 -AMediaFormat_setString -AMediaFormat_toString -AMediaMuxer_addTrack -AMediaMuxer_delete -AMediaMuxer_new -AMediaMuxer_setLocation -AMediaMuxer_setOrientationHint -AMediaMuxer_start -AMediaMuxer_stop -AMediaMuxer_writeSampleData -__popcountdi2 diff --git a/ndk/platforms/android-20/arch-arm64/symbols/libmediandk.so.variables.txt b/ndk/platforms/android-20/arch-arm64/symbols/libmediandk.so.variables.txt deleted file mode 100644 index 6f59e1fc7..000000000 --- a/ndk/platforms/android-20/arch-arm64/symbols/libmediandk.so.variables.txt +++ /dev/null @@ -1,24 +0,0 @@ -AMEDIAFORMAT_KEY_AAC_PROFILE -AMEDIAFORMAT_KEY_BIT_RATE -AMEDIAFORMAT_KEY_CHANNEL_COUNT -AMEDIAFORMAT_KEY_CHANNEL_MASK -AMEDIAFORMAT_KEY_COLOR_FORMAT -AMEDIAFORMAT_KEY_DURATION -AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL -AMEDIAFORMAT_KEY_FRAME_RATE -AMEDIAFORMAT_KEY_HEIGHT -AMEDIAFORMAT_KEY_IS_ADTS -AMEDIAFORMAT_KEY_IS_AUTOSELECT -AMEDIAFORMAT_KEY_IS_DEFAULT -AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE -AMEDIAFORMAT_KEY_I_FRAME_INTERVAL -AMEDIAFORMAT_KEY_LANGUAGE -AMEDIAFORMAT_KEY_MAX_HEIGHT -AMEDIAFORMAT_KEY_MAX_INPUT_SIZE -AMEDIAFORMAT_KEY_MAX_WIDTH -AMEDIAFORMAT_KEY_MIME -AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP -AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER -AMEDIAFORMAT_KEY_SAMPLE_RATE -AMEDIAFORMAT_KEY_STRIDE -AMEDIAFORMAT_KEY_WIDTH diff --git a/ndk/platforms/android-20/arch-mips/symbols/libmediandk.so.functions.txt b/ndk/platforms/android-20/arch-mips/symbols/libmediandk.so.functions.txt deleted file mode 100644 index c6f09592f..000000000 --- a/ndk/platforms/android-20/arch-mips/symbols/libmediandk.so.functions.txt +++ /dev/null @@ -1,91 +0,0 @@ -AMediaCodecCryptoInfo_delete -AMediaCodecCryptoInfo_getClearBytes -AMediaCodecCryptoInfo_getEncryptedBytes -AMediaCodecCryptoInfo_getIV -AMediaCodecCryptoInfo_getKey -AMediaCodecCryptoInfo_getMode -AMediaCodecCryptoInfo_getNumSubSamples -AMediaCodecCryptoInfo_new -AMediaCodec_configure -AMediaCodec_createCodecByName -AMediaCodec_createDecoderByType -AMediaCodec_createEncoderByType -AMediaCodec_delete -AMediaCodec_dequeueInputBuffer -AMediaCodec_dequeueOutputBuffer -AMediaCodec_flush -AMediaCodec_getInputBuffer -AMediaCodec_getOutputBuffer -AMediaCodec_getOutputFormat -AMediaCodec_queueInputBuffer -AMediaCodec_queueSecureInputBuffer -AMediaCodec_releaseOutputBuffer -AMediaCodec_releaseOutputBufferAtTime -AMediaCodec_start -AMediaCodec_stop -AMediaCrypto_delete -AMediaCrypto_isCryptoSchemeSupported -AMediaCrypto_new -AMediaCrypto_requiresSecureDecoderComponent -AMediaDrm_closeSession -AMediaDrm_createByUUID -AMediaDrm_decrypt -AMediaDrm_encrypt -AMediaDrm_getKeyRequest -AMediaDrm_getPropertyByteArray -AMediaDrm_getPropertyString -AMediaDrm_getProvisionRequest -AMediaDrm_getSecureStops -AMediaDrm_isCryptoSchemeSupported -AMediaDrm_openSession -AMediaDrm_provideKeyResponse -AMediaDrm_provideProvisionResponse -AMediaDrm_queryKeyStatus -AMediaDrm_release -AMediaDrm_releaseSecureStops -AMediaDrm_removeKeys -AMediaDrm_restoreKeys -AMediaDrm_setOnEventListener -AMediaDrm_setPropertyByteArray -AMediaDrm_setPropertyString -AMediaDrm_sign -AMediaDrm_verify -AMediaExtractor_advance -AMediaExtractor_delete -AMediaExtractor_getPsshInfo -AMediaExtractor_getSampleCryptoInfo -AMediaExtractor_getSampleFlags -AMediaExtractor_getSampleTime -AMediaExtractor_getSampleTrackIndex -AMediaExtractor_getTrackCount -AMediaExtractor_getTrackFormat -AMediaExtractor_new -AMediaExtractor_readSampleData -AMediaExtractor_seekTo -AMediaExtractor_selectTrack -AMediaExtractor_setDataSource -AMediaExtractor_setDataSourceFd -AMediaExtractor_unselectTrack -AMediaFormat_delete -AMediaFormat_getBuffer -AMediaFormat_getFloat -AMediaFormat_getInt32 -AMediaFormat_getInt64 -AMediaFormat_getSize -AMediaFormat_getString -AMediaFormat_new -AMediaFormat_setBuffer -AMediaFormat_setFloat -AMediaFormat_setInt32 -AMediaFormat_setInt64 -AMediaFormat_setString -AMediaFormat_toString -AMediaMuxer_addTrack -AMediaMuxer_delete -AMediaMuxer_new -AMediaMuxer_setLocation -AMediaMuxer_setOrientationHint -AMediaMuxer_start -AMediaMuxer_stop -AMediaMuxer_writeSampleData -__popcountdi2 diff --git a/ndk/platforms/android-20/arch-mips/symbols/libmediandk.so.variables.txt b/ndk/platforms/android-20/arch-mips/symbols/libmediandk.so.variables.txt deleted file mode 100644 index 6f59e1fc7..000000000 --- a/ndk/platforms/android-20/arch-mips/symbols/libmediandk.so.variables.txt +++ /dev/null @@ -1,24 +0,0 @@ -AMEDIAFORMAT_KEY_AAC_PROFILE -AMEDIAFORMAT_KEY_BIT_RATE -AMEDIAFORMAT_KEY_CHANNEL_COUNT -AMEDIAFORMAT_KEY_CHANNEL_MASK -AMEDIAFORMAT_KEY_COLOR_FORMAT -AMEDIAFORMAT_KEY_DURATION -AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL -AMEDIAFORMAT_KEY_FRAME_RATE -AMEDIAFORMAT_KEY_HEIGHT -AMEDIAFORMAT_KEY_IS_ADTS -AMEDIAFORMAT_KEY_IS_AUTOSELECT -AMEDIAFORMAT_KEY_IS_DEFAULT -AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE -AMEDIAFORMAT_KEY_I_FRAME_INTERVAL -AMEDIAFORMAT_KEY_LANGUAGE -AMEDIAFORMAT_KEY_MAX_HEIGHT -AMEDIAFORMAT_KEY_MAX_INPUT_SIZE -AMEDIAFORMAT_KEY_MAX_WIDTH -AMEDIAFORMAT_KEY_MIME -AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP -AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER -AMEDIAFORMAT_KEY_SAMPLE_RATE -AMEDIAFORMAT_KEY_STRIDE -AMEDIAFORMAT_KEY_WIDTH diff --git a/ndk/platforms/android-20/arch-mips64/symbols/libmediandk.so.functions.txt b/ndk/platforms/android-20/arch-mips64/symbols/libmediandk.so.functions.txt deleted file mode 100644 index c6f09592f..000000000 --- a/ndk/platforms/android-20/arch-mips64/symbols/libmediandk.so.functions.txt +++ /dev/null @@ -1,91 +0,0 @@ -AMediaCodecCryptoInfo_delete -AMediaCodecCryptoInfo_getClearBytes -AMediaCodecCryptoInfo_getEncryptedBytes -AMediaCodecCryptoInfo_getIV -AMediaCodecCryptoInfo_getKey -AMediaCodecCryptoInfo_getMode -AMediaCodecCryptoInfo_getNumSubSamples -AMediaCodecCryptoInfo_new -AMediaCodec_configure -AMediaCodec_createCodecByName -AMediaCodec_createDecoderByType -AMediaCodec_createEncoderByType -AMediaCodec_delete -AMediaCodec_dequeueInputBuffer -AMediaCodec_dequeueOutputBuffer -AMediaCodec_flush -AMediaCodec_getInputBuffer -AMediaCodec_getOutputBuffer -AMediaCodec_getOutputFormat -AMediaCodec_queueInputBuffer -AMediaCodec_queueSecureInputBuffer -AMediaCodec_releaseOutputBuffer -AMediaCodec_releaseOutputBufferAtTime -AMediaCodec_start -AMediaCodec_stop -AMediaCrypto_delete -AMediaCrypto_isCryptoSchemeSupported -AMediaCrypto_new -AMediaCrypto_requiresSecureDecoderComponent -AMediaDrm_closeSession -AMediaDrm_createByUUID -AMediaDrm_decrypt -AMediaDrm_encrypt -AMediaDrm_getKeyRequest -AMediaDrm_getPropertyByteArray -AMediaDrm_getPropertyString -AMediaDrm_getProvisionRequest -AMediaDrm_getSecureStops -AMediaDrm_isCryptoSchemeSupported -AMediaDrm_openSession -AMediaDrm_provideKeyResponse -AMediaDrm_provideProvisionResponse -AMediaDrm_queryKeyStatus -AMediaDrm_release -AMediaDrm_releaseSecureStops -AMediaDrm_removeKeys -AMediaDrm_restoreKeys -AMediaDrm_setOnEventListener -AMediaDrm_setPropertyByteArray -AMediaDrm_setPropertyString -AMediaDrm_sign -AMediaDrm_verify -AMediaExtractor_advance -AMediaExtractor_delete -AMediaExtractor_getPsshInfo -AMediaExtractor_getSampleCryptoInfo -AMediaExtractor_getSampleFlags -AMediaExtractor_getSampleTime -AMediaExtractor_getSampleTrackIndex -AMediaExtractor_getTrackCount -AMediaExtractor_getTrackFormat -AMediaExtractor_new -AMediaExtractor_readSampleData -AMediaExtractor_seekTo -AMediaExtractor_selectTrack -AMediaExtractor_setDataSource -AMediaExtractor_setDataSourceFd -AMediaExtractor_unselectTrack -AMediaFormat_delete -AMediaFormat_getBuffer -AMediaFormat_getFloat -AMediaFormat_getInt32 -AMediaFormat_getInt64 -AMediaFormat_getSize -AMediaFormat_getString -AMediaFormat_new -AMediaFormat_setBuffer -AMediaFormat_setFloat -AMediaFormat_setInt32 -AMediaFormat_setInt64 -AMediaFormat_setString -AMediaFormat_toString -AMediaMuxer_addTrack -AMediaMuxer_delete -AMediaMuxer_new -AMediaMuxer_setLocation -AMediaMuxer_setOrientationHint -AMediaMuxer_start -AMediaMuxer_stop -AMediaMuxer_writeSampleData -__popcountdi2 diff --git a/ndk/platforms/android-20/arch-mips64/symbols/libmediandk.so.variables.txt b/ndk/platforms/android-20/arch-mips64/symbols/libmediandk.so.variables.txt deleted file mode 100644 index 6f59e1fc7..000000000 --- a/ndk/platforms/android-20/arch-mips64/symbols/libmediandk.so.variables.txt +++ /dev/null @@ -1,24 +0,0 @@ -AMEDIAFORMAT_KEY_AAC_PROFILE -AMEDIAFORMAT_KEY_BIT_RATE -AMEDIAFORMAT_KEY_CHANNEL_COUNT -AMEDIAFORMAT_KEY_CHANNEL_MASK -AMEDIAFORMAT_KEY_COLOR_FORMAT -AMEDIAFORMAT_KEY_DURATION -AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL -AMEDIAFORMAT_KEY_FRAME_RATE -AMEDIAFORMAT_KEY_HEIGHT -AMEDIAFORMAT_KEY_IS_ADTS -AMEDIAFORMAT_KEY_IS_AUTOSELECT -AMEDIAFORMAT_KEY_IS_DEFAULT -AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE -AMEDIAFORMAT_KEY_I_FRAME_INTERVAL -AMEDIAFORMAT_KEY_LANGUAGE -AMEDIAFORMAT_KEY_MAX_HEIGHT -AMEDIAFORMAT_KEY_MAX_INPUT_SIZE -AMEDIAFORMAT_KEY_MAX_WIDTH -AMEDIAFORMAT_KEY_MIME -AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP -AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER -AMEDIAFORMAT_KEY_SAMPLE_RATE -AMEDIAFORMAT_KEY_STRIDE -AMEDIAFORMAT_KEY_WIDTH diff --git a/ndk/platforms/android-20/arch-x86/symbols/libmediandk.so.functions.txt b/ndk/platforms/android-20/arch-x86/symbols/libmediandk.so.functions.txt deleted file mode 100644 index c6f09592f..000000000 --- a/ndk/platforms/android-20/arch-x86/symbols/libmediandk.so.functions.txt +++ /dev/null @@ -1,91 +0,0 @@ -AMediaCodecCryptoInfo_delete -AMediaCodecCryptoInfo_getClearBytes -AMediaCodecCryptoInfo_getEncryptedBytes -AMediaCodecCryptoInfo_getIV -AMediaCodecCryptoInfo_getKey -AMediaCodecCryptoInfo_getMode -AMediaCodecCryptoInfo_getNumSubSamples -AMediaCodecCryptoInfo_new -AMediaCodec_configure -AMediaCodec_createCodecByName -AMediaCodec_createDecoderByType -AMediaCodec_createEncoderByType -AMediaCodec_delete -AMediaCodec_dequeueInputBuffer -AMediaCodec_dequeueOutputBuffer -AMediaCodec_flush -AMediaCodec_getInputBuffer -AMediaCodec_getOutputBuffer -AMediaCodec_getOutputFormat -AMediaCodec_queueInputBuffer -AMediaCodec_queueSecureInputBuffer -AMediaCodec_releaseOutputBuffer -AMediaCodec_releaseOutputBufferAtTime -AMediaCodec_start -AMediaCodec_stop -AMediaCrypto_delete -AMediaCrypto_isCryptoSchemeSupported -AMediaCrypto_new -AMediaCrypto_requiresSecureDecoderComponent -AMediaDrm_closeSession -AMediaDrm_createByUUID -AMediaDrm_decrypt -AMediaDrm_encrypt -AMediaDrm_getKeyRequest -AMediaDrm_getPropertyByteArray -AMediaDrm_getPropertyString -AMediaDrm_getProvisionRequest -AMediaDrm_getSecureStops -AMediaDrm_isCryptoSchemeSupported -AMediaDrm_openSession -AMediaDrm_provideKeyResponse -AMediaDrm_provideProvisionResponse -AMediaDrm_queryKeyStatus -AMediaDrm_release -AMediaDrm_releaseSecureStops -AMediaDrm_removeKeys -AMediaDrm_restoreKeys -AMediaDrm_setOnEventListener -AMediaDrm_setPropertyByteArray -AMediaDrm_setPropertyString -AMediaDrm_sign -AMediaDrm_verify -AMediaExtractor_advance -AMediaExtractor_delete -AMediaExtractor_getPsshInfo -AMediaExtractor_getSampleCryptoInfo -AMediaExtractor_getSampleFlags -AMediaExtractor_getSampleTime -AMediaExtractor_getSampleTrackIndex -AMediaExtractor_getTrackCount -AMediaExtractor_getTrackFormat -AMediaExtractor_new -AMediaExtractor_readSampleData -AMediaExtractor_seekTo -AMediaExtractor_selectTrack -AMediaExtractor_setDataSource -AMediaExtractor_setDataSourceFd -AMediaExtractor_unselectTrack -AMediaFormat_delete -AMediaFormat_getBuffer -AMediaFormat_getFloat -AMediaFormat_getInt32 -AMediaFormat_getInt64 -AMediaFormat_getSize -AMediaFormat_getString -AMediaFormat_new -AMediaFormat_setBuffer -AMediaFormat_setFloat -AMediaFormat_setInt32 -AMediaFormat_setInt64 -AMediaFormat_setString -AMediaFormat_toString -AMediaMuxer_addTrack -AMediaMuxer_delete -AMediaMuxer_new -AMediaMuxer_setLocation -AMediaMuxer_setOrientationHint -AMediaMuxer_start -AMediaMuxer_stop -AMediaMuxer_writeSampleData -__popcountdi2 diff --git a/ndk/platforms/android-20/arch-x86/symbols/libmediandk.so.variables.txt b/ndk/platforms/android-20/arch-x86/symbols/libmediandk.so.variables.txt deleted file mode 100644 index 6f59e1fc7..000000000 --- a/ndk/platforms/android-20/arch-x86/symbols/libmediandk.so.variables.txt +++ /dev/null @@ -1,24 +0,0 @@ -AMEDIAFORMAT_KEY_AAC_PROFILE -AMEDIAFORMAT_KEY_BIT_RATE -AMEDIAFORMAT_KEY_CHANNEL_COUNT -AMEDIAFORMAT_KEY_CHANNEL_MASK -AMEDIAFORMAT_KEY_COLOR_FORMAT -AMEDIAFORMAT_KEY_DURATION -AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL -AMEDIAFORMAT_KEY_FRAME_RATE -AMEDIAFORMAT_KEY_HEIGHT -AMEDIAFORMAT_KEY_IS_ADTS -AMEDIAFORMAT_KEY_IS_AUTOSELECT -AMEDIAFORMAT_KEY_IS_DEFAULT -AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE -AMEDIAFORMAT_KEY_I_FRAME_INTERVAL -AMEDIAFORMAT_KEY_LANGUAGE -AMEDIAFORMAT_KEY_MAX_HEIGHT -AMEDIAFORMAT_KEY_MAX_INPUT_SIZE -AMEDIAFORMAT_KEY_MAX_WIDTH -AMEDIAFORMAT_KEY_MIME -AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP -AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER -AMEDIAFORMAT_KEY_SAMPLE_RATE -AMEDIAFORMAT_KEY_STRIDE -AMEDIAFORMAT_KEY_WIDTH diff --git a/ndk/platforms/android-20/arch-x86_64/symbols/libmediandk.so.functions.txt b/ndk/platforms/android-20/arch-x86_64/symbols/libmediandk.so.functions.txt deleted file mode 100644 index c6f09592f..000000000 --- a/ndk/platforms/android-20/arch-x86_64/symbols/libmediandk.so.functions.txt +++ /dev/null @@ -1,91 +0,0 @@ -AMediaCodecCryptoInfo_delete -AMediaCodecCryptoInfo_getClearBytes -AMediaCodecCryptoInfo_getEncryptedBytes -AMediaCodecCryptoInfo_getIV -AMediaCodecCryptoInfo_getKey -AMediaCodecCryptoInfo_getMode -AMediaCodecCryptoInfo_getNumSubSamples -AMediaCodecCryptoInfo_new -AMediaCodec_configure -AMediaCodec_createCodecByName -AMediaCodec_createDecoderByType -AMediaCodec_createEncoderByType -AMediaCodec_delete -AMediaCodec_dequeueInputBuffer -AMediaCodec_dequeueOutputBuffer -AMediaCodec_flush -AMediaCodec_getInputBuffer -AMediaCodec_getOutputBuffer -AMediaCodec_getOutputFormat -AMediaCodec_queueInputBuffer -AMediaCodec_queueSecureInputBuffer -AMediaCodec_releaseOutputBuffer -AMediaCodec_releaseOutputBufferAtTime -AMediaCodec_start -AMediaCodec_stop -AMediaCrypto_delete -AMediaCrypto_isCryptoSchemeSupported -AMediaCrypto_new -AMediaCrypto_requiresSecureDecoderComponent -AMediaDrm_closeSession -AMediaDrm_createByUUID -AMediaDrm_decrypt -AMediaDrm_encrypt -AMediaDrm_getKeyRequest -AMediaDrm_getPropertyByteArray -AMediaDrm_getPropertyString -AMediaDrm_getProvisionRequest -AMediaDrm_getSecureStops -AMediaDrm_isCryptoSchemeSupported -AMediaDrm_openSession -AMediaDrm_provideKeyResponse -AMediaDrm_provideProvisionResponse -AMediaDrm_queryKeyStatus -AMediaDrm_release -AMediaDrm_releaseSecureStops -AMediaDrm_removeKeys -AMediaDrm_restoreKeys -AMediaDrm_setOnEventListener -AMediaDrm_setPropertyByteArray -AMediaDrm_setPropertyString -AMediaDrm_sign -AMediaDrm_verify -AMediaExtractor_advance -AMediaExtractor_delete -AMediaExtractor_getPsshInfo -AMediaExtractor_getSampleCryptoInfo -AMediaExtractor_getSampleFlags -AMediaExtractor_getSampleTime -AMediaExtractor_getSampleTrackIndex -AMediaExtractor_getTrackCount -AMediaExtractor_getTrackFormat -AMediaExtractor_new -AMediaExtractor_readSampleData -AMediaExtractor_seekTo -AMediaExtractor_selectTrack -AMediaExtractor_setDataSource -AMediaExtractor_setDataSourceFd -AMediaExtractor_unselectTrack -AMediaFormat_delete -AMediaFormat_getBuffer -AMediaFormat_getFloat -AMediaFormat_getInt32 -AMediaFormat_getInt64 -AMediaFormat_getSize -AMediaFormat_getString -AMediaFormat_new -AMediaFormat_setBuffer -AMediaFormat_setFloat -AMediaFormat_setInt32 -AMediaFormat_setInt64 -AMediaFormat_setString -AMediaFormat_toString -AMediaMuxer_addTrack -AMediaMuxer_delete -AMediaMuxer_new -AMediaMuxer_setLocation -AMediaMuxer_setOrientationHint -AMediaMuxer_start -AMediaMuxer_stop -AMediaMuxer_writeSampleData -__popcountdi2 diff --git a/ndk/platforms/android-20/arch-x86_64/symbols/libmediandk.so.variables.txt b/ndk/platforms/android-20/arch-x86_64/symbols/libmediandk.so.variables.txt deleted file mode 100644 index 6f59e1fc7..000000000 --- a/ndk/platforms/android-20/arch-x86_64/symbols/libmediandk.so.variables.txt +++ /dev/null @@ -1,24 +0,0 @@ -AMEDIAFORMAT_KEY_AAC_PROFILE -AMEDIAFORMAT_KEY_BIT_RATE -AMEDIAFORMAT_KEY_CHANNEL_COUNT -AMEDIAFORMAT_KEY_CHANNEL_MASK -AMEDIAFORMAT_KEY_COLOR_FORMAT -AMEDIAFORMAT_KEY_DURATION -AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL -AMEDIAFORMAT_KEY_FRAME_RATE -AMEDIAFORMAT_KEY_HEIGHT -AMEDIAFORMAT_KEY_IS_ADTS -AMEDIAFORMAT_KEY_IS_AUTOSELECT -AMEDIAFORMAT_KEY_IS_DEFAULT -AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE -AMEDIAFORMAT_KEY_I_FRAME_INTERVAL -AMEDIAFORMAT_KEY_LANGUAGE -AMEDIAFORMAT_KEY_MAX_HEIGHT -AMEDIAFORMAT_KEY_MAX_INPUT_SIZE -AMEDIAFORMAT_KEY_MAX_WIDTH -AMEDIAFORMAT_KEY_MIME -AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP -AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER -AMEDIAFORMAT_KEY_SAMPLE_RATE -AMEDIAFORMAT_KEY_STRIDE -AMEDIAFORMAT_KEY_WIDTH diff --git a/ndk/platforms/android-20/include/SLES/OpenSLES.h b/ndk/platforms/android-20/include/SLES/OpenSLES.h deleted file mode 100644 index 8686997cb..000000000 --- a/ndk/platforms/android-20/include/SLES/OpenSLES.h +++ /dev/null @@ -1,2774 +0,0 @@ -/* - * Copyright (c) 2007-2009 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and /or associated documentation files (the "Materials "), to - * deal in the Materials without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Materials, and to permit persons to whom the Materials are - * furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE - * MATERIALS. - * - * OpenSLES.h - OpenSL ES version 1.0.1 - * - */ - -/****************************************************************************/ -/* NOTE: This file is a standard OpenSL ES header file and should not be */ -/* modified in any way. */ -/****************************************************************************/ - -#ifndef OPENSL_ES_H_ -#define OPENSL_ES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "OpenSLES_Platform.h" - - -/*****************************************************************************/ -/* Common types, structures, and defines */ -/*****************************************************************************/ - -#ifndef _KHRONOS_KEYS_ -#define _KHRONOS_KEYS_ - -#define KHRONOS_TITLE "KhronosTitle" -#define KHRONOS_ALBUM "KhronosAlbum" -#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber" -#define KHRONOS_ARTIST "KhronosArtist" -#define KHRONOS_GENRE "KhronosGenre" -#define KHRONOS_YEAR "KhronosYear" -#define KHRONOS_COMMENT "KhronosComment" -#define KHRONOS_ARTIST_URL "KhronosArtistURL" -#define KHRONOS_CONTENT_URL "KhronosContentURL" -#define KHRONOS_RATING "KhronosRating" -#define KHRONOS_ALBUM_ART "KhronosAlbumArt" -#define KHRONOS_COPYRIGHT "KhronosCopyright" - -#endif - - -/* remap common types to SL types for clarity */ -typedef sl_int8_t SLint8; /* 8 bit signed integer */ -typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */ -typedef sl_int16_t SLint16; /* 16 bit signed integer */ -typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */ -typedef sl_int32_t SLint32; /* 32 bit signed integer */ -typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */ - -typedef SLuint32 SLboolean; -#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000) -#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001) - -typedef SLuint8 SLchar; /* UTF-8 is to be used */ -typedef SLint16 SLmillibel; -typedef SLuint32 SLmillisecond; -typedef SLuint32 SLmilliHertz; -typedef SLint32 SLmillimeter; -typedef SLint32 SLmillidegree; -typedef SLint16 SLpermille; -typedef SLuint32 SLmicrosecond; -typedef SLuint32 SLresult; - -#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF) -#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1)) - -#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF) -#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF) - -/** Interface ID defined as a UUID */ -typedef const struct SLInterfaceID_ { - SLuint32 time_low; - SLuint16 time_mid; - SLuint16 time_hi_and_version; - SLuint16 clock_seq; - SLuint8 node[6]; -} * SLInterfaceID; - -/* Forward declaration for the object interface */ -struct SLObjectItf_; - -typedef const struct SLObjectItf_ * const * SLObjectItf; - -/* Objects ID's */ - -#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001) -#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002) -#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003) -#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004) -#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005) -#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006) -#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007) -#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008) -#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009) -#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A) - - -/* SL Profiles */ - -#define SL_PROFILES_PHONE ((SLuint16) 0x0001) -#define SL_PROFILES_MUSIC ((SLuint16) 0x0002) -#define SL_PROFILES_GAME ((SLuint16) 0x0004) - -/* Types of voices supported by the system */ - -#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001) -#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002) -#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004) -#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008) - -/* Convenient macros representing various different priority levels, for use with the SetPriority method */ - -#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1)) -#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000) -#define SL_PRIORITY_LOW ((SLint32) -0x40000000) -#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000) -#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000) -#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000) -#define SL_PRIORITY_HIGH ((SLint32) 0x40000000) -#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000) -#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF) - - -/** These macros list the various sample formats that are possible on audio input and output devices. */ - -#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008) -#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010) -#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014) -#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018) -#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C) -#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020) - - -/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */ - -#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000) -#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000) -#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000) -#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000) -#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000) -#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000) -#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000) -#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000) -#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000) -#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000) -#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000) -#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000) -#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000) - -#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001) -#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002) -#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004) -#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008) -#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010) -#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020) -#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040) -#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080) -#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100) -#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200) -#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400) -#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800) -#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000) -#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000) -#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000) -#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000) -#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000) -#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000) - - -/*****************************************************************************/ -/* Errors */ -/* */ -/*****************************************************************************/ - -#define SL_RESULT_SUCCESS ((SLuint32) 0x00000000) -#define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001) -#define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002) -#define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003) -#define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004) -#define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005) -#define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006) -#define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007) -#define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008) -#define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009) -#define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A) -#define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B) -#define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C) -#define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D) -#define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E) -#define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F) -#define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010) - - -/* Object state definitions */ - -#define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001) -#define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002) -#define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003) - -/* Object event definitions */ - -#define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001) -#define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002) -#define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003) -#define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004) -#define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005) -#define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006) -#define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007) - - -/*****************************************************************************/ -/* Interface definitions */ -/*****************************************************************************/ - -/** NULL Interface */ - -extern SL_API const SLInterfaceID SL_IID_NULL; - -/*---------------------------------------------------------------------------*/ -/* Data Source and Data Sink Structures */ -/*---------------------------------------------------------------------------*/ - -/** Data locator macros */ -#define SL_DATALOCATOR_URI ((SLuint32) 0x00000001) -#define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002) -#define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003) -#define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004) -#define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005) -#define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006) -#define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007) -#define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008) - - - -/** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/ -typedef struct SLDataLocator_URI_ { - SLuint32 locatorType; - SLchar * URI; -} SLDataLocator_URI; - -/** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/ -typedef struct SLDataLocator_Address_ { - SLuint32 locatorType; - void *pAddress; - SLuint32 length; -} SLDataLocator_Address; - -/** IODevice-types */ -#define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001) -#define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002) -#define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003) -#define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004) -#define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005) - -/** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/ -typedef struct SLDataLocator_IODevice_ { - SLuint32 locatorType; - SLuint32 deviceType; - SLuint32 deviceID; - SLObjectItf device; -} SLDataLocator_IODevice; - -/** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/ -typedef struct SLDataLocator_OutputMix { - SLuint32 locatorType; - SLObjectItf outputMix; -} SLDataLocator_OutputMix; - - -/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/ -typedef struct SLDataLocator_BufferQueue { - SLuint32 locatorType; - SLuint32 numBuffers; -} SLDataLocator_BufferQueue; - -/** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/ -typedef struct SLDataLocator_MIDIBufferQueue { - SLuint32 locatorType; - SLuint32 tpqn; - SLuint32 numBuffers; -} SLDataLocator_MIDIBufferQueue; - -/** Data format defines */ -#define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001) -#define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002) -#define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003) - - -/** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/ -typedef struct SLDataFormat_MIME_ { - SLuint32 formatType; - SLchar * mimeType; - SLuint32 containerType; -} SLDataFormat_MIME; - -/* Byte order of a block of 16- or 32-bit data */ -#define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001) -#define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002) - -/* Container type */ -#define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001) -#define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002) -#define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003) -#define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004) -#define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005) -#define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006) -#define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007) -#define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008) -#define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009) -#define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A) -#define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B) -#define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C) -#define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D) -#define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E) -#define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F) -#define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010) -#define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011) -#define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012) -#define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013) -#define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014) -#define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015) -#define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016) -#define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017) -#define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018) -#define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019) -#define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A) -#define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B) -#define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C) -#define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D) - - -/** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/ -typedef struct SLDataFormat_PCM_ { - SLuint32 formatType; - SLuint32 numChannels; - SLuint32 samplesPerSec; - SLuint32 bitsPerSample; - SLuint32 containerSize; - SLuint32 channelMask; - SLuint32 endianness; -} SLDataFormat_PCM; - -typedef struct SLDataSource_ { - void *pLocator; - void *pFormat; -} SLDataSource; - - -typedef struct SLDataSink_ { - void *pLocator; - void *pFormat; -} SLDataSink; - - - - - - -/*---------------------------------------------------------------------------*/ -/* Standard Object Interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_OBJECT; - -/** Object callback */ - - -typedef void (SLAPIENTRY *slObjectCallback) ( - SLObjectItf caller, - const void * pContext, - SLuint32 event, - SLresult result, - SLuint32 param, - void *pInterface -); - - -struct SLObjectItf_ { - SLresult (*Realize) ( - SLObjectItf self, - SLboolean async - ); - SLresult (*Resume) ( - SLObjectItf self, - SLboolean async - ); - SLresult (*GetState) ( - SLObjectItf self, - SLuint32 * pState - ); - SLresult (*GetInterface) ( - SLObjectItf self, - const SLInterfaceID iid, - void * pInterface - ); - SLresult (*RegisterCallback) ( - SLObjectItf self, - slObjectCallback callback, - void * pContext - ); - void (*AbortAsyncOperation) ( - SLObjectItf self - ); - void (*Destroy) ( - SLObjectItf self - ); - SLresult (*SetPriority) ( - SLObjectItf self, - SLint32 priority, - SLboolean preemptable - ); - SLresult (*GetPriority) ( - SLObjectItf self, - SLint32 *pPriority, - SLboolean *pPreemptable - ); - SLresult (*SetLossOfControlInterfaces) ( - SLObjectItf self, - SLint16 numInterfaces, - SLInterfaceID * pInterfaceIDs, - SLboolean enabled - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Audio IO Device capabilities interface */ -/*---------------------------------------------------------------------------*/ - -#define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF) -#define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE) -#define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD) -#define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC) -#define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB) - - -#define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001) -#define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100) -#define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200) -#define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400) - - -#define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001) -#define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002) -#define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003) -#define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004) -#define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005) -/* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */ -#define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005) - - -#define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001) -#define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002) -#define SL_DEVSCOPE_USER ((SLuint16) 0x0003) - - -typedef struct SLAudioInputDescriptor_ { - SLchar *deviceName; - SLint16 deviceConnection; - SLint16 deviceScope; - SLint16 deviceLocation; - SLboolean isForTelephony; - SLmilliHertz minSampleRate; - SLmilliHertz maxSampleRate; - SLboolean isFreqRangeContinuous; - SLmilliHertz *samplingRatesSupported; - SLint16 numOfSamplingRatesSupported; - SLint16 maxChannels; -} SLAudioInputDescriptor; - - -typedef struct SLAudioOutputDescriptor_ { - SLchar *pDeviceName; - SLint16 deviceConnection; - SLint16 deviceScope; - SLint16 deviceLocation; - SLboolean isForTelephony; - SLmilliHertz minSampleRate; - SLmilliHertz maxSampleRate; - SLboolean isFreqRangeContinuous; - SLmilliHertz *samplingRatesSupported; - SLint16 numOfSamplingRatesSupported; - SLint16 maxChannels; -} SLAudioOutputDescriptor; - - - -extern SL_API const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES; - -struct SLAudioIODeviceCapabilitiesItf_; -typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf; - - -typedef void (SLAPIENTRY *slAvailableAudioInputsChangedCallback) ( - SLAudioIODeviceCapabilitiesItf caller, - void *pContext, - SLuint32 deviceID, - SLint32 numInputs, - SLboolean isNew -); - - -typedef void (SLAPIENTRY *slAvailableAudioOutputsChangedCallback) ( - SLAudioIODeviceCapabilitiesItf caller, - void *pContext, - SLuint32 deviceID, - SLint32 numOutputs, - SLboolean isNew -); - -typedef void (SLAPIENTRY *slDefaultDeviceIDMapChangedCallback) ( - SLAudioIODeviceCapabilitiesItf caller, - void *pContext, - SLboolean isOutput, - SLint32 numDevices -); - - -struct SLAudioIODeviceCapabilitiesItf_ { - SLresult (*GetAvailableAudioInputs)( - SLAudioIODeviceCapabilitiesItf self, - SLint32 *pNumInputs, - SLuint32 *pInputDeviceIDs - ); - SLresult (*QueryAudioInputCapabilities)( - SLAudioIODeviceCapabilitiesItf self, - SLuint32 deviceId, - SLAudioInputDescriptor *pDescriptor - ); - SLresult (*RegisterAvailableAudioInputsChangedCallback) ( - SLAudioIODeviceCapabilitiesItf self, - slAvailableAudioInputsChangedCallback callback, - void *pContext - ); - SLresult (*GetAvailableAudioOutputs)( - SLAudioIODeviceCapabilitiesItf self, - SLint32 *pNumOutputs, - SLuint32 *pOutputDeviceIDs - ); - SLresult (*QueryAudioOutputCapabilities)( - SLAudioIODeviceCapabilitiesItf self, - SLuint32 deviceId, - SLAudioOutputDescriptor *pDescriptor - ); - SLresult (*RegisterAvailableAudioOutputsChangedCallback) ( - SLAudioIODeviceCapabilitiesItf self, - slAvailableAudioOutputsChangedCallback callback, - void *pContext - ); - SLresult (*RegisterDefaultDeviceIDMapChangedCallback) ( - SLAudioIODeviceCapabilitiesItf self, - slDefaultDeviceIDMapChangedCallback callback, - void *pContext - ); - SLresult (*GetAssociatedAudioInputs) ( - SLAudioIODeviceCapabilitiesItf self, - SLuint32 deviceId, - SLint32 *pNumAudioInputs, - SLuint32 *pAudioInputDeviceIDs - ); - SLresult (*GetAssociatedAudioOutputs) ( - SLAudioIODeviceCapabilitiesItf self, - SLuint32 deviceId, - SLint32 *pNumAudioOutputs, - SLuint32 *pAudioOutputDeviceIDs - ); - SLresult (*GetDefaultAudioDevices) ( - SLAudioIODeviceCapabilitiesItf self, - SLuint32 defaultDeviceID, - SLint32 *pNumAudioDevices, - SLuint32 *pAudioDeviceIDs - ); - SLresult (*QuerySampleFormatsSupported)( - SLAudioIODeviceCapabilitiesItf self, - SLuint32 deviceId, - SLmilliHertz samplingRate, - SLint32 *pSampleFormats, - SLint32 *pNumOfSampleFormats - ); -}; - - - -/*---------------------------------------------------------------------------*/ -/* Capabilities of the LED array IODevice */ -/*---------------------------------------------------------------------------*/ - -typedef struct SLLEDDescriptor_ { - SLuint8 ledCount; - SLuint8 primaryLED; - SLuint32 colorMask; -} SLLEDDescriptor; - - -/*---------------------------------------------------------------------------*/ -/* LED Array interface */ -/*---------------------------------------------------------------------------*/ - -typedef struct SLHSL_ { - SLmillidegree hue; - SLpermille saturation; - SLpermille lightness; -} SLHSL; - - -extern SL_API const SLInterfaceID SL_IID_LED; - -struct SLLEDArrayItf_; -typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf; - -struct SLLEDArrayItf_ { - SLresult (*ActivateLEDArray) ( - SLLEDArrayItf self, - SLuint32 lightMask - ); - SLresult (*IsLEDArrayActivated) ( - SLLEDArrayItf self, - SLuint32 *lightMask - ); - SLresult (*SetColor) ( - SLLEDArrayItf self, - SLuint8 index, - const SLHSL *color - ); - SLresult (*GetColor) ( - SLLEDArrayItf self, - SLuint8 index, - SLHSL *color - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Capabilities of the Vibra IODevice */ -/*---------------------------------------------------------------------------*/ - -typedef struct SLVibraDescriptor_ { - SLboolean supportsFrequency; - SLboolean supportsIntensity; - SLmilliHertz minFrequency; - SLmilliHertz maxFrequency; -} SLVibraDescriptor; - - - -/*---------------------------------------------------------------------------*/ -/* Vibra interface */ -/*---------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_VIBRA; - - -struct SLVibraItf_; -typedef const struct SLVibraItf_ * const * SLVibraItf; - -struct SLVibraItf_ { - SLresult (*Vibrate) ( - SLVibraItf self, - SLboolean vibrate - ); - SLresult (*IsVibrating) ( - SLVibraItf self, - SLboolean *pVibrating - ); - SLresult (*SetFrequency) ( - SLVibraItf self, - SLmilliHertz frequency - ); - SLresult (*GetFrequency) ( - SLVibraItf self, - SLmilliHertz *pFrequency - ); - SLresult (*SetIntensity) ( - SLVibraItf self, - SLpermille intensity - ); - SLresult (*GetIntensity) ( - SLVibraItf self, - SLpermille *pIntensity - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Meta data extraction related types and interface */ -/*---------------------------------------------------------------------------*/ - -#define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000) -#define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001) -#define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002) -#define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003) -#define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004) -#define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005) -#define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006) -#define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007) -#define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008) -#define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009) -#define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A) -#define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B) -#define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B) -#define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C) -#define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D) -#define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E) -#define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F) -#define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010) -#define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011) -#define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012) -#define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013) -#define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014) -#define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015) -#define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016) -#define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017) -#define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018) -#define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019) -#define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A) -#define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B) -#define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C) -#define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D) -#define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E) -#define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F) -#define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020) - - -#define SL_METADATA_FILTER_KEY ((SLuint8) 0x01) -#define SL_METADATA_FILTER_LANG ((SLuint8) 0x02) -#define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04) - - -typedef struct SLMetadataInfo_ { - SLuint32 size; - SLuint32 encoding; - SLchar langCountry[16]; - SLuint8 data[1]; -} SLMetadataInfo; - -extern SL_API const SLInterfaceID SL_IID_METADATAEXTRACTION; - -struct SLMetadataExtractionItf_; -typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf; - - -struct SLMetadataExtractionItf_ { - SLresult (*GetItemCount) ( - SLMetadataExtractionItf self, - SLuint32 *pItemCount - ); - SLresult (*GetKeySize) ( - SLMetadataExtractionItf self, - SLuint32 index, - SLuint32 *pKeySize - ); - SLresult (*GetKey) ( - SLMetadataExtractionItf self, - SLuint32 index, - SLuint32 keySize, - SLMetadataInfo *pKey - ); - SLresult (*GetValueSize) ( - SLMetadataExtractionItf self, - SLuint32 index, - SLuint32 *pValueSize - ); - SLresult (*GetValue) ( - SLMetadataExtractionItf self, - SLuint32 index, - SLuint32 valueSize, - SLMetadataInfo *pValue - ); - SLresult (*AddKeyFilter) ( - SLMetadataExtractionItf self, - SLuint32 keySize, - const void *pKey, - SLuint32 keyEncoding, - const SLchar *pValueLangCountry, - SLuint32 valueEncoding, - SLuint8 filterMask - ); - SLresult (*ClearKeyFilter) ( - SLMetadataExtractionItf self - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Meta data traversal related types and interface */ -/*---------------------------------------------------------------------------*/ - -#define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001) -#define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002) - - -#define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001) -#define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002) -#define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003) -#define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004) - -#define SL_NODE_PARENT 0xFFFFFFFF - -extern SL_API const SLInterfaceID SL_IID_METADATATRAVERSAL; - -struct SLMetadataTraversalItf_; -typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf; - -struct SLMetadataTraversalItf_ { - SLresult (*SetMode) ( - SLMetadataTraversalItf self, - SLuint32 mode - ); - SLresult (*GetChildCount) ( - SLMetadataTraversalItf self, - SLuint32 *pCount - ); - SLresult (*GetChildMIMETypeSize) ( - SLMetadataTraversalItf self, - SLuint32 index, - SLuint32 *pSize - ); - SLresult (*GetChildInfo) ( - SLMetadataTraversalItf self, - SLuint32 index, - SLint32 *pNodeID, - SLuint32 *pType, - SLuint32 size, - SLchar *pMimeType - ); - SLresult (*SetActiveNode) ( - SLMetadataTraversalItf self, - SLuint32 index - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Dynamic Source types and interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_DYNAMICSOURCE; - -struct SLDynamicSourceItf_; -typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf; - -struct SLDynamicSourceItf_ { - SLresult (*SetSource) ( - SLDynamicSourceItf self, - SLDataSource *pDataSource - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Output Mix interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_OUTPUTMIX; - -struct SLOutputMixItf_; -typedef const struct SLOutputMixItf_ * const * SLOutputMixItf; - -typedef void (SLAPIENTRY *slMixDeviceChangeCallback) ( - SLOutputMixItf caller, - void *pContext -); - - -struct SLOutputMixItf_ { - SLresult (*GetDestinationOutputDeviceIDs) ( - SLOutputMixItf self, - SLint32 *pNumDevices, - SLuint32 *pDeviceIDs - ); - SLresult (*RegisterDeviceChangeCallback) ( - SLOutputMixItf self, - slMixDeviceChangeCallback callback, - void *pContext - ); - SLresult (*ReRoute)( - SLOutputMixItf self, - SLint32 numOutputDevices, - SLuint32 *pOutputDeviceIDs - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Playback interface */ -/*---------------------------------------------------------------------------*/ - -/** Playback states */ -#define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001) -#define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002) -#define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003) - -/** Play events **/ -#define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001) -#define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002) -#define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004) -#define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008) -#define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010) - -#define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF) - - -extern SL_API const SLInterfaceID SL_IID_PLAY; - -/** Playback interface methods */ - -struct SLPlayItf_; -typedef const struct SLPlayItf_ * const * SLPlayItf; - -typedef void (SLAPIENTRY *slPlayCallback) ( - SLPlayItf caller, - void *pContext, - SLuint32 event -); - -struct SLPlayItf_ { - SLresult (*SetPlayState) ( - SLPlayItf self, - SLuint32 state - ); - SLresult (*GetPlayState) ( - SLPlayItf self, - SLuint32 *pState - ); - SLresult (*GetDuration) ( - SLPlayItf self, - SLmillisecond *pMsec - ); - SLresult (*GetPosition) ( - SLPlayItf self, - SLmillisecond *pMsec - ); - SLresult (*RegisterCallback) ( - SLPlayItf self, - slPlayCallback callback, - void *pContext - ); - SLresult (*SetCallbackEventsMask) ( - SLPlayItf self, - SLuint32 eventFlags - ); - SLresult (*GetCallbackEventsMask) ( - SLPlayItf self, - SLuint32 *pEventFlags - ); - SLresult (*SetMarkerPosition) ( - SLPlayItf self, - SLmillisecond mSec - ); - SLresult (*ClearMarkerPosition) ( - SLPlayItf self - ); - SLresult (*GetMarkerPosition) ( - SLPlayItf self, - SLmillisecond *pMsec - ); - SLresult (*SetPositionUpdatePeriod) ( - SLPlayItf self, - SLmillisecond mSec - ); - SLresult (*GetPositionUpdatePeriod) ( - SLPlayItf self, - SLmillisecond *pMsec - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Prefetch status interface */ -/*---------------------------------------------------------------------------*/ - -#define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001) -#define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002) - -#define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001) -#define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002) -#define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003) - - -extern SL_API const SLInterfaceID SL_IID_PREFETCHSTATUS; - - -/** Prefetch status interface methods */ - -struct SLPrefetchStatusItf_; -typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf; - -typedef void (SLAPIENTRY *slPrefetchCallback) ( - SLPrefetchStatusItf caller, - void *pContext, - SLuint32 event -); - -struct SLPrefetchStatusItf_ { - SLresult (*GetPrefetchStatus) ( - SLPrefetchStatusItf self, - SLuint32 *pStatus - ); - SLresult (*GetFillLevel) ( - SLPrefetchStatusItf self, - SLpermille *pLevel - ); - SLresult (*RegisterCallback) ( - SLPrefetchStatusItf self, - slPrefetchCallback callback, - void *pContext - ); - SLresult (*SetCallbackEventsMask) ( - SLPrefetchStatusItf self, - SLuint32 eventFlags - ); - SLresult (*GetCallbackEventsMask) ( - SLPrefetchStatusItf self, - SLuint32 *pEventFlags - ); - SLresult (*SetFillUpdatePeriod) ( - SLPrefetchStatusItf self, - SLpermille period - ); - SLresult (*GetFillUpdatePeriod) ( - SLPrefetchStatusItf self, - SLpermille *pPeriod - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Playback Rate interface */ -/*---------------------------------------------------------------------------*/ - -#define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001) -#define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002) -#define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100) -#define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200) -#define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400) -#define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800) - - -extern SL_API const SLInterfaceID SL_IID_PLAYBACKRATE; - -struct SLPlaybackRateItf_; -typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf; - -struct SLPlaybackRateItf_ { - SLresult (*SetRate)( - SLPlaybackRateItf self, - SLpermille rate - ); - SLresult (*GetRate)( - SLPlaybackRateItf self, - SLpermille *pRate - ); - SLresult (*SetPropertyConstraints)( - SLPlaybackRateItf self, - SLuint32 constraints - ); - SLresult (*GetProperties)( - SLPlaybackRateItf self, - SLuint32 *pProperties - ); - SLresult (*GetCapabilitiesOfRate)( - SLPlaybackRateItf self, - SLpermille rate, - SLuint32 *pCapabilities - ); - SLresult (*GetRateRange) ( - SLPlaybackRateItf self, - SLuint8 index, - SLpermille *pMinRate, - SLpermille *pMaxRate, - SLpermille *pStepSize, - SLuint32 *pCapabilities - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Seek Interface */ -/*---------------------------------------------------------------------------*/ - -#define SL_SEEKMODE_FAST ((SLuint32) 0x0001) -#define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002) - -extern SL_API const SLInterfaceID SL_IID_SEEK; - -struct SLSeekItf_; -typedef const struct SLSeekItf_ * const * SLSeekItf; - -struct SLSeekItf_ { - SLresult (*SetPosition)( - SLSeekItf self, - SLmillisecond pos, - SLuint32 seekMode - ); - SLresult (*SetLoop)( - SLSeekItf self, - SLboolean loopEnable, - SLmillisecond startPos, - SLmillisecond endPos - ); - SLresult (*GetLoop)( - SLSeekItf self, - SLboolean *pLoopEnabled, - SLmillisecond *pStartPos, - SLmillisecond *pEndPos - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Standard Recording Interface */ -/*---------------------------------------------------------------------------*/ - -/** Recording states */ -#define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001) -#define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002) -#define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003) - - -/** Record event **/ -#define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001) -#define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002) -#define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004) -#define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008) -#define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010) -/* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */ -#define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020) -#define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020) - - -extern SL_API const SLInterfaceID SL_IID_RECORD; - -struct SLRecordItf_; -typedef const struct SLRecordItf_ * const * SLRecordItf; - -typedef void (SLAPIENTRY *slRecordCallback) ( - SLRecordItf caller, - void *pContext, - SLuint32 event -); - -/** Recording interface methods */ -struct SLRecordItf_ { - SLresult (*SetRecordState) ( - SLRecordItf self, - SLuint32 state - ); - SLresult (*GetRecordState) ( - SLRecordItf self, - SLuint32 *pState - ); - SLresult (*SetDurationLimit) ( - SLRecordItf self, - SLmillisecond msec - ); - SLresult (*GetPosition) ( - SLRecordItf self, - SLmillisecond *pMsec - ); - SLresult (*RegisterCallback) ( - SLRecordItf self, - slRecordCallback callback, - void *pContext - ); - SLresult (*SetCallbackEventsMask) ( - SLRecordItf self, - SLuint32 eventFlags - ); - SLresult (*GetCallbackEventsMask) ( - SLRecordItf self, - SLuint32 *pEventFlags - ); - SLresult (*SetMarkerPosition) ( - SLRecordItf self, - SLmillisecond mSec - ); - SLresult (*ClearMarkerPosition) ( - SLRecordItf self - ); - SLresult (*GetMarkerPosition) ( - SLRecordItf self, - SLmillisecond *pMsec - ); - SLresult (*SetPositionUpdatePeriod) ( - SLRecordItf self, - SLmillisecond mSec - ); - SLresult (*GetPositionUpdatePeriod) ( - SLRecordItf self, - SLmillisecond *pMsec - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Equalizer interface */ -/*---------------------------------------------------------------------------*/ - -#define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF) - -extern SL_API const SLInterfaceID SL_IID_EQUALIZER; - -struct SLEqualizerItf_; -typedef const struct SLEqualizerItf_ * const * SLEqualizerItf; - -struct SLEqualizerItf_ { - SLresult (*SetEnabled)( - SLEqualizerItf self, - SLboolean enabled - ); - SLresult (*IsEnabled)( - SLEqualizerItf self, - SLboolean *pEnabled - ); - SLresult (*GetNumberOfBands)( - SLEqualizerItf self, - SLuint16 *pAmount - ); - SLresult (*GetBandLevelRange)( - SLEqualizerItf self, - SLmillibel *pMin, - SLmillibel *pMax - ); - SLresult (*SetBandLevel)( - SLEqualizerItf self, - SLuint16 band, - SLmillibel level - ); - SLresult (*GetBandLevel)( - SLEqualizerItf self, - SLuint16 band, - SLmillibel *pLevel - ); - SLresult (*GetCenterFreq)( - SLEqualizerItf self, - SLuint16 band, - SLmilliHertz *pCenter - ); - SLresult (*GetBandFreqRange)( - SLEqualizerItf self, - SLuint16 band, - SLmilliHertz *pMin, - SLmilliHertz *pMax - ); - SLresult (*GetBand)( - SLEqualizerItf self, - SLmilliHertz frequency, - SLuint16 *pBand - ); - SLresult (*GetCurrentPreset)( - SLEqualizerItf self, - SLuint16 *pPreset - ); - SLresult (*UsePreset)( - SLEqualizerItf self, - SLuint16 index - ); - SLresult (*GetNumberOfPresets)( - SLEqualizerItf self, - SLuint16 *pNumPresets - ); - SLresult (*GetPresetName)( - SLEqualizerItf self, - SLuint16 index, - const SLchar ** ppName - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Volume Interface */ -/* --------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_VOLUME; - -struct SLVolumeItf_; -typedef const struct SLVolumeItf_ * const * SLVolumeItf; - -struct SLVolumeItf_ { - SLresult (*SetVolumeLevel) ( - SLVolumeItf self, - SLmillibel level - ); - SLresult (*GetVolumeLevel) ( - SLVolumeItf self, - SLmillibel *pLevel - ); - SLresult (*GetMaxVolumeLevel) ( - SLVolumeItf self, - SLmillibel *pMaxLevel - ); - SLresult (*SetMute) ( - SLVolumeItf self, - SLboolean mute - ); - SLresult (*GetMute) ( - SLVolumeItf self, - SLboolean *pMute - ); - SLresult (*EnableStereoPosition) ( - SLVolumeItf self, - SLboolean enable - ); - SLresult (*IsEnabledStereoPosition) ( - SLVolumeItf self, - SLboolean *pEnable - ); - SLresult (*SetStereoPosition) ( - SLVolumeItf self, - SLpermille stereoPosition - ); - SLresult (*GetStereoPosition) ( - SLVolumeItf self, - SLpermille *pStereoPosition - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Device Volume Interface */ -/* --------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_DEVICEVOLUME; - -struct SLDeviceVolumeItf_; -typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf; - -struct SLDeviceVolumeItf_ { - SLresult (*GetVolumeScale) ( - SLDeviceVolumeItf self, - SLuint32 deviceID, - SLint32 *pMinValue, - SLint32 *pMaxValue, - SLboolean *pIsMillibelScale - ); - SLresult (*SetVolume) ( - SLDeviceVolumeItf self, - SLuint32 deviceID, - SLint32 volume - ); - SLresult (*GetVolume) ( - SLDeviceVolumeItf self, - SLuint32 deviceID, - SLint32 *pVolume - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Buffer Queue Interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_BUFFERQUEUE; - -struct SLBufferQueueItf_; -typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf; - -typedef void (SLAPIENTRY *slBufferQueueCallback)( - SLBufferQueueItf caller, - void *pContext -); - -/** Buffer queue state **/ - -typedef struct SLBufferQueueState_ { - SLuint32 count; - SLuint32 playIndex; -} SLBufferQueueState; - - -struct SLBufferQueueItf_ { - SLresult (*Enqueue) ( - SLBufferQueueItf self, - const void *pBuffer, - SLuint32 size - ); - SLresult (*Clear) ( - SLBufferQueueItf self - ); - SLresult (*GetState) ( - SLBufferQueueItf self, - SLBufferQueueState *pState - ); - SLresult (*RegisterCallback) ( - SLBufferQueueItf self, - slBufferQueueCallback callback, - void* pContext - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* PresetReverb */ -/*---------------------------------------------------------------------------*/ - -#define SL_REVERBPRESET_NONE ((SLuint16) 0x0000) -#define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001) -#define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002) -#define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003) -#define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004) -#define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005) -#define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006) - - -extern SL_API const SLInterfaceID SL_IID_PRESETREVERB; - -struct SLPresetReverbItf_; -typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf; - -struct SLPresetReverbItf_ { - SLresult (*SetPreset) ( - SLPresetReverbItf self, - SLuint16 preset - ); - SLresult (*GetPreset) ( - SLPresetReverbItf self, - SLuint16 *pPreset - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* EnvironmentalReverb */ -/*---------------------------------------------------------------------------*/ - -#define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \ - { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \ - { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \ - { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \ - { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \ - { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 } -#define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \ - { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \ - { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \ - { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \ - { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \ - { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \ - { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \ - { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \ - { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \ - { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \ - { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \ - { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \ - { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_CITY \ - { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \ - { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \ - { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \ - { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \ - { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \ - { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 } -#define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \ - { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \ - { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \ - { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \ - { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \ - { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \ - { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 } -#define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \ - { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 } - - -typedef struct SLEnvironmentalReverbSettings_ { - SLmillibel roomLevel; - SLmillibel roomHFLevel; - SLmillisecond decayTime; - SLpermille decayHFRatio; - SLmillibel reflectionsLevel; - SLmillisecond reflectionsDelay; - SLmillibel reverbLevel; - SLmillisecond reverbDelay; - SLpermille diffusion; - SLpermille density; -} SLEnvironmentalReverbSettings; - - - - -extern SL_API const SLInterfaceID SL_IID_ENVIRONMENTALREVERB; - - -struct SLEnvironmentalReverbItf_; -typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf; - -struct SLEnvironmentalReverbItf_ { - SLresult (*SetRoomLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel room - ); - SLresult (*GetRoomLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel *pRoom - ); - SLresult (*SetRoomHFLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel roomHF - ); - SLresult (*GetRoomHFLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel *pRoomHF - ); - SLresult (*SetDecayTime) ( - SLEnvironmentalReverbItf self, - SLmillisecond decayTime - ); - SLresult (*GetDecayTime) ( - SLEnvironmentalReverbItf self, - SLmillisecond *pDecayTime - ); - SLresult (*SetDecayHFRatio) ( - SLEnvironmentalReverbItf self, - SLpermille decayHFRatio - ); - SLresult (*GetDecayHFRatio) ( - SLEnvironmentalReverbItf self, - SLpermille *pDecayHFRatio - ); - SLresult (*SetReflectionsLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel reflectionsLevel - ); - SLresult (*GetReflectionsLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel *pReflectionsLevel - ); - SLresult (*SetReflectionsDelay) ( - SLEnvironmentalReverbItf self, - SLmillisecond reflectionsDelay - ); - SLresult (*GetReflectionsDelay) ( - SLEnvironmentalReverbItf self, - SLmillisecond *pReflectionsDelay - ); - SLresult (*SetReverbLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel reverbLevel - ); - SLresult (*GetReverbLevel) ( - SLEnvironmentalReverbItf self, - SLmillibel *pReverbLevel - ); - SLresult (*SetReverbDelay) ( - SLEnvironmentalReverbItf self, - SLmillisecond reverbDelay - ); - SLresult (*GetReverbDelay) ( - SLEnvironmentalReverbItf self, - SLmillisecond *pReverbDelay - ); - SLresult (*SetDiffusion) ( - SLEnvironmentalReverbItf self, - SLpermille diffusion - ); - SLresult (*GetDiffusion) ( - SLEnvironmentalReverbItf self, - SLpermille *pDiffusion - ); - SLresult (*SetDensity) ( - SLEnvironmentalReverbItf self, - SLpermille density - ); - SLresult (*GetDensity) ( - SLEnvironmentalReverbItf self, - SLpermille *pDensity - ); - SLresult (*SetEnvironmentalReverbProperties) ( - SLEnvironmentalReverbItf self, - const SLEnvironmentalReverbSettings *pProperties - ); - SLresult (*GetEnvironmentalReverbProperties) ( - SLEnvironmentalReverbItf self, - SLEnvironmentalReverbSettings *pProperties - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Effects Send Interface */ -/*---------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_EFFECTSEND; - -struct SLEffectSendItf_; -typedef const struct SLEffectSendItf_ * const * SLEffectSendItf; - -struct SLEffectSendItf_ { - SLresult (*EnableEffectSend) ( - SLEffectSendItf self, - const void *pAuxEffect, - SLboolean enable, - SLmillibel initialLevel - ); - SLresult (*IsEnabled) ( - SLEffectSendItf self, - const void * pAuxEffect, - SLboolean *pEnable - ); - SLresult (*SetDirectLevel) ( - SLEffectSendItf self, - SLmillibel directLevel - ); - SLresult (*GetDirectLevel) ( - SLEffectSendItf self, - SLmillibel *pDirectLevel - ); - SLresult (*SetSendLevel) ( - SLEffectSendItf self, - const void *pAuxEffect, - SLmillibel sendLevel - ); - SLresult (*GetSendLevel)( - SLEffectSendItf self, - const void *pAuxEffect, - SLmillibel *pSendLevel - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* 3D Grouping Interface */ -/*---------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_3DGROUPING; - - -struct SL3DGroupingItf_ ; -typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf; - -struct SL3DGroupingItf_ { - SLresult (*Set3DGroup) ( - SL3DGroupingItf self, - SLObjectItf group - ); - SLresult (*Get3DGroup) ( - SL3DGroupingItf self, - SLObjectItf *pGroup - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* 3D Commit Interface */ -/*---------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_3DCOMMIT; - -struct SL3DCommitItf_; -typedef const struct SL3DCommitItf_* const * SL3DCommitItf; - -struct SL3DCommitItf_ { - SLresult (*Commit) ( - SL3DCommitItf self - ); - SLresult (*SetDeferred) ( - SL3DCommitItf self, - SLboolean deferred - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* 3D Location Interface */ -/*---------------------------------------------------------------------------*/ - -typedef struct SLVec3D_ { - SLint32 x; - SLint32 y; - SLint32 z; -} SLVec3D; - -extern SL_API const SLInterfaceID SL_IID_3DLOCATION; - -struct SL3DLocationItf_; -typedef const struct SL3DLocationItf_ * const * SL3DLocationItf; - -struct SL3DLocationItf_ { - SLresult (*SetLocationCartesian) ( - SL3DLocationItf self, - const SLVec3D *pLocation - ); - SLresult (*SetLocationSpherical) ( - SL3DLocationItf self, - SLmillidegree azimuth, - SLmillidegree elevation, - SLmillimeter distance - ); - SLresult (*Move) ( - SL3DLocationItf self, - const SLVec3D *pMovement - ); - SLresult (*GetLocationCartesian) ( - SL3DLocationItf self, - SLVec3D *pLocation - ); - SLresult (*SetOrientationVectors) ( - SL3DLocationItf self, - const SLVec3D *pFront, - const SLVec3D *pAbove - ); - SLresult (*SetOrientationAngles) ( - SL3DLocationItf self, - SLmillidegree heading, - SLmillidegree pitch, - SLmillidegree roll - ); - SLresult (*Rotate) ( - SL3DLocationItf self, - SLmillidegree theta, - const SLVec3D *pAxis - ); - SLresult (*GetOrientationVectors) ( - SL3DLocationItf self, - SLVec3D *pFront, - SLVec3D *pUp - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* 3D Doppler Interface */ -/*---------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_3DDOPPLER; - -struct SL3DDopplerItf_; -typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf; - -struct SL3DDopplerItf_ { - SLresult (*SetVelocityCartesian) ( - SL3DDopplerItf self, - const SLVec3D *pVelocity - ); - SLresult (*SetVelocitySpherical) ( - SL3DDopplerItf self, - SLmillidegree azimuth, - SLmillidegree elevation, - SLmillimeter speed - ); - SLresult (*GetVelocityCartesian) ( - SL3DDopplerItf self, - SLVec3D *pVelocity - ); - SLresult (*SetDopplerFactor) ( - SL3DDopplerItf self, - SLpermille dopplerFactor - ); - SLresult (*GetDopplerFactor) ( - SL3DDopplerItf self, - SLpermille *pDopplerFactor - ); -}; - -/*---------------------------------------------------------------------------*/ -/* 3D Source Interface and associated defines */ -/* --------------------------------------------------------------------------*/ - -#define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000) -#define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001) - - -extern SL_API const SLInterfaceID SL_IID_3DSOURCE; - -struct SL3DSourceItf_; -typedef const struct SL3DSourceItf_ * const * SL3DSourceItf; - -struct SL3DSourceItf_ { - SLresult (*SetHeadRelative) ( - SL3DSourceItf self, - SLboolean headRelative - ); - SLresult (*GetHeadRelative) ( - SL3DSourceItf self, - SLboolean *pHeadRelative - ); - SLresult (*SetRolloffDistances) ( - SL3DSourceItf self, - SLmillimeter minDistance, - SLmillimeter maxDistance - ); - SLresult (*GetRolloffDistances) ( - SL3DSourceItf self, - SLmillimeter *pMinDistance, - SLmillimeter *pMaxDistance - ); - SLresult (*SetRolloffMaxDistanceMute) ( - SL3DSourceItf self, - SLboolean mute - ); - SLresult (*GetRolloffMaxDistanceMute) ( - SL3DSourceItf self, - SLboolean *pMute - ); - SLresult (*SetRolloffFactor) ( - SL3DSourceItf self, - SLpermille rolloffFactor - ); - SLresult (*GetRolloffFactor) ( - SL3DSourceItf self, - SLpermille *pRolloffFactor - ); - SLresult (*SetRoomRolloffFactor) ( - SL3DSourceItf self, - SLpermille roomRolloffFactor - ); - SLresult (*GetRoomRolloffFactor) ( - SL3DSourceItf self, - SLpermille *pRoomRolloffFactor - ); - SLresult (*SetRolloffModel) ( - SL3DSourceItf self, - SLuint8 model - ); - SLresult (*GetRolloffModel) ( - SL3DSourceItf self, - SLuint8 *pModel - ); - SLresult (*SetCone) ( - SL3DSourceItf self, - SLmillidegree innerAngle, - SLmillidegree outerAngle, - SLmillibel outerLevel - ); - SLresult (*GetCone) ( - SL3DSourceItf self, - SLmillidegree *pInnerAngle, - SLmillidegree *pOuterAngle, - SLmillibel *pOuterLevel - ); -}; - -/*---------------------------------------------------------------------------*/ -/* 3D Macroscopic Interface */ -/* --------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_3DMACROSCOPIC; - -struct SL3DMacroscopicItf_; -typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf; - -struct SL3DMacroscopicItf_ { - SLresult (*SetSize) ( - SL3DMacroscopicItf self, - SLmillimeter width, - SLmillimeter height, - SLmillimeter depth - ); - SLresult (*GetSize) ( - SL3DMacroscopicItf self, - SLmillimeter *pWidth, - SLmillimeter *pHeight, - SLmillimeter *pDepth - ); - SLresult (*SetOrientationAngles) ( - SL3DMacroscopicItf self, - SLmillidegree heading, - SLmillidegree pitch, - SLmillidegree roll - ); - SLresult (*SetOrientationVectors) ( - SL3DMacroscopicItf self, - const SLVec3D *pFront, - const SLVec3D *pAbove - ); - SLresult (*Rotate) ( - SL3DMacroscopicItf self, - SLmillidegree theta, - const SLVec3D *pAxis - ); - SLresult (*GetOrientationVectors) ( - SL3DMacroscopicItf self, - SLVec3D *pFront, - SLVec3D *pUp - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Mute Solo Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_MUTESOLO; - -struct SLMuteSoloItf_; -typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf; - -struct SLMuteSoloItf_ { - SLresult (*SetChannelMute) ( - SLMuteSoloItf self, - SLuint8 chan, - SLboolean mute - ); - SLresult (*GetChannelMute) ( - SLMuteSoloItf self, - SLuint8 chan, - SLboolean *pMute - ); - SLresult (*SetChannelSolo) ( - SLMuteSoloItf self, - SLuint8 chan, - SLboolean solo - ); - SLresult (*GetChannelSolo) ( - SLMuteSoloItf self, - SLuint8 chan, - SLboolean *pSolo - ); - SLresult (*GetNumChannels) ( - SLMuteSoloItf self, - SLuint8 *pNumChannels - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Dynamic Interface Management Interface and associated types and macros */ -/* --------------------------------------------------------------------------*/ - -#define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001) -#define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002) -#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003) -#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004) -#define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005) - - - - -extern SL_API const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT; - -struct SLDynamicInterfaceManagementItf_; -typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf; - -typedef void (SLAPIENTRY *slDynamicInterfaceManagementCallback) ( - SLDynamicInterfaceManagementItf caller, - void * pContext, - SLuint32 event, - SLresult result, - const SLInterfaceID iid -); - - -struct SLDynamicInterfaceManagementItf_ { - SLresult (*AddInterface) ( - SLDynamicInterfaceManagementItf self, - const SLInterfaceID iid, - SLboolean async - ); - SLresult (*RemoveInterface) ( - SLDynamicInterfaceManagementItf self, - const SLInterfaceID iid - ); - SLresult (*ResumeInterface) ( - SLDynamicInterfaceManagementItf self, - const SLInterfaceID iid, - SLboolean async - ); - SLresult (*RegisterCallback) ( - SLDynamicInterfaceManagementItf self, - slDynamicInterfaceManagementCallback callback, - void * pContext - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Midi Message Interface and associated types */ -/* --------------------------------------------------------------------------*/ - -#define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001) -#define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002) -#define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003) -#define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004) -#define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005) -#define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006) -#define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007) - - -extern SL_API const SLInterfaceID SL_IID_MIDIMESSAGE; - -struct SLMIDIMessageItf_; -typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf; - -typedef void (SLAPIENTRY *slMetaEventCallback) ( - SLMIDIMessageItf caller, - void *pContext, - SLuint8 type, - SLuint32 length, - const SLuint8 *pData, - SLuint32 tick, - SLuint16 track -); - -typedef void (SLAPIENTRY *slMIDIMessageCallback) ( - SLMIDIMessageItf caller, - void *pContext, - SLuint8 statusByte, - SLuint32 length, - const SLuint8 *pData, - SLuint32 tick, - SLuint16 track -); - -struct SLMIDIMessageItf_ { - SLresult (*SendMessage) ( - SLMIDIMessageItf self, - const SLuint8 *data, - SLuint32 length - ); - SLresult (*RegisterMetaEventCallback) ( - SLMIDIMessageItf self, - slMetaEventCallback callback, - void *pContext - ); - SLresult (*RegisterMIDIMessageCallback) ( - SLMIDIMessageItf self, - slMIDIMessageCallback callback, - void *pContext - ); - SLresult (*AddMIDIMessageCallbackFilter) ( - SLMIDIMessageItf self, - SLuint32 messageType - ); - SLresult (*ClearMIDIMessageCallbackFilter) ( - SLMIDIMessageItf self - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Midi Mute Solo interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_MIDIMUTESOLO; - -struct SLMIDIMuteSoloItf_; -typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf; - -struct SLMIDIMuteSoloItf_ { - SLresult (*SetChannelMute) ( - SLMIDIMuteSoloItf self, - SLuint8 channel, - SLboolean mute - ); - SLresult (*GetChannelMute) ( - SLMIDIMuteSoloItf self, - SLuint8 channel, - SLboolean *pMute - ); - SLresult (*SetChannelSolo) ( - SLMIDIMuteSoloItf self, - SLuint8 channel, - SLboolean solo - ); - SLresult (*GetChannelSolo) ( - SLMIDIMuteSoloItf self, - SLuint8 channel, - SLboolean *pSolo - ); - SLresult (*GetTrackCount) ( - SLMIDIMuteSoloItf self, - SLuint16 *pCount - ); - SLresult (*SetTrackMute) ( - SLMIDIMuteSoloItf self, - SLuint16 track, - SLboolean mute - ); - SLresult (*GetTrackMute) ( - SLMIDIMuteSoloItf self, - SLuint16 track, - SLboolean *pMute - ); - SLresult (*SetTrackSolo) ( - SLMIDIMuteSoloItf self, - SLuint16 track, - SLboolean solo - ); - SLresult (*GetTrackSolo) ( - SLMIDIMuteSoloItf self, - SLuint16 track, - SLboolean *pSolo - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Midi Tempo interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_MIDITEMPO; - -struct SLMIDITempoItf_; -typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf; - -struct SLMIDITempoItf_ { - SLresult (*SetTicksPerQuarterNote) ( - SLMIDITempoItf self, - SLuint32 tpqn - ); - SLresult (*GetTicksPerQuarterNote) ( - SLMIDITempoItf self, - SLuint32 *pTpqn - ); - SLresult (*SetMicrosecondsPerQuarterNote) ( - SLMIDITempoItf self, - SLmicrosecond uspqn - ); - SLresult (*GetMicrosecondsPerQuarterNote) ( - SLMIDITempoItf self, - SLmicrosecond *uspqn - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Midi Time interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_MIDITIME; - -struct SLMIDITimeItf_; -typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf; - -struct SLMIDITimeItf_ { - SLresult (*GetDuration) ( - SLMIDITimeItf self, - SLuint32 *pDuration - ); - SLresult (*SetPosition) ( - SLMIDITimeItf self, - SLuint32 position - ); - SLresult (*GetPosition) ( - SLMIDITimeItf self, - SLuint32 *pPosition - ); - SLresult (*SetLoopPoints) ( - SLMIDITimeItf self, - SLuint32 startTick, - SLuint32 numTicks - ); - SLresult (*GetLoopPoints) ( - SLMIDITimeItf self, - SLuint32 *pStartTick, - SLuint32 *pNumTicks - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Audio Decoder Capabilities Interface */ -/* --------------------------------------------------------------------------*/ - -/*Audio Codec related defines*/ - -#define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001) -#define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002) - -#define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001) -#define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002) -#define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003) -#define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004) -#define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005) -#define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006) -#define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007) -#define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008) - -#define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001) - -#define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001) -#define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002) -#define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003) - -#define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001) -#define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002) -#define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003) -#define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004) - -#define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001) - -#define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001) -#define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002) -#define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003) -#define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004) -#define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005) -#define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006) - -#define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001) - -#define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001) - -#define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001) - -#define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001) -#define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002) -#define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003) -#define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004) -#define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005) -#define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006) -#define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007) -#define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008) -#define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009) -#define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A) - -#define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001) -#define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002) -#define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003) -#define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004) -#define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005) -#define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006) -#define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007) - -#define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001) -#define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002) -#define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003) -#define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004) - -#define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001) -#define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002) -#define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003) -#define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004) -#define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005) -#define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006) -#define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007) -#define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008) - -#define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001) - -#define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001) -#define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002) -#define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003) -#define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004) - -typedef struct SLAudioCodecDescriptor_ { - SLuint32 maxChannels; - SLuint32 minBitsPerSample; - SLuint32 maxBitsPerSample; - SLmilliHertz minSampleRate; - SLmilliHertz maxSampleRate; - SLboolean isFreqRangeContinuous; - SLmilliHertz *pSampleRatesSupported; - SLuint32 numSampleRatesSupported; - SLuint32 minBitRate; - SLuint32 maxBitRate; - SLboolean isBitrateRangeContinuous; - SLuint32 *pBitratesSupported; - SLuint32 numBitratesSupported; - SLuint32 profileSetting; - SLuint32 modeSetting; -} SLAudioCodecDescriptor; - -/*Structure used to retrieve the profile and level settings supported by an audio encoder */ - -typedef struct SLAudioCodecProfileMode_ { - SLuint32 profileSetting; - SLuint32 modeSetting; -} SLAudioCodecProfileMode; - -extern SL_API const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES; - -struct SLAudioDecoderCapabilitiesItf_; -typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf; - -struct SLAudioDecoderCapabilitiesItf_ { - SLresult (*GetAudioDecoders) ( - SLAudioDecoderCapabilitiesItf self, - SLuint32 * pNumDecoders , - SLuint32 *pDecoderIds - ); - SLresult (*GetAudioDecoderCapabilities) ( - SLAudioDecoderCapabilitiesItf self, - SLuint32 decoderId, - SLuint32 *pIndex, - SLAudioCodecDescriptor *pDescriptor - ); -}; - - - - -/*---------------------------------------------------------------------------*/ -/* Audio Encoder Capabilities Interface */ -/* --------------------------------------------------------------------------*/ - -/* Structure used when setting audio encoding parameters */ - -typedef struct SLAudioEncoderSettings_ { - SLuint32 encoderId; - SLuint32 channelsIn; - SLuint32 channelsOut; - SLmilliHertz sampleRate; - SLuint32 bitRate; - SLuint32 bitsPerSample; - SLuint32 rateControl; - SLuint32 profileSetting; - SLuint32 levelSetting; - SLuint32 channelMode; - SLuint32 streamFormat; - SLuint32 encodeOptions; - SLuint32 blockAlignment; -} SLAudioEncoderSettings; - -extern SL_API const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES; - -struct SLAudioEncoderCapabilitiesItf_; -typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf; - -struct SLAudioEncoderCapabilitiesItf_ { - SLresult (*GetAudioEncoders) ( - SLAudioEncoderCapabilitiesItf self, - SLuint32 *pNumEncoders , - SLuint32 *pEncoderIds - ); - SLresult (*GetAudioEncoderCapabilities) ( - SLAudioEncoderCapabilitiesItf self, - SLuint32 encoderId, - SLuint32 *pIndex, - SLAudioCodecDescriptor * pDescriptor - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Audio Encoder Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_AUDIOENCODER; - -struct SLAudioEncoderItf_; -typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf; - -struct SLAudioEncoderItf_ { - SLresult (*SetEncoderSettings) ( - SLAudioEncoderItf self, - SLAudioEncoderSettings *pSettings - ); - SLresult (*GetEncoderSettings) ( - SLAudioEncoderItf self, - SLAudioEncoderSettings *pSettings - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Bass Boost Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_BASSBOOST; - -struct SLBassBoostItf_; -typedef const struct SLBassBoostItf_ * const * SLBassBoostItf; - -struct SLBassBoostItf_ { - SLresult (*SetEnabled)( - SLBassBoostItf self, - SLboolean enabled - ); - SLresult (*IsEnabled)( - SLBassBoostItf self, - SLboolean *pEnabled - ); - SLresult (*SetStrength)( - SLBassBoostItf self, - SLpermille strength - ); - SLresult (*GetRoundedStrength)( - SLBassBoostItf self, - SLpermille *pStrength - ); - SLresult (*IsStrengthSupported)( - SLBassBoostItf self, - SLboolean *pSupported - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Pitch Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_PITCH; - -struct SLPitchItf_; -typedef const struct SLPitchItf_ * const * SLPitchItf; - -struct SLPitchItf_ { - SLresult (*SetPitch) ( - SLPitchItf self, - SLpermille pitch - ); - SLresult (*GetPitch) ( - SLPitchItf self, - SLpermille *pPitch - ); - SLresult (*GetPitchCapabilities) ( - SLPitchItf self, - SLpermille *pMinPitch, - SLpermille *pMaxPitch - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Rate Pitch Interface */ -/* RatePitchItf is an interface for controlling the rate a sound is played */ -/* back. A change in rate will cause a change in pitch. */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_RATEPITCH; - -struct SLRatePitchItf_; -typedef const struct SLRatePitchItf_ * const * SLRatePitchItf; - -struct SLRatePitchItf_ { - SLresult (*SetRate) ( - SLRatePitchItf self, - SLpermille rate - ); - SLresult (*GetRate) ( - SLRatePitchItf self, - SLpermille *pRate - ); - SLresult (*GetRatePitchCapabilities) ( - SLRatePitchItf self, - SLpermille *pMinRate, - SLpermille *pMaxRate - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Virtualizer Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_VIRTUALIZER; - -struct SLVirtualizerItf_; -typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf; - -struct SLVirtualizerItf_ { - SLresult (*SetEnabled)( - SLVirtualizerItf self, - SLboolean enabled - ); - SLresult (*IsEnabled)( - SLVirtualizerItf self, - SLboolean *pEnabled - ); - SLresult (*SetStrength)( - SLVirtualizerItf self, - SLpermille strength - ); - SLresult (*GetRoundedStrength)( - SLVirtualizerItf self, - SLpermille *pStrength - ); - SLresult (*IsStrengthSupported)( - SLVirtualizerItf self, - SLboolean *pSupported - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Visualization Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_VISUALIZATION; - -struct SLVisualizationItf_; -typedef const struct SLVisualizationItf_ * const * SLVisualizationItf; - -typedef void (SLAPIENTRY *slVisualizationCallback) ( - void *pContext, - const SLuint8 waveform[], - const SLuint8 fft[], - SLmilliHertz samplerate -); - -struct SLVisualizationItf_{ - SLresult (*RegisterVisualizationCallback)( - SLVisualizationItf self, - slVisualizationCallback callback, - void *pContext, - SLmilliHertz rate - ); - SLresult (*GetMaxRate)( - SLVisualizationItf self, - SLmilliHertz* pRate - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Engine Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_ENGINE; - -struct SLEngineItf_; -typedef const struct SLEngineItf_ * const * SLEngineItf; - - -struct SLEngineItf_ { - - SLresult (*CreateLEDDevice) ( - SLEngineItf self, - SLObjectItf * pDevice, - SLuint32 deviceID, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateVibraDevice) ( - SLEngineItf self, - SLObjectItf * pDevice, - SLuint32 deviceID, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateAudioPlayer) ( - SLEngineItf self, - SLObjectItf * pPlayer, - SLDataSource *pAudioSrc, - SLDataSink *pAudioSnk, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateAudioRecorder) ( - SLEngineItf self, - SLObjectItf * pRecorder, - SLDataSource *pAudioSrc, - SLDataSink *pAudioSnk, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateMidiPlayer) ( - SLEngineItf self, - SLObjectItf * pPlayer, - SLDataSource *pMIDISrc, - SLDataSource *pBankSrc, - SLDataSink *pAudioOutput, - SLDataSink *pVibra, - SLDataSink *pLEDArray, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateListener) ( - SLEngineItf self, - SLObjectItf * pListener, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*Create3DGroup) ( - SLEngineItf self, - SLObjectItf * pGroup, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateOutputMix) ( - SLEngineItf self, - SLObjectItf * pMix, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateMetadataExtractor) ( - SLEngineItf self, - SLObjectItf * pMetadataExtractor, - SLDataSource * pDataSource, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*CreateExtensionObject) ( - SLEngineItf self, - SLObjectItf * pObject, - void * pParameters, - SLuint32 objectID, - SLuint32 numInterfaces, - const SLInterfaceID * pInterfaceIds, - const SLboolean * pInterfaceRequired - ); - SLresult (*QueryNumSupportedInterfaces) ( - SLEngineItf self, - SLuint32 objectID, - SLuint32 * pNumSupportedInterfaces - ); - SLresult (*QuerySupportedInterfaces) ( - SLEngineItf self, - SLuint32 objectID, - SLuint32 index, - SLInterfaceID * pInterfaceId - ); - SLresult (*QueryNumSupportedExtensions) ( - SLEngineItf self, - SLuint32 * pNumExtensions - ); - SLresult (*QuerySupportedExtension) ( - SLEngineItf self, - SLuint32 index, - SLchar * pExtensionName, - SLint16 * pNameLength - ); - SLresult (*IsExtensionSupported) ( - SLEngineItf self, - const SLchar * pExtensionName, - SLboolean * pSupported - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Engine Capabilities Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_ENGINECAPABILITIES; - -struct SLEngineCapabilitiesItf_; -typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf; - -struct SLEngineCapabilitiesItf_ { - SLresult (*QuerySupportedProfiles) ( - SLEngineCapabilitiesItf self, - SLuint16 *pProfilesSupported - ); - SLresult (*QueryAvailableVoices) ( - SLEngineCapabilitiesItf self, - SLuint16 voiceType, - SLint16 *pNumMaxVoices, - SLboolean *pIsAbsoluteMax, - SLint16 *pNumFreeVoices - ); - SLresult (*QueryNumberOfMIDISynthesizers) ( - SLEngineCapabilitiesItf self, - SLint16 *pNumMIDIsynthesizers - ); - SLresult (*QueryAPIVersion) ( - SLEngineCapabilitiesItf self, - SLint16 *pMajor, - SLint16 *pMinor, - SLint16 *pStep - ); - SLresult (*QueryLEDCapabilities) ( - SLEngineCapabilitiesItf self, - SLuint32 *pIndex, - SLuint32 *pLEDDeviceID, - SLLEDDescriptor *pDescriptor - ); - SLresult (*QueryVibraCapabilities) ( - SLEngineCapabilitiesItf self, - SLuint32 *pIndex, - SLuint32 *pVibraDeviceID, - SLVibraDescriptor *pDescriptor - ); - SLresult (*IsThreadSafe) ( - SLEngineCapabilitiesItf self, - SLboolean *pIsThreadSafe - ); -}; - -/*---------------------------------------------------------------------------*/ -/* Thread Sync Interface */ -/* --------------------------------------------------------------------------*/ - - -extern SL_API const SLInterfaceID SL_IID_THREADSYNC; - -struct SLThreadSyncItf_; -typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf; - - -struct SLThreadSyncItf_ { - SLresult (*EnterCriticalSection) ( - SLThreadSyncItf self - ); - SLresult (*ExitCriticalSection) ( - SLThreadSyncItf self - ); -}; - - -/*****************************************************************************/ -/* SL engine constructor */ -/*****************************************************************************/ - -#define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001) -#define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002) - -typedef struct SLEngineOption_ { - SLuint32 feature; - SLuint32 data; -} SLEngineOption; - - -SL_API SLresult SLAPIENTRY slCreateEngine( - SLObjectItf *pEngine, - SLuint32 numOptions, - const SLEngineOption *pEngineOptions, - SLuint32 numInterfaces, - const SLInterfaceID *pInterfaceIds, - const SLboolean * pInterfaceRequired -); - -SL_API SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces( - SLuint32 * pNumSupportedInterfaces -); - -SL_API SLresult SLAPIENTRY slQuerySupportedEngineInterfaces( - SLuint32 index, - SLInterfaceID * pInterfaceId -); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* OPENSL_ES_H_ */ diff --git a/ndk/platforms/android-20/include/SLES/OpenSLES_Android.h b/ndk/platforms/android-20/include/SLES/OpenSLES_Android.h deleted file mode 100644 index dcf343279..000000000 --- a/ndk/platforms/android-20/include/SLES/OpenSLES_Android.h +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OPENSL_ES_ANDROID_H_ -#define OPENSL_ES_ANDROID_H_ - -#include "OpenSLES_AndroidConfiguration.h" -#include "OpenSLES_AndroidMetadata.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#include "OpenSLES.h" - -/*---------------------------------------------------------------------------*/ -/* Android common types */ -/*---------------------------------------------------------------------------*/ - -typedef sl_int64_t SLAint64; /* 64 bit signed integer */ - -typedef sl_uint64_t SLAuint64; /* 64 bit unsigned integer */ - -/*---------------------------------------------------------------------------*/ -/* Android PCM Data Format */ -/*---------------------------------------------------------------------------*/ - -/* The following pcm representations and data formats map to those in OpenSLES 1.1 */ -#define SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT ((SLuint32) 0x00000001) -#define SL_ANDROID_PCM_REPRESENTATION_UNSIGNED_INT ((SLuint32) 0x00000002) -#define SL_ANDROID_PCM_REPRESENTATION_FLOAT ((SLuint32) 0x00000003) - -#define SL_ANDROID_DATAFORMAT_PCM_EX ((SLuint32) 0x00000004) - -typedef struct SLAndroidDataFormat_PCM_EX_ { - SLuint32 formatType; - SLuint32 numChannels; - SLuint32 sampleRate; - SLuint32 bitsPerSample; - SLuint32 containerSize; - SLuint32 channelMask; - SLuint32 endianness; - SLuint32 representation; -} SLAndroidDataFormat_PCM_EX; - -/*---------------------------------------------------------------------------*/ -/* Android Effect interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_ANDROIDEFFECT; - -/** Android Effect interface methods */ - -struct SLAndroidEffectItf_; -typedef const struct SLAndroidEffectItf_ * const * SLAndroidEffectItf; - -struct SLAndroidEffectItf_ { - - SLresult (*CreateEffect) (SLAndroidEffectItf self, - SLInterfaceID effectImplementationId); - - SLresult (*ReleaseEffect) (SLAndroidEffectItf self, - SLInterfaceID effectImplementationId); - - SLresult (*SetEnabled) (SLAndroidEffectItf self, - SLInterfaceID effectImplementationId, - SLboolean enabled); - - SLresult (*IsEnabled) (SLAndroidEffectItf self, - SLInterfaceID effectImplementationId, - SLboolean *pEnabled); - - SLresult (*SendCommand) (SLAndroidEffectItf self, - SLInterfaceID effectImplementationId, - SLuint32 command, - SLuint32 commandSize, - void *pCommandData, - SLuint32 *replySize, - void *pReplyData); -}; - - -/*---------------------------------------------------------------------------*/ -/* Android Effect Send interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_ANDROIDEFFECTSEND; - -/** Android Effect Send interface methods */ - -struct SLAndroidEffectSendItf_; -typedef const struct SLAndroidEffectSendItf_ * const * SLAndroidEffectSendItf; - -struct SLAndroidEffectSendItf_ { - SLresult (*EnableEffectSend) ( - SLAndroidEffectSendItf self, - SLInterfaceID effectImplementationId, - SLboolean enable, - SLmillibel initialLevel - ); - SLresult (*IsEnabled) ( - SLAndroidEffectSendItf self, - SLInterfaceID effectImplementationId, - SLboolean *pEnable - ); - SLresult (*SetDirectLevel) ( - SLAndroidEffectSendItf self, - SLmillibel directLevel - ); - SLresult (*GetDirectLevel) ( - SLAndroidEffectSendItf self, - SLmillibel *pDirectLevel - ); - SLresult (*SetSendLevel) ( - SLAndroidEffectSendItf self, - SLInterfaceID effectImplementationId, - SLmillibel sendLevel - ); - SLresult (*GetSendLevel)( - SLAndroidEffectSendItf self, - SLInterfaceID effectImplementationId, - SLmillibel *pSendLevel - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Android Effect Capabilities interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_ANDROIDEFFECTCAPABILITIES; - -/** Android Effect Capabilities interface methods */ - -struct SLAndroidEffectCapabilitiesItf_; -typedef const struct SLAndroidEffectCapabilitiesItf_ * const * SLAndroidEffectCapabilitiesItf; - -struct SLAndroidEffectCapabilitiesItf_ { - - SLresult (*QueryNumEffects) (SLAndroidEffectCapabilitiesItf self, - SLuint32 *pNumSupportedEffects); - - - SLresult (*QueryEffect) (SLAndroidEffectCapabilitiesItf self, - SLuint32 index, - SLInterfaceID *pEffectType, - SLInterfaceID *pEffectImplementation, - SLchar *pName, - SLuint16 *pNameSize); -}; - - -/*---------------------------------------------------------------------------*/ -/* Android Configuration interface */ -/*---------------------------------------------------------------------------*/ -extern SL_API const SLInterfaceID SL_IID_ANDROIDCONFIGURATION; - -/** Android Configuration interface methods */ - -struct SLAndroidConfigurationItf_; -typedef const struct SLAndroidConfigurationItf_ * const * SLAndroidConfigurationItf; - -struct SLAndroidConfigurationItf_ { - - SLresult (*SetConfiguration) (SLAndroidConfigurationItf self, - const SLchar *configKey, - const void *pConfigValue, - SLuint32 valueSize); - - SLresult (*GetConfiguration) (SLAndroidConfigurationItf self, - const SLchar *configKey, - SLuint32 *pValueSize, - void *pConfigValue - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Android Simple Buffer Queue Interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_ANDROIDSIMPLEBUFFERQUEUE; - -struct SLAndroidSimpleBufferQueueItf_; -typedef const struct SLAndroidSimpleBufferQueueItf_ * const * SLAndroidSimpleBufferQueueItf; - -typedef void (SLAPIENTRY *slAndroidSimpleBufferQueueCallback)( - SLAndroidSimpleBufferQueueItf caller, - void *pContext -); - -/** Android simple buffer queue state **/ - -typedef struct SLAndroidSimpleBufferQueueState_ { - SLuint32 count; - SLuint32 index; -} SLAndroidSimpleBufferQueueState; - - -struct SLAndroidSimpleBufferQueueItf_ { - SLresult (*Enqueue) ( - SLAndroidSimpleBufferQueueItf self, - const void *pBuffer, - SLuint32 size - ); - SLresult (*Clear) ( - SLAndroidSimpleBufferQueueItf self - ); - SLresult (*GetState) ( - SLAndroidSimpleBufferQueueItf self, - SLAndroidSimpleBufferQueueState *pState - ); - SLresult (*RegisterCallback) ( - SLAndroidSimpleBufferQueueItf self, - slAndroidSimpleBufferQueueCallback callback, - void* pContext - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Android Buffer Queue Interface */ -/*---------------------------------------------------------------------------*/ - -extern SL_API const SLInterfaceID SL_IID_ANDROIDBUFFERQUEUESOURCE; - -struct SLAndroidBufferQueueItf_; -typedef const struct SLAndroidBufferQueueItf_ * const * SLAndroidBufferQueueItf; - -#define SL_ANDROID_ITEMKEY_NONE ((SLuint32) 0x00000000) -#define SL_ANDROID_ITEMKEY_EOS ((SLuint32) 0x00000001) -#define SL_ANDROID_ITEMKEY_DISCONTINUITY ((SLuint32) 0x00000002) -#define SL_ANDROID_ITEMKEY_BUFFERQUEUEEVENT ((SLuint32) 0x00000003) -#define SL_ANDROID_ITEMKEY_FORMAT_CHANGE ((SLuint32) 0x00000004) - -#define SL_ANDROIDBUFFERQUEUEEVENT_NONE ((SLuint32) 0x00000000) -#define SL_ANDROIDBUFFERQUEUEEVENT_PROCESSED ((SLuint32) 0x00000001) -#if 0 // reserved for future use -#define SL_ANDROIDBUFFERQUEUEEVENT_UNREALIZED ((SLuint32) 0x00000002) -#define SL_ANDROIDBUFFERQUEUEEVENT_CLEARED ((SLuint32) 0x00000004) -#define SL_ANDROIDBUFFERQUEUEEVENT_STOPPED ((SLuint32) 0x00000008) -#define SL_ANDROIDBUFFERQUEUEEVENT_ERROR ((SLuint32) 0x00000010) -#define SL_ANDROIDBUFFERQUEUEEVENT_CONTENT_END ((SLuint32) 0x00000020) -#endif - -typedef struct SLAndroidBufferItem_ { - SLuint32 itemKey; // identifies the item - SLuint32 itemSize; - SLuint8 itemData[0]; -} SLAndroidBufferItem; - -typedef SLresult (SLAPIENTRY *slAndroidBufferQueueCallback)( - SLAndroidBufferQueueItf caller,/* input */ - void *pCallbackContext, /* input */ - void *pBufferContext, /* input */ - void *pBufferData, /* input */ - SLuint32 dataSize, /* input */ - SLuint32 dataUsed, /* input */ - const SLAndroidBufferItem *pItems,/* input */ - SLuint32 itemsLength /* input */ -); - -typedef struct SLAndroidBufferQueueState_ { - SLuint32 count; - SLuint32 index; -} SLAndroidBufferQueueState; - -struct SLAndroidBufferQueueItf_ { - SLresult (*RegisterCallback) ( - SLAndroidBufferQueueItf self, - slAndroidBufferQueueCallback callback, - void* pCallbackContext - ); - - SLresult (*Clear) ( - SLAndroidBufferQueueItf self - ); - - SLresult (*Enqueue) ( - SLAndroidBufferQueueItf self, - void *pBufferContext, - void *pData, - SLuint32 dataLength, - const SLAndroidBufferItem *pItems, - SLuint32 itemsLength - ); - - SLresult (*GetState) ( - SLAndroidBufferQueueItf self, - SLAndroidBufferQueueState *pState - ); - - SLresult (*SetCallbackEventsMask) ( - SLAndroidBufferQueueItf self, - SLuint32 eventFlags - ); - - SLresult (*GetCallbackEventsMask) ( - SLAndroidBufferQueueItf self, - SLuint32 *pEventFlags - ); -}; - - -/*---------------------------------------------------------------------------*/ -/* Android File Descriptor Data Locator */ -/*---------------------------------------------------------------------------*/ - -/** Addendum to Data locator macros */ -#define SL_DATALOCATOR_ANDROIDFD ((SLuint32) 0x800007BC) - -#define SL_DATALOCATOR_ANDROIDFD_USE_FILE_SIZE ((SLAint64) 0xFFFFFFFFFFFFFFFFll) - -/** File Descriptor-based data locator definition, locatorType must be SL_DATALOCATOR_ANDROIDFD */ -typedef struct SLDataLocator_AndroidFD_ { - SLuint32 locatorType; - SLint32 fd; - SLAint64 offset; - SLAint64 length; -} SLDataLocator_AndroidFD; - - -/*---------------------------------------------------------------------------*/ -/* Android Android Simple Buffer Queue Data Locator */ -/*---------------------------------------------------------------------------*/ - -/** Addendum to Data locator macros */ -#define SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE ((SLuint32) 0x800007BD) - -/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE*/ -typedef struct SLDataLocator_AndroidSimpleBufferQueue { - SLuint32 locatorType; - SLuint32 numBuffers; -} SLDataLocator_AndroidSimpleBufferQueue; - - -/*---------------------------------------------------------------------------*/ -/* Android Buffer Queue Data Locator */ -/*---------------------------------------------------------------------------*/ - -/** Addendum to Data locator macros */ -#define SL_DATALOCATOR_ANDROIDBUFFERQUEUE ((SLuint32) 0x800007BE) - -/** Android Buffer Queue-based data locator definition, - * locatorType must be SL_DATALOCATOR_ANDROIDBUFFERQUEUE */ -typedef struct SLDataLocator_AndroidBufferQueue_ { - SLuint32 locatorType; - SLuint32 numBuffers; -} SLDataLocator_AndroidBufferQueue; - -/** - * MIME types required for data in Android Buffer Queues - */ -#define SL_ANDROID_MIME_AACADTS ((SLchar *) "audio/vnd.android.aac-adts") - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OPENSL_ES_ANDROID_H_ */ diff --git a/ndk/platforms/android-20/include/SLES/OpenSLES_AndroidConfiguration.h b/ndk/platforms/android-20/include/SLES/OpenSLES_AndroidConfiguration.h deleted file mode 100644 index 01f460de9..000000000 --- a/ndk/platforms/android-20/include/SLES/OpenSLES_AndroidConfiguration.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OPENSL_ES_ANDROIDCONFIGURATION_H_ -#define OPENSL_ES_ANDROIDCONFIGURATION_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/*---------------------------------------------------------------------------*/ -/* Android AudioRecorder configuration */ -/*---------------------------------------------------------------------------*/ - -/** Audio recording preset */ -/** Audio recording preset key */ -#define SL_ANDROID_KEY_RECORDING_PRESET ((const SLchar*) "androidRecordingPreset") -/** Audio recording preset values */ -/** preset "none" cannot be set, it is used to indicate the current settings - * do not match any of the presets. */ -#define SL_ANDROID_RECORDING_PRESET_NONE ((SLuint32) 0x00000000) -/** generic recording configuration on the platform */ -#define SL_ANDROID_RECORDING_PRESET_GENERIC ((SLuint32) 0x00000001) -/** uses the microphone audio source with the same orientation as the camera - * if available, the main device microphone otherwise */ -#define SL_ANDROID_RECORDING_PRESET_CAMCORDER ((SLuint32) 0x00000002) -/** uses the main microphone tuned for voice recognition */ -#define SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION ((SLuint32) 0x00000003) -/** uses the main microphone tuned for audio communications */ -#define SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION ((SLuint32) 0x00000004) - -/*---------------------------------------------------------------------------*/ -/* Android AudioPlayer configuration */ -/*---------------------------------------------------------------------------*/ - -/** Audio playback stream type */ -/** Audio playback stream type key */ -#define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar*) "androidPlaybackStreamType") - -/** Audio playback stream type values */ -/* same as android.media.AudioManager.STREAM_VOICE_CALL */ -#define SL_ANDROID_STREAM_VOICE ((SLint32) 0x00000000) -/* same as android.media.AudioManager.STREAM_SYSTEM */ -#define SL_ANDROID_STREAM_SYSTEM ((SLint32) 0x00000001) -/* same as android.media.AudioManager.STREAM_RING */ -#define SL_ANDROID_STREAM_RING ((SLint32) 0x00000002) -/* same as android.media.AudioManager.STREAM_MUSIC */ -#define SL_ANDROID_STREAM_MEDIA ((SLint32) 0x00000003) -/* same as android.media.AudioManager.STREAM_ALARM */ -#define SL_ANDROID_STREAM_ALARM ((SLint32) 0x00000004) -/* same as android.media.AudioManager.STREAM_NOTIFICATION */ -#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005) - - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */ diff --git a/ndk/platforms/android-20/include/SLES/OpenSLES_AndroidMetadata.h b/ndk/platforms/android-20/include/SLES/OpenSLES_AndroidMetadata.h deleted file mode 100644 index 01e33b8d6..000000000 --- a/ndk/platforms/android-20/include/SLES/OpenSLES_AndroidMetadata.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OPENSL_ES_ANDROIDMETADATA_H_ -#define OPENSL_ES_ANDROIDMETADATA_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/*---------------------------------------------------------------------------*/ -/* Android metadata keys */ -/*---------------------------------------------------------------------------*/ - -/** - * Additional metadata keys to be used in SLMetadataExtractionItf: - * the ANDROID_KEY_PCMFORMAT_* keys follow the fields of the SLDataFormat_PCM struct, and as such - * all values corresponding to these keys are of SLuint32 type, and are defined as the fields - * of the same name in SLDataFormat_PCM. The exception is that sample rate is expressed here - * in Hz units, rather than in milliHz units. - */ -#define ANDROID_KEY_PCMFORMAT_NUMCHANNELS "AndroidPcmFormatNumChannels" -#define ANDROID_KEY_PCMFORMAT_SAMPLERATE "AndroidPcmFormatSampleRate" -#define ANDROID_KEY_PCMFORMAT_BITSPERSAMPLE "AndroidPcmFormatBitsPerSample" -#define ANDROID_KEY_PCMFORMAT_CONTAINERSIZE "AndroidPcmFormatContainerSize" -#define ANDROID_KEY_PCMFORMAT_CHANNELMASK "AndroidPcmFormatChannelMask" -#define ANDROID_KEY_PCMFORMAT_ENDIANNESS "AndroidPcmFormatEndianness" - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OPENSL_ES_ANDROIDMETADATA_H_ */ diff --git a/ndk/platforms/android-20/include/SLES/OpenSLES_Platform.h b/ndk/platforms/android-20/include/SLES/OpenSLES_Platform.h deleted file mode 100644 index 527693d8e..000000000 --- a/ndk/platforms/android-20/include/SLES/OpenSLES_Platform.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007-2009 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and /or associated documentation files (the "Materials "), to - * deal in the Materials without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Materials, and to permit persons to whom the Materials are - * furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE - * MATERIALS. - * - * OpenSLES_Platform.h - OpenSL ES version 1.0 - * - */ - -/****************************************************************************/ -/* NOTE: This file contains definitions for the base types and the */ -/* SLAPIENTRY macro. This file **WILL NEED TO BE EDITED** to provide */ -/* the correct definitions specific to the platform being used. */ -/****************************************************************************/ - -#ifndef _OPENSLES_PLATFORM_H_ -#define _OPENSLES_PLATFORM_H_ - -typedef unsigned char sl_uint8_t; -typedef signed char sl_int8_t; -typedef unsigned short sl_uint16_t; -typedef signed short sl_int16_t; -typedef unsigned int /*long*/ sl_uint32_t; -typedef signed int /*long*/ sl_int32_t; -typedef long long sl_int64_t; -typedef unsigned long long sl_uint64_t; - -#ifndef SL_API -#ifdef __GNUC__ -#define SL_API /* override per-platform */ -#else -#define SL_API __declspec(dllimport) -#endif -#endif - -#ifndef SLAPIENTRY -#define SLAPIENTRY -#endif - -#endif /* _OPENSLES_PLATFORM_H_ */ diff --git a/ndk/platforms/android-20/include/media/NdkMediaCodec.h b/ndk/platforms/android-20/include/media/NdkMediaCodec.h deleted file mode 100644 index c07f4c9f6..000000000 --- a/ndk/platforms/android-20/include/media/NdkMediaCodec.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This file defines an NDK API. - * Do not remove methods. - * Do not change method signatures. - * Do not change the value of constants. - * Do not change the size of any of the classes defined in here. - * Do not reference types that are not part of the NDK. - * Do not #include files that aren't part of the NDK. - */ - -#ifndef _NDK_MEDIA_CODEC_H -#define _NDK_MEDIA_CODEC_H - -#include - -#include "NdkMediaCrypto.h" -#include "NdkMediaError.h" -#include "NdkMediaFormat.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -struct AMediaCodec; -typedef struct AMediaCodec AMediaCodec; - -struct AMediaCodecBufferInfo { - int32_t offset; - int32_t size; - int64_t presentationTimeUs; - uint32_t flags; -}; -typedef struct AMediaCodecBufferInfo AMediaCodecBufferInfo; -typedef struct AMediaCodecCryptoInfo AMediaCodecCryptoInfo; - -enum { - AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM = 4, - AMEDIACODEC_CONFIGURE_FLAG_ENCODE = 1, - AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED = -3, - AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED = -2, - AMEDIACODEC_INFO_TRY_AGAIN_LATER = -1 -}; - -/** - * 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 - * encoder or decoder. - */ -AMediaCodec* AMediaCodec_createCodecByName(const char *name); - -/** - * Create codec by mime type. Most applications will use this, specifying a - * mime type obtained from media extractor. - */ -AMediaCodec* AMediaCodec_createDecoderByType(const char *mime_type); - -/** - * Create encoder by name. - */ -AMediaCodec* AMediaCodec_createEncoderByType(const char *mime_type); - -/** - * delete the codec and free its resources - */ -media_status_t AMediaCodec_delete(AMediaCodec*); - -/** - * Configure the codec. For decoding you would typically get the format from an extractor. - */ -media_status_t AMediaCodec_configure( - AMediaCodec*, - const AMediaFormat* format, - ANativeWindow* surface, - AMediaCrypto *crypto, - uint32_t flags); - -/** - * Start the codec. A codec must be configured before it can be started, and must be started - * before buffers can be sent to it. - */ -media_status_t AMediaCodec_start(AMediaCodec*); - -/** - * Stop the codec. - */ -media_status_t AMediaCodec_stop(AMediaCodec*); - -/* - * Flush the codec's input and output. All indices previously returned from calls to - * AMediaCodec_dequeueInputBuffer and AMediaCodec_dequeueOutputBuffer become invalid. - */ -media_status_t AMediaCodec_flush(AMediaCodec*); - -/** - * Get an input buffer. The specified buffer index must have been previously obtained from - * dequeueInputBuffer, and not yet queued. - */ -uint8_t* AMediaCodec_getInputBuffer(AMediaCodec*, size_t idx, size_t *out_size); - -/** - * Get an output buffer. The specified buffer index must have been previously obtained from - * dequeueOutputBuffer, and not yet queued. - */ -uint8_t* AMediaCodec_getOutputBuffer(AMediaCodec*, size_t idx, size_t *out_size); - -/** - * Get the index of the next available input buffer. An app will typically use this with - * getInputBuffer() to get a pointer to the buffer, then copy the data to be encoded or decoded - * into the buffer before passing it to the codec. - */ -ssize_t AMediaCodec_dequeueInputBuffer(AMediaCodec*, int64_t timeoutUs); - -/** - * Send the specified buffer to the codec for processing. - */ -media_status_t AMediaCodec_queueInputBuffer(AMediaCodec*, - size_t idx, off_t offset, size_t size, uint64_t time, uint32_t flags); - -/** - * Send the specified buffer to the codec for processing. - */ -media_status_t AMediaCodec_queueSecureInputBuffer(AMediaCodec*, - size_t idx, off_t offset, AMediaCodecCryptoInfo*, uint64_t time, uint32_t flags); - -/** - * Get the index of the next available buffer of processed data. - */ -ssize_t AMediaCodec_dequeueOutputBuffer(AMediaCodec*, AMediaCodecBufferInfo *info, int64_t timeoutUs); -AMediaFormat* AMediaCodec_getOutputFormat(AMediaCodec*); - -/** - * If you are done with a buffer, use this call to return the buffer to - * the codec. If you previously specified a surface when configuring this - * video decoder you can optionally render the buffer. - */ -media_status_t AMediaCodec_releaseOutputBuffer(AMediaCodec*, size_t idx, bool render); - -/** - * If you are done with a buffer, use this call to update its surface timestamp - * and return it to the codec to render it on the output surface. If you - * have not specified an output surface when configuring this video codec, - * this call will simply return the buffer to the codec. - * - * For more details, see the Java documentation for MediaCodec.releaseOutputBuffer. - */ -media_status_t AMediaCodec_releaseOutputBufferAtTime( - AMediaCodec *mData, size_t idx, int64_t timestampNs); - - -typedef enum { - AMEDIACODECRYPTOINFO_MODE_CLEAR = 0, - AMEDIACODECRYPTOINFO_MODE_AES_CTR = 1 -} cryptoinfo_mode_t; - -/** - * Create an AMediaCodecCryptoInfo from scratch. Use this if you need to use custom - * crypto info, rather than one obtained from AMediaExtractor. - * - * AMediaCodecCryptoInfo describes the structure of an (at least - * partially) encrypted input sample. - * A buffer's data is considered to be partitioned into "subsamples", - * each subsample starts with a (potentially empty) run of plain, - * unencrypted bytes followed by a (also potentially empty) run of - * encrypted bytes. - * numBytesOfClearData can be null to indicate that all data is encrypted. - * This information encapsulates per-sample metadata as outlined in - * ISO/IEC FDIS 23001-7:2011 "Common encryption in ISO base media file format files". - */ -AMediaCodecCryptoInfo *AMediaCodecCryptoInfo_new( - int numsubsamples, - uint8_t key[16], - uint8_t iv[16], - cryptoinfo_mode_t mode, - size_t *clearbytes, - size_t *encryptedbytes); - -/** - * delete an AMediaCodecCryptoInfo created previously with AMediaCodecCryptoInfo_new, or - * obtained from AMediaExtractor - */ -media_status_t AMediaCodecCryptoInfo_delete(AMediaCodecCryptoInfo*); - -/** - * The number of subsamples that make up the buffer's contents. - */ -size_t AMediaCodecCryptoInfo_getNumSubSamples(AMediaCodecCryptoInfo*); - -/** - * A 16-byte opaque key - */ -media_status_t AMediaCodecCryptoInfo_getKey(AMediaCodecCryptoInfo*, uint8_t *dst); - -/** - * A 16-byte initialization vector - */ -media_status_t AMediaCodecCryptoInfo_getIV(AMediaCodecCryptoInfo*, uint8_t *dst); - -/** - * The type of encryption that has been applied, - * one of AMEDIACODECRYPTOINFO_MODE_CLEAR or AMEDIACODECRYPTOINFO_MODE_AES_CTR. - */ -cryptoinfo_mode_t AMediaCodecCryptoInfo_getMode(AMediaCodecCryptoInfo*); - -/** - * The number of leading unencrypted bytes in each subsample. - */ -media_status_t AMediaCodecCryptoInfo_getClearBytes(AMediaCodecCryptoInfo*, size_t *dst); - -/** - * The number of trailing encrypted bytes in each subsample. - */ -media_status_t AMediaCodecCryptoInfo_getEncryptedBytes(AMediaCodecCryptoInfo*, size_t *dst); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif //_NDK_MEDIA_CODEC_H diff --git a/ndk/platforms/android-20/include/media/NdkMediaCrypto.h b/ndk/platforms/android-20/include/media/NdkMediaCrypto.h deleted file mode 100644 index 90374c538..000000000 --- a/ndk/platforms/android-20/include/media/NdkMediaCrypto.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/* - * This file defines an NDK API. - * Do not remove methods. - * Do not change method signatures. - * Do not change the value of constants. - * Do not change the size of any of the classes defined in here. - * Do not reference types that are not part of the NDK. - * Do not #include files that aren't part of the NDK. - */ - -#ifndef _NDK_MEDIA_CRYPTO_H -#define _NDK_MEDIA_CRYPTO_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct AMediaCrypto; -typedef struct AMediaCrypto AMediaCrypto; - -typedef uint8_t AMediaUUID[16]; - -bool AMediaCrypto_isCryptoSchemeSupported(const AMediaUUID uuid); - -bool AMediaCrypto_requiresSecureDecoderComponent(const char *mime); - -AMediaCrypto* AMediaCrypto_new(const AMediaUUID uuid, const void *initData, size_t initDataSize); - -void AMediaCrypto_delete(AMediaCrypto* crypto); - - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _NDK_MEDIA_CRYPTO_H diff --git a/ndk/platforms/android-20/include/media/NdkMediaDrm.h b/ndk/platforms/android-20/include/media/NdkMediaDrm.h deleted file mode 100644 index 10afdd9a6..000000000 --- a/ndk/platforms/android-20/include/media/NdkMediaDrm.h +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This file defines an NDK API. - * Do not remove methods. - * Do not change method signatures. - * Do not change the value of constants. - * Do not change the size of any of the classes defined in here. - * Do not reference types that are not part of the NDK. - * Do not #include files that aren't part of the NDK. - */ - -#ifndef _NDK_MEDIA_DRM_H -#define _NDK_MEDIA_DRM_H - -#include "NdkMediaError.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -struct AMediaDrm; -typedef struct AMediaDrm AMediaDrm; - -typedef struct { - const uint8_t *ptr; - size_t length; -} AMediaDrmByteArray; - -typedef AMediaDrmByteArray AMediaDrmSessionId; -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 - * the provisioning server. The request message data is obtained using - * AMediaDrm_getProvisionRequest. - */ - EVENT_PROVISION_REQUIRED = 1, - - /** - * This event type indicates that the app needs to request keys from a license - * server. The request message data is obtained using AMediaDrm_getKeyRequest. - */ - EVENT_KEY_REQUIRED = 2, - - /** - * This event type indicates that the licensed usage duration for keys in a session - * has expired. The keys are no longer valid. - */ - EVENT_KEY_EXPIRED = 3, - - /** - * This event may indicate some specific vendor-defined condition, see your - * DRM provider documentation for details - */ - EVENT_VENDOR_DEFINED = 4 -} AMediaDrmEventType; - -typedef void (*AMediaDrmEventListener)(AMediaDrm *, const AMediaDrmSessionId *sessionId, - AMediaDrmEventType eventType, int extra, const uint8_t *data, size_t dataSize); - - -/** - * Query if the given scheme identified by its UUID is supported on this device, and - * whether the drm plugin is able to handle the media container format specified by mimeType. - * - * uuid identifies the universal unique ID of the crypto scheme. uuid must be 16 bytes. - * mimeType is the MIME type of the media container, e.g. "video/mp4". If mimeType - * is not known or required, it can be provided as NULL. - */ -bool AMediaDrm_isCryptoSchemeSupported(const uint8_t *uuid, const char *mimeType); - -/** - * Create a MediaDrm instance from a UUID - * uuid identifies the universal unique ID of the crypto scheme. uuid must be 16 bytes. - */ -AMediaDrm* AMediaDrm_createByUUID(const uint8_t *uuid); - -/** - * Release a MediaDrm object - */ -void AMediaDrm_release(AMediaDrm *); - -/** - * Register a callback to be invoked when an event occurs - * - * listener is the callback that will be invoked on event - */ -media_status_t AMediaDrm_setOnEventListener(AMediaDrm *, AMediaDrmEventListener listener); - -/** - * Open a new session with the MediaDrm object. A session ID is returned. - * - * returns MEDIADRM_NOT_PROVISIONED_ERROR if provisioning is needed - * returns MEDIADRM_RESOURCE_BUSY_ERROR if required resources are in use - */ -media_status_t AMediaDrm_openSession(AMediaDrm *, AMediaDrmSessionId *sessionId); - -/** - * Close a session on the MediaDrm object that was previously opened - * with AMediaDrm_openSession. - */ -media_status_t AMediaDrm_closeSession(AMediaDrm *, const AMediaDrmSessionId *sessionId); - -typedef enum AMediaDrmKeyType { - /** - * This key request type species that the keys will be for online use, they will - * not be saved to the device for subsequent use when the device is not connected - * to a network. - */ - KEY_TYPE_STREAMING = 1, - - /** - * This key request type specifies that the keys will be for offline use, they - * will be saved to the device for use when the device is not connected to a network. - */ - KEY_TYPE_OFFLINE = 2, - - /** - * This key request type specifies that previously saved offline keys should be released. - */ - KEY_TYPE_RELEASE = 3 -} AMediaDrmKeyType; - -/** - * Data type containing {key, value} pair - */ -typedef struct AMediaDrmKeyValuePair { - const char *mKey; - const char *mValue; -} AMediaDrmKeyValue; - -/** - * A key request/response exchange occurs between the app and a license server - * to obtain or release keys used to decrypt encrypted content. - * AMediaDrm_getKeyRequest is used to obtain an opaque key request byte array that - * is delivered to the license server. The opaque key request byte array is - * returned in KeyRequest.data. The recommended URL to deliver the key request to - * is returned in KeyRequest.defaultUrl. - * - * After the app has received the key request response from the server, - * it should deliver to the response to the DRM engine plugin using the method - * AMediaDrm_provideKeyResponse. - * - * scope may be a sessionId or a keySetId, depending on the specified keyType. - * When the keyType is KEY_TYPE_STREAMING or KEY_TYPE_OFFLINE, scope should be set - * to the sessionId the keys will be provided to. When the keyType is - * KEY_TYPE_RELEASE, scope should be set to the keySetId of the keys being released. - * Releasing keys from a device invalidates them for all sessions. - * - * init container-specific data, its meaning is interpreted based on the mime type - * provided in the mimeType parameter. It could contain, for example, the content - * ID, key ID or other data obtained from the content metadata that is required in - * generating the key request. init may be null when keyType is KEY_TYPE_RELEASE. - * - * initSize is the number of bytes of initData - * - * mimeType identifies the mime type of the content. - * - * keyType specifes the type of the request. The request may be to acquire keys for - * streaming or offline content, or to release previously acquired keys, which are - * identified by a keySetId. - * - * optionalParameters are included in the key request message to allow a client - * application to provide additional message parameters to the server. - * - * numOptionalParameters indicates the number of optional parameters provided - * by the caller - * - * On exit: - * 1. The keyRequest pointer will reference the opaque key request data. It - * will reside in memory owned by the AMediaDrm object, and will remain - * accessible until the next call to AMediaDrm_getKeyRequest or until the - * MediaDrm object is released. - * 2. keyRequestSize will be set to the size of the request - * - * returns MEDIADRM_NOT_PROVISIONED_ERROR if reprovisioning is needed, due to a - * problem with the device certificate. -*/ -media_status_t AMediaDrm_getKeyRequest(AMediaDrm *, const AMediaDrmScope *scope, - const uint8_t *init, size_t initSize, const char *mimeType, AMediaDrmKeyType keyType, - const AMediaDrmKeyValue *optionalParameters, size_t numOptionalParameters, - const uint8_t **keyRequest, size_t *keyRequestSize); - -/** - * A key response is received from the license server by the app, then it is - * provided to the DRM engine plugin using provideKeyResponse. When the - * response is for an offline key request, a keySetId is returned that can be - * used to later restore the keys to a new session with AMediaDrm_restoreKeys. - * When the response is for a streaming or release request, a null keySetId is - * returned. - * - * scope may be a sessionId or keySetId depending on the type of the - * response. Scope should be set to the sessionId when the response is for either - * streaming or offline key requests. Scope should be set to the keySetId when - * the response is for a release request. - * - * response points to the opaque response from the server - * responseSize should be set to the size of the response in bytes - */ - -media_status_t AMediaDrm_provideKeyResponse(AMediaDrm *, const AMediaDrmScope *scope, - const uint8_t *response, size_t responseSize, AMediaDrmKeySetId *keySetId); - -/** - * Restore persisted offline keys into a new session. keySetId identifies the - * keys to load, obtained from a prior call to AMediaDrm_provideKeyResponse. - * - * sessionId is the session ID for the DRM session - * keySetId identifies the saved key set to restore - */ -media_status_t AMediaDrm_restoreKeys(AMediaDrm *, const AMediaDrmSessionId *sessionId, - const AMediaDrmKeySetId *keySetId); - -/** - * Remove the current keys from a session. - * - * keySetId identifies keys to remove - */ -media_status_t AMediaDrm_removeKeys(AMediaDrm *, const AMediaDrmSessionId *keySetId); - -/** - * Request an informative description of the key status for the session. The status is - * in the form of {key, value} pairs. Since DRM license policies vary by vendor, - * the specific status field names are determined by each DRM vendor. Refer to your - * DRM provider documentation for definitions of the field names for a particular - * DRM engine plugin. - * - * On entry, numPairs should be set by the caller to the maximum number of pairs - * that can be returned (the size of the array). On exit, numPairs will be set - * to the number of entries written to the array. If the number of {key, value} pairs - * to be returned is greater than *numPairs, MEDIADRM_SHORT_BUFFER will be returned - * and numPairs will be set to the number of pairs available. - */ -media_status_t AMediaDrm_queryKeyStatus(AMediaDrm *, const AMediaDrmSessionId *sessionId, - AMediaDrmKeyValue *keyValuePairs, size_t *numPairs); - - -/** - * A provision request/response exchange occurs between the app and a provisioning - * server to retrieve a device certificate. If provisionining is required, the - * EVENT_PROVISION_REQUIRED event will be sent to the event handler. - * getProvisionRequest is used to obtain the opaque provision request byte array that - * should be delivered to the provisioning server. - * On exit: - * 1. The provision request data will be referenced by provisionRequest, in - * memory owned by the AMediaDrm object. It will remain accessible until the - * next call to getProvisionRequest. - * 2. provisionRequestSize will be set to the size of the request data. - * 3. serverUrl will reference a NULL terminated string containing the URL - * the provisioning request should be sent to. It will remain accessible until - * the next call to getProvisionRequest. - */ -media_status_t AMediaDrm_getProvisionRequest(AMediaDrm *, const uint8_t **provisionRequest, - size_t *provisionRequestSize, const char **serverUrl); - - -/** - * After a provision response is received by the app, it is provided to the DRM - * engine plugin using this method. - * - * response is the opaque provisioning response byte array to provide to the - * DRM engine plugin. - * responseSize is the length of the provisioning response in bytes. - * - * returns MEDIADRM_DEVICE_REVOKED_ERROR if the response indicates that the - * server rejected the request - */ -media_status_t AMediaDrm_provideProvisionResponse(AMediaDrm *, - const uint8_t *response, size_t responseSize); - - -/** - * A means of enforcing limits on the number of concurrent streams per subscriber - * across devices is provided via SecureStop. This is achieved by securely - * monitoring the lifetime of sessions. - * - * Information from the server related to the current playback session is written - * to persistent storage on the device when each MediaCrypto object is created. - * - * In the normal case, playback will be completed, the session destroyed and the - * Secure Stops will be queried. The app queries secure stops and forwards the - * secure stop message to the server which verifies the signature and notifies the - * server side database that the session destruction has been confirmed. The persisted - * record on the client is only removed after positive confirmation that the server - * received the message using releaseSecureStops(). - * - * numSecureStops is set by the caller to the maximum number of secure stops to - * return. On exit, *numSecureStops will be set to the number actually returned. - * If *numSecureStops is too small for the number of secure stops available, - * MEDIADRM_SHORT_BUFFER will be returned and *numSecureStops will be set to the - * number required. - */ -media_status_t AMediaDrm_getSecureStops(AMediaDrm *, - AMediaDrmSecureStop *secureStops, size_t *numSecureStops); - -/** - * Process the SecureStop server response message ssRelease. After authenticating - * the message, remove the SecureStops identified in the response. - * - * ssRelease is the server response indicating which secure stops to release - */ -media_status_t AMediaDrm_releaseSecureStops(AMediaDrm *, - const AMediaDrmSecureStop *ssRelease); - -/** - * String property name: identifies the maker of the DRM engine plugin - */ -const char *PROPERTY_VENDOR = "vendor"; - -/** - * String property name: identifies the version of the DRM engine plugin - */ -const char *PROPERTY_VERSION = "version"; - -/** - * String property name: describes the DRM engine plugin - */ -const char *PROPERTY_DESCRIPTION = "description"; - -/** - * String property name: a comma-separated list of cipher and mac algorithms - * supported by CryptoSession. The list may be empty if the DRM engine - * plugin does not support CryptoSession operations. - */ -const char *PROPERTY_ALGORITHMS = "algorithms"; - -/** - * Read a DRM engine plugin String property value, given the property name string. - * - * propertyName identifies the property to query - * On return, propertyValue will be set to point to the property value. The - * memory that the value resides in is owned by the NDK MediaDrm API and - * will remain valid until the next call to AMediaDrm_getPropertyString. - */ -media_status_t AMediaDrm_getPropertyString(AMediaDrm *, const char *propertyName, - const char **propertyValue); - -/** - * Byte array property name: the device unique identifier is established during - * device provisioning and provides a means of uniquely identifying each device. - */ -const char *PROPERTY_DEVICE_UNIQUE_ID = "deviceUniqueId"; - -/** - * Read a DRM engine plugin byte array property value, given the property name string. - * On return, *propertyValue will be set to point to the property value. The - * memory that the value resides in is owned by the NDK MediaDrm API and - * will remain valid until the next call to AMediaDrm_getPropertyByteArray. - */ -media_status_t AMediaDrm_getPropertyByteArray(AMediaDrm *, const char *propertyName, - AMediaDrmByteArray *propertyValue); - -/** - * Set a DRM engine plugin String property value. - */ -media_status_t AMediaDrm_setPropertyString(AMediaDrm *, const char *propertyName, - const char *value); - -/** - * Set a DRM engine plugin byte array property value. - */ -media_status_t AMediaDrm_setPropertyByteArray(AMediaDrm *, const char *propertyName, - const uint8_t *value, size_t valueSize); - -/** - * In addition to supporting decryption of DASH Common Encrypted Media, the - * MediaDrm APIs provide the ability to securely deliver session keys from - * an operator's session key server to a client device, based on the factory-installed - * root of trust, and then perform encrypt, decrypt, sign and verify operations - * with the session key on arbitrary user data. - * - * Operators create session key servers that receive session key requests and provide - * encrypted session keys which can be used for general purpose crypto operations. - * - * Generic encrypt/decrypt/sign/verify methods are based on the established session - * keys. These keys are exchanged using the getKeyRequest/provideKeyResponse methods. - * - * Applications of this capability include securing various types of purchased or - * private content, such as applications, books and other media, photos or media - * delivery protocols. - */ - -/* - * Encrypt the data referenced by input of length dataSize using algorithm specified - * by cipherAlgorithm, and write the encrypted result into output. The caller must - * ensure that the output buffer is large enough to accept dataSize bytes. The key - * to use is identified by the 16 byte keyId. The key must have been loaded into - * the session using provideKeyResponse. - */ -media_status_t AMediaDrm_encrypt(AMediaDrm *, const AMediaDrmSessionId *sessionId, - const char *cipherAlgorithm, uint8_t *keyId, uint8_t *iv, - const uint8_t *input, uint8_t *output, size_t dataSize); - -/* - * Decrypt the data referenced by input of length dataSize using algorithm specified - * by cipherAlgorithm, and write the decrypted result into output. The caller must - * ensure that the output buffer is large enough to accept dataSize bytes. The key - * to use is identified by the 16 byte keyId. The key must have been loaded into - * the session using provideKeyResponse. - */ -media_status_t AMediaDrm_decrypt(AMediaDrm *, const AMediaDrmSessionId *sessionId, - const char *cipherAlgorithm, uint8_t *keyId, uint8_t *iv, - const uint8_t *input, uint8_t *output, size_t dataSize); - -/* - * Generate a signature using the specified macAlgorithm over the message data - * referenced by message of size messageSize and store the signature in the - * buffer referenced signature of max size *signatureSize. If the buffer is not - * large enough to hold the signature, MEDIADRM_SHORT_BUFFER is returned and - * *signatureSize is set to the buffer size required. The key to use is identified - * by the 16 byte keyId. The key must have been loaded into the session using - * provideKeyResponse. - */ -media_status_t AMediaDrm_sign(AMediaDrm *, const AMediaDrmSessionId *sessionId, - const char *macAlgorithm, uint8_t *keyId, uint8_t *message, size_t messageSize, - uint8_t *signature, size_t *signatureSize); - -/* - * Perform a signature verification using the specified macAlgorithm over the message - * data referenced by the message parameter of size messageSize. Returns MEDIADRM_OK - * if the signature matches, otherwise MEDAIDRM_VERIFY_FAILED is returned. The key to - * use is identified by the 16 byte keyId. The key must have been loaded into the - * session using provideKeyResponse. - */ -media_status_t AMediaDrm_verify(AMediaDrm *, const AMediaDrmSessionId *sessionId, - const char *macAlgorithm, uint8_t *keyId, const uint8_t *message, size_t messageSize, - const uint8_t *signature, size_t signatureSize); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif //_NDK_MEDIA_DRM_H diff --git a/ndk/platforms/android-20/include/media/NdkMediaError.h b/ndk/platforms/android-20/include/media/NdkMediaError.h deleted file mode 100644 index 12613eb1d..000000000 --- a/ndk/platforms/android-20/include/media/NdkMediaError.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/* - * This file defines an NDK API. - * Do not remove methods. - * Do not change method signatures. - * Do not change the value of constants. - * Do not change the size of any of the classes defined in here. - * Do not reference types that are not part of the NDK. - * Do not #include files that aren't part of the NDK. - */ - -#ifndef _NDK_MEDIA_ERROR_H -#define _NDK_MEDIA_ERROR_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - AMEDIA_OK = 0, - - AMEDIA_ERROR_BASE = -10000, - AMEDIA_ERROR_UNKNOWN = AMEDIA_ERROR_BASE, - AMEDIA_ERROR_MALFORMED = AMEDIA_ERROR_BASE - 1, - AMEDIA_ERROR_UNSUPPORTED = AMEDIA_ERROR_BASE - 2, - AMEDIA_ERROR_INVALID_OBJECT = AMEDIA_ERROR_BASE - 3, - AMEDIA_ERROR_INVALID_PARAMETER = AMEDIA_ERROR_BASE - 4, - - AMEDIA_DRM_ERROR_BASE = -20000, - AMEDIA_DRM_NOT_PROVISIONED = AMEDIA_DRM_ERROR_BASE - 1, - AMEDIA_DRM_RESOURCE_BUSY = AMEDIA_DRM_ERROR_BASE - 2, - AMEDIA_DRM_DEVICE_REVOKED = AMEDIA_DRM_ERROR_BASE - 3, - AMEDIA_DRM_SHORT_BUFFER = AMEDIA_DRM_ERROR_BASE - 4, - AMEDIA_DRM_SESSION_NOT_OPENED = AMEDIA_DRM_ERROR_BASE - 5, - AMEDIA_DRM_TAMPER_DETECTED = AMEDIA_DRM_ERROR_BASE - 6, - AMEDIA_DRM_VERIFY_FAILED = AMEDIA_DRM_ERROR_BASE - 7, - AMEDIA_DRM_NEED_KEY = AMEDIA_DRM_ERROR_BASE - 8, - AMEDIA_DRM_LICENSE_EXPIRED = AMEDIA_DRM_ERROR_BASE - 9, - -} media_status_t; - - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _NDK_MEDIA_ERROR_H diff --git a/ndk/platforms/android-20/include/media/NdkMediaExtractor.h b/ndk/platforms/android-20/include/media/NdkMediaExtractor.h deleted file mode 100644 index 7a4e70214..000000000 --- a/ndk/platforms/android-20/include/media/NdkMediaExtractor.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/* - * This file defines an NDK API. - * Do not remove methods. - * Do not change method signatures. - * Do not change the value of constants. - * Do not change the size of any of the classes defined in here. - * Do not reference types that are not part of the NDK. - * Do not #include files that aren't part of the NDK. - */ - -#ifndef _NDK_MEDIA_EXTRACTOR_H -#define _NDK_MEDIA_EXTRACTOR_H - -#include - -#include "NdkMediaCodec.h" -#include "NdkMediaFormat.h" -#include "NdkMediaCrypto.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct AMediaExtractor; -typedef struct AMediaExtractor AMediaExtractor; - - -/** - * Create new media extractor - */ -AMediaExtractor* AMediaExtractor_new(); - -/** - * Delete a previously created media extractor - */ -media_status_t AMediaExtractor_delete(AMediaExtractor*); - -/** - * Set the file descriptor from which the extractor will read. - */ -media_status_t AMediaExtractor_setDataSourceFd(AMediaExtractor*, int fd, off64_t offset, off64_t length); - -/** - * Set the URI from which the extractor will read. - */ -media_status_t AMediaExtractor_setDataSource(AMediaExtractor*, const char *location); // TODO support headers - -/** - * Return the number of tracks in the previously specified media file - */ -size_t AMediaExtractor_getTrackCount(AMediaExtractor*); - -/** - * Return the format of the specified track. The caller must free the returned format - */ -AMediaFormat* AMediaExtractor_getTrackFormat(AMediaExtractor*, size_t idx); - -/** - * Select the specified track. Subsequent calls to readSampleData, getSampleTrackIndex and - * getSampleTime only retrieve information for the subset of tracks selected. - * Selecting the same track multiple times has no effect, the track is - * only selected once. - */ -media_status_t AMediaExtractor_selectTrack(AMediaExtractor*, size_t idx); - -/** - * Unselect the specified track. Subsequent calls to readSampleData, getSampleTrackIndex and - * getSampleTime only retrieve information for the subset of tracks selected.. - */ -media_status_t AMediaExtractor_unselectTrack(AMediaExtractor*, size_t idx); - -/** - * Read the current sample. - */ -ssize_t AMediaExtractor_readSampleData(AMediaExtractor*, uint8_t *buffer, size_t capacity); - -/** - * Read the current sample's flags. - */ -uint32_t AMediaExtractor_getSampleFlags(AMediaExtractor*); // see definitions below - -/** - * Returns the track index the current sample originates from (or -1 - * if no more samples are available) - */ -int AMediaExtractor_getSampleTrackIndex(AMediaExtractor*); - -/** - * Returns the current sample's presentation time in microseconds. - * or -1 if no more samples are available. - */ -int64_t AMediaExtractor_getSampleTime(AMediaExtractor*); - -/** - * Advance to the next sample. Returns false if no more sample data - * is available (end of stream). - */ -bool AMediaExtractor_advance(AMediaExtractor*); - -typedef enum { - AMEDIAEXTRACTOR_SEEK_PREVIOUS_SYNC, - AMEDIAEXTRACTOR_SEEK_NEXT_SYNC, - AMEDIAEXTRACTOR_SEEK_CLOSEST_SYNC -} SeekMode; - -/** - * - */ -media_status_t AMediaExtractor_seekTo(AMediaExtractor*, int64_t seekPosUs, SeekMode mode); - -/** - * mapping of crypto scheme uuid to the scheme specific data for that scheme - */ -typedef struct PsshEntry { - AMediaUUID uuid; - size_t datalen; - void *data; -} PsshEntry; - -/** - * list of crypto schemes and their data - */ -typedef struct PsshInfo { - size_t numentries; - PsshEntry entries[0]; -} PsshInfo; - -/** - * Get the PSSH info if present. - */ -PsshInfo* AMediaExtractor_getPsshInfo(AMediaExtractor*); - - -AMediaCodecCryptoInfo *AMediaExtractor_getSampleCryptoInfo(AMediaExtractor *); - - -enum { - AMEDIAEXTRACTOR_SAMPLE_FLAG_SYNC = 1, - AMEDIAEXTRACTOR_SAMPLE_FLAG_ENCRYPTED = 2, -}; - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _NDK_MEDIA_EXTRACTOR_H diff --git a/ndk/platforms/android-20/include/media/NdkMediaFormat.h b/ndk/platforms/android-20/include/media/NdkMediaFormat.h deleted file mode 100644 index ab29791a6..000000000 --- a/ndk/platforms/android-20/include/media/NdkMediaFormat.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This file defines an NDK API. - * Do not remove methods. - * Do not change method signatures. - * Do not change the value of constants. - * Do not change the size of any of the classes defined in here. - * Do not reference types that are not part of the NDK. - * Do not #include files that aren't part of the NDK. - */ - -#ifndef _NDK_MEDIA_FORMAT_H -#define _NDK_MEDIA_FORMAT_H - -#include - -#include "NdkMediaError.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct AMediaFormat; -typedef struct AMediaFormat AMediaFormat; - -AMediaFormat *AMediaFormat_new(); -media_status_t AMediaFormat_delete(AMediaFormat*); - -/** - * Human readable representation of the format. The returned string is owned by the format, - * and remains valid until the next call to toString, or until the format is deleted. - */ -const char* AMediaFormat_toString(AMediaFormat*); - -bool AMediaFormat_getInt32(AMediaFormat*, const char *name, int32_t *out); -bool AMediaFormat_getInt64(AMediaFormat*, const char *name, int64_t *out); -bool AMediaFormat_getFloat(AMediaFormat*, const char *name, float *out); -/** - * The returned data is owned by the format and remains valid as long as the named entry - * is part of the format. - */ -bool AMediaFormat_getBuffer(AMediaFormat*, const char *name, void** data, size_t *size); -/** - * The returned string is owned by the format, and remains valid until the next call to getString, - * or until the format is deleted. - */ -bool AMediaFormat_getString(AMediaFormat*, const char *name, const char **out); - - -void AMediaFormat_setInt32(AMediaFormat*, const char* name, int32_t value); -void AMediaFormat_setInt64(AMediaFormat*, const char* name, int64_t value); -void AMediaFormat_setFloat(AMediaFormat*, const char* name, float value); -/** - * The provided string is copied into the format. - */ -void AMediaFormat_setString(AMediaFormat*, const char* name, const char* value); -/** - * The provided data is copied into the format. - */ -void AMediaFormat_setBuffer(AMediaFormat*, const char* name, void* data, size_t size); - - - -/** - * XXX should these be ints/enums that we look up in a table as needed? - */ -extern const char* AMEDIAFORMAT_KEY_AAC_PROFILE; -extern const char* AMEDIAFORMAT_KEY_BIT_RATE; -extern const char* AMEDIAFORMAT_KEY_CHANNEL_COUNT; -extern const char* AMEDIAFORMAT_KEY_CHANNEL_MASK; -extern const char* AMEDIAFORMAT_KEY_COLOR_FORMAT; -extern const char* AMEDIAFORMAT_KEY_DURATION; -extern const char* AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL; -extern const char* AMEDIAFORMAT_KEY_FRAME_RATE; -extern const char* AMEDIAFORMAT_KEY_HEIGHT; -extern const char* AMEDIAFORMAT_KEY_IS_ADTS; -extern const char* AMEDIAFORMAT_KEY_IS_AUTOSELECT; -extern const char* AMEDIAFORMAT_KEY_IS_DEFAULT; -extern const char* AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE; -extern const char* AMEDIAFORMAT_KEY_I_FRAME_INTERVAL; -extern const char* AMEDIAFORMAT_KEY_LANGUAGE; -extern const char* AMEDIAFORMAT_KEY_MAX_HEIGHT; -extern const char* AMEDIAFORMAT_KEY_MAX_INPUT_SIZE; -extern const char* AMEDIAFORMAT_KEY_MAX_WIDTH; -extern const char* AMEDIAFORMAT_KEY_MIME; -extern const char* AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP; -extern const char* AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER; -extern const char* AMEDIAFORMAT_KEY_SAMPLE_RATE; -extern const char* AMEDIAFORMAT_KEY_WIDTH; -extern const char* AMEDIAFORMAT_KEY_STRIDE; - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _NDK_MEDIA_FORMAT_H diff --git a/ndk/platforms/android-20/include/media/NdkMediaMuxer.h b/ndk/platforms/android-20/include/media/NdkMediaMuxer.h deleted file mode 100644 index 90d946cbc..000000000 --- a/ndk/platforms/android-20/include/media/NdkMediaMuxer.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/* - * This file defines an NDK API. - * Do not remove methods. - * Do not change method signatures. - * Do not change the value of constants. - * Do not change the size of any of the classes defined in here. - * Do not reference types that are not part of the NDK. - * Do not #include files that aren't part of the NDK. - */ - -#ifndef _NDK_MEDIA_MUXER_H -#define _NDK_MEDIA_MUXER_H - -#include - -#include "NdkMediaCodec.h" -#include "NdkMediaError.h" -#include "NdkMediaFormat.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct AMediaMuxer; -typedef struct AMediaMuxer AMediaMuxer; - -typedef enum { - AMEDIAMUXER_OUTPUT_FORMAT_MPEG_4 = 0, - AMEDIAMUXER_OUTPUT_FORMAT_WEBM = 1, -} OutputFormat; - -/** - * Create new media muxer - */ -AMediaMuxer* AMediaMuxer_new(int fd, OutputFormat format); - -/** - * Delete a previously created media muxer - */ -media_status_t AMediaMuxer_delete(AMediaMuxer*); - -/** - * Set and store the geodata (latitude and longitude) in the output file. - * This method should be called before AMediaMuxer_start. The geodata is stored - * in udta box if the output format is AMEDIAMUXER_OUTPUT_FORMAT_MPEG_4, and is - * ignored for other output formats. - * The geodata is stored according to ISO-6709 standard. - * - * Both values are specified in degrees. - * Latitude must be in the range [-90, 90]. - * Longitude must be in the range [-180, 180]. - */ -media_status_t AMediaMuxer_setLocation(AMediaMuxer*, float latitude, float longitude); - -/** - * Sets the orientation hint for output video playback. - * This method should be called before AMediaMuxer_start. Calling this - * method will not rotate the video frame when muxer is generating the file, - * but add a composition matrix containing the rotation angle in the output - * video if the output format is AMEDIAMUXER_OUTPUT_FORMAT_MPEG_4, so that a - * video player can choose the proper orientation for playback. - * Note that some video players may choose to ignore the composition matrix - * during playback. - * The angle is specified in degrees, clockwise. - * The supported angles are 0, 90, 180, and 270 degrees. - */ -media_status_t AMediaMuxer_setOrientationHint(AMediaMuxer*, int degrees); - -/** - * Adds a track with the specified format. - * Returns the index of the new track or a negative value in case of failure, - * which can be interpreted as a media_status_t. - */ -ssize_t AMediaMuxer_addTrack(AMediaMuxer*, const AMediaFormat* format); - -/** - * Start the muxer. Should be called after AMediaMuxer_addTrack and - * before AMediaMuxer_writeSampleData. - */ -media_status_t AMediaMuxer_start(AMediaMuxer*); - -/** - * Stops the muxer. - * Once the muxer stops, it can not be restarted. - */ -media_status_t AMediaMuxer_stop(AMediaMuxer*); - -/** - * Writes an encoded sample into the muxer. - * The application needs to make sure that the samples are written into - * the right tracks. Also, it needs to make sure the samples for each track - * are written in chronological order (e.g. in the order they are provided - * by the encoder.) - */ -media_status_t AMediaMuxer_writeSampleData(AMediaMuxer *muxer, - size_t trackIdx, const uint8_t *data, const AMediaCodecBufferInfo *info); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _NDK_MEDIA_MUXER_H diff --git a/ndk/platforms/android-20/samples/native-codec/AndroidManifest.xml b/ndk/platforms/android-20/samples/native-codec/AndroidManifest.xml deleted file mode 100644 index addf1f0e6..000000000 --- a/ndk/platforms/android-20/samples/native-codec/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/ndk/platforms/android-20/samples/native-codec/README.txt b/ndk/platforms/android-20/samples/native-codec/README.txt deleted file mode 100644 index 446941a7e..000000000 --- a/ndk/platforms/android-20/samples/native-codec/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This sample app requires a video file to be placed in /sdcard/testfile.mp4 -For demonstration purposes we have supplied such a file. diff --git a/ndk/platforms/android-20/samples/native-codec/default.properties b/ndk/platforms/android-20/samples/native-codec/default.properties deleted file mode 100644 index 5874172af..000000000 --- a/ndk/platforms/android-20/samples/native-codec/default.properties +++ /dev/null @@ -1,4 +0,0 @@ -# Indicates whether an apk should be generated for each density. -split.density=false -# Project target. -target=android-20 diff --git a/ndk/platforms/android-20/samples/native-codec/jni/Android.mk b/ndk/platforms/android-20/samples/native-codec/jni/Android.mk deleted file mode 100644 index 34300c4be..000000000 --- a/ndk/platforms/android-20/samples/native-codec/jni/Android.mk +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2014 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := native-codec-jni -LOCAL_SRC_FILES := native-codec-jni.cpp looper.cpp -# for native multimedia -LOCAL_LDLIBS += -lOpenMAXAL -lmediandk -# for logging -LOCAL_LDLIBS += -llog -# for native windows -LOCAL_LDLIBS += -landroid - -LOCAL_CFLAGS += -UNDEBUG - -include $(BUILD_SHARED_LIBRARY) diff --git a/ndk/platforms/android-20/samples/native-codec/jni/Application.mk b/ndk/platforms/android-20/samples/native-codec/jni/Application.mk deleted file mode 100644 index b02fc24e3..000000000 --- a/ndk/platforms/android-20/samples/native-codec/jni/Application.mk +++ /dev/null @@ -1,2 +0,0 @@ -APP_PLATFORM := android-20 -APP_ABI := all diff --git a/ndk/platforms/android-20/samples/native-codec/jni/looper.cpp b/ndk/platforms/android-20/samples/native-codec/jni/looper.cpp deleted file mode 100644 index 98112f4d8..000000000 --- a/ndk/platforms/android-20/samples/native-codec/jni/looper.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "looper.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// for __android_log_print(ANDROID_LOG_INFO, "YourApp", "formatted message"); -#include -#define TAG "NativeCodec-looper" -#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__) - - -struct loopermessage; -typedef struct loopermessage loopermessage; - -struct loopermessage { - int what; - void *obj; - loopermessage *next; - bool quit; -}; - - - -void* looper::trampoline(void* p) { - ((looper*)p)->loop(); - return NULL; -} - -looper::looper() { - sem_init(&headdataavailable, 0, 0); - sem_init(&headwriteprotect, 0, 1); - pthread_attr_t attr; - pthread_attr_init(&attr); - - pthread_create(&worker, &attr, trampoline, this); - running = true; -} - - -looper::~looper() { - if (running) { - LOGV("Looper deleted while still running. Some messages will not be processed"); - quit(); - } -} - -void looper::post(int what, void *data, bool flush) { - loopermessage *msg = new loopermessage(); - msg->what = what; - msg->obj = data; - msg->next = NULL; - msg->quit = false; - addmsg(msg, flush); -} - -void looper::addmsg(loopermessage *msg, bool flush) { - sem_wait(&headwriteprotect); - loopermessage *h = head; - - if (flush) { - while(h) { - loopermessage *next = h->next; - delete h; - h = next; - } - h = NULL; - } - if (h) { - while (h->next) { - h = h->next; - } - h->next = msg; - } else { - head = msg; - } - LOGV("post msg %d", msg->what); - sem_post(&headwriteprotect); - sem_post(&headdataavailable); -} - -void looper::loop() { - while(true) { - // wait for available message - sem_wait(&headdataavailable); - - // get next available message - sem_wait(&headwriteprotect); - loopermessage *msg = head; - if (msg == NULL) { - LOGV("no msg"); - sem_post(&headwriteprotect); - continue; - } - head = msg->next; - sem_post(&headwriteprotect); - - if (msg->quit) { - LOGV("quitting"); - delete msg; - return; - } - LOGV("processing msg %d", msg->what); - handle(msg->what, msg->obj); - delete msg; - } -} - -void looper::quit() { - LOGV("quit"); - loopermessage *msg = new loopermessage(); - msg->what = 0; - msg->obj = NULL; - msg->next = NULL; - msg->quit = true; - addmsg(msg, false); - void *retval; - pthread_join(worker, &retval); - sem_destroy(&headdataavailable); - sem_destroy(&headwriteprotect); - running = false; -} - -void looper::handle(int what, void* obj) { - LOGV("dropping msg %d %p", what, obj); -} - diff --git a/ndk/platforms/android-20/samples/native-codec/jni/looper.h b/ndk/platforms/android-20/samples/native-codec/jni/looper.h deleted file mode 100644 index 531a7cbcf..000000000 --- a/ndk/platforms/android-20/samples/native-codec/jni/looper.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -struct loopermessage; - -class looper { - public: - looper(); - ~looper(); - - void post(int what, void *data, bool flush = false); - void quit(); - - virtual void handle(int what, void *data); - - private: - void addmsg(loopermessage *msg, bool flush); - static void* trampoline(void* p); - void loop(); - loopermessage *head; - pthread_t worker; - sem_t headwriteprotect; - sem_t headdataavailable; - bool running; -}; diff --git a/ndk/platforms/android-20/samples/native-codec/jni/native-codec-jni.cpp b/ndk/platforms/android-20/samples/native-codec/jni/native-codec-jni.cpp deleted file mode 100644 index 6053abe2f..000000000 --- a/ndk/platforms/android-20/samples/native-codec/jni/native-codec-jni.cpp +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* This is a JNI example where we use native methods to play video - * using the native AMedia* APIs. - * See the corresponding Java source file located at: - * - * src/com/example/nativecodec/NativeMedia.java - * - * In this example we use assert() for "impossible" error conditions, - * and explicit handling and recovery for more likely error conditions. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "looper.h" -#include "media/NdkMediaCodec.h" -#include "media/NdkMediaExtractor.h" - -// for __android_log_print(ANDROID_LOG_INFO, "YourApp", "formatted message"); -#include -#define TAG "NativeCodec" -#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__) - -// for native window JNI -#include - -typedef struct { - int fd; - ANativeWindow* window; - AMediaExtractor* ex; - AMediaCodec *codec; - int64_t renderstart; - bool sawInputEOS; - bool sawOutputEOS; - bool isPlaying; - bool renderonce; -} workerdata; - -workerdata data = {-1, NULL, NULL, NULL, 0, false, false, false, false}; - -enum { - kMsgCodecBuffer, - kMsgPause, - kMsgResume, - kMsgPauseAck, - kMsgDecodeDone, - kMsgSeek, -}; - - - -class mylooper: public looper { - virtual void handle(int what, void* obj); -}; - -static mylooper *mlooper = NULL; - -int64_t systemnanotime() { - timespec now; - clock_gettime(CLOCK_MONOTONIC, &now); - return now.tv_sec * 1000000000LL + now.tv_nsec; -} - -void doCodecWork(workerdata *d) { - - ssize_t bufidx = -1; - if (!d->sawInputEOS) { - bufidx = AMediaCodec_dequeueInputBuffer(d->codec, 2000); - LOGV("input buffer %zd", bufidx); - if (bufidx >= 0) { - size_t bufsize; - uint8_t *buf = AMediaCodec_getInputBuffer(d->codec, bufidx, &bufsize); - ssize_t sampleSize = AMediaExtractor_readSampleData(d->ex, buf, bufsize); - if (sampleSize < 0) { - sampleSize = 0; - d->sawInputEOS = true; - LOGV("EOS"); - } - int64_t presentationTimeUs = AMediaExtractor_getSampleTime(d->ex); - - AMediaCodec_queueInputBuffer(d->codec, bufidx, 0, sampleSize, presentationTimeUs, - d->sawInputEOS ? AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM : 0); - AMediaExtractor_advance(d->ex); - } - } - - if (!d->sawOutputEOS) { - AMediaCodecBufferInfo info; - ssize_t status = AMediaCodec_dequeueOutputBuffer(d->codec, &info, 0); - if (status >= 0) { - if (info.flags & AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM) { - LOGV("output EOS"); - d->sawOutputEOS = true; - } - int64_t presentationNano = info.presentationTimeUs * 1000; - if (d->renderstart < 0) { - d->renderstart = systemnanotime() - presentationNano; - } - int64_t delay = (d->renderstart + presentationNano) - systemnanotime(); - if (delay > 0) { - usleep(delay / 1000); - } - AMediaCodec_releaseOutputBuffer(d->codec, status, info.size != 0); - if (d->renderonce) { - d->renderonce = false; - return; - } - } else if (status == AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED) { - LOGV("output buffers changed"); - } else if (status == AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED) { - AMediaFormat *format = NULL; - format = AMediaCodec_getOutputFormat(d->codec); - LOGV("format changed to: %s", AMediaFormat_toString(format)); - AMediaFormat_delete(format); - } else if (status == AMEDIACODEC_INFO_TRY_AGAIN_LATER) { - LOGV("no output buffer right now"); - } else { - LOGV("unexpected info code: %zd", status); - } - } - - if (!d->sawInputEOS || !d->sawOutputEOS) { - mlooper->post(kMsgCodecBuffer, d); - } -} - -void mylooper::handle(int what, void* obj) { - switch (what) { - case kMsgCodecBuffer: - doCodecWork((workerdata*)obj); - break; - - case kMsgDecodeDone: - { - workerdata *d = (workerdata*)obj; - AMediaCodec_stop(d->codec); - AMediaCodec_delete(d->codec); - AMediaExtractor_delete(d->ex); - d->sawInputEOS = true; - d->sawOutputEOS = true; - } - break; - - case kMsgSeek: - { - workerdata *d = (workerdata*)obj; - AMediaExtractor_seekTo(d->ex, 0, AMEDIAEXTRACTOR_SEEK_NEXT_SYNC); - AMediaCodec_flush(d->codec); - d->renderstart = -1; - d->sawInputEOS = false; - d->sawOutputEOS = false; - if (!d->isPlaying) { - d->renderonce = true; - post(kMsgCodecBuffer, d); - } - LOGV("seeked"); - } - break; - - case kMsgPause: - { - workerdata *d = (workerdata*)obj; - if (d->isPlaying) { - // flush all outstanding codecbuffer messages with a no-op message - d->isPlaying = false; - post(kMsgPauseAck, NULL, true); - } - } - break; - - case kMsgResume: - { - workerdata *d = (workerdata*)obj; - if (!d->isPlaying) { - d->renderstart = -1; - d->isPlaying = true; - post(kMsgCodecBuffer, d); - } - } - break; - } -} - - - - -extern "C" { - -jboolean Java_com_example_nativecodec_NativeCodec_createStreamingMediaPlayer(JNIEnv* env, - jclass clazz, jstring filename) -{ - LOGV("@@@ create"); - - // convert Java string to UTF-8 - const char *utf8 = env->GetStringUTFChars(filename, NULL); - LOGV("opening %s", utf8); - int fd = open(utf8, O_RDONLY); - env->ReleaseStringUTFChars(filename, utf8); - if (fd < 0) { - LOGV("failed: %d (%s)", fd, strerror(errno)); - return JNI_FALSE; - } - - data.fd = fd; - - workerdata *d = &data; - - AMediaExtractor *ex = AMediaExtractor_new(); - media_status_t err = AMediaExtractor_setDataSourceFd(ex, d->fd, 0 , LONG_MAX); - close(d->fd); - if (err != AMEDIA_OK) { - LOGV("setDataSource error: %d", err); - return JNI_FALSE; - } - - int numtracks = AMediaExtractor_getTrackCount(ex); - - AMediaCodec *codec = NULL; - - LOGV("input has %d tracks", numtracks); - for (int i = 0; i < numtracks; i++) { - AMediaFormat *format = AMediaExtractor_getTrackFormat(ex, i); - const char *s = AMediaFormat_toString(format); - LOGV("track %d format: %s", i, s); - const char *mime; - if (!AMediaFormat_getString(format, AMEDIAFORMAT_KEY_MIME, &mime)) { - LOGV("no mime type"); - return JNI_FALSE; - } else if (!strncmp(mime, "video/", 6)) { - // Omitting most error handling for clarity. - // Production code should check for errors. - AMediaExtractor_selectTrack(ex, i); - codec = AMediaCodec_createDecoderByType(mime); - AMediaCodec_configure(codec, format, d->window, NULL, 0); - d->ex = ex; - d->codec = codec; - d->renderstart = -1; - d->sawInputEOS = false; - d->sawOutputEOS = false; - d->isPlaying = false; - d->renderonce = true; - AMediaCodec_start(codec); - } - AMediaFormat_delete(format); - } - - mlooper = new mylooper(); - mlooper->post(kMsgCodecBuffer, d); - - return JNI_TRUE; -} - -// set the playing state for the streaming media player -void Java_com_example_nativecodec_NativeCodec_setPlayingStreamingMediaPlayer(JNIEnv* env, - jclass clazz, jboolean isPlaying) -{ - LOGV("@@@ playpause: %d", isPlaying); - if (mlooper) { - if (isPlaying) { - mlooper->post(kMsgResume, &data); - } else { - mlooper->post(kMsgPause, &data); - } - } -} - - -// shut down the native media system -void Java_com_example_nativecodec_NativeCodec_shutdown(JNIEnv* env, jclass clazz) -{ - LOGV("@@@ shutdown"); - if (mlooper) { - mlooper->post(kMsgDecodeDone, &data, true /* flush */); - mlooper->quit(); - delete mlooper; - mlooper = NULL; - } - if (data.window) { - ANativeWindow_release(data.window); - data.window = NULL; - } -} - - -// set the surface -void Java_com_example_nativecodec_NativeCodec_setSurface(JNIEnv *env, jclass clazz, jobject surface) -{ - // obtain a native window from a Java surface - if (data.window) { - ANativeWindow_release(data.window); - data.window = NULL; - } - data.window = ANativeWindow_fromSurface(env, surface); - LOGV("@@@ setsurface %p", data.window); -} - - -// rewind the streaming media player -void Java_com_example_nativecodec_NativeCodec_rewindStreamingMediaPlayer(JNIEnv *env, jclass clazz) -{ - LOGV("@@@ rewind"); - mlooper->post(kMsgSeek, &data); -} - -} diff --git a/ndk/platforms/android-20/samples/native-codec/res/drawable/icon.png b/ndk/platforms/android-20/samples/native-codec/res/drawable/icon.png deleted file mode 100644 index a07c69fa5..000000000 Binary files a/ndk/platforms/android-20/samples/native-codec/res/drawable/icon.png and /dev/null differ diff --git a/ndk/platforms/android-20/samples/native-codec/res/layout/main.xml b/ndk/platforms/android-20/samples/native-codec/res/layout/main.xml deleted file mode 100644 index 4e94a7b92..000000000 --- a/ndk/platforms/android-20/samples/native-codec/res/layout/main.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - -