qtmultimedia

QML data folder

怎甘沉沦 提交于 2019-12-02 03:33:05
问题 Im my app based on QML I use Camera and CameraCapture to capture an image from the camera. After it was captured I want to store captured image in application data folder with CameraCapture.captureToLocation() . But I have no idea how to get path to this folder. So my question - how can I get path to application folder wit write permissions? Is there way in Qt to get it? It should be system specified folder, I guess. For example in Android it should be /data/data/AppName. As I see

QML data folder

六月ゝ 毕业季﹏ 提交于 2019-12-02 03:12:28
Im my app based on QML I use Camera and CameraCapture to capture an image from the camera. After it was captured I want to store captured image in application data folder with CameraCapture.captureToLocation() . But I have no idea how to get path to this folder. So my question - how can I get path to application folder wit write permissions? Is there way in Qt to get it? It should be system specified folder, I guess. For example in Android it should be /data/data/AppName. As I see LocalStorage creates its files in some similar place. /data/data/AppName is not mapped in QStandardPaths , but I

QAudioDeviceInfo finds no default audio device on Ubuntu

旧街凉风 提交于 2019-11-30 09:37:44
I am trying to run the basic example from the QAudioDeviceInfo class reference , but Qt is not finding a default audio device. Running this code shows no output: foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput)) qDebug() << "Device name: " << deviceInfo.deviceName(); I'm running Qt Creator 2.7.1 with Qt 5.0.2 on Ubuntu 13.10. Qt Multimedia was installed via apt-get . My pro file has QT += multimedia . My header file includes: #include <QAudio> #include <QAudioOutput> #include <QAudioDeviceInfo> Any ideas as to what I might be doing wrong? It

QMediaPlayer doesn't play anything on Ubuntu 16.04 / Qt 5.6

给你一囗甜甜゛ 提交于 2019-11-29 15:17:19
I'm using the official Qt 5.6 SDK on Ubuntu 16.04 and when I try to play an mp3 file I just get: defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer" The code is as simple as it gets: mMediaPlayer->setMedia(QUrl::fromLocalFile(myMp3File)); mMediaPlayer->play(); This works on Android and it worked on my Ubuntu 14.04 machine before. What am I missing? All the required gstreamer (by documentation) stuff seems to be installed already by default, but it still doesn't work: $ dpkg -l | grep gstream ii gir1.2-gstreamer-1.0 1.8.2-1~ubuntu1 amd64 GObject

QAudioDeviceInfo finds no default audio device on Ubuntu

柔情痞子 提交于 2019-11-29 14:17:22
问题 I am trying to run the basic example from the QAudioDeviceInfo class reference, but Qt is not finding a default audio device. Running this code shows no output: foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput)) qDebug() << "Device name: " << deviceInfo.deviceName(); I'm running Qt Creator 2.7.1 with Qt 5.0.2 on Ubuntu 13.10. Qt Multimedia was installed via apt-get . My pro file has QT += multimedia . My header file includes: #include <QAudio

QMediaPlayer doesn't play anything on Ubuntu 16.04 / Qt 5.6

只谈情不闲聊 提交于 2019-11-28 09:18:52
问题 I'm using the official Qt 5.6 SDK on Ubuntu 16.04 and when I try to play an mp3 file I just get: defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer" The code is as simple as it gets: mMediaPlayer->setMedia(QUrl::fromLocalFile(myMp3File)); mMediaPlayer->play(); This works on Android and it worked on my Ubuntu 14.04 machine before. What am I missing? All the required gstreamer (by documentation) stuff seems to be installed already by default, but it