Commit Graph

12 Commits

Author SHA1 Message Date
ejurgensen
3ee9204ff8 [xcode/daap/rsp] Default transcode to 320 kbps mp3 instead of wav
- Calculate size for both formats (+ move the return to transcode_encode_query)
- Let transcode_needed() decide what format to output
- Determine content-type from transcoding type
- Add transcode-dependent ability to override file metadata in rsp/daap
- Send file size matching format
2023-12-04 17:26:03 +01:00
ejurgensen
8528073003 [daap] Fix for use-after-free
Present in 28.7 and 28.8. Closes #1659.

Credit X-Ryl669.
2023-09-30 23:06:09 +02:00
ejurgensen
580ba924a4 [httpd] Remove needless test (always true) 2023-04-25 23:04:44 +02: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
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
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