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. Reliable MediaObject::totalTime() queries
Forum Updated to NodeBB v4.3 + New Features

Reliable MediaObject::totalTime() queries

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.6k 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.
  • J Offline
    J Offline
    jkyle
    wrote on last edited by
    #1

    I need to reliably retrieve the totalTime() of MediaObjects. The problem is, initially an object is in Phonon::LoadingState. In this state, totalTime (and most other object information) is not defined/available.

    This results in a sort of race condition where attempts to retrieve the totalTime of a MediaObjects results in undefined behavior.

    How may I force a MediaObject to retrieve this information and wait for it to be available? I realize it's likely a performance optimization, but the totalTime value is more important to me than a hit to initial loading performance.

    I tried to force it by calling MediaObject::stop(), putting the object into a different Phonon::State (Phonon::StoppedState) a transition the docs hinted may do the trick. But this didn't work.

    My last resort would be doing some kind of loop that breaks when the MediaObject leaves the Phonon::LoadingState (with timeout).

    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