camerabin: don't proxy gst xoverlay interface

Default view finder sink in camerabin is autovideosink which doesn't
support xoverlay iface. If application decides to use another sink
that supports xoverlay, then it can use the interface directly.
This commit is contained in:
Lasse Laukkanen 2009-04-22 12:29:14 +03:00 committed by Stefan Kost
parent 710faaef68
commit 3ff7128293
4 changed files with 1 additions and 118 deletions

View file

@ -14,7 +14,6 @@ EXTRA_DIST = gstcamerabin-marshal.list
plugin_LTLIBRARIES = libgstcamerabin.la
libgstcamerabin_la_SOURCES = gstcamerabin.c \
gstcamerabinxoverlay.c \
gstcamerabincolorbalance.c \
camerabinimage.c \
camerabinvideo.c \
@ -33,7 +32,6 @@ libgstcamerabin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstcamerabin_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstcamerabin.h \
gstcamerabinxoverlay.h \
gstcamerabincolorbalance.h \
camerabinimage.h \
camerabinvideo.h \

View file

@ -135,7 +135,6 @@
/* FIXME: include #include <gst/gst-i18n-plugin.h> and use _(" ") */
#include "gstcamerabin.h"
#include "gstcamerabinxoverlay.h"
#include "gstcamerabincolorbalance.h"
#include "gstcamerabinphotography.h"
@ -356,11 +355,7 @@ gst_camerabin_iface_supported (GstImplementsInterface * iface, GType iface_type)
{
GstCameraBin *camera = GST_CAMERABIN (iface);
if (iface_type == GST_TYPE_X_OVERLAY) {
if (camera->view_sink) {
return GST_IS_X_OVERLAY (camera->view_sink);
}
} else if (iface_type == GST_TYPE_COLOR_BALANCE) {
if (iface_type == GST_TYPE_COLOR_BALANCE) {
if (camera->src_vid_src) {
return GST_IS_COLOR_BALANCE (camera->src_vid_src);
}
@ -402,12 +397,6 @@ camerabin_init_interfaces (GType type)
NULL,
};
static const GInterfaceInfo camerabin_xoverlay_info = {
(GInterfaceInitFunc) gst_camerabin_xoverlay_init,
NULL,
NULL,
};
static const GInterfaceInfo camerabin_color_balance_info = {
(GInterfaceInitFunc) gst_camerabin_color_balance_init,
NULL,
@ -428,9 +417,6 @@ camerabin_init_interfaces (GType type)
g_type_add_interface_static (type,
GST_TYPE_IMPLEMENTS_INTERFACE, &camerabin_info);
g_type_add_interface_static (type, GST_TYPE_X_OVERLAY,
&camerabin_xoverlay_info);
g_type_add_interface_static (type, GST_TYPE_COLOR_BALANCE,
&camerabin_color_balance_info);

View file

@ -1,73 +0,0 @@
/*
* GStreamer
* Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Includes
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gstcamerabinxoverlay.h"
#include "gstcamerabin.h"
/*
* static functions implementation
*/
static void
gst_camerabin_expose (GstXOverlay * overlay)
{
if (overlay && GST_CAMERABIN (overlay)->view_sink) {
GstXOverlay *xoverlay = GST_X_OVERLAY (GST_CAMERABIN (overlay)->view_sink);
gst_x_overlay_expose (xoverlay);
}
}
static void
gst_camerabin_set_xwindow_id (GstXOverlay * overlay, gulong xwindow_id)
{
if (overlay && GST_CAMERABIN (overlay)->view_sink) {
GstXOverlay *xoverlay = GST_X_OVERLAY (GST_CAMERABIN (overlay)->view_sink);
gst_x_overlay_set_xwindow_id (xoverlay, xwindow_id);
}
}
static void
gst_camerabin_set_event_handling (GstXOverlay * overlay, gboolean handle_events)
{
if (overlay && GST_CAMERABIN (overlay)->view_sink) {
GstXOverlay *xoverlay = GST_X_OVERLAY (GST_CAMERABIN (overlay)->view_sink);
gst_x_overlay_handle_events (xoverlay, handle_events);
}
}
/*
* extern functions implementation
*/
void
gst_camerabin_xoverlay_init (GstXOverlayClass * iface)
{
iface->set_xwindow_id = gst_camerabin_set_xwindow_id;
iface->expose = gst_camerabin_expose;
iface->handle_events = gst_camerabin_set_event_handling;
}

View file

@ -1,28 +0,0 @@
/*
* GStreamer
* Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_CAMERAXOVERLAY_H__
#define __GST_CAMERAXOVERLAY_H__
#include <gst/interfaces/xoverlay.h>
extern void gst_camerabin_xoverlay_init (GstXOverlayClass * iface);
#endif /* #ifndef __GST_CAMERAXOVERLAY_H__ */