Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMediaPlayer from memory only?
Forum Updated to NodeBB v4.3 + New Features

QMediaPlayer from memory only?

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 3 Posters 918 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by davecotter
    #1

    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 a QUrl or a QMediaContent 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.

    eyllanescE 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • D Offline
        D Offline
        davecotter
        wrote on last edited by davecotter
        #3

        @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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I was not aware of this.

          Note that, IIRC, GStreamer has a QtQuick plugin so it might also be an alternative.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @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.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                davecotter
                wrote on last edited by
                #7

                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.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  You can add your weight to push for keeping the feature alive.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    davecotter
                    wrote on last edited by
                    #9

                    how do i do that?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      You can add a comment explaining your use case and other that you may have that requires custom GStreamer pipelines.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        davecotter
                        wrote on last edited by davecotter
                        #11

                        i have added my 2¢

                        1 Reply Last reply
                        1
                        • D davecotter

                          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 a QUrl or a QMediaContent 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.

                          eyllanescE Offline
                          eyllanescE Offline
                          eyllanesc
                          wrote on last edited by eyllanesc
                          #12
                          This post is deleted!
                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved