QMediaPlayer not playing from IODevice
-
You need to install a codecs-pack.. e.g. K-Lite .. or other..
-
I don't know, it is just my suggestion... Maybe the reason is that in case of a stream, the QMediaPlayer do not know the format of a video... because it does not read a video header of a file... :)
-
I don't know, it is just my suggestion... Maybe the reason is that in case of a stream, the QMediaPlayer do not know the format of a video... because it does not read a video header of a file... :)
-
Hi,
Checking the doc of setMedia:
Setting the media to a null QMediaContent will cause the player to discard all information relating to the current media source and to cease all I/O operations related to that media.
-
Hi,
Checking the doc of setMedia:
Setting the media to a null QMediaContent will cause the player to discard all information relating to the current media source and to cease all I/O operations related to that media.
wrote on 1 Jun 2016, 21:35 last edited by onek24 6 Jan 2016, 21:42Thanks, but i have already tried creating a QMediaContent from the video file and passing it to my mediaplayer with the buffer. That didn't work either.
Maybe im understanding it wrong. Maybe the stream has to be actual video or audio data instead of a container like mp4 or mkv? And the QMediaContent the actual information for either video or audio data, instead of the full container?
-
wrote on 2 Jun 2016, 09:15 last edited by onek24 6 Feb 2016, 09:17
Since i was still unable to solve my problem:
Could someone please provide me a working block of code of a QMediaPlayer playing from a buffer or other IODevice? I would like to provide media-data while the QMediaPlayer plays. QTemporaryFile or something similar isn't an option too since it has to be live.
So basically: Playing from an IODevice while the device provides more data during playtime.
Thanks in advance.
-
Since i was still unable to solve my problem:
Could someone please provide me a working block of code of a QMediaPlayer playing from a buffer or other IODevice? I would like to provide media-data while the QMediaPlayer plays. QTemporaryFile or something similar isn't an option too since it has to be live.
So basically: Playing from an IODevice while the device provides more data during playtime.
Thanks in advance.
wrote on 5 Jun 2016, 13:00 last edited byHi.
QTemporaryFile can solve your problem
QTemporaryFile is based on QObject, so you can create a pointer to it and set the parent to QApplication:// in main.cpp QTemporaryFile *file = new QTemporaryFile(&app); // use file in application
file will be deleted when app destructor is called. (end of application)
It is better to create a singleton class derived from QObject that wraps temp file IO
use above method for setting its parent as application -
Hi.
QTemporaryFile can solve your problem
QTemporaryFile is based on QObject, so you can create a pointer to it and set the parent to QApplication:// in main.cpp QTemporaryFile *file = new QTemporaryFile(&app); // use file in application
file will be deleted when app destructor is called. (end of application)
It is better to create a singleton class derived from QObject that wraps temp file IO
use above method for setting its parent as applicationwrote on 5 Jun 2016, 13:26 last edited byIt's no option. I'm trieing to archieve a "straming"-like behaviour.
-
It's no option. I'm trieing to archieve a "straming"-like behaviour.
-
wrote on 4 May 2017, 14:02 last edited by
Did anyone solve this?
I am trying to decrypt a video before supplying the bytes to qmediaplayer. it doesn't seem to connect to the qiodevice. -
Did anyone solve this?
I am trying to decrypt a video before supplying the bytes to qmediaplayer. it doesn't seem to connect to the qiodevice.wrote on 9 Jan 2018, 15:20 last edited by Mohammad Kanan 1 Sept 2018, 15:41