QtGStreamer 1.2.0
Loading...
Searching...
No Matches
plugin.cpp
1/*
2 Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
3 @author Benjamin Federau <benjamin.federau@basyskom.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
19#include "../../QGst/Quick/videoitem.h"
20#include "../../QGst/Quick/videosurface.h"
21#include <QtQml/QQmlExtensionPlugin>
22
23class QtGStreamerPlugin : public QQmlExtensionPlugin
24{
25 Q_OBJECT
26 Q_PLUGIN_METADATA(IID "org.freedesktop.gstreamer.QtGStreamerQuick2-1.0"
27 FILE "QtGStreamerQuick2.json")
28public:
29 virtual void registerTypes(const char *uri);
30};
31
32void QtGStreamerPlugin::registerTypes(const char *uri)
33{
34 // @uri org.freedesktop.gstreamer.QtGStreamerQuick2-1.0
35 qmlRegisterType<QGst::Quick::VideoItem>(uri, 1, 0, "VideoItem");
36 qmlRegisterUncreatableType<QGst::Quick::VideoSurface>(uri, 1, 0, "VideoSurface",
37 QLatin1String("Creating a QGst::Quick::VideoSurface from QML is not supported"));
38}
39
40#include "plugin.moc"