summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2012-05-03 19:11:57 -0400
committerThiago Santos <thiago.sousa.santos@collabora.com>2012-05-04 19:50:52 -0300
commitd3303121c87af5f42b3d745db22e26f0a0c8eb02 (patch)
treeeb0bd022e300bfabc94bc3f39613cfe20481cfb8 /gst/camerabin2
parent99b6f14486e069dc02d7c4090417aebd104bd291 (diff)
basecamerabin: Do not set the pad templates in the base class.
It is best to let the subclass define the pad templates, this would allow the subclass to decide which caps the pads should have.
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index b69a08880..189d66840 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -54,6 +54,24 @@ GST_DEBUG_CATEGORY (wrapper_camera_bin_src_debug);
G_DEFINE_TYPE (GstWrapperCameraBinSrc, gst_wrapper_camera_bin_src,
GST_TYPE_BASE_CAMERA_SRC);
+static GstStaticPadTemplate vfsrc_template =
+GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME,
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate imgsrc_template =
+GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME,
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate vidsrc_template =
+GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME,
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+
static void set_capsfilter_caps (GstWrapperCameraBinSrc * self,
GstCaps * new_caps);
@@ -1126,6 +1144,15 @@ gst_wrapper_camera_bin_src_class_init (GstWrapperCameraBinSrcClass * klass)
GST_DEBUG_CATEGORY_INIT (wrapper_camera_bin_src_debug, "wrappercamerabinsrc",
0, "wrapper camera src");
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&vfsrc_template));
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&imgsrc_template));
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&vidsrc_template));
+
gst_element_class_set_details_simple (gstelement_class,
"Wrapper camera src element for camerabin2", "Source/Video",
"Wrapper camera src element for camerabin2",