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

refactor: default to Qt Multimedia and delete default player shenanigans #1994

Conversation

shenlebantongying
Copy link
Collaborator

@shenlebantongying shenlebantongying commented Nov 26, 2024

Slightly related to #1738

Because on Linux, qt multimedia can uses the GStreamer which uses libspeex and it is not broken.

We currently don't ship FFmpeg backend for Windows & macOS.

If #1738 is not fixable, we can also consider reinstate the FFmpeg backend and build FFmpeg by ourselves.

Changing default back is as simple as changing the order of availableBackends()


Copy link

sonarcloud bot commented Nov 26, 2024

@xiaoyifang
Copy link
Owner

xiaoyifang commented Nov 26, 2024

If #1738 is not fixable, we can also consider reinstate the FFmpeg backend and build FFmpeg by ourselves.

I think for now, Just inform the users the ffmpeg should be blamed. no need to build the source code.

@shenlebantongying
Copy link
Collaborator Author

In a fresh startup, the audioPlayer fallback to the default one.

Open and close GD → in config, the audioPlayer will be empty. In the next startup, GD-ng will fall back to the default one.

Don't really care how the original GD will behave. Hopefully, the defensive programming of that person can handle this situation.

if ( !playerPtr || !qobject_cast< MultimediaAudioPlayer * >( playerPtr.data() ) ) {
playerPtr.reset( new MultimediaAudioPlayer );
}
playerPtr.reset( internalPlayerBackend.getActualPlayer() );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

reset will delete the current one and take over the ownership of incoming pointer.

@shenlebantongying shenlebantongying merged commit 7eb0648 into xiaoyifang:staged Nov 26, 2024
8 checks passed
@shenlebantongying shenlebantongying deleted the refactor/default-qt-multimedia-player branch November 26, 2024 00:54
@shenlebantongying
Copy link
Collaborator Author

I think for now, Just inform the users the ffmpeg should be blamed. no need to build the source code.

Ok.

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.

2 participants