Commit Graph

36 Commits

Author SHA1 Message Date
ejurgensen
ff2d0b4ab1 [httpd] Check speaker settings to determine DAAP/RSP stream format 2024-06-17 22:25:20 +02:00
ejurgensen
4a08644806 [xcode] Change the signature of transcode_setup/transcode_en/decode_setup()
Should make it easier to add/remove parameters without changing all calls to the
functions throughout the code.

Also adds an interface through which to call make_mp4_header().
2024-06-17 22:05:07 +02:00
ejurgensen
aed74fbb8a [xcode] Support for ALAC encoded RSP/DAAP streaming
Also changes WAV encoding to use source quality instead of fixed 44100/16/2.
Sets the default to WAV, since it has the best quality, and doesn't have the
delay that creating an MP4 container for ALAC currently has (TODO prepare
the headers to avoid the delay).

Ref issue #1182 and #1665
2024-06-17 22:05:07 +02:00
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
2bbc5f16c5 [xcode] Add support for seekable custom I/O (evbuffer input to transcode) 2021-05-31 11:55:32 +02:00
ejurgensen
a67c74ba6c [spotify] Introduce own spotifyc as replacement for libspotify 2021-05-31 11:54:30 +02:00
ejurgensen
1977db0319 [xcode] Add profile for ALAC encoding 2021-01-18 00:19:34 +01:00
ejurgensen
7e106aec09 [xcode] Add VP8 encoding profile 2020-11-18 23:13:00 +01:00
ejurgensen
53780a7ef3 [xcode] Make sample rate + channels variable
This change is preparation to use ffmpeg's resampling capabilities to keep local
audio in sync (by up/downsampling slightly). This requires that sample rates are
not fixed for a transcode profile.

Added benefit of this is that we don't need quite as many xcode profiles.
2019-04-02 22:47:11 +02:00
ejurgensen
1285128b9a [xcode] Fix incorrect source BPS detection + support for more audio qualities 2019-03-18 23:06:08 +01:00
ejurgensen
ad77a42dbb [xcode] Adapt to allow for new raw PCM input profiles, e.g. 48000/16 2019-03-18 23:06:08 +01:00
ejurgensen
9182597605 [input/xcode] Write to input buffer with the sources native sample rate/format
Still WIP at this point since the player and output can't use the use improved
quality yet, and because rtptimes etc. are likely incorrect
2019-03-18 23:06:08 +01:00
ejurgensen
d850c2e691 [xcode] Add OPUS encoding profile for RTP Chromecasting 2019-03-18 23:06:08 +01:00
ejurgensen
441ad006a6 [artwork/transcode] Also let transcode.c handle rescaling of non-file Spotify artwork 2017-08-06 22:31:43 +02:00
ejurgensen
e7f888645f [artwork/transcode] Adjust transcode.c so it can take care of artwork
rescaling, meaning we can do without parallel ffmpeg interfaces.
This also moves artwork rescaling from libswscale to libavfilter, which
seems to fix a problem with PNG rescaling.
2017-08-06 22:31:43 +02:00
ejurgensen
e96b9500db [transcode] Implement new ffmpeg decoding methods: avcodec_send_packet/avcodec_receive_frame 2017-08-06 22:20:44 +02:00
ejurgensen
25c1795af2 [transcode] Update to new ffmpeg api - part 1
- no more use of AVStream.codec
- ditch some backwards compability
- move closer to being able do video, at least for artwork
2017-08-06 22:20:44 +02:00
ejurgensen
8b5cac0538 [file/http/input] Implement metadata handling through input interface 2017-01-27 22:36:00 +01:00
chme
6690ba32eb [player/transcode/httpd] Pass path, data_kind and song_length to
transcode_decode_setup/transcode_setup
2016-11-12 09:11:40 +01:00
ejurgensen
1fbb4b0d59 [transcode] Fix problem for file types where ffmpeg decode returns 0
It seems ffmpeg/libav reads a file type like Monkey's audio in large
chunks, so that each packet must be passed to the decoder multiple
times. The decoder will return 0 until the packet is completed. This
change makes forked-daapd able to deal with a return value of 0.
2016-05-06 00:23:07 +02:00
ejurgensen
3e80e5c517 [transcode] Don't pass error to player on eof + some comments and cleaning 2015-10-22 22:09:19 +02:00
ejurgensen
2a610812a5 Refactor transcode.c so it can actually transcode + use new capability to support mp3 streaming.
Also includes the skeleton for perhaps supporting video in the future. Adds more fine-grained
ffmpeg/libav compability checks. Dependency on libavresample/libswresample exchanged with
dependency on libavfilter, which seems more versatile.
2015-10-09 23:58:27 +02:00
ejurgensen
99cda05dab Remove player metadata event timer (use the existing instead) 2015-04-11 20:30:31 +02:00
ejurgensen
e72447954a Some cleaning up of ICY artwork retrieval 2015-04-09 22:22:42 +02:00
ejurgensen
b8d8df132b Support for remote m3u playlists (ref pr #79) 2015-03-20 23:40:42 +01:00
ejurgensen
6221e24f1b Support for live ICY metadata for streams (incl. artwork) 2015-03-14 21:42:53 +01:00
ejurgensen
513e38dcda Proper update to libevent 2 (artwork, avio_evbuffer, dmap_common, transcode) 2014-09-28 22:44:45 +02:00
ejurgensen
cf091e8d8b Adjust daapcache so it serves User-Agent to httpd_daap's reply handlers 2014-08-23 00:02:01 +02:00
ejurgensen
5b4ef31758 Migrate all evhttp to non-deprecated libevent2
- well except a troublemaker in httpd_daap.c (req->flags &= ~EVHTTP_PROXY_REQUEST)
2014-05-29 23:22:00 +02:00
ejurgensen
687f349927 Let configure check libevent version and include according to version 2014-03-13 23:33:35 +01:00
ejurgensen
7ed6cc98c3 Add support for Spotify (squashed commit), and:
- Try to not return items which a client can't play
    - Remove inotify subscription to IN_MODIFY and IN_CREATE
    - Fix crash on unknown codec type in transcode.c
    - Probably added some new bugs...
2014-03-11 23:20:29 +01:00
Julien BLACHE
17daace67f Add seek support to transcode 2010-05-02 11:21:08 +02:00
Julien BLACHE
9fb7ec8e5c Make the WAV header optional 2010-05-02 11:21:08 +02:00
Julien BLACHE
58faeaceca Integer types cleanup
Try to be a bit more strict about integer types, use off_t or int64_t for
file size and file offsets.

Replace safe_ato*() by safe_atoi32() and safe_atoi64(), fix integer types
at call sites to match.
2010-02-02 21:09:56 +01:00
Julien BLACHE
e4fe084619 Use embedded evhttp 2009-05-03 11:16:57 +02:00
Julien BLACHE
2c2498b6b4 Add transcoding infrastructure 2009-05-03 11:16:57 +02:00