From 9364d13c027644298c54a405dbf4160bef9f8eba Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 28 Nov 2011 18:47:50 -0300 Subject: camerabin2: viewfinderbin: use faster cast macro Use cast macro without type checks when we know it should work. --- gst/camerabin2/gstviewfinderbin.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gst/camerabin2/gstviewfinderbin.c b/gst/camerabin2/gstviewfinderbin.c index 87cfe2752..abf996bba 100644 --- a/gst/camerabin2/gstviewfinderbin.c +++ b/gst/camerabin2/gstviewfinderbin.c @@ -192,11 +192,11 @@ gst_viewfinder_bin_create_elements (GstViewfinderBin * vfbin) /* remove the elements, user doesn't want them */ gst_ghost_pad_set_target (GST_GHOST_PAD (vfbin->ghostpad), NULL); - csp = gst_bin_get_by_name (GST_BIN (vfbin), "vfbin-csp"); - videoscale = gst_bin_get_by_name (GST_BIN (vfbin), "vfbin-videoscale"); + csp = gst_bin_get_by_name (GST_BIN_CAST (vfbin), "vfbin-csp"); + videoscale = gst_bin_get_by_name (GST_BIN_CAST (vfbin), "vfbin-videoscale"); - gst_bin_remove (GST_BIN (vfbin), csp); - gst_bin_remove (GST_BIN (vfbin), videoscale); + gst_bin_remove (GST_BIN_CAST (vfbin), csp); + gst_bin_remove (GST_BIN_CAST (vfbin), videoscale); gst_object_unref (csp); gst_object_unref (videoscale); @@ -211,14 +211,14 @@ gst_viewfinder_bin_create_elements (GstViewfinderBin * vfbin) missing_element_name = "ffmpegcolorspace"; goto missing_element; } - gst_bin_add (GST_BIN (vfbin), csp); + gst_bin_add (GST_BIN_CAST (vfbin), csp); videoscale = gst_element_factory_make ("videoscale", "vfbin->videoscale"); if (!videoscale) { missing_element_name = "videoscale"; goto missing_element; } - gst_bin_add (GST_BIN (vfbin), videoscale); + gst_bin_add (GST_BIN_CAST (vfbin), videoscale); gst_element_link_pads_full (csp, "src", videoscale, "sink", GST_PAD_LINK_CHECK_NOTHING); -- cgit v1.2.3