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/>.
17 #ifndef _QTGSTREAMER_QGSTELEMENT_H
18 #define _QTGSTREAMER_QGSTELEMENT_H
20 #include "qgstobject.h"
21 typedef struct _GstElement GstElement;
23 namespace QtGstreamer {
25 class QGstElement : public QGstObject
28 Q_DISABLE_COPY(QGstElement)
30 enum State { VoidPending, Null, Ready, Paused, Playing };
32 explicit QGstElement(GstElement *gstElement, QObject *parent = 0);
33 virtual ~QGstElement();
35 //FIXME those functions need some love to match the gstreamer api
36 State currentState() const;
37 void setState(State state);
39 static bool link(QGstElement *element1, QGstElement *element2,
40 QGstElement *element3 = NULL, QGstElement *element4 = NULL,
41 QGstElement *element5 = NULL, QGstElement *element6 = NULL,
42 QGstElement *element7 = NULL, QGstElement *element8 = NULL,
43 QGstElement *element9 = NULL, QGstElement *element10 = NULL);
45 static void unlink(QGstElement *element1, QGstElement *element2,
46 QGstElement *element3 = NULL, QGstElement *element4 = NULL,
47 QGstElement *element5 = NULL, QGstElement *element6 = NULL,
48 QGstElement *element7 = NULL, QGstElement *element8 = NULL,
49 QGstElement *element9 = NULL, QGstElement *element10 = NULL);