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

UI: Update media source time labels while seeking #10603

Merged
merged 1 commit into from May 4, 2024

Conversation

Warchamp7
Copy link
Member

Description

Update the time and duration labels in the context bar when changing the seek position

explorer_ECIQ8z0cPH.mp4

Motivation and Context

Better feedback of user interaction

How Has This Been Tested?

Seeked back and forth through multiple media files.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Copy link
Member

@WizardCM WizardCM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only very minor concern is that MediaSliderMoved might run more than 60 times a second, which could cause the whole UI to lag while dragging. Wouldn't mind a side-by-side, but otherwise I'm OK with this change.

@Lain-B Lain-B merged commit 8721bf6 into obsproject:master May 4, 2024
14 checks passed
@RytoEX
Copy link
Member

RytoEX commented May 4, 2024

A future problem/concern/refactor might be to redo this so that we store the media's duration once when it's loaded and refer back to the stored value rather than pulling a strong reference (sometimes two!) and fetching the source's duration every time we update labels. However, if we decide that a "file that has its duration change while loaded" is a valid use case, then we would have to load its duration every time. That said, I'm not sure if the get duration function call actually gets a new duration if that's happening.

@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants