2 Copyright (C) 2009 George Kiagiadakis <kiagiadakis.george@gmail.com>
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published
6 by the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #include <gst/gstbin.h>
20 namespace QtGstreamer {
22 QGstBin::QGstBin(const char *name, QObject *parent)
23 : QGstElement(gst_bin_new(name), parent)
27 QGstBin::QGstBin(GstBin *gstBin, QObject *parent)
28 : QGstElement(GST_ELEMENT(gstBin), parent)
36 bool QGstBin::add(QGstElement *element)
38 if ( gst_bin_add(GST_BIN(m_object), GST_ELEMENT(element->m_object)) ) {
39 element->setParent(this);
45 QGstBin & QGstBin::operator<<(QGstElement *element)
51 bool QGstBin::remove(QGstElement *element)
53 if ( gst_bin_remove(GST_BIN(m_object), GST_ELEMENT(element->m_object)) ) {
54 element->setParent(NULL);
62 #include "qgstbin.moc"