【一起来玩NDK】篇一:不好意思,学会NDK真的无所不能

广告时间

宝沃汽车-智能系统部正在招聘Android开发工程师,感兴趣的可以发送简历到 liyilin7@borgward.com,期待跟你成为同事!

前言

作为Android工程师,Java和Kotlin是我们经常使用的开发语言

但在涉及到一些需要高性能,或与底层相关,或与安全相关的功能,就不得不使用C/C++来实现,Java语言也提供了相关接口(JNI)来调用native相关的代码

Android平台又在此基础上提供了native相关的开发套件NDK(native develop kit)让我们更加便利的实现Android平台与native代码之间的交互

作为开端,本篇文章将简单介绍我们使用NDK可以做哪些事情,实现哪些功能

下面,正文开始!

使用NDK可以做什么?

NDK开发并不难,因为NDK只是开发工具,但前提是掌握了C/C++相关的语言基础,JNI相关的调用API,以及Cmake相关的编译知识,本系列也会在此基础上进行的展开分析

安全相关

将部分代码放在C语言中去实现,可以增加逆向分析的难度,对程序来说也更安全。针对这一块目前没有发现比较好的开源库,后面我会自己去做一些代码示例,或者做成开源库的形式

处理音频(Audio)

  1. audio-echo: https://github.com/android/ndk-samples/blob/main/audio-echo/README.md
  2. oboe: https://github.com/android/ndk-samples/blob/main/hello-oboe/README.md
  3. opensl es: https://github.com/android/ndk-samples/blob/main/native-audio/README.md
  4. MIDI: https://github.com/android/ndk-samples/blob/main/native-midi/README.md

处理视频(Video)

  1. codec: https://github.com/android/ndk-samples/blob/main/native-codec/README.md
  2. openMAX: https://github.com/android/ndk-samples/blob/main/native-media/README.md
  3. ffmpeg: https://github.com/FFmpeg/FFmpeg

处理图片(Picture)

  1. plasma effect : https://github.com/android/ndk-samples/blob/main/bitmap-plasma/README.md
  2. webp: https://github.com/android/ndk-samples/blob/main/webp/README.md
  3. image-p3: https://github.com/android/ndk-samples/blob/main/display-p3/README.md

神经网络(Neural Network)

  1. NNAPI: https://github.com/android/ndk-samples/blob/main/nn-samples/README.md

OpenGL(Render with OpenGL)

  1. render tea port: https://github.com/android/ndk-samples/blob/main/teapots/README.md
  2. render san angles: https://github.com/android/ndk-samples/blob/main/san-angeles/README.md
  3. sensor graph: https://github.com/android/ndk-samples/blob/main/sensor-graph/README.md
  4. GLES2.0: https://github.com/android/ndk-samples/blob/main/hello-gl2/README.md
  5. GLES3.0 : https://github.com/android/ndk-samples/blob/main/gles3jni/README.md

游戏开发(3D Game)

https://github.com/android/ndk-samples/blob/main/endless-tunnel/README.md

后记

在下面的文章中,我将逐项分析相关源码,并拓展实现相关功能,感兴趣的小伙伴可以关注一波!

我是释然,我们下篇文章再见!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

释然小师弟

觉得不错?不妨请我喝杯咖啡?

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值