QtGStreamer 1.2.0
Loading...
Searching...
No Matches
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#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
22# define Q_PLUGIN_METADATA(x)
23#endif
24
25class QtGStreamerPlugin : public QDeclarativeExtensionPlugin
26{
27 Q_OBJECT
28 Q_PLUGIN_METADATA(IID "org.freedesktop.gstreamer.Qt5GStreamerQuick1-1.0")
29public:
30 void registerTypes(const char *uri);
31};
32
33void QtGStreamerPlugin::registerTypes(const char *uri)
34{
35 qmlRegisterType<VideoItem>(uri, 1, 0, "VideoItem");
36 qmlRegisterUncreatableType<QGst::Ui::GraphicsVideoSurface>(uri, 1, 0, "GraphicsVideoSurface",
37 QLatin1String("Creating a QGst::Ui::GraphicsVideoSurface from QML is not supported"));
38}
39
40#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
41Q_EXPORT_PLUGIN2(qtgstPlugin, QtGStreamerPlugin)
42#endif
43
44#include "plugin.moc"