Problem with mp3 playback using QMediaPlayer / Dynamically altering a QML
-
Hey there!
First of all: I have no idea what I'm actually doing as this is a required project for university and my first time ever really programming and using QT. That being said, I run into a problem while trying to build an mp3-player for this course.
I use the standard QMediaPlayer and sometimes everything works just fine, other times I can't get the player to play a file.
The player is reading the tags from the file and prints them to the Debug, so I can see if the infos are properly read. From time to time it will play a certain file, other times it wont. Did not change a thing, it just wont work.
Empty tags (as in "Artist " ", Title " ") and " DirectShowPlayerService::doSetUrlSource: Unresolved error code 80070020" as an error code is all I get.
Even further - sometime I open, say file1.mp3 and it doesn't work. Then file2.mp3, which works and suddenly file1.mp3 works aswell. I can't find a pattern, I can't pinpoint it to a certain type of files I'm using as it will randomly work...or not.
Do you guys need any specific lines from my code or do you have any ideas without it?
Question 2: Is it possible, if yes, how, to dynamically alter a qml file? I have a qml ile which just applies a blur effect on a fixed image - I want to use the image, I scanned from the file and set it as the background of my player with a slight blur. But I have no idea a) how to change the filepath in the qml and b) how to actually properly display it.
So, sorry for the wall of text but I hope you get my problem and can help me out! Thanks!