QMediaPlayer from memory only?
-
Say i have an mp4 file that is encrypted on disk, and must stay encrypted. I wish to load that file into RAM, decrypt it there, then send it to QMediaPlayer, using the QBuffer method. How do i tell the
setMedia
function its mime type? It apparently STILL NEEDS the file to be unencrypted on disk in order to determine its type? Is there a way to fake up aQUrl
or aQMediaContent
with the correct info and pass that in? How do i avoid using the disk for this? Note this is cross platform mac/win so there is no "simple ramdisk" i could create to fake up a file system. -
Hi,
Bad news: that won't work as is. Some backends do not support playing from memory.
You may have to consider building GStreamer for your targets. The backend supports custom pipelines that may allow you to more easily achieve your goal.
-
@SGaist said in QMediaPlayer from memory only?:
GStreamer
but aren't custom GStreamer pipelines out of scope for Qt6 ? i'm not investing in something that is dead.
-
I was not aware of this.
Note that, IIRC, GStreamer has a QtQuick plugin so it might also be an alternative.
-
In that link, it says "Out-of-scope ... Custom G-streamer pipelines".
also note i'm using Qt Widgets and have no intention to ever use QtQuick.
-
@davecotter said in QMediaPlayer from memory only?:
In that link, it says "Out-of-scope ... Custom G-streamer pipelines".
I saw it and I think that's a bad idea since it allows to access a larger set of media that way.
-
it's definitely a bad idea, for the reason you said.
clearly i can't invest in something that won't pan out. :(
oh well, i guess i'm stuck. -
You can add your weight to push for keeping the feature alive.
-
how do i do that?
-
You can add a comment explaining your use case and other that you may have that requires custom GStreamer pipelines.
-
-
This post is deleted!