Application hang when playing audio

Application hang when playing audio

Hi all, We encounter a strange problem: when playing the audio, occasionally it fails and the application hangs. Does anyone have the same problem and have any clue? The application load a qml file from qrc and display it. In the qml file, we create an audio element: Audio { id: audioIncorrect source: "file:///opt/" } And there is a button in the qml, when click the button, we do: audioIncorrect.stop();; The intention is to play an alert when click the button. We create a rpm package and install it on EXOPC, the meego image version is 1.1.99 build: meego-tablet-ia32-pinetrail- After install, when launch the application, sometimes the sound play correctly without problem, but sometimes, when first click the button, there is no sound, and then click the button again, the application hangs. Another strange issue is run the application from console, it always display: Error: "The autoaudiosink element is not working." Error: "Internal data stream error." GStreamer; Unable to play - "file:///opt/" Error: "No URI set" And the application never hangs when running from console. Very appreciated if someone give a hint.
3 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

The music player pre-installed on meego seems without this problem. I checked the code in, I find it has a resource manager to play the music:

property variant resourceManager: ResourceManager {
name: "player"
type: ResourceManager.MusicApp
onStartPlaying: {;
onStopPlaying: {

but I can't find the definition of ResourceManager anywhere.

ResourceManager is defined by package meego-ux-media

/home/npm/qtquick/ux/meego-app-video/main.qml: property variant resourceManager: ResourceManager {
/home/npm/qtquick/ux/meego-app-video/main.qml: type: ResourceManager.VideoApp
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:ResourceManager::ResourceManager(QObject *parent) :
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::startup()
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::setType(const int type)
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::setName(const QString &name)
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::setUserwantsplayback(const bool userwantsplayback)
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::acquire()
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::release()
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::resourceAcquiredHandler(const QList&)
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.cpp:void ResourceManager::resourceLostHandler()
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.h:class ResourceManager : public QObject
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.h: ResourceManager(QObject *parent = 0);
/home/npm/qtquick/ux/meego-ux-media/lib/resourcemanager.h: ~ResourceManager();
/home/npm/qtquick/ux/meego-ux-media/libqml/mediaqml.cpp: qmlRegisterType(uri, 0, 0, "ResourceManager");
/home/npm/qtquick/ux/meego-app-music/main.qml: property variant resourceManager: ResourceManager {
/home/npm/qtquick/ux/meego-app-music/main.qml: type: ResourceManager.MusicApp

See also
"Default Using harmattan resource policies in apps"
(which also applies to MeeGo, with ResourceManager providing an alternate meego-ux implementation of what I implement here: )

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi