Hi,
my problem is to capture sth from camera using GSreamer. I'm working on Linux and OMAP4. In pre-build image I have a command to capture image:
#!/bin/sh DISPLAY=:0 gst-launch --gst-debug-level=2 -e omx_camera device=0 do-timestamp=1 mode=0 nme=cam cam.src ! "video/x-raw-yuv, format=(fourcc)NV12, width=1280, height=720, framerate=24/1" ! queue ! avimux ! filesink location=foo1.avi t1. ! queue ! dri2videosink sync=fal
So If I undestand this It should capture video from omx_camera number=0 and save it as a foo1.avi. But it doesn't work. Error msg I get is:
(gst-launch-0.10:3579): GLib-GObject-CRITICAL **: Read/writable property 'exposure' on class 'GstOmxCamera' has type 'GstOmxCameraExposureControl' which is not exactly equal to the type 'guint' of the property on the interface 'GstPhotography' No protocol specified No protocol specified 0:00:00.356109667 3579 0x10692a0 ERROR omx gstomx_camera.c:1555:open_drm: Could not open display Setting pipeline to PAUSED ... No protocol specified No protocol specified 0:00:00.380157518 3579 0x10692a0 ERROR dri2videosink gstdri2util.c:178:gst_dri2context_new:<dri2videosink0> Failed to open X display ERROR: Pipeline doesn't want to pause. Setting pipeline to NULL ... Freeing pipeline ...
So my questions are:
1. Is it problem with display and connection to it? (I have X running but I am connected to my board over serial, and don't have any physic displays.)
2. How to capture sth? :D (I try many different versions and variations of gst-launch line, but no effect). I guess gst is installed correctly becouse I can test it:
$ gst-launch-1.0 -v fakesrc silent=0 num-buffers=3 ! fakesink silent=0 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "create ******* (fakesrc0:src) (0 bytes, timestamp: none, duration: none, offset: 0, offset_end: -1, flags: 0 ) 0xb6002408" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "preroll ******* " Pipeline is PREROLLED ... /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event ******* (fakesink0:sink) E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES, start=(gint64)0, stop=(gint64)-1, position=(gint64)0;) 0x1a5d198" Setting pipeline to PLAYING ... /GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "event ******* (fakesrc0:src) E (type: 289, GstEventLatency, latency=(guint64)0;) 0x1b84c08" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (0 bytes, timestamp: 0:00:00.000000000, duration: none, offset: 0, offset_end: -1, flags: 32 discont ) 0xb6002408" New clock: GstSystemClock /GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "create ******* (fakesrc0:src) (0 bytes, timestamp: none, duration: none, offset: 1, offset_end: -1, flags: 0 ) 0xb6002470" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (0 bytes, timestamp: 0:00:00.000000000, duration: none, offset: 1, offset_end: -1, flags: 0 ) 0xb6002470" /GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "create ******* (fakesrc0:src) (0 bytes, timestamp: none, duration: none, offset: 2, offset_end: -1, flags: 0 ) 0xb60024d8" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (0 bytes, timestamp: 0:00:00.000000000, duration: none, offset: 2, offset_end: -1, flags: 0 ) 0xb60024d8" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event ******* (fakesink0:sink) E (type: 86, ) 0x1a5d198" Got EOS from element "pipeline0". Execution ended after 2441406 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...