Commit Graph

93 Commits

Author SHA1 Message Date
Max Kellermann 381215fd73 *: use std::scoped_lock with implicit template parameter 2024-05-23 20:54:49 +02:00
Max Kellermann 34f7b38f39 input/InputStream: pass std::span<std::byte> to Read() 2024-05-13 12:28:40 +02:00
Max Kellermann 09a2da89a2 io/FileDescriptor: pass std::span to Full{Read,Write}() 2023-09-27 10:14:02 +02:00
Max Kellermann 90565b1e36 test/run_{input,output}: add missing includes 2023-03-29 10:06:48 +02:00
Max Kellermann 148aca23be use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
Max Kellermann 45b13fc2a6 util/OptionParser: move to cmdline/
This library will depend on libfmt, and libutil shouldn't depend on
any library.
2022-11-29 11:32:16 +01:00
Max Kellermann cc0def15c4 Copyright year 2022 2022-07-14 17:59:35 +02:00
Max Kellermann e8667f99be util/OptionParser: use std::span instead of ConstBuffer 2022-07-04 19:04:16 +02:00
Max Kellermann 6c107443d3 input/qobuz: include cleanup 2022-07-04 18:37:35 +02:00
Max Kellermann fdc0329e64 archive/List: add option to disable archive plugins in mpd.conf
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1384
2022-02-14 17:54:21 +01:00
Max Kellermann b1096a9935 test/{visit_archive,dump_text_file}: add basic config file support (not wired yet) 2022-02-14 16:43:37 +01:00
Max Kellermann a5fa43b526 fs/io: move to io/ 2021-12-03 14:35:41 +01:00
Rosen Penev 4e0e4c00bf treewide: replace lock_guard with scoped_lock
SonarLint reports the latter to be better:

std::scoped_lock basically provides the same feature as std::lock_guard,
but is more generic: It can lock several mutexes at the same time, with a
deadlock prevention mechanism (see {rule:cpp:S5524}). The equivalent code
to perform simultaneous locking with std::lock_guard is significantly more
complex. Therefore, it is simpler to use std::scoped_lock all the time,
even when locking only one mutex (there will be no performance impact).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 17:13:03 -08:00
Max Kellermann 4d9af9a81b test/run_{input,output,convert}: switch file descriptors to binary mode
Fixes those programs on Windows.
2021-03-08 17:27:23 +01:00
Max Kellermann c58c53293c test/run_input: add option --seek 2021-02-07 21:20:17 +01:00
Max Kellermann 8695a2806a test/run_input: document more options 2021-02-07 21:17:10 +01:00
Max Kellermann 5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann e8380cf2aa Merge branch 'v0.21.x' into master 2020-09-07 21:15:53 +02:00
Max Kellermann 979a7a1dcc test/run_input: add option --chunk-size 2020-09-07 20:52:37 +02:00
Max Kellermann 291be84704 Merge branch 'v0.21.x' into master 2020-09-07 20:18:40 +02:00
Max Kellermann 962cf32ba7 test/run_input: pass FileDescriptor to dump_input_stream() 2020-09-07 20:14:39 +02:00
Max Kellermann d7838950d8 test/run_input: use WithBufferedOutputStream() 2020-09-07 20:04:13 +02:00
Max Kellermann 2e93a83dd5 test/run_input: convert pointer to reference 2020-09-07 20:02:12 +02:00
Max Kellermann 12b97bbe38 release v0.21.22
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl6GCWgQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEvkQD/9qg6cnCgCKSOmTjteJu1ayeXBMDiL3cCCg
 AwarHQoxsB0102NpV+MLka+4HIwHn+WNL55TzYgfbSh0nfmnki2fZ0YpsZoQR79w
 MP11iMPnFH1oKqj58minBkFNmAis2aLYHJGKaQNUh7wcf0WhbVTqtWBUrKb07RQ0
 Zj5lXtg65O/+yaCVdQGS6fMk2t7CqBM+S3RmbXCib/JRMC6aozoC7nWPvj8b2R8d
 PgxwKMRzyslyFoxDQZrusDjJ1piyigzUMMr32yzYDED4Xr8jsEELaJfULbr6qWT2
 ZNYF91e+D5V7riASAtlFTaVMaISx4QbHjKWR5Xcx0q/SJPAXTxF8RrAqGvqpWYmc
 kqmC8iNxQsW5o3sNhI9qg6sOkq2dIu43VasRCvuo19GABR36wwTK5ORoazIi8fbU
 /Ki/oZHtZczHRop9Cd6698Qr9jyTPdIs55FbgejzrVADvAmslqtcA6XxCBuG1nSF
 Qo48dp9Px7J74qNNuDt5/xLnQGJKaW60/BXrMK9G9QG4x9r4zuCayDO6Qc7FMWWR
 DG7k9nYoXJU5YG7xp9Rk+Yj3Ade8kqhTnKfqw0f2JfkLt0ChPG+rZcxICWSdzZm0
 AfHxuEQlwKaaFHFEsZhVehlsXkeU9OVywo+QDzmY2uqQ2ddlBZ47Qm2MWgTsv8i/
 euVsrzLtag==
 =EedX
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.22'

release v0.21.22
2020-04-02 18:02:10 +02:00
Max Kellermann 9c66b0414a test/*: fix Windows build using class FromNarrowPath 2020-04-02 17:16:05 +02:00
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann 973c87b351 event/Call, ...: use wait() with predicate 2019-05-07 20:01:45 +02:00
Max Kellermann 1b5c1f75a4 input/InputStreams: pass std::unique_lock<> to various methods 2019-05-07 19:09:39 +02:00
Max Kellermann 92022658f9 thread/Cond: add wait() overload which takes a unique_lock<>
Just like std::condition_variable, which however has no way to specify
the std::mutex directly.
2019-04-26 11:51:45 +02:00
Max Kellermann b51bae5500 thread/*Cond: rename methods to match std::condition_variable 2019-04-25 19:46:43 +02:00
Max Kellermann 9e73ea77b4 input/Init: add RAII class 2019-02-05 22:07:49 +01:00
Max Kellermann b0739eca87 test/ConfigGlue: merge duplicate code from various debug programs 2019-02-05 21:56:20 +01:00
Max Kellermann c9ba4f3f9c archive/List: add RAII class 2019-02-05 21:40:07 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 80839b5372 test/run_input: allocate ConfigData in class GlobalInit 2018-08-19 22:41:08 +02:00
Max Kellermann 0ff0aca2e2 input/Init: use struct ConfigData 2018-07-17 22:05:27 +02:00
Max Kellermann d6529d8c60 test/*: catch and print all exceptions 2018-07-17 21:58:39 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann d0fbf6db59 input/Stream: remove attribute "cond", replace with handler interface
This adds a bit of overhead, but also adds flexibility to the API,
because arbitrary triggers may be invoked from that virtual method
implementation, not just Cond::signal().

The motivation for this is to make the handlers more dynamic, for the
upcoming buffering class utilizing ProxyInputStream.
2018-06-22 19:37:18 +02:00
Max Kellermann 005bb59797 test/run_input: move code from Scan() to input/ScanTags.cxx 2018-01-29 16:57:44 +01:00
Max Kellermann 3ecf5fd442 test/run_input: add frontend for InputPlugin::scan_tags() 2018-01-26 20:08:01 +01:00
Max Kellermann 3461580b34 test/run_input: add option "--verbose" 2018-01-24 15:29:30 +01:00
Max Kellermann c4f7740b80 fs/Path: replace method Null() with nullptr_t constructor 2018-01-17 12:16:21 +01:00
Max Kellermann 6c239f7a00 test/run_input: add option to load a configuration file 2018-01-17 12:09:08 +01:00
Max Kellermann 7d5b859756 test/run_input: add command-line option parser 2018-01-17 12:04:01 +01:00
Max Kellermann 73e69edac3 input/InputStream: ReadTag() returns std::unique_ptr<Tag> 2017-12-20 15:22:18 +01:00
Max Kellermann d1456ae039 test/*: use class EventThread instead of ScopeIOThread 2017-02-10 22:25:01 +01:00
Max Kellermann 3854211694 input/Plugin: pass EventLoop& to init()
Eliminate dependency on io_thread_get().
2017-01-26 09:26:25 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann d2046de193 test/run_input, ...: RAII-style global initialization 2017-01-03 12:24:05 +01:00