Access Android Mobile Camera to capture video and stream to server

Sebastian Dröge sebastian at centricular.com
Wed Aug 6 00:39:37 PDT 2014


On Di, 2014-08-05 at 22:44 -0700, SRM Sample wrote:
> HI All,
> 
> Greetings...
> 
> Intention is to use Android Camera to capture video and stream that to a
> particular port.
> Other devices like PC,Android device should be able to view the live stream
> using ip and port number of the android device.
> 
> My whole idea is to Create a New Element to access Android Camera by
> default.Similar to v4l2src for webcamera.
> I searched and googled a lot and found nothing similar.

There is no such element yet, but you can create one around the
android.hardware.Camera API by using the "preview" functionality of it.
Don't be scared by the word "preview", it usually gives you the full
resolution the camera can do :)

You'll have to work with JNI though, and also create a custom Java class
(for marshalling the listener calls to the native code). Take a look at
the androidmedia plugin for some ideas of how to work with JNI from a
GStreamer plugin. It however does not contain anything (yet) to create a
Java class, but once you get to needing that part just ask again.

I wouldn't recommend looking at the v4l2 plugin as it's quite
complicated and advanced. You don't need most of that for an initial
version of a camera source. It can be a very simple element that
inherits from GstPushSrc.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140806/b281c0ce/attachment.sig>


More information about the gstreamer-devel mailing list