summaryrefslogtreecommitdiff
path: root/gst-libs/gst/basecamerabinsrc
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-09-27 13:04:21 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-09-29 11:50:04 -0300
commitb03c7478d4df98ebcc3c1a53dfc2caaac0b52a34 (patch)
treeba8bc6b3f6f59b904d7cd806518e2b08e2dbb4f6 /gst-libs/gst/basecamerabinsrc
parent6446cc4ae941775475d794928ebe5fe2b4c52600 (diff)
downloadgstreamer-plugins-bad-b03c7478d4df98ebcc3c1a53dfc2caaac0b52a34.tar.gz
camerabin2: removing capsfilter from preview pipeline
appsink already has a caps property, so we don't need the capsfilter here
Diffstat (limited to 'gst-libs/gst/basecamerabinsrc')
-rw-r--r--gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c13
-rw-r--r--gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
index be42c98dc..c221ed9e2 100644
--- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
+++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
@@ -135,13 +135,11 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
data->pipeline = gst_pipeline_new ("preview-pipeline");
data->appsrc = gst_element_factory_make ("appsrc", "preview-appsrc");
- data->capsfilter = gst_element_factory_make ("capsfilter",
- "preview-capsfilter");
data->appsink = gst_element_factory_make ("appsink", "preview-appsink");
csp = gst_element_factory_make ("ffmpegcolorspace", "preview-csp");
vscale = gst_element_factory_make ("videoscale", "preview-vscale");
- if (!data->appsrc || !data->capsfilter || !data->appsink || !csp || !vscale) {
+ if (!data->appsrc || !data->appsink || !csp || !vscale) {
goto error;
}
@@ -149,7 +147,7 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
g_object_set (data->appsink, "sync", FALSE, "enable-last-buffer",
FALSE, NULL);
- gst_bin_add_many (GST_BIN (data->pipeline), data->appsrc, data->capsfilter,
+ gst_bin_add_many (GST_BIN (data->pipeline), data->appsrc,
data->appsink, csp, vscale, NULL);
if (filter)
gst_bin_add (GST_BIN (data->pipeline), gst_object_ref (filter));
@@ -173,9 +171,6 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
"sink", GST_PAD_LINK_CHECK_NOTHING));
linkfail |=
GST_PAD_LINK_FAILED (gst_element_link_pads_full (csp, "src",
- data->capsfilter, "sink", GST_PAD_LINK_CHECK_NOTHING));
- linkfail |=
- GST_PAD_LINK_FAILED (gst_element_link_pads_full (data->capsfilter, "src",
data->appsink, "sink", GST_PAD_LINK_CHECK_NOTHING));
if (linkfail) {
@@ -212,8 +207,6 @@ error:
gst_object_unref (vscale);
if (data->appsrc)
gst_object_unref (data->appsrc);
- if (data->capsfilter)
- gst_object_unref (data->capsfilter);
if (data->appsink)
gst_object_unref (data->appsink);
}
@@ -304,7 +297,7 @@ _gst_camerabin_preview_set_caps (GstCameraBinPreviewPipelineData * preview,
pending = GST_STATE_VOID_PENDING;
}
gst_element_set_state (preview->pipeline, GST_STATE_NULL);
- g_object_set (preview->capsfilter, "caps", caps, NULL);
+ g_object_set (preview->appsink, "caps", caps, NULL);
if (pending != GST_STATE_VOID_PENDING)
state = pending;
gst_element_set_state (preview->pipeline, state);
diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.h b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.h
index ff5bc719e..ef9cd9667 100644
--- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.h
+++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.h
@@ -35,7 +35,6 @@ typedef struct
GstElement *appsrc;
GstElement *filter;
- GstElement *capsfilter;
GstElement *appsink;
GstElement *element;