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. How to repeat a part of video in Qt player
Forum Updated to NodeBB v4.3 + New Features

How to repeat a part of video in Qt player

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.1k 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.
  • H Offline
    H Offline
    herculis
    wrote on last edited by
    #1

    i want to start a video from let say after one min and stop it after 3 min and start the video again from 1 min means like a loop and video is 7 min long.Could anyone help me in this.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Marty
      wrote on last edited by
      #2

      maybe have a look at QTimer class : start the timer with method start(time) and make something in a slot when signal tiemout() is fired.

      if you need more control, use setPosition()

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

        There is no direct way to stop the video at specified duration.

        As Marty said,

        1. To start at 1 min, you use the setPosition(...).
        2. Use QTimer to fire timeout after 3 minutes. Use this as repeat timer.
        3. Now use stop() to stop the video.

        This you need to repeat.

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

        1 Reply Last reply
        0
        • H Offline
          H Offline
          herculis
          wrote on last edited by
          #4

          I used mediaplayer.setPosition(7000) to seek the video till 7 sec an after that play normally but its not working mean the video is starting from the start only.could you please help

          1 Reply Last reply
          0
          • H Offline
            H Offline
            herculis
            wrote on last edited by
            #5

            and if i used signal slot then how can i connect them to mediaplayer coz in the end its mediaplyer class which shuld receive the signal not the timer class and timeout() signal is related to timer class.

            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