gd
f15b6a43d3
Logging: curl - write debug output through MPD log instead of curl writing 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.
2025-02-01 08:53:38 +02:00
Max Kellermann
7c4ddb5943
input/uring: initialize uring_input_queue lazily
...
The BlockingCall() in InitUringInputPlugin() did not work because the
EventThread was not yet started. This was never noticed until commit
e309941646 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.
2025-01-30 20:00:57 +01:00
Max Kellermann
5b001957c7
input/async: skip resume and seek if there is a pending error
...
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.
2025-01-30 16:47:51 +01:00
Max Kellermann
715ef846b6
input/Plugin: pass URI as std::string_view
2025-01-30 13:38:30 +01:00
Max Kellermann
aee49d1c1c
input/cdio: pass std::string_view to parse_cdio_uri()
2025-01-30 13:17:47 +01:00
Max Kellermann
459390cd56
input/alsa: use std::string_view in class SourceSpec
2025-01-30 13:03:52 +01:00
Max Kellermann
e06d775af5
util/CircularBuffer: add method MoveTo()
...
This implements wraparound, so AsyncInputStream and ThreadInputStream
can now return all of the buffer contents in one Read() call.
2025-01-29 21:28:28 +01:00
Max Kellermann
950f5f4d32
input/{async,thread}: move code to ReadFromBuffer()
2025-01-29 21:26:05 +01:00
Max Kellermann
a404e5754e
Merge tag 'v0.23.17'
...
release v0.23.17
2025-01-29 17:20:02 +01:00
Max Kellermann
d7212624b0
input/{async,thread}: clear the CircularBuffer when it becomes empty
...
First step towards fixing https://github.com/MusicPlayerDaemon/MPD/issues/2186
2025-01-29 13:05:24 +01:00
Max Kellermann
70a0a781c8
input/async: move the IsEOF() check to a separate block
2025-01-29 12:59:04 +01:00
Max Kellermann
bd78307940
input/{async,thread}: add an additional Cond field
...
This eliminates the ScopeExchangeInputStreamHandler kludge.
2025-01-29 12:14:42 +01:00
Max Kellermann
959826d1d1
input/ffmpeg: offload FFmpeg calls to thread
...
Prepare for interruptible I/O.
2024-07-30 12:43:05 +02:00
Max Kellermann
ec30716e01
input/thread: implement size and seek
2024-07-30 12:33:44 +02:00
Max Kellermann
dc51015c75
input/mms: move MMS_BUFFER_SIZE into the class
2024-07-30 12:33:30 +02:00
Max Kellermann
72b0eeb7b1
input/mms: invoke Start() in constructor
2024-07-30 12:31:58 +02:00
Max Kellermann
b050e0132e
input/{async,thread}: add an additional Cond field
...
This eliminates the ScopeExchangeInputStreamHandler kludge.
2024-07-29 23:17:33 +02:00
Max Kellermann
cf962d94c7
input/thread: remove bogus inline
2024-07-29 23:14:16 +02:00
Max Kellermann
c29d23b4c3
input/thread: use notify_one() instead of notify_all()
...
There's only ever one waiter, and notify_one() may be faster than
notify_all().
2024-07-29 23:09:07 +02:00
Max Kellermann
61e8df913d
input/thread: check IsEOF() in IsAvailable()
2024-07-29 23:05:00 +02:00
Max Kellermann
4a55e3e8bd
input/thread: check buffer.empty() in IsEOF()
2024-07-29 23:03:00 +02:00
Max Kellermann
2e78bd430c
input/thread: use pass std::span<std::byte> to ThreadRead()
2024-07-29 22:32:52 +02:00
Max Kellermann
dbaa72cb40
util/CircularBuffer: use std::span internally
2024-07-29 22:24:54 +02:00
Max Kellermann
902cb8efac
input/thread: use std::byte instead of uint8_t
2024-07-29 22:13:50 +02:00
Max Kellermann
f54210bf68
input/async: move enum definition down
2024-07-29 22:13:42 +02:00
Max Kellermann
18cb34825d
input/alsa: use libfmt instead of std::string concatenation
2024-07-23 15:04:49 +02:00
Max Kellermann
3db8a4f41b
lib/alsa/NonBlock: embed in "namespace Alsa"
2024-07-11 21:33:03 +02:00
Max Kellermann
fb87e19bae
input/Registry: replace the input_plugins_for_each macros with a container class
2024-07-11 20:52:44 +02:00
Max Kellermann
13576b8a2e
lib/curl/Easy: use pass std::chrono::duration to SetTimeout()
2024-07-10 16:58:16 +02:00
Max Kellermann
381215fd73
*: use std::scoped_lock with implicit template parameter
2024-05-23 20:54:49 +02:00
Max Kellermann
b64d01677b
storage/nfs: optimize OpenFile()
2024-05-17 13:39:42 +02:00
Max Kellermann
2576e66a55
input/nfs: cancel the pending read operation on seek
2024-05-17 12:54:08 +02:00
Max Kellermann
1f47fe47c7
input/Open: move code to WaitReady()
2024-05-15 14:39:40 +02:00
Max Kellermann
556300d59a
input/InputStream: add [[nodiscard]]
2024-05-13 12:29:16 +02:00
Max Kellermann
34f7b38f39
input/InputStream: pass std::span<std::byte> to Read()
2024-05-13 12:28:40 +02:00
Max Kellermann
6d5dab38dd
input/async: pass std::string_view to constructor
2024-05-13 10:18:18 +02:00
Max Kellermann
0c1ecc96a8
*: let libfmt quote strings
2024-04-16 11:50:18 +02:00
Max Kellermann
6a99f20828
util/IntrusiveHashSet: add concept checks to *Operators
...
This requires adding another template argument and reordering the others.
2024-04-03 21:27:37 +02:00
Max Kellermann
e4ba736d03
input/{async,rewind}, decoder/dsdiff: use std::cmp_*() for safer integer comparisons
2024-03-15 18:45:46 +01:00
Max Kellermann
cc291e8c98
Merge branch 'extend-robustness-of-cdda-playback' of https://github.com/lazypingu/MPD
2024-03-15 18:39:45 +01:00
lazypingu
c00d217a53
Skip track if returned LSNs are negative which indicates track errors or if track is not an audio track
2024-03-12 20:39:51 +01:00
lazypingu
9d853897cd
Use track and disc functions from libcdio-paranoia to enable playback of hidden tracks and audio tracks on multisession CDs
2024-03-12 20:37:50 +01:00
lazypingu
88c77f9c8a
Add debug logging if setting speed failed
2024-03-12 20:37:50 +01:00
lazypingu
1a7278f1d3
Move cddap_speed_set below cddap_open to make sure that the drive was initialized and opened before attemting to set the speed
2024-03-12 20:36:28 +01:00
Max Kellermann
d685d693e8
input/rewind, archive/iso9660: use use std::cmp_*() for safe integer comparison
2024-03-11 15:09:57 +01:00
Max Kellermann
393d57b387
util/NumberParser: rename to CNumberParser
...
A new NumberParser library based on std::from_chars() will be added.
2024-01-04 21:02:45 +01:00
Max Kellermann
8b03ce562c
input/curl: increase CURLOPT_BUFFERSIZE from 16 kB to 512 kB
2024-01-04 17:57:42 +01:00
Max Kellermann
3c5b864396
tag/IcyMetadataParser: use std::span
2023-12-21 08:42:23 +01:00
borine
2fb34697c7
input/plugins/Alsa: catch all exceptions
...
snd_pcm_poll_descriptors_revents() may return any error code; the
ALSA docs do not constrain the permitted values. A 'hw' device
will only ever return an error if the pfd array passed in is
invalid (-EINVAL), but other I/O plugins may return arbitary
errors. For example a network-based device may return -EPIPE etc.
The resulting exception thrown by
AlsaNonBlockPcm::DispatchSockets() must be caught to prevent the
mpd process from being aborted.
2023-12-20 13:27:25 +01:00
borine
17d944f6ce
input/plugins/Alsa: limit ALSA buffer time to 2 seconds maximum
...
Some ALSA capture devices can have very large buffers, holding 10
seconds or more audio. Using the maximum buffer size with such
devices leads to unacceptably large, and unnecessary, latency.
Also, some ALSA drivers (e.g. HDA Intel PCH) report an invalid
maximum period size, and the period size that mpd calculates from
the maximum buffer size results in "Invalid argument" error when
applying the hw_params. Note that the "default" capture device on
many cards includes the "dsnoop" plugin which imposes a buffer
size of 16384 frames, so that "alsa://" works OK but
"alsa://plughw" or "alsa://hw" both fail.
Limit the maximum buffer time for ALSA input devices to a more useable
2 seconds, thereby avoiding both the above problems.
2023-12-20 13:26:24 +01:00