Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QMediaObject::setNotifyInterval - equivalent ? #373

Closed
3electrons opened this issue Feb 12, 2015 · 9 comments
Closed

QMediaObject::setNotifyInterval - equivalent ? #373

3electrons opened this issue Feb 12, 2015 · 9 comments

Comments

@3electrons
Copy link

Hi Wang
Colud you please add equivalent of QtMultimedia
QMediaObject::setNotifyInterval(int ms)
that sets how often signal positionChanged is emited.

I am porting form QtMultimedia to QtAV
I used to set m_player->setNotifyInterval(50) for my QMediaPlayer
I guess it can do it for now with my timer frequently checking current progress.

@3electrons 3electrons changed the title QMediaObject::setNotifyInterval - equivalen ? QMediaObject::setNotifyInterval - equivalent ? Feb 12, 2015
@wang-bin
Copy link
Owner

No such interface now. Do we really need this?

@3electrons
Copy link
Author

I see m_player->updateClock(200); does the job :) otherwise progress was updated once per second.

@wang-bin
Copy link
Owner

Really? It"s strange. Usually this function is useless

@3electrons
Copy link
Author

Well I was mistaken - it does not do that.
How often positionChanged is emited and what it is that time dependend of ? Because sometimes it is emitted once per second and sometimes more often.

@wang-bin
Copy link
Owner

It"s in computeNotifyPrecision in AVPlayerPrivate.cpp

@wang-bin
Copy link
Owner

There"s no public api to set the interval. I can add it if necessary.

@3electrons
Copy link
Author

It would be nice :) Adding it as public may be useful for applications where there is need to synchronize video with data attached to it - as it is in mine case - and because of different cpu load factors it could be adjusted to optimal value.

wang-bin added a commit that referenced this issue Feb 17, 2015
@wang-bin
Copy link
Owner

added in cd4de96
Unlike QtMultimedia, only progress update interval changes,

@3electrons
Copy link
Author

Works like a charm :) Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants