Can we access camera using android NDK

2,165 views
Skip to first unread message

Amila

unread,
Oct 27, 2010, 2:23:09 AM10/27/10
to android-ndk
Hi,

Can we access the camera using android NDK to enhance the
performances?
Does any one have such sample code?

Regards
Amila

Onur Cinar

unread,
Oct 27, 2010, 1:05:18 PM10/27/10
to andro...@googlegroups.com

Hi Amila,

Not directly possible with the API covered by the NDK. But if you link to certain portions of the OS, then you will have direct access to the camera (not the driver but the wrapper layer), and this is not officially supported at the moment.  The API (look for Camera.h) is very similar to the Java equivalent, but you may get a better frame rate.   The major issue is that you will need to have multiple libraries for different version of the Android OS, and things may stop working at any time in the future after an OS update, so it will require lots of maintenance for your application.  So it purely depends on what you would like to accomplish with the camera. Most of the Video communication applications on Android is currently doing that direct access.

Regards,

-onur


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

---
www.zdo.com

Glenn Kasten

unread,
Oct 27, 2010, 7:44:27 PM10/27/10
to android-ndk
As Tim mentioned in the other thread with similar subject, this is
dangerous. Use JNI.
> > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > .

Amila Karunanayake

unread,
Oct 27, 2010, 7:50:59 PM10/27/10
to andro...@googlegroups.com
Hi Onur,

Can you send me sample code or any reference to access camera from Camera.h

Thanks
Regards
Amila

mic _

unread,
Oct 28, 2010, 1:23:03 AM10/28/10
to andro...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages