Commit d8a614c0 by olly Committed by Ian Baker

Include opusV2JNI Target In Non-Android Builds

Allow opusV2JNI to be built-for & included-in non-Android build targets by ifdef'ing out the liblog dependency. Also removed libz and libandroid dependencies.

PiperOrigin-RevId: 427269838
parent 3c50238d
Showing with 9 additions and 0 deletions
...@@ -14,17 +14,26 @@ ...@@ -14,17 +14,26 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef __ANDROID__
#include <android/log.h> #include <android/log.h>
#endif
#include <jni.h> #include <jni.h>
#include <cstdint>
#include <cstdlib> #include <cstdlib>
#include "opus.h" // NOLINT #include "opus.h" // NOLINT
#include "opus_multistream.h" // NOLINT #include "opus_multistream.h" // NOLINT
#ifdef __ANDROID__
#define LOG_TAG "opus_jni" #define LOG_TAG "opus_jni"
#define LOGE(...) \ #define LOGE(...) \
((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)) ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
#else // __ANDROID__
#define LOGE(...) \
do { \
} while (0)
#endif // __ANDROID__
#define DECODER_FUNC(RETURN_TYPE, NAME, ...) \ #define DECODER_FUNC(RETURN_TYPE, NAME, ...) \
extern "C" { \ extern "C" { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment