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

Simplify selection of video stream #10730

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Profpatsch
Copy link
Contributor

I was trying to understand the logic here, and noticed the indirection via a QualityResolver interfaces is pretty unnecessary. Just branching directly makes the logic a lot easier to follow.

The -999 sentinel value is a bit dumb, but java does not recognize that videoIndex is always initialized.

Nice side-effect, the Resolver interface was completely unused and can be dropped.

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • record videos
  • create clones
  • take over the world

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

I was trying to understand the logic here, and noticed the indirection
via a QualityResolver interfaces is pretty unnecessary. Just branching
directly makes the logic a lot easier to follow.

The `-999` sentinel value is a bit dumb, but java does not recognize
that videoIndex is always initialized.

Nice side-effect, the `Resolver` interface was completely unused and
can be dropped.
@TobiGr TobiGr added player Issues related to any player (main, popup and background) codequality Improvements to the codebase to improve the code quality labels Jan 6, 2024
Copy link

sonarcloud bot commented Jan 6, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@Profpatsch Profpatsch force-pushed the simplify-video-stream-selection branch from e784673 to 71d88d0 Compare January 6, 2024 15:49
@Profpatsch
Copy link
Contributor Author

Should I change the switch to an if? In my mind the switch tells the reader that this is intended to be exhaustive, but I don’t care either way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codequality Improvements to the codebase to improve the code quality player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants