QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
plugin.cpp
1 /*
2  Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
3  @author George Kiagiadakis <george.kiagiadakis@collabora.com>
4 
5  This library is free software; you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published
7  by the Free Software Foundation; either version 2.1 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #include "videoitem.h"
19 #include <QtDeclarative/QDeclarativeExtensionPlugin>
20 
21 class QtGStreamerPlugin : public QDeclarativeExtensionPlugin
22 {
23  Q_OBJECT
24 public:
25  void registerTypes(const char *uri);
26 };
27 
28 void QtGStreamerPlugin::registerTypes(const char *uri)
29 {
30  qmlRegisterType<VideoItem>(uri, 0, 10, "VideoItem");
31  qmlRegisterUncreatableType<QGst::Ui::GraphicsVideoSurface>(uri, 0, 10, "GraphicsVideoSurface",
32  QLatin1String("Creating a QGst::Ui::GraphicsVideoSurface from QML is not supported"));
33 }
34 
35 Q_EXPORT_PLUGIN2(qtgstPlugin, QtGStreamerPlugin)
36 
37 #include "plugin.moc"