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
ejurgensen
b9b2874a2e
[player] Possible fix for issue #781 where playback status is incorrect
...
pb_suspend() + pb_resume() during track changes made the playback status
incorrect, i.e. pb_session.source_list/playing_now would not match what the
input was actually writing. This attempts to solve it by resetting the
session when pb_suspend() is called, so that the input, input_buffer and
source_list come into sync.
2019-08-17 01:44:45 +02:00
ejurgensen
86339eee87
[input] Make input_resume() not reopen tracks that have finished playing
...
If playback was paused during the very last part of the track, the rest of the
track would be read into the input buffer and the input would be closed. With
this commit the input will not be reopened.
Also allow input_flush to be called with null argument.
2019-08-17 01:37:39 +02:00
ejurgensen
7dfe4c2b65
[daap] Always use S_PLAYLIST ordering for Q_PL (ref issue #785 )
2019-08-13 21:35:07 +02:00
ejurgensen
f9bfec180f
[raop] Fix possible infinite loop + wrong packet resend (fixes issue #775 )
...
Fixes bugs which were due to incorrect handling of unsigned integer wrap-around:
1. Calling packet_resend() with seqnum + len greater than UINT16_MAX => infinite loop
2. Calling rtp_packet_get() with session->seqnum - seqnum greater than pktbuf_next => wrong packet
2019-08-10 22:41:04 +02:00
ejurgensen
6578f28621
[raop] Logging change to find cause of issue #775
2019-08-09 23:58:45 +02:00
chme
a87059265d
[spotify] Require Spotify web API scope playlist-read-collaborative
...
Also exposes granted and required Spotify web API scope through the
forked-daapd JSON API.
2019-08-03 12:55:53 +02:00
Christian Meffert
d996b1ff09
Merge pull request #772 from whatdoineed2do/smartpl-dynamic-dates-context
...
[smartpl] generate dynamic dates for SMARTPL queries
2019-08-03 08:51:57 +02:00
whatdoineed2do/Ray
50232bc091
[streaming] icy-meta overflow fix (for artist+song title > 4064 bytes)
2019-08-01 12:42:20 +01:00
whatdoineed2do
0941cf51ff
[streaming] support sending ICY metadata (title) ( #732 )
...
* [streaming] obey Icy-MetaData directive and send icy title
* [streaming] fix 'streaming_sessions' race conditions/dbl frees on shutdown
* [streaming] simplify icy meta sending logic
* [streaming] 'icy request' variable cleanup
* [streaming] icy-meta comment/logging cleanup
2019-07-31 16:34:11 +02:00
ejurgensen
cf173df805
[outputs] Fix issue where RTP packet is not available for retransmit
...
Check for sequence number did not account for wrap around, so e.g. a
request for seqnum 65335 when first was 65100 and last was 100 would
not work.
2019-07-20 20:37:22 +02:00
chme
772b18479d
[smartpl] Refactor appending date expression to sql query
2019-07-14 20:51:46 +01:00
ejurgensen
5307c6d94b
[player] Fix commit 3e9f8ef
, input_resume() must be non-blocking (possibly issue #773 )
2019-07-14 00:02:50 +02:00
ejurgensen
2f3ec36c6a
[input] Fix for playback pause on http streams
...
This fixes a bug from commit 37ce8dd6
where seek_http (which is called when
pausing playback) for non-seekable streams would return -1, thus signalling
an error, even though it is not. The player would think that the stream
could not be played and then skip to the next item.
2019-07-12 19:15:31 +02:00
ejurgensen
3e9f8effa0
[player] Better fix for resuming playback af long pause (issue #766 )
...
The fix in commit 3928ab6
broke resuming from an underrun, since it meant that
pb_resume() would flush the input buffer. With this fix it is possible to call
input_resume(), which will not flush the buffer if the source is already open.
Also renamed some functions in player.c for consistency.
2019-07-12 19:11:48 +02:00
whatdoineed2do/Ray
02d4ba1eaa
[smartpl] remove dupl code from interval AFTER/BEFORE DATE
2019-07-11 18:48:29 +01:00
whatdoineed2do/Ray
62201e4128
[smartpl] handle intervals in 'week' as days due to lack of SQLite modifier support
2019-07-11 18:25:01 +01:00
whatdoineed2do/Ray
3dcd826513
[smartpl] date 'interval' handling defered to db/not using potentially inaccurate time_t calcaulations
2019-07-11 18:25:01 +01:00
whatdoineed2do/Ray
d31a8c1e05
[smartpl] generate dynamic dates for SMARTPL queries
...
For dates that require context (ie today, yesterday, N days ago etc) we want the
underlying SQL to respect the current time when running query; a query that
requests items for 'today' should only find matches for the time it was run.
Current implementation would generated a fixed date (at the time the SMARTPL is
inserted into db) in the playlist table where as this commit understands the
context of the date.
2019-07-11 18:25:01 +01:00
ejurgensen
3928ab6f82
[player] Fix for resuming playback after long pause (issue #766 )
...
After a long pause the input would close the source (due to INPUT_OPEN_TIMEOUT).
This change makes the player restart the input when resuming.
2019-07-09 23:12:20 +02:00
Christian Meffert
e608b763ef
Merge pull request #752 from whatdoineed2do/db-queue-quality
...
db queue to incl media quality info
2019-07-09 20:19:10 +02:00
whatdoineed2do/Ray
e0a18082f7
[web-src/jsonapi] move endpoint /api/update as PUT operation
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
8c024387ae
[web-src/jsonapi] endpoint GET /api/update/meta -> PUT /api/rescan
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
e9c1a59ad2
[jsonapi] expose force metadata rescan via /api/update/meta endpoint
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
8f311d4360
[library] support forced metadata scan of library, via '.meta-rescan' file
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
9baba8f8db
[smartpl] use start of today (ie 00:00) for DATE calculations
2019-07-06 18:52:58 +01:00
ejurgensen
528a175d99
[main] Conditionally disable functions deprecated by ffmpeg 4.0
...
av_register_all, av_lockmgr_register and avfilter_register_all
2019-07-03 20:29:31 +02:00
ejurgensen
a321667201
[xcode] Remove deprecated ffmpeg AVFormatContext filename field
2019-07-02 21:48:34 +02:00
ejurgensen
bc8e6794ad
[cast] Fix some compiler warnings
2019-07-02 20:42:31 +02:00
ejurgensen
51d85d0975
[alsa] Fix for ALSA issues when source quality changes (issue #722 , issue #744 and issue #754 )
...
* Fix "clicks" during playback, especially on low buffer size devices
Bug had two causes: Trying to write to the prebuf ringbuffer when it was full
and writing new audio to the device without first having drained the prebuf,
thus writing out of order.
* Use snd_pcm_drain() so alsa doesn't report underrun on playback session end
Removes SNDRV_PCM_IOCTL_SYNC_PTR errors
* Fix missing error check of the return value from snd_pcm_avail (now use snd_pcm_avail_delay)
2019-06-22 21:53:09 +02:00
ejurgensen
a28e370c4f
Merge pull request #748 from chme/conf_deprecated
...
[conf] Gracefully handle the change of config options for modifying playlists
2019-06-16 22:05:08 +02:00
chme
94af51f19b
[conf/logger] Log error message from libconfuse in forked-daapd log
2019-06-15 12:21:27 +02:00
chme
9351d905f2
[mpd] Handle deprecated config options gracefully
2019-06-15 12:21:27 +02:00
chme
7853f80269
[conf] Readd old config options in mpd section as deprecated
2019-06-15 12:21:27 +02:00
ejurgensen
0cb8907201
[streaming] Logging fix
2019-06-12 22:51:25 +02:00
whatdoineed2do/Ray
f194145b8e
[jsonapi] queue/track responses incl type/bitrate/samplerate/channels
2019-06-12 16:52:46 +01:00
whatdoineed2do/Ray
e2d62a62a4
[scan] extract 'channels' from (files) audio and type/bitrate/samplerate/channels from streams
2019-06-12 16:52:02 +01:00
whatdoineed2do/Ray
b126a2fbc0
[db] add 'channels' to file/queue tbl
2019-06-12 16:52:02 +01:00
whatdoineed2do/Ray
c796db251d
[db] schema v20.01 support codec type/bitrate/samplerate in queue tbl
2019-06-12 16:50:52 +01:00
Scott Shambarger
20f5118f75
[alsa] asoundlib.h should be alsa/asoundlib.h
2019-06-11 20:10:04 -07:00
chme
d35333139e
[jsonapi] Fix segfault if no default playlist directory is set in conf
2019-06-01 08:12:38 +02:00
ejurgensen
4f5966c9ff
[db] Speed up Q_PL query used by e.g. '/databases/1/containers' request
...
The previous solution would use subqueries to count the number of items and
streams in each playlist, which means that response time gets pretty slow if
there are many playlists.
This commit also includes a number of lesser db code changes.
2019-05-30 21:19:40 +02:00
chme
4434fe7a2c
[jsonapi] Check for empty playlist name in queue/save
2019-05-30 11:23:22 +02:00
chme
2b4b9c747f
[jsonapi] Add config options for saving playlists to config reply
2019-05-30 11:23:22 +02:00
whatdoineed2do/Ray
d28f7f43b7
[jsonapi,mpd,conf] save playlist via JSON api
...
- new endpoint api/queue/save?name= to .m3u via library_save()
- refact for common cfg for playlist save options
2019-05-30 07:23:04 +02:00
ejurgensen
380f1358d5
[xcode] Disable reconnect_at_eof, does not work with m3u8 ( fixes #745 )
...
Only fixes #745 with newer versions of ffmpeg. With ffmpeg 3.4 playback
will still get interrupted because av_read_frame returns an error.
2019-05-21 21:19:03 +02:00
ejurgensen
7bf90eb8cb
[xcode] Fix for reading mono sources (ref issue #742 )
2019-05-19 22:45:39 +02:00
Christian Meffert
cbd8d8a44d
Merge pull request #740 from whatdoineed2do/library-https-stream
...
[library] accept https:// streams
2019-05-18 07:36:45 +02:00
ejurgensen
b3d6211371
[db] Upgrade db schema to 21.0
...
Commit b3bfb0a
and e1993bc
change the triggers and calculation of id's in a way
that is not backwards compatible, so we need to make major schema upgrade.
2019-05-17 23:07:48 +02:00
ejurgensen
e1993bc7b6
[db] Comeback for the files-table insert trigger
2019-05-17 23:03:05 +02:00
ejurgensen
35a585c23e
[scan] Use MusicBrainz and other tags to set songalbumid
...
Credit to @whatdoineed2do for finding tags and suggesting this change.
2019-05-17 23:03:05 +02:00
ejurgensen
b3bfb0a5f6
[db] Move calculation of artist/album id's from sqlite to code
...
The purpose of this is to support library backends making their own
calculation of these id's, which is relevant if they have more information
available than just album_artist and album.
This also removes a bunch of sqlite extension code plus some triggers, which
in itself is probably an improvement.
2019-05-17 23:03:05 +02:00
ejurgensen
c8650a0450
[cast] Put back Chromecast exclude option
...
Was removed by mistake in commit f8b0147
2019-05-16 23:04:33 +02:00
ejurgensen
31d852993f
Merge pull request #741 from whatdoineed2do/seekable-http-streams
...
Seekable http streams
2019-05-16 15:26:32 +02:00
ejurgensen
cd7bf45749
[alsa] Return ALSA the error code from buffer_write, not -1
2019-05-15 11:53:13 +02:00
whatdoineed2do/Ray
37ce8dd607
[inputs] enable seek on non-live http streams
2019-05-12 11:08:42 +01:00