Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Input video data from C++ to QML Video Player
Forum Updated to NodeBB v4.3 + New Features

Input video data from C++ to QML Video Player

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 1.8k Views 1 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.
  • B Offline
    B Offline
    beemaster
    wrote on last edited by
    #1

    I am looking for a best way to implement a video player application in QML. Almost all QML examples are reading files from filesystem or web:

    @
    MediaPlayer {
    id: mediaplayer
    source: "groovy_video.mp4"
    }

    VideoOutput {
    anchors: parent.fill
    source: mediaplayer
    }
    @

    I want to specify my own source for MediaPlayer - a C++ QObject derived class, that has an interface similar to QIODevice. That would be perfect for my needs. I need to preload video in parts and also to cache it for later use.

    Is there an easy solution for my needs? (I am using Qt 5.2)

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      How about passing the data from C++ to QML using the QmlEngine rootcontext(). You can look at "here":http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppintegration-interactqmlfromcpp.html

      I have not tried with MediaPlayer class. C++ and QML interaction is very much feasible.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • L Offline
        L Offline
        laureon
        wrote on last edited by
        #3

        Is this what you looking for?
        http://qt-project.org/forums/viewthread/27741/

        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