summaryrefslogtreecommitdiff
path: root/gst-libs/gst/basecamerabinsrc
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-09-05 09:55:53 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-09-05 09:59:53 -0300
commitd41af4e2f83be8b7cc1460b273a8182cd45325ff (patch)
treedc028cab45ba95b501905c9eced3978c0016d807 /gst-libs/gst/basecamerabinsrc
parent0bdde84f3b8f76f0ac3e89af820a748088810a3a (diff)
downloadgstreamer-plugins-bad-d41af4e2f83be8b7cc1460b273a8182cd45325ff.tar.gz
camerabin2: preview: Remove one of the two colorspace converters
The preview pipeline doesn't need 2 colorspace converters, remove one to speed up caps negotiation and reduce the delay on getting the first preview buffer out of the preview pipeline. It shouldn't cause problems as videoscale and ffmpegcolorspace seems to handle the same caps, so no conversion should be needed for videoscale. Additionally, camerabin1 has been working with a similar pipeline with a single ffmpegcolorspace and no bugs have been open about it so far.
Diffstat (limited to 'gst-libs/gst/basecamerabinsrc')
-rw-r--r--gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
index 597aeb96f..9dfc1876a 100644
--- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
+++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
@@ -125,7 +125,6 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
{
GstCameraBinPreviewPipelineData *data;
GstElement *csp;
- GstElement *csp2;
GstElement *vscale;
gboolean added = FALSE;
gboolean linkfail = FALSE;
@@ -139,19 +138,17 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
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-csp0");
- csp2 = gst_element_factory_make ("ffmpegcolorspace", "preview-csp1");
+ csp = gst_element_factory_make ("ffmpegcolorspace", "preview-csp");
vscale = gst_element_factory_make ("videoscale", "preview-vscale");
- if (!data->appsrc || !data->capsfilter || !data->appsink || !csp ||
- !csp2 || !vscale) {
+ if (!data->appsrc || !data->capsfilter || !data->appsink || !csp || !vscale) {
goto error;
}
g_object_set (data->appsrc, "emit-signals", FALSE, NULL);
gst_bin_add_many (GST_BIN (data->pipeline), data->appsrc, data->capsfilter,
- data->appsink, csp, csp2, vscale, NULL);
+ data->appsink, csp, vscale, NULL);
if (filter)
gst_bin_add (GST_BIN (data->pipeline), gst_object_ref (filter));
added = TRUE;
@@ -162,21 +159,18 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
filter, NULL, GST_PAD_LINK_CHECK_NOTHING));
linkfail |=
GST_PAD_LINK_FAILED (gst_element_link_pads_full (filter, NULL,
- csp, "sink", GST_PAD_LINK_CHECK_CAPS));
+ vscale, "sink", GST_PAD_LINK_CHECK_CAPS));
} else {
linkfail |=
GST_PAD_LINK_FAILED (gst_element_link_pads_full (data->appsrc, "src",
- csp, "sink", GST_PAD_LINK_CHECK_NOTHING));
+ vscale, "sink", GST_PAD_LINK_CHECK_NOTHING));
}
linkfail |=
- GST_PAD_LINK_FAILED (gst_element_link_pads_full (csp, "src", vscale,
+ GST_PAD_LINK_FAILED (gst_element_link_pads_full (vscale, "src", csp,
"sink", GST_PAD_LINK_CHECK_NOTHING));
linkfail |=
- GST_PAD_LINK_FAILED (gst_element_link_pads_full (vscale, "src", csp2,
- "sink", GST_PAD_LINK_CHECK_NOTHING));
- linkfail |=
- GST_PAD_LINK_FAILED (gst_element_link_pads_full (csp2, "src",
+ 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",
@@ -212,8 +206,6 @@ error:
if (!added) {
if (csp)
gst_object_unref (csp);
- if (csp2)
- gst_object_unref (csp2);
if (vscale)
gst_object_unref (vscale);
if (data->appsrc)