title: Capture video from android camera with gstreamer
body: <p>Does anybody know how to capture video from android camera and save it to file using gstreamer1.0? I have already tried  <code>camerabin</code> plugin. I built this pipeline: 
  <code>gst-launch-1.0 camerabin mode=1 filename="/storage/sdcard0/Movies/camera.ogg"</code> 
  but it doesn't work. I uderstand that I must set <code>viewfinder-sink</code> and <code>camera-src</code> properties, but when I try to make pipeline by using gstreamer functions  like this </p>
  
  <pre><code> `data-&gt;pipeline = gst_element_factory_make("camerabin", "camerabin");
   g_object_set(data-&gt;pipeline, "mode", MODE_VIDEO, NULL);
   sink = gst_element_factory_make ("filesink", NULL);
   g_object_set(sink, "location","/storage/sdcard0/Movies/test.ogg");
   g_object_set(data-&gt;pipeline, "viewfinder-sink", sink, NULL);
   g_object_set(data-&gt;pipeline, "filename","/storage/sdcard0/Movies/camera-record.ogg", NULL);
   gst_element_set_state(data-&gt;pipeline, GST_STATE_READY);`
  </code></pre>
  
  <p>the app crashes and gives me error:</p>
  
  <p><code>A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x83127d5b in tid 27873 (als.tutorial_51)</code>
  I add filesink element because when I build pipeline like this:</p>
  
  <pre><code>data-&gt;pipeline = gst_parse_launch("camerabin mode=1 filename="/storage/sdcard0/Movies/camera.ogg")
  </code></pre>
  
  <p>file camera.ogg doesn't create in filesystem.</p>
  
  <p>And I can't set <code>camera-src</code> property, because i don't know what value i should use. In examples peoples use <code>v4l2</code>, but not all devices support this plugin. Also they used <code>ahcsrc</code>, but it gives me error: <code>no elements ahcsrc</code>. I tried to find this element and found out there is no such element in gstreamer1.0, only in gstreamer-0.10 in <code>androidcamera</code> plugin. </p>
  
  <p>Please, help me!</p>