diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2014-04-03 15:17:49 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-07 11:50:29 +0200 |
commit | d3ba2d6f3f7cbdd8a4e41a7967874f53a2caaec3 (patch) | |
tree | 53529d761162fc454de57481cbc01ad89e04dd5f /src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp | |
parent | b0c68a1a07f546fe22a7d76b1a15bb2b39aa550f (diff) | |
download | qtmultimedia-d3ba2d6f3f7cbdd8a4e41a7967874f53a2caaec3.tar.gz |
GStreamer: cleanup system includes.
Replaced some linux includes with <private/qcore_unix_p.h> to be more
portable.
Use qt_safe_open() and qt_safe_close() instead of ::open() and
::close().
Task-number: QTBUG-38061
Change-Id: Idb3f50d070ec1701cafba98e79e2e85824653a3a
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp')
-rw-r--r-- | src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp index 657b9806f..8b88fbb71 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp @@ -51,18 +51,8 @@ #include "qgstreamercaptureservice.h" #include <private/qgstutils_p.h> -#include <linux/types.h> -#include <sys/time.h> -#include <sys/ioctl.h> -#include <sys/poll.h> -#include <unistd.h> -#include <fcntl.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <sys/mman.h> +#include <private/qcore_unix_p.h> #include <linux/videodev2.h> -#include <gst/gst.h> QMediaService* QGstreamerCaptureServicePlugin::create(const QString &key) { @@ -155,7 +145,7 @@ void QGstreamerCaptureServicePlugin::updateDevices() const foreach( const QFileInfo &entryInfo, entries ) { //qDebug() << "Try" << entryInfo.filePath(); - int fd = ::open(entryInfo.filePath().toLatin1().constData(), O_RDWR ); + int fd = qt_safe_open(entryInfo.filePath().toLatin1().constData(), O_RDWR ); if (fd == -1) continue; @@ -185,7 +175,7 @@ void QGstreamerCaptureServicePlugin::updateDevices() const m_cameraDevices.append(entryInfo.filePath().toLocal8Bit()); m_cameraDescriptions.append(name); } - ::close(fd); + qt_safe_close(fd); } if (!m_cameraDevices.isEmpty()) |