gst: libcamerasrc: Allocate and add static pad
This pad will always be present and will allow simple pipeline to be used to stream from the camera. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
71a28f9593
commit
26c923a27c
@@ -12,6 +12,7 @@
|
||||
|
||||
struct _GstLibcameraSrc {
|
||||
GstElement parent;
|
||||
GstPad *srcpad;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(GstLibcameraSrc, gst_libcamera_src, GST_TYPE_ELEMENT);
|
||||
@@ -31,6 +32,10 @@ GstStaticPadTemplate request_src_template = {
|
||||
static void
|
||||
gst_libcamera_src_init(GstLibcameraSrc *self)
|
||||
{
|
||||
GstPadTemplate *templ = gst_element_get_pad_template(GST_ELEMENT(self), "src");
|
||||
|
||||
self->srcpad = gst_pad_new_from_template(templ, "src");
|
||||
gst_element_add_pad(GST_ELEMENT(self), self->srcpad);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user