Romain
Romain

Reputation: 1410

Which has the most low latency between NDK or Java MediaCodec api?

I'm building a live-streaming app that streams the content to a client. I'm wondering what would be the fastest way to decode a stream ? Coding the client using NDK or using Java media codec api ?

I've seen Kodi/FFMPEG using the NDK and ExoPlayer using the Java.

Thanks for any pointers :)

Upvotes: 2

Views: 939

Answers (1)

Sergio
Sergio

Reputation: 8209

Both NDK and Java MediaCodec APIs use the same native backend library. Decoding performance is the same for both cases (of course Java API introduces extra overhead because of JNI mechanism, but it is much less than actual decoding time). So just choose whatever you want. But note than NDK API is available only at Android 5.0+ devices.

Upvotes: 4

Related Questions