ejurgensen
f998b1f3dd
[streaming] Change how metadata is delivered to http streaming
...
This gets rid of player locks + the special header file outputs/streaming.h
2023-05-12 22:35:10 +02:00
ejurgensen
6364515fb7
[streaming] Use player_streaming_register() for thread safety
...
Also means we might be able to drop the special header file for
outputs/streaming.c making it a bit more like a regular output module.
2023-05-11 22:30:36 +02:00
ejurgensen
dedd4a95c2
[player] Add player_streaming_register() and _deregister()
2023-05-11 22:30:36 +02:00
ejurgensen
537012440b
[streaming] Fix mp3 streaming not working with ffmpeg 6
...
ffmpeg 6 requires fixed size frames for the encoder, so this commit refactors
the mp3 streaming to do support that. Also uses outputs_quality_subscribe which
potentially has better performance (e.g. a 48000 sample rate source will only
be resampled once if both airplay and mp3 streaming want 44100), and makes it
easier to create fixed size frames.
Resolves #1601
2023-05-11 22:30:36 +02:00
ejurgensen
701bad466e
[outputs] Add helpers for output buffer copy and free
2023-05-11 22:30:36 +02:00
ejurgensen
cd62070fdb
[xcode] Add "samples_per_frame" query parameter
2023-05-11 22:30:36 +02:00
ejurgensen
4df644eb3a
[mdns] Fix possible deref of null *addr in browse_resolve_callback()
...
Regression from PR #1599 , commit e7a7355
Fixes #1604
2023-05-04 22:39:22 +02:00
ejurgensen
2318739a58
[evrtsp] Proper enum return type for evrtsp_parse_headers + evrtsp_parse_firstline
...
Fixes compiler warnings
2023-04-25 23:09:25 +02:00
ejurgensen
580ba924a4
[httpd] Remove needless test (always true)
2023-04-25 23:04:44 +02:00
couteau
71d37fc9c7
Ignore ipv6 announcements when ipv6 disabled
2023-04-12 11:23:18 -04:00
couteau
e7a73551ab
Allow mixed ipv4/ipv6 mdns
2023-04-11 10:25:07 -04:00
ejurgensen
8013bac725
[artwork] Change search order for pipe artwork ("own" as fallback)
...
Ref. issue #1591
2023-04-03 22:33:21 +02:00
ejurgensen
9e93e130db
[raop] Make txt record comparison case insensitive
...
Should fix issue with TuneAero for Windows
Closes #1596
2023-03-28 23:09:08 +02:00
lordmyschkin
a4ae747b15
[web] Optionally Show FilePath on Now playing-Page
2023-03-15 22:32:16 +01:00
ejurgensen
c645d570ea
[artwork] Also look for "own" artwork for pipes
...
Closes #1591
2023-03-15 22:08:59 +01:00
ejurgensen
e94838925e
[httpd] Change prototype for the close connection callback
...
Don't include hreq since it isn't fully valid, so caller shouldn't be invited
to dereference it.
2023-03-07 21:01:45 +01:00
ejurgensen
18a80f15dd
[httpd] Multithread solution using worker threads instead of httpd threads
...
Using worker threads instead of httpd threads means that we, not libevent,
decide which requests get handled by which threads. This means that we can
make sure blocking requests (e.g. volume changes) don't get in the way of
realtime(ish) stuff like mp3 streaming.
Includes refactor of httpd_stream_file() since it was a bit of a monster.
2023-03-07 21:01:45 +01:00
ejurgensen
81922e147e
[streaming] Fix BSD name collision (pipe)
2023-03-07 21:01:10 +01:00
ejurgensen
a2c63a5bac
[httpd] Check for syscall() presence and fix small memleak
2023-03-07 21:01:10 +01:00
ejurgensen
7841e336b3
[main] Make libevent_pthreads non-optional
2023-03-07 21:01:10 +01:00
ejurgensen
e77cb3f94e
[streaming] ICY handling using output metadata events/callbacks
2023-03-07 21:01:10 +01:00
ejurgensen
4d0c297901
[evhtr] Consolidate pool threading in evthr.c
...
Also reinstate check for server already running
2023-03-07 21:01:10 +01:00
ejurgensen
bd6f38282c
[httpd] Main commit that adds multithreading to httpd
...
Also refactor streaming implementation to make it more like an output and to
let the design support multithreading.
2023-03-07 21:01:10 +01:00
ejurgensen
50a319df2b
[httpd] Try doing request handling in worker thread
2023-03-07 21:01:10 +01:00
ejurgensen
4736e10d11
[worker] Remove some unused includes
2023-03-07 21:01:10 +01:00
ejurgensen
3377faffb8
[worker] Switch worker to use evthr threadpool
2023-03-07 21:01:10 +01:00
ejurgensen
68d66c3229
[httpd] Drop libevhtp backend
...
Despite that it seemingly supports multithreading it picks threads that are
busy, and not sure how that can be prevented. Also libevhtp is currently
unmaintained.
2023-03-07 21:01:10 +01:00
ejurgensen
74f1b93b42
[httpd] Make http modules agnostic to evhttp
2023-03-07 21:01:10 +01:00
ejurgensen
4ae73fa9b4
[httpd] Move internal declarations to httpd_internal.h
2023-03-07 21:01:10 +01:00
ejurgensen
2778088c52
[httpd] Refactor to use modules for daap, dacp, json api etc.
...
Removes a lot of code duplication which hopefully will make it easier to add
support for evhtp as http engine.
2023-03-07 21:01:10 +01:00
ejurgensen
83b8a4eb3f
[http] Use curl for URL parsing instead of depending on httpd
...
Makes it easier to make the httpd parsing internal.
2023-03-07 21:01:10 +01:00
ejurgensen
2e31a3d4f3
[misc] 'unsigned short' instead of 'short unsigned' as arg to net_evhttp_bind()
2023-03-07 21:01:10 +01:00
ejurgensen
316d932d99
[dmap] Move dmap_send_error() to dacp_send_error()
...
Means dmap_common doesn't need a dependency to httpd and http replying is kept
within httpd_xxx modules.
2023-03-07 21:01:10 +01:00
ejurgensen
631996f133
[mpd] Decouple mpd and httpd
...
mpd is based on evhttp, so if httpd should use another backend they need to be
decoupled. No need to use httpd_send_reply/error, since CORS headers are not
relevant to MPD artwork serving.
2023-03-07 21:01:10 +01:00
ejurgensen
23979d223c
[httpd] Refactor http handlers so they are initialized centrally
...
Means regex.h doesn't need to be in httpd.h making it easier to e.g. experiment
with evhtp.
2023-03-07 21:01:10 +01:00
ejurgensen
5f342ea60b
[httpd/artwork] Drop support for libevent <2.1.4
2023-03-07 21:01:10 +01:00
ejurgensen
6ade24c935
[xcode] Support for user-configured ffmpeg filters
...
Closes #1583 and #290
2023-02-25 16:48:17 +01:00
ejurgensen
2272f99599
[artwork] Fix for --disable-spotify broken in commit c8e46aa
2023-02-06 22:59:27 +01:00
ejurgensen
070cf6a5fc
[spotify] Some cleanup of webapi client
2023-02-06 22:38:44 +01:00
ejurgensen
eee011180f
[spotify] Make web api client thread safe
...
Protect http_session with a lock and don't use mutating globals in utility
functions where it is less clear if they are protected.
2023-02-06 22:38:44 +01:00
ejurgensen
c8e46aad42
[artwork] Make Spotify online artwork getter thread safe
...
By making the global struct online_source's read-only. Before, the Spotify
handler was modifying auth_secret in a non-thread safe way.
2023-02-06 22:38:44 +01:00
ejurgensen
8b6336b91d
[xcode] Protect against memleak if future ffmpeg doesn't free options
...
Can happen if ffmpeg doesn't recognize all the options
2023-02-05 17:14:17 +01:00
ejurgensen
af07f9eeb4
[scan] Changes to commit 9a3cb3b7
...
* 'split_genre' -> 'only_first_genre' + changed description
* fix memleak on multiple genre tags
2022-12-29 20:07:30 +01:00
whatdoineed2do/Ray
0c43de9735
[scan] option to use first genre on multi token genres
...
multiple genres are either supported by format (see flac/orbis) or are
handled by convention (see mp3) - ffmpeg presents either case as a
single string, seperated by ';' (ie "Pop;Rock")
Currently the server/db does not support multiple genres and will store
the ffmpeg string as-is which is unlikely the user intention.
Introduce 'split_genre' to take the first genre token
2022-12-29 20:07:30 +01:00
ejurgensen
c23c2fdc45
[httpd] Addendum to commit 017e09d
: More fixing up of libevent warnings
2022-12-26 17:16:58 +01:00
ejurgensen
017e09d7c3
[httpd] Fix evhttp_connection_get_peer() const char warning for newer libevent
2022-12-25 20:09:38 +01:00
ejurgensen
b70188f4b8
[spotify] Fix commit 5e7bf182
to avoid picking too large images
2022-12-21 23:29:44 +01:00
ejurgensen
5e7bf1826c
[spotify] Fix poor artwork resolution on playback from playlist start
...
Closes #1559
2022-12-21 17:39:41 +01:00
whatdoineed2do/Ray
7d26c2c954
[db,scan,jsonapi] bug fix to handle date_released before 1970, storing -ve values in db
2022-12-13 17:38:07 +00:00
ejurgensen
7c0474b743
[player] Don't stop/clear queue on speaker 'prevent-playback' or 'busy'
...
When 'prevent-playback' or 'busy' is sent by a single playing speaker, we just
want to pause playback and not clear the queue
Closes #1553
2022-11-20 22:38:33 +01:00