Camerabin : Failed to link camera source's vfsrc pad to viewfinder queue
Lee Matthews
lma at spaceapplications.com
Tue Jun 17 02:07:59 PDT 2014
Hi,
I'm trying to use camerabin to record video from an Android device.
Here is a code snippet :
pipeline = gst_pipeline_new (NULL);
g_print("create camera.\n");
camera = gst_element_factory_make ("camerabin", "camerabin");
if(!camera)
{
g_print("camera create fail.\n");
return HTTP_FAIL;
}
g_print("create source.\n");
source = gst_element_factory_make ("v4l2src", "webcam");
if(!camera)
{
g_print("source create fail.\n");
return HTTP_FAIL;
}
g_print("set source.\n");
g_object_set (camera,"camera-source",source,NULL);
g_print("create multisocketsink.\n");
multisocketsink = gst_element_factory_make ("multisocketsink", NULL);
g_object_set (multisocketsink,
"unit-format", GST_FORMAT_TIME,
"units-max", (gint64) 7 * GST_SECOND,
"units-soft-max", (gint64) 3 * GST_SECOND,
"recover-policy", 3 /* keyframe */ ,
"timeout", (guint64) 10 * GST_SECOND,
"sync-method", 1 /* next-keyframe */ ,
NULL);
g_print("set viewdfinder.\n");
g_object_set (camera,"viewfinder-sink",multisocketsink,NULL);
g_print("add camera to pipeline.\n");
status = gst_bin_add (pipeline, camera);
if(!status)
{
g_print("Could not add camera to pipeline.\n");
return HTTP_FAIL;
}
--
When I look at the output of logcat, I get the following messages :
I/GStreamer+GST_ELEMENT_PADS(18924): 0:00:05.303407811 0x759fb6c0 gstelement.c:891:gst_element_get_static_pad no such pad 'imgsrc' in element "webcam"
I/GStreamer+GST_ELEMENT_PADS(18924): 0:00:05.303498696 0x759fb6c0 gstutils.c:1543:gst_element_link_pads_full trying to link element webcam:vfsrc to element viewfinderbin-queue:sink
I/GStreamer+GST_ELEMENT_PADS(18924): 0:00:05.303548071 0x759fb6c0 gstelement.c:891:gst_element_get_static_pad no such pad 'vfsrc' in element "webcam"
E/GStreamer+camerabin(18924): 0:00:05.303600519 0x759fb6c0 gstcamerabin2.c:1765:gst_camera_bin_create_elements:<camerabin> Failed to link camera source's vfsrc pad to viewfinder queue
What exactly is vfsrc ? I cannot find any reference to it. If it means view finder source, I don't understand why the v4l2src element would have these pads...
Thanks
Lee
More information about the gstreamer-devel
mailing list