Commit Graph

3699 Commits

Author SHA1 Message Date
ejurgensen
40c7522baa [db] Make Apple Music on Catalina work - part 2 (fix for issue #834)
Extends the playlist table with media_kind to handle playlist queries like
this from Apple Music:

/databases/71/containers?session-id=12345678&revision-number=4&delta=0&query=('dmap.itemname:Library%20name','com.apple.itunes.extended-media-kind:1','com.apple.itunes.extended-media-kind:32','com.apple.itunes.extended-media-kind:128','com.apple.itunes.extended-media-kind:65537')&meta=dmap.itemid,dmap.itemname,dmap.persistentid,dmap.parentcontainerid,com.apple.itunes.is-podcast-playlist,com.apple.itunes.special-playlist,com.apple.itunes.smart-playlist,dmap.haschildcontainers,com.apple.itunes.saved-genius,dmap.objectextradata
2019-11-01 15:44:53 -07:00
ejurgensen
a69e79e5ec [daap] Make Apple Music on Catalina work - part 1 (fix for issue #834)
Like with iTunes, it has adverse effects to announce support for DAAP groups,
so with this change we also check if user-agent is "Music" before deciding what
to announce.
2019-11-01 15:43:56 -07:00
ejurgensen
dd24c35b2f [misc] Add missing comparison in quality_is_equal() 2019-10-26 23:30:44 +02:00
ejurgensen
051e526b2c [pipe] Disallow 24 bit input, doesn't work currently
If 24 bit input needs to be transcoded, like it will for AirPlay, it
will fail in transcode.c, because XCODE_PCM24 actually produces 4-byte
samples.
2019-10-26 23:28:05 +02:00
ejurgensen
85ab7c3057 [alsa] Fix playback of 24 bit audio (issue #830)
The player will write 24 bit samples using 3 bytes, not 4, so the appropriate
sample format is SND_PCM_FORMAT_S24_3LE, not SND_PCM_FORMAT_S24_LE.

For extra protection we also use snd_pcm_bytes_to_frames() instead of BTOS(),
because that way we can be more certain that the buffer is not too short for
snd_pcm_writei().
2019-10-22 19:51:51 +02:00
ejurgensen
41f51d43ac [pipe] Allow configuration of 32 bit input format (issue #830)
Should work with e.g. arecord -f S32_LE -r 96000 -c 2 -t wav
2019-10-21 21:54:12 +02:00
chme
4c835f4435 [player] Remove dead code and rework check if fetching queue item failed 2019-10-20 14:36:21 +02:00
chme
69d3c97b7e [player] Fix freeing of queue item if error happens during seek
Plus fix some code style issues and add more documentation
2019-10-20 14:36:21 +02:00
chme
6e5d6791ff [player/dacp/mpd/jsonapi] Combine seek commands into one with mode param
Also changes relative seeking behavior:
- seeking behind the the current track only switches to the previous
track, if we are not more than 3 seconds into the current track,
otherwise starts current track from the beginning
- seeking beyond the current track will start the next track from the
beginning
2019-10-20 14:36:21 +02:00
chme
d69f328973 [jsonapi] Support relative seeking 2019-10-20 14:36:21 +02:00
chme
ced11ef0c1 [player] Allow seeking by a relative amount of milliseconds 2019-10-20 14:36:21 +02:00
chme
dc9396886c [jsonapi] Set correct artwork url for pipe input 2019-10-20 08:39:18 +02:00
chme
7e6b8f740d [db] Add missing mapping of queue version into queue item on fetch 2019-10-20 08:38:40 +02:00
ejurgensen
547222ec2b
Merge pull request #821 from chme/master_vol
[player] Fix missing update of master volume in web interface
2019-09-26 22:17:37 +02:00
chme
e3edcb5b96 [player] Fix missing update of master volume in web interface
Activating/deactivating an output might change the master volume,
therefor send a volume change notification.
2019-09-26 08:11:29 +02:00
chme
2846287169 [jsonapi] Add endpoint "/api/outputs/{id}/toggle" to toggle outputs 2019-09-26 08:00:03 +02:00
ejurgensen
8cff93ce55 [streaming] A bit of fixing up 2019-09-22 23:08:35 +02:00
whatdoineed2do/Ray
586dc4342d [streaming] mem leak fix on client initiated disconnect; close callback cleans
up the session but not the evhhttp_request object alloc'd in
  httpd()-> event_base_loop() -> ... -> evhttp_request_new()
2019-09-22 23:08:35 +02:00
whatdoineed2do/Ray
c2ba1fdb63 [streaming,conf,xcode] review fixes 2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
008e11bfb8 [streaming] review: remove bps/channels from cfg, undoc icy_metaint cfg option 2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
7ccd32c354 [streaming] validate cfg for supported ffmpeg/mp3 sample_rates
$ fmpeg -h encoder=mp3
    ...
	Supported sample rates: 44100 48000 32000 22050 24000 16000 11025 12000 8000
	Supported sample formats: s32p fltp s16p
	Supported channel layouts: mono stereo
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
8762891145 [streaming] configurable icy_metaint 2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
f5c3eb0c14 [streaming] refactor for sperate in/out streaming qualities and configurable streaming params 2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
07d297aaca [streaming] increase icy-metaint interval to 16k bytes 2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
554799ebc3 [streaming/xcode] configurable MP3 streaming bitrate 2019-09-22 22:58:32 +02:00
ejurgensen
cae790ed7e [pipe] Harden pict_tmpfile_recreate() against invalid input, take 2 2019-09-22 22:56:18 +02:00
ejurgensen
d2921e9444 [pipe] Harden pict_tmpfile_recreate() against invalid input 2019-09-22 20:27:47 +02:00
ejurgensen
56d3f42598 Fix a few gcc 8 / scan-build compiler warnings 2019-09-22 00:51:17 +02:00
ejurgensen
cf927e7daa [pipe] Fixup missing condition 2019-09-20 21:51:09 +02:00
ejurgensen
e1a0e366cf [dacp] Make sure Remote updates images from metadata pipes 2019-09-20 21:47:17 +02:00
ejurgensen
7316c060b8 [pipe/artwork] Support for artwork via Shairport metadata pipes, take 3
This implementation uses a tmpfile for storage of the artwork, plus it uses
artwork_get() which means that it scales the image as requested by the client.

It also does not create a tmpfile unless we actually receive artwork.
2019-09-20 21:47:17 +02:00
ejurgensen
ddb91e61ef [pipe/artwork] Support for artwork via Shairport metadata pipes, take 2
This implementation uses a tmpfile for storage of the artwork (instead of the
cache, which may not be enabled).
2019-09-20 21:47:17 +02:00
ejurgensen
69fafd873d [pipe/artwork] Support for artwork via Shairport metadata pipes
This implementation uses the cache for storage. Might change that to use a
tmpfile instead.
2019-09-20 21:47:17 +02:00
ejurgensen
2e149273e5 [cache] Clear stash if called with called with NULL 2019-09-20 21:47:17 +02:00
ejurgensen
1752901529 [misc] Change b64_* to wrap ffmpeg's base64 encoder/decoder
Using ffmpeg's is probably better than having our own, plus it provides us with
decoded length, which we will need to support artwork via pipe.
2019-09-20 21:47:17 +02:00
ejurgensen
e654276262 [alsa] Fix incorrect use of abs() for float, use fabs() instead 2019-09-18 21:28:15 +02:00
ejurgensen
6836a0f277 [mdns] Fix incorrect error check for getaddrinfo (can cause segfault)
Non-zero return from getaddrinfo is an error, so since *ai could be a null
pointer when derefenced in the following socket() call.
2019-09-18 21:18:01 +02:00
ejurgensen
4ab734343c [-] Free events on exit (turns out event_base_free does not free them)
Credit @whatdoineed2do, ref. pr #797
2019-09-09 22:23:00 +02:00
chme
d88182820c [mpd] Fix initial value of 'songpos' in play command 2019-09-07 08:31:31 +02:00
Christian Meffert
7925639f5b
Merge pull request #790 from chme/admin_settings
Introduce new settings for displaying the composer in the now playing page
2019-08-31 09:05:49 +02:00
Christian Meffert
73470113b6
Merge pull request #795 from whatdoineed2do/jsonapi-memleak
[jsonapi] potential memleaks on query_params.filter object
2019-08-30 19:31:44 +02:00
whatdoineed2do/Ray
6ad3d8dbef [jsonapi] potential memleaks on query_params.filter object 2019-08-28 21:35:29 +01:00
ejurgensen
ef9c0117c9 [input] Fix pipe playback bringing cpu to 100%
When pipe playback is started, but no data is written to the pipe, the input
loop would bring the cpu to 100%. This fix limits the loop like it was before
player refactor.
2019-08-28 22:23:11 +02:00
chme
a5c2d6c0f8 [spotify] Return widest image if no max width is given 2019-08-25 11:24:14 +02:00
chme
2cc310b646 [jsonapi] Expose reading and updating settings through the JSON API 2019-08-25 10:39:16 +02:00
chme
02dd0a9445 [settings] Add settings component
This adds a new settings component for user configurable options that
can be changed through the JSON API.
The settings are stored in the admin db table and not in the conf-file.
2019-08-25 10:39:16 +02:00
ejurgensen
78373af201 [cast] Add a simple delay to stream to a have little bit of sync
Since it is unknown how to do real sync on Chromecast, this commit instead adds
a primitive delay to the stream, so that it is at least somewhat closer to
Airplay/local audio.

Also some cleanup of unused stuff.
2019-08-23 19:45:17 +02:00
whatdoineed2do
a5987addd4 [db,jsonapi] case insensitive directory/file listing (#784)
* [db,jsonapi] case insensitive directory/file listing

* [jsonapi] file listing of playlist uses same VPATH ordering as per directory and files

* [db,jsonapi] sorting via existing S_VPATH

* [db] replace LOWER with COLLATE NOCASE
2019-08-21 22:54:34 +02:00
ejurgensen
9cb5810e9a [player] Avoid repeated resets on output delay when changing track (issue #781) 2019-08-18 23:12:10 +02:00
ejurgensen
19ba9d106a [input] Buffer full callback should also be made when source reading ends
Otherwise the player will wait infinitely
2019-08-18 23:10:56 +02:00