forked from MusicPlayerDaemon/MPD
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from MusicPlayerDaemon:master #26
Open
pull
wants to merge
33
commits into
CartoonFan:master
Choose a base branch
from
MusicPlayerDaemon:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libFLAC tries to keep on seeking a stream even after a (fatal) read error has occurred. Let the DecoderClient decide whether proceeding is possible. This fixes a crash bug when playing a file over NFS and the NFS connection fails.
The resume/seek was received asynchronously and meanwhile an error might have occurred that needs to be handled. This fixes another NFS-related crash bug.
Once a NFS request fails with NFS4ERR_EXPIRED, the whole connection is broken and we need to open a new one. I wish libnfs would report this to us as a connection-level error, but instead only the one request fails; therefore this workaround is an ugly kludge. Closes #2175
Reviewer's Guide by SourceryThis pull request refactors the codebase to use std::string_view instead of const char* for string handling, and introduces utility functions for parsing numbers and splitting strings. This improves code readability and maintainability, and reduces the risk of buffer overflows. Sequence diagram for updated audio format parsingsequenceDiagram
participant Client
participant AudioParser
participant StringUtils
Client->>AudioParser: ParseAudioFormat(string_view, mask)
AudioParser->>StringUtils: Split(src, ':')
StringUtils-->>AudioParser: {sample_rate, rest}
AudioParser->>AudioParser: ParseSampleRate(sample_rate, mask)
AudioParser->>StringUtils: Split(rest, ':')
StringUtils-->>AudioParser: {format, channels}
AudioParser->>AudioParser: ParseSampleFormat(format, mask)
AudioParser->>AudioParser: ParseChannelCount(channels, mask)
AudioParser-->>Client: AudioFormat
Class diagram showing updated string handling in InputPluginclassDiagram
class InputPlugin {
+name: const char*
+init(EventLoop&, ConfigBlock&): void
+finish(): void
+open(string_view uri, Mutex& mutex): InputStreamPtr
+scan_tags(string_view uri, RemoteTagHandler& handler): RemoteTagScanner*
+SupportsUri(string_view uri): bool
}
class InputStream {
+uri: string
+mutex: Mutex&
+static Open(string_view uri, Mutex& mutex): InputStreamPtr
+static OpenReady(string_view uri, Mutex& mutex): InputStreamPtr
}
InputPlugin ..> InputStream: creates
Class diagram showing AudioParser changesclassDiagram
class AudioParser {
+ParseAudioFormat(string_view src, bool mask): AudioFormat
-ParseSampleRate(string_view src, bool mask): uint32_t
-ParseSampleFormat(string_view src, bool mask): SampleFormat
-ParseChannelCount(string_view src, bool mask): uint8_t
}
class AudioFormat {
+sample_rate: uint32_t
+format: SampleFormat
+channels: uint8_t
+Clear(): void
+IsValid(): bool
+IsMaskValid(): bool
}
AudioParser ..> AudioFormat: creates
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This reverts commit b49cfe9. It was a bad idea because it broke signal handlers. I need to find a better way to fix io_uring intialization.
This reverts commit abc8420. This was a bad idea, too, because it broke daemonization.
The BlockingCall() in InitUringInputPlugin() did not work because the EventThread was not yet started. This was never noticed until commit e309941 which enabled `IORING_SETUP_SINGLE_ISSUER`, and suddenly the kernel refused to accept io_uring_submit() calls from the io_thread because io_uring_setup() had been called from the main thread.
…iting directly to stderr. The output gets the standard MPD log format with domain curl and a timestamp. Using CURLOPT_DEBUGFUNCTION that is only called when CURLOPT_VERBOSE is in effect when MPD log level is verbose.
This reverts commit 518ce01.
…nullptr May be null for the root of the files directory.
…m64-v8a/libmpd.so with the apk
… and permission FOREGROUND_SERVICE_MEDIA_PLAYBACK Required by newer android sdk.
…mpile sdk to 35, and target sdk to 34
Require to call it before calling Run(); remove the setter from Run(). This gives class EventThread more control over when it is initialized.
Log the io_uring initialization error at MPD startup.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Replace the usage of several C functions for string parsing with C++ equivalents, improving type safety and code clarity.
New Features:
Enhancements: