|
| 1 | +/* |
| 2 | + * Project: PiOmxTexturesQmlUtils |
| 3 | + * Author: Luca Carlon |
| 4 | + * Date: 03.12.2016 |
| 5 | + * |
| 6 | + * Copyright (c) 2016 Luca Carlon. All rights reserved. |
| 7 | + * |
| 8 | + * This file is part of PiOmxTexturesQmlUtils. |
| 9 | + * |
| 10 | + * PiOmxTexturesQmlUtils is free software: you can redistribute it and/or modify |
| 11 | + * it under the terms of the GNU Lesser General Public License as published by |
| 12 | + * the Free Software Foundation, either version 3 of the License, or |
| 13 | + * (at your option) any later version. |
| 14 | + * |
| 15 | + * PiOmxTexturesQmlUtils is distributed in the hope that it will be useful, |
| 16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | + * GNU Lesser General Public License for more details. |
| 19 | + * |
| 20 | + * You should have received a copy of the GNU Lesser General Public License |
| 21 | + * along with PiOmxTexturesQmlUtils. If not, see <http://www.gnu.org/licenses/>. |
| 22 | + */ |
| 23 | + |
| 24 | +#ifndef OMX_PIOMXTEXTURESPLUGIN_H |
| 25 | +#define OMX_PIOMXTEXTURESPLUGIN_H |
| 26 | + |
| 27 | +/*------------------------------------------------------------------------------ |
| 28 | +| includes |
| 29 | ++-----------------------------------------------------------------------------*/ |
| 30 | +#include <QQmlExtensionPlugin> |
| 31 | +#include <QtQml> |
| 32 | +#include <QObject> |
| 33 | +#include <QProcess> |
| 34 | + |
| 35 | +#include "omx_logging.h" |
| 36 | +#include "pot_videoprobe.h" |
| 37 | + |
| 38 | +/*------------------------------------------------------------------------------ |
| 39 | +| OMX_PiOmxTexturesPlugin class |
| 40 | ++-----------------------------------------------------------------------------*/ |
| 41 | +class OMX_PiOmxTexturesPlugin : public QQmlExtensionPlugin |
| 42 | +{ |
| 43 | + Q_OBJECT |
| 44 | + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") |
| 45 | + |
| 46 | +public: |
| 47 | + OMX_PiOmxTexturesPlugin(QObject* parent = 0); |
| 48 | + |
| 49 | + void registerTypes(const char* uri) { |
| 50 | + log_info("PiOmxTexturesQmlUtils version %s built %s, %s.", |
| 51 | + VERSION, __DATE__, __TIME__); |
| 52 | + |
| 53 | + log_info("Registering POT_VideoProbe QML type..."); |
| 54 | + Q_ASSERT(uri == QLatin1String("PiOmxTexturesQmlUtils")); |
| 55 | + qmlRegisterType<POT_VideoProbe>(uri, 0, 1, "POT_VideoProbe"); |
| 56 | + } |
| 57 | +}; |
| 58 | + |
| 59 | +#endif // OMX_PIOMXTEXTURESPLUGIN_H |
0 commit comments