summaryrefslogtreecommitdiffstats
path: root/src/multimedia/platform
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-02-08 15:44:43 +0100
committerLars Knoll <lars.knoll@qt.io>2021-02-09 19:05:03 +0000
commit2b21a66eed67c30d83e4ca088c59e3ca88a20fde (patch)
treea94559d8a4e6c048110505e8d7274715518903d3 /src/multimedia/platform
parentb6d6576089126d54998248bfe197d058c2be0d98 (diff)
Remove some code that not needed anymore
qgstreamerimagecapture/encoder provides the same functionality. And we won't be going with camerabin anyway as the API is still unstable and doesn't give us the flexibility we need. Some of the remaining code in here can be brought over to give better camera support, although gst-photography seems to be mostly unused. Change-Id: Iae7e8c20545f108a53a1efd0d83fd917c520e9d8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/multimedia/platform')
-rw-r--r--src/multimedia/platform/gstreamer/camerabin/camerabin.pri4
-rw-r--r--src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture.cpp303
-rw-r--r--src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture_p.h125
-rw-r--r--src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder.cpp88
-rw-r--r--src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder_p.h97
5 files changed, 0 insertions, 617 deletions
diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabin.pri b/src/multimedia/platform/gstreamer/camerabin/camerabin.pri
index 164e4b0a9..4c598a7a2 100644
--- a/src/multimedia/platform/gstreamer/camerabin/camerabin.pri
+++ b/src/multimedia/platform/gstreamer/camerabin/camerabin.pri
@@ -3,17 +3,13 @@ HEADERS += \
$$PWD/camerabinservice_p.h \
$$PWD/camerabinsession_p.h \
$$PWD/camerabincontrol_p.h \
- $$PWD/camerabinimageencoder_p.h \
$$PWD/camerabinrecorder_p.h \
- $$PWD/camerabinimagecapture_p.h \
$$PWD/camerabinimageprocessing_p.h \
SOURCES += \
$$PWD/camerabinservice.cpp \
$$PWD/camerabinsession.cpp \
$$PWD/camerabincontrol.cpp \
- $$PWD/camerabinimagecapture.cpp \
- $$PWD/camerabinimageencoder.cpp \
$$PWD/camerabinimageprocessing.cpp \
$$PWD/camerabinrecorder.cpp \
diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture.cpp b/src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture.cpp
deleted file mode 100644
index 36fb4c205..000000000
--- a/src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture.cpp
+++ /dev/null
@@ -1,303 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "camerabinimagecapture.h"
-#include "camerabincontrol.h"
-#include "camerabinsession.h"
-#include <private/qgstvideobuffer_p.h>
-#include <private/qgstutils_p.h>
-#include <QtMultimedia/qmediametadata.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/qbuffer.h>
-#include <QtGui/qimagereader.h>
-
-//#define DEBUG_CAPTURE
-
-#define IMAGE_DONE_SIGNAL "image-done"
-
-QT_BEGIN_NAMESPACE
-
-CameraBinImageCapture::CameraBinImageCapture(CameraBinSession *session)
- :QCameraImageCaptureControl(session)
- , m_encoderProbe(this)
- , m_muxerProbe(this)
- , m_session(session)
- , m_jpegEncoderElement(0)
- , m_metadataMuxerElement(0)
- , m_requestId(0)
- , m_ready(false)
-{
- connect(m_session, SIGNAL(statusChanged(QCamera::Status)), SLOT(updateState()));
- connect(m_session, SIGNAL(imageExposed(int)), this, SIGNAL(imageExposed(int)));
- connect(m_session, SIGNAL(imageCaptured(int,QImage)), this, SIGNAL(imageCaptured(int,QImage)));
-
- m_session->bus()->installMessageFilter(this);
-}
-
-CameraBinImageCapture::~CameraBinImageCapture()
-{
-}
-
-bool CameraBinImageCapture::isReadyForCapture() const
-{
- return m_ready;
-}
-
-int CameraBinImageCapture::capture(const QString &fileName)
-{
- m_requestId++;
-
- if (!m_ready) {
- emit error(m_requestId, QCameraImageCapture::NotReadyError, tr("Camera not ready"));
- return m_requestId;
- }
-
-#ifdef DEBUG_CAPTURE
- qDebug() << Q_FUNC_INFO << m_requestId << fileName;
-#endif
- m_session->captureImage(m_requestId, fileName);
- return m_requestId;
-}
-
-void CameraBinImageCapture::cancelCapture()
-{
-}
-
-QCameraImageCapture::CaptureDestinations CameraBinImageCapture::captureDestination() const
-{
- return m_destination;
-}
-
-void CameraBinImageCapture::setCaptureDestination(QCameraImageCapture::CaptureDestinations destination)
-{
- m_destination = destination;
-}
-
-
-void CameraBinImageCapture::updateState()
-{
- bool ready = m_session->status() == QCamera::ActiveStatus;
- if (m_ready != ready) {
-#ifdef DEBUG_CAPTURE
- qDebug() << "readyForCaptureChanged" << ready;
-#endif
- emit readyForCaptureChanged(m_ready = ready);
- }
-}
-
-GstPadProbeReturn CameraBinImageCapture::encoderEventProbe(
- GstPad *, GstPadProbeInfo *info, gpointer user_data)
-{
- GstEvent * const event = gst_pad_probe_info_get_event(info);
- CameraBinImageCapture * const self = static_cast<CameraBinImageCapture *>(user_data);
- if (event && GST_EVENT_TYPE(event) == GST_EVENT_TAG) {
- GstTagList *gstTags;
- gst_event_parse_tag(event, &gstTags);
- QMap<QByteArray, QVariant> extendedTags = QGstUtils::gstTagListToMap(gstTags);
-
-#ifdef DEBUG_CAPTURE
- qDebug() << QString(gst_structure_to_string(gst_event_get_structure(event))).right(768);
- qDebug() << "Capture event probe" << extendedTags;
-#endif
-
- QVariantMap tags;
- tags[QMediaMetaData::ISOSpeedRatings] = extendedTags.value("capturing-iso-speed");
- tags[QMediaMetaData::DigitalZoomRatio] = extendedTags.value("capturing-digital-zoom-ratio");
- tags[QMediaMetaData::ExposureTime] = extendedTags.value("capturing-shutter-speed");
- tags[QMediaMetaData::WhiteBalance] = extendedTags.value("capturing-white-balance");
- tags[QMediaMetaData::Flash] = extendedTags.value("capturing-flash-fired");
- tags[QMediaMetaData::FocalLengthIn35mmFilm] = extendedTags.value("capturing-focal-length");
- tags[QMediaMetaData::ExposureMode] = extendedTags.value("capturing-exposure-mode");
- tags[QMediaMetaData::FNumber] = extendedTags.value("capturing-focal-ratio");
- tags[QMediaMetaData::ExposureMode] = extendedTags.value("capturing-exposure-mode");
-
- for (auto i = tags.cbegin(), end = tags.cend(); i != end; ++i) {
- if (i.value().isValid()) {
- QMetaObject::invokeMethod(self, "imageMetadataAvailable",
- Qt::QueuedConnection,
- Q_ARG(int, self->m_requestId),
- Q_ARG(QString, i.key()),
- Q_ARG(QVariant, i.value()));
- }
- }
- }
- return GST_PAD_PROBE_OK;
-}
-
-void CameraBinImageCapture::EncoderProbe::probeCaps(GstCaps *caps)
-{
- capture->m_bufferFormat = QGstUtils::formatForCaps(caps, &capture->m_videoInfo);
-}
-
-bool CameraBinImageCapture::EncoderProbe::probeBuffer(GstBuffer *)
-{
-#ifdef DEBUG_CAPTURE
- qDebug() << "Uncompressed buffer probe";
-#endif
- // keep the buffer so we can capture to file or encode the image
- return true;
-}
-
-void CameraBinImageCapture::MuxerProbe::probeCaps(GstCaps *caps)
-{
- capture->m_jpegResolution = QGstUtils::capsCorrectedResolution(caps);
-}
-
-bool CameraBinImageCapture::MuxerProbe::probeBuffer(GstBuffer *buffer)
-{
- QCameraImageCapture::CaptureDestinations destination = capture->m_destination;
-
- if (destination & QCameraImageCapture::CaptureToBuffer) {
- QSize resolution = capture->m_jpegResolution;
- //if resolution is not presented in caps, try to find it from encoded jpeg data:
- GstMapInfo mapInfo;
- if (resolution.isEmpty() && gst_buffer_map(buffer, &mapInfo, GST_MAP_READ)) {
- QBuffer data;
- data.setData(reinterpret_cast<const char*>(mapInfo.data), mapInfo.size);
-
- QImageReader reader(&data, "JPEG");
- resolution = reader.size();
-
- gst_buffer_unmap(buffer, &mapInfo);
- }
-
- GstVideoInfo info;
- gst_video_info_set_format(
- &info, GST_VIDEO_FORMAT_ENCODED, resolution.width(), resolution.height());
- QGstVideoBuffer *videoBuffer = new QGstVideoBuffer(buffer, info);
-
- QVideoFrame frame(videoBuffer,
- resolution,
- QVideoFrame::Format_Jpeg);
- QMetaObject::invokeMethod(capture, "imageAvailable",
- Qt::QueuedConnection,
- Q_ARG(int, capture->m_requestId),
- Q_ARG(QVideoFrame, frame));
- }
-
-
- // Theoretically we could drop the buffer here when don't want to capture to file but that
- // prevents camerabin from recognizing that capture has been completed and returning
- // to its idle state.
- return true;
-}
-
-
-bool CameraBinImageCapture::processBusMessage(const QGstreamerMessage &message)
-{
- //Install metadata event and buffer probes
-
- //The image capture pipiline is built dynamically,
- //it's necessary to wait until jpeg encoder is added to pipeline
-
- GstMessage *gm = message.rawMessage();
- if (GST_MESSAGE_TYPE(gm) == GST_MESSAGE_STATE_CHANGED) {
- GstState oldState;
- GstState newState;
- GstState pending;
- gst_message_parse_state_changed(gm, &oldState, &newState, &pending);
-
- if (newState == GST_STATE_READY) {
- GstElement *element = GST_ELEMENT(GST_MESSAGE_SRC(gm));
- if (!element)
- return false;
-
- gchar *name = gst_element_get_name(element);
- QString elementName = QString::fromLatin1(name);
- g_free(name);
- if (elementName.contains("jpegenc") && element != m_jpegEncoderElement) {
- m_jpegEncoderElement = element;
- GstPad *sinkpad = gst_element_get_static_pad(element, "sink");
-
- //metadata event probe is installed before jpeg encoder
- //to emit metadata available signal as soon as possible.
-#ifdef DEBUG_CAPTURE
- qDebug() << "install metadata probe";
-#endif
- gst_pad_add_probe(
- sinkpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, encoderEventProbe, this, NULL);
-#ifdef DEBUG_CAPTURE
- qDebug() << "install uncompressed buffer probe";
-#endif
- m_encoderProbe.addProbeToPad(sinkpad, true);
-
- gst_object_unref(sinkpad);
- } else if ((elementName.contains("jifmux") || elementName.startsWith("metadatamux"))
- && element != m_metadataMuxerElement) {
- //Jpeg encoded buffer probe is added after jifmux/metadatamux
- //element to ensure the resulting jpeg buffer contains capture metadata
- m_metadataMuxerElement = element;
-
- GstPad *srcpad = gst_element_get_static_pad(element, "src");
-#ifdef DEBUG_CAPTURE
- qDebug() << "install jpeg buffer probe";
-#endif
- m_muxerProbe.addProbeToPad(srcpad);
-
- gst_object_unref(srcpad);
- }
- }
- } else if (GST_MESSAGE_TYPE(gm) == GST_MESSAGE_ELEMENT) {
- if (GST_MESSAGE_SRC(gm) == (GstObject *)m_session->cameraBin()) {
- const GstStructure *structure = gst_message_get_structure(gm);
-
- if (gst_structure_has_name (structure, "image-done")) {
- const gchar *fileName = gst_structure_get_string (structure, "filename");
-#ifdef DEBUG_CAPTURE
- qDebug() << "Image saved" << fileName;
-#endif
-
- if (m_destination & QCameraImageCapture::CaptureToFile) {
- emit imageSaved(m_requestId, QString::fromUtf8(fileName));
- } else {
-#ifdef DEBUG_CAPTURE
- qDebug() << Q_FUNC_INFO << "Dropped saving file" << fileName;
-#endif
- QFileInfo info(QString::fromUtf8(fileName));
- if (info.exists() && info.isFile())
- QFile(info.absoluteFilePath()).remove();
- }
- }
- }
- }
-
- return false;
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture_p.h b/src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture_p.h
deleted file mode 100644
index 8cd783ec9..000000000
--- a/src/multimedia/platform/gstreamer/camerabin/camerabinimagecapture_p.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef CAMERABINIMAGECAPTURECONTROL_H
-#define CAMERABINIMAGECAPTURECONTROL_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qcameraimagecapturecontrol.h>
-#include "camerabinsession.h"
-
-#include <qvideosurfaceformat.h>
-
-#include <private/qgstreamerbufferprobe_p.h>
-
-#include <gst/video/video.h>
-
-QT_BEGIN_NAMESPACE
-
-class CameraBinImageCapture : public QCameraImageCaptureControl, public QGstreamerBusMessageFilter
-{
- Q_OBJECT
- Q_INTERFACES(QGstreamerBusMessageFilter)
-public:
- CameraBinImageCapture(CameraBinSession *session);
- virtual ~CameraBinImageCapture();
-
- bool isReadyForCapture() const override;
- int capture(const QString &fileName) override;
- void cancelCapture() override;
-
- QCameraImageCapture::CaptureDestinations captureDestination() const override;
- void setCaptureDestination(QCameraImageCapture::CaptureDestinations destination) override;
-
- bool processBusMessage(const QGstreamerMessage &message) override;
-
-private slots:
- void updateState();
-
-private:
- static GstPadProbeReturn encoderEventProbe(GstPad *, GstPadProbeInfo *info, gpointer user_data);
-
- class EncoderProbe : public QGstreamerBufferProbe
- {
- public:
- EncoderProbe(CameraBinImageCapture *capture) : capture(capture) {}
- void probeCaps(GstCaps *caps) override;
- bool probeBuffer(GstBuffer *buffer) override;
-
- private:
- CameraBinImageCapture * const capture;
- } m_encoderProbe;
-
- class MuxerProbe : public QGstreamerBufferProbe
- {
- public:
- MuxerProbe(CameraBinImageCapture *capture) : capture(capture) {}
- void probeCaps(GstCaps *caps) override;
- bool probeBuffer(GstBuffer *buffer) override;
-
- private:
- CameraBinImageCapture * const capture;
-
- } m_muxerProbe;
-
- QVideoSurfaceFormat m_bufferFormat;
- QSize m_jpegResolution;
- CameraBinSession *m_session;
- GstElement *m_jpegEncoderElement;
- GstElement *m_metadataMuxerElement;
- GstVideoInfo m_videoInfo;
- int m_requestId;
- bool m_ready;
- QCameraImageCapture::CaptureDestinations m_destination;
-};
-
-QT_END_NAMESPACE
-
-#endif // CAMERABINCAPTURECORNTROL_H
diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder.cpp b/src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder.cpp
deleted file mode 100644
index 8c4eaec70..000000000
--- a/src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "camerabinimageencoder.h"
-#include "camerabinsession.h"
-
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-CameraBinImageEncoder::CameraBinImageEncoder(CameraBinSession *session)
- :QImageEncoderControl(session), m_session(session)
-{
-}
-
-CameraBinImageEncoder::~CameraBinImageEncoder()
-{
-}
-
-QList<QSize> CameraBinImageEncoder::supportedResolutions(const QImageEncoderSettings &, bool *continuous) const
-{
- if (continuous)
- *continuous = false;
-
- return m_session->supportedResolutions(qMakePair<int,int>(0,0), continuous, QCamera::CaptureStillImage);
-}
-
-QStringList CameraBinImageEncoder::supportedImageCodecs() const
-{
- return QStringList() << "jpeg";
-}
-
-QString CameraBinImageEncoder::imageCodecDescription(const QString &codecName) const
-{
- if (codecName == "jpeg")
- return tr("JPEG image");
-
- return QString();
-}
-
-QImageEncoderSettings CameraBinImageEncoder::imageSettings() const
-{
- return m_settings;
-}
-
-void CameraBinImageEncoder::setImageSettings(const QImageEncoderSettings &settings)
-{
- m_settings = settings;
- emit settingsChanged();
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder_p.h b/src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder_p.h
deleted file mode 100644
index 217eb1f22..000000000
--- a/src/multimedia/platform/gstreamer/camerabin/camerabinimageencoder_p.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CAMERABINIMAGEENCODE_H
-#define CAMERABINIMAGEENCODE_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qimageencodercontrol.h>
-
-#include <QtCore/qstringlist.h>
-#include <QtCore/qmap.h>
-
-#include <gst/gst.h>
-QT_BEGIN_NAMESPACE
-
-class CameraBinSession;
-
-class CameraBinImageEncoder : public QImageEncoderControl
-{
- Q_OBJECT
-public:
- CameraBinImageEncoder(CameraBinSession *session);
- virtual ~CameraBinImageEncoder();
-
- QList<QSize> supportedResolutions(const QImageEncoderSettings &settings = QImageEncoderSettings(),
- bool *continuous = 0) const override;
-
- QStringList supportedImageCodecs() const override;
- QString imageCodecDescription(const QString &formatName) const override;
-
- QImageEncoderSettings imageSettings() const override;
- void setImageSettings(const QImageEncoderSettings &settings) override;
-
-Q_SIGNALS:
- void settingsChanged();
-
-private:
- QImageEncoderSettings m_settings;
-
- CameraBinSession *m_session;
-
- // Added
- QStringList m_codecs;
- QMap<QString,QByteArray> m_elementNames;
- QMap<QString,QString> m_codecDescriptions;
- QMap<QString,QStringList> m_codecOptions;
-};
-
-QT_END_NAMESPACE
-
-#endif