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. example code for "Working with Low Level Video Frames" ?

example code for "Working with Low Level Video Frames" ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 868 Views
  • 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
    #1

    on this page, it says "There are both C++ and QML examples available", but then doesn't link to them. Does anyone have example C++ (not QML) code for using MyVideoSurface and MyVideoProducer to draw over a movie while it is playing?

    raven-worxR 1 Reply Last reply
    0
    • D davecotter

      on this page, it says "There are both C++ and QML examples available", but then doesn't link to them. Does anyone have example C++ (not QML) code for using MyVideoSurface and MyVideoProducer to draw over a movie while it is playing?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @davecotter said in example code for "Working with Low Level Video Frames" ?:

      MyVideoSurface and MyVideoProducer to draw over a movie while it is playing?

      what excatly do you want o draw? If it is just a watermark it's easier to place an overlay widget/item on the media player.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

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

        well yes, i'd like to draw animated text and / or graphics as an overlay. i think your idea is better since then we don't have to grab the video bits from the graphics card, draw on them, then push them back, right? i'd like the whole process to be hardware accelerated. i have no need to capture or alter the bits of the video.

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

          still, is there sample code for that page, where it says "here is some sample code"?

          new tack: okay so here's my current code:

          			QMediaPlayer		*mediaPlayer = new QMediaPlayer(NULL, QMediaPlayer::VideoSurface);
          			QGraphicsVideoItem	*videoItem = new QGraphicsVideoItem();
          			QGraphicsView		*graphicsView = new QGraphicsView(new QGraphicsScene(this));
          			QSizeF				vidSize(340, 200);
          			
          		    videoItem->setSize(vidSize);
          		
          		    mediaPlayer->setVideoOutput(videoItem);
          			
          			graphicsView->scene()->addItem(videoItem);
          			
          			SuperString		filePath(movieFile.path(true));
          			QUrl			fileUrl(QUrl::fromLocalFile(filePath));
          
          			mediaPlayer->setMedia(fileUrl);
          			mediaPlayer->play();
          			
          			layout->addWidget(graphicsView, 0, columnI++);
          

          what widget do i use to overlay a draw surface on top of that, and keep everything hardware accelerated? is there sample code for that?

          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