Stream video from Android camera

Sebastian Dröge sebastian at centricular.com
Wed Mar 12 01:35:22 PDT 2014


On Di, 2014-03-11 at 05:25 -0700, Dmitry Kazakov wrote:
> Hi,
> 
> I would like to play stream from Android camera to some file or server. Is
> it possible? How should I built a pipeline in this case?

You will have to write a GStreamer source element for the Android camera
API or use an appsrc that provides the camera frames to GStreamer.

The API that could be used for this is android.hardware.Camera and then
using the "preview" feature (which allows you to capture multiple frames
instead of just a single snapshot, and although called preview it will
give you HD resolutions or whatever your device supports).

You'll have to use JNI to access this API from C, see the androidmedia
plugin for an example of how to do that. Or alternatively you could pass
the camera frames from your application to the appsink via JNI, which
might be a bit simpler in the end.

-- 
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-android/attachments/20140312/601cb3e0/attachment.pgp>


More information about the gstreamer-android mailing list