Commit Graph

381 Commits

Author SHA1 Message Date
chme
30d43bef4f [player] Fix return value in volume_setrel_speaker if device is not
selected
2016-08-06 06:34:34 +02:00
chme
2ae94e8f82 [player] Fix return value in playback_prev_bh if source_open failed 2016-08-06 06:31:09 +02:00
chme
cd9a3bae07 [player] Fix return value in playback_start_item if source_open failed 2016-08-06 06:29:55 +02:00
ejurgensen
547783d008 Merge pull request #268 from chme/threadexit
Refactor thread exit handling
2016-06-11 22:57:09 +02:00
chme
32ac6c2ea9 [commands] Rename commands_cmdloop_break to commands_base_destroy and
free commands_base after breaking the libevent loop
2016-06-11 10:56:27 +02:00
chme
a9a656042b [player] Cleanup: player clock is the only sync-source available 2016-06-11 10:37:09 +02:00
chme
5258ee712c [commands] Added functionality to break the event loop of a command base 2016-06-11 09:52:31 +02:00
chme
5dc1cba5c8 On deinit free event base before freeing command base and pipes 2016-05-21 06:48:02 +02:00
chme
3c9a7d9119 [player] Use generic commands for inter thread communication 2016-05-15 08:42:15 +02:00
ejurgensen
9a56044c77 [misc] Explicitly check for pthread_setname_np/pthread_set_name_np
Seems there is no pthread_setname_np in OpenWrt
2016-05-05 19:39:15 +02:00
ejurgensen
1f10c6a928 [player] Always reselect output devices when they return online
Consider this use case:
1. Playback stops, device switched off
2. Device switched back on, playback started by user
Before this commit, the device would be unselected when it came back on.
I don't think that is desirable, so with this commit the selection will
stay (except if the device comes back on during playback).
2016-04-30 23:55:45 +02:00
ejurgensen
960f89fcbd [player] Remove unused var 2016-04-14 10:04:21 +02:00
ejurgensen
857055a18d [player] Insert duplicate packets slowly on timer overrun 2016-04-14 09:48:48 +02:00
ejurgensen
acc1ff4a47 [player] Sort devices and autoselect based on priority 2016-04-14 09:48:47 +02:00
ejurgensen
c5bb83480d [alsa] Add rewritten ALSA to generic outputs interface 2016-04-14 09:48:47 +02:00
ejurgensen
617303d545 [player] Purge laudio from player.c 2016-04-14 09:48:47 +02:00
ejurgensen
36755031cb [outputs] Make a wrapper for mp3 streaming so it can be included in
the generic outputs interface and so special handling in player.c can
be removed
2016-04-14 09:48:47 +02:00
ejurgensen
a07c24d625 [player] Fix possible segfault after playback stop on FreeBSD/machines with lo-res timers 2016-04-14 08:55:59 +02:00
chme
1fb1fc7d2d [player] Add config option to disable clearing the queue after playback
stops (default is clearing the queue) and if true do not clear the
queue.

This option is necessary because some dacp clients rely on the queue
being empty if player is stopped. Retune for example does not always
show the queue contents if player state is stopped.
2016-03-20 07:45:21 +01:00
chme
e3750957f5 [player] Allow removing by position (dacp-requests) if player is stopped 2016-03-19 09:40:36 +01:00
chme
ed2fe682fe [player] Allow moving by position (dacp-requests) if player is stopped 2016-03-19 09:40:36 +01:00
chme
d35894ac15 [mpd] Return correct item-id for command 'addid' and return correct
number of items in the queue if player is stopped for command 'status'
2016-03-19 09:40:36 +01:00
ejurgensen
b454a2fd60 [general] Put back support for platforms without pipe2(), see issue #239 2016-03-17 22:20:16 +01:00
ejurgensen
abce1d0eeb Merge pull request #237 from chme/threadnames
Set thread names
2016-03-12 17:18:34 +01:00
chme
98d6db002f Set thread names to make it easier to identify threads during debugging 2016-03-12 14:01:08 +01:00
chme
9a5b67031e [player] Remove unnecessary check for plid != 0 and set plid always to 0
if queue changed
2016-03-12 14:01:08 +01:00
ejurgensen
bd61399e49 [player] Only catch up by lowering sample rate if data_kind is http or pipe 2016-03-06 10:55:10 +01:00
ejurgensen
3000341acd [player] Different timer catch up for files + remove timer abort
Timer abort should no longer apply since we may catch up for more
than a second. Introduce separate catch up strategies for files and
streams, since for files we can read at our own pace.
2016-02-28 22:28:37 +01:00
chme
494a936caa [mpd] Implement mpd command 'move' 2016-02-21 19:01:52 +01:00
ejurgensen
a824f73779 [player] Remove some debug log messages 2016-02-12 22:00:10 +01:00
ejurgensen
bd75281340 [player] Save speaker name and rename raop_ to output_ 2016-02-11 20:04:30 +01:00
ejurgensen
483a428bae [chromecast] Try to improve session handling + actually remove device on mdns cb 2016-02-11 20:04:29 +01:00
ejurgensen
e4d209f8a0 [chromecast] Support for most basic functionality 2016-02-11 20:04:29 +01:00
ejurgensen
ffe8653d9e [chromecast] Remove RAOP specifics from player.c, add generic output interface 2016-02-11 20:04:29 +01:00
ejurgensen
4c887ba7bb [chromecast] First building blocks for supporting ChromeCast 2016-02-11 20:04:29 +01:00
ejurgensen
62eb1a067d [player] Rename ticks to overrun and safeguard against decreasing from 0 2016-02-11 20:02:17 +01:00
ejurgensen
5f5a138c77 [player] Fix for player getting ahead of network streams (issue #218)
Issue caused stuttering after a few hours. This fix will check if
the player is getting behind the playback timer. Apparently, we
sometimes get samples at a rate slightly below 44100 from network
streams, and then we end up consuming too quickly. This introduces
a way of reducing consumption if that happens.
2016-02-11 08:29:29 +01:00
chme
b2d2e9286f [mpd] implement range support for 'delete' command 2015-11-22 12:06:01 +01:00
chme
8fc8d08b42 [player] Add missing notification of playlist changes after removing an
item from the playlist
2015-11-21 14:23:06 +01:00
ejurgensen
316af87189 Merge pull request #193 from chme/mpd
[mpd] Add support for moveid and close command
2015-10-31 11:31:27 +01:00
chme
1c409846d5 [player/queue] Add player commands to move queue-items by item-id 2015-10-31 07:56:50 +01:00
chme
94895b8eed [player] if source is not pausable (http-streams or pipe) abort playback
on pause command 

This restores the behaviour before the queue/player-refactoring.
2015-10-25 09:00:47 +01: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
9853b8f9bd Merge pull request #188 from chme/playerfixes
Playerfixes
2015-10-19 22:15:43 +02:00
chme
7592462571 [player] Fix segfault if reading from source failed for all queue items 2015-10-19 21:33:43 +02:00
ejurgensen
55104015e0 Full removal of libevent 1 legacy code. Also drop pipe() in FreeBSD, since pipe2 is available now. 2015-10-19 21:15:29 +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
chme
199b765a7d [player] Store item-ids in history to allow start of playback from the
previously played items in dacp
2015-10-04 08:05:37 +02:00
chme
b19a7280b9 [player] remove unused player_queue struct 2015-10-04 08:05:37 +02:00
chme
fbce3a7d57 [player] Confusing naming of ids cleaned up 2015-10-04 08:05:37 +02:00
chme
ba3385b0ec [queue] Remove queue_info and queue_item_info structs 2015-10-04 08:05:37 +02:00
chme
064dfef2de [player] cleanup metadata_trigger
metadata_trigger is always called for the current streaming item and
source_open makes sure that the stream_start and output_start values are
set correctly
2015-10-04 08:05:36 +02:00
chme
64698eb3a4 [player] Some minor cleanup (error handling, comments) 2015-10-04 08:05:36 +02:00
chme
a06424a701 [mpd] Expose queue-item-id instead of dbmfi-id in mpd commands
[player] Reshuffle on end of playlist and repeat mode is "repeat all"
2015-10-04 07:59:58 +02:00
chme
cb2805800b [player] Fix segfault if pause requested in the last two seconds of the
last item in the playqueue (cur_streaming is already NULL)
2015-10-04 07:59:58 +02:00
chme
2b037b67d9 [player] Combine stream_stop and stream_cleanup into one function 2015-10-04 07:59:58 +02:00
chme
e44a160b9a [player] Improve error handling 2015-10-04 07:59:58 +02:00
chme
4595a2f4a6 [player] Add missing metadata trigger on item change (after eof) 2015-10-04 07:59:58 +02:00
chme
c8a61015fc [dacp] Fix playing of radio streams after queue refactoring 2015-10-04 07:59:58 +02:00
chme
58069e67f8 [player/spotify] adjust spotify integration to refactoring of player 2015-10-04 07:59:58 +02:00
chme
e1147c00a1 [player] Refactor player to better fit the queue refactor 2015-10-04 07:59:58 +02:00
chme
1f53d7ab1a [queue] Refactor queue handling
Decouple the playing/streaming item from the queue. Move all queue
related functions to seperate file queue.h/c.
Introduce internal item "head" to make iterating over the play-queue and
shuffle-queue easier.
2015-10-04 07:59:57 +02:00
chme
10d7097f98 [player] rename "queue_*"-functions to "playerqueue_*" (avoid naming
conflicts with later introduced separate queue file
2015-10-04 07:57:39 +02:00
chme
1fbedaa54f [player] Refactor queue_get 2015-10-04 07:57:38 +02:00
chme
f0a6a48599 [player] Refactor queue_remove functions 2015-10-04 07:57:38 +02:00
chme
1812848ee1 Move client protocol specific make_queue functions out of player.c/h 2015-10-04 07:57:38 +02:00
ejurgensen
4db6318a82 Fix issue where volume gets set to -1 on startup of raop devices 2015-09-27 15:24:04 +02:00
ejurgensen
68912efa1f Enable resuming playback from saved position for certain media kinds (eg audiobooks) 2015-08-04 22:33:32 +02:00
ejurgensen
d870b97142 Remove LastFM thread now that it can run from the worker thread 2015-06-27 23:24:07 +02:00
ejurgensen
4fffc057b6 Change queue_remove() to fix segfault because source_head/shuffle_head could become invalid, and to protect against invalid input in general (ref issue #160).
Also try to failsafe source_position() and implement next_ps() all around.
2015-06-08 00:21:49 +02:00
ejurgensen
79cdfebf34 Merge pull request #150 from chme/mpdidle
Add support for mpd idle command
2015-05-21 22:31:03 +02:00
chme
3886ec6638 Add version number for playlist (queue)
This is necessary to return a valid playlist id for mpd status command.
2015-05-09 07:46:33 +02:00
chme
aa4a12cabe add events for playlist (queue), volume, speaker, options
(random/shuffle) changes
2015-05-09 07:46:33 +02:00
chme
d2c7c87191 use listener logic to send dacp update requests 2015-05-09 07:46:33 +02:00
chme
36499f4997 [player] added some source code comments 2015-05-09 07:46:33 +02:00
chme
600e48842f [mpd] idle command 2015-05-09 07:46:33 +02:00
chme
fb92040d4b expose generic player_queue_make function 2015-05-09 07:35:15 +02:00
chme
3832692929 move setting query_params.sort out of generic queue make function 2015-05-09 07:35:14 +02:00
chme
3a495a3d48 move setting query_params.idx_type out of generic queue make function 2015-05-09 07:35:14 +02:00
chme
d19fbe5ed7 fix first item is not shuffled 2015-05-05 18:44:02 +02:00
chme
659f9c09bb Use enum values for data_kind and media_kind 2015-04-23 11:34:44 +02:00
ejurgensen
8a0994860f Ignore empty ICY StreamTitles 2015-04-12 18:15:06 +02:00
ejurgensen
99cda05dab Remove player metadata event timer (use the existing instead) 2015-04-11 20:30:31 +02:00
ejurgensen
0397b824a5 Fixup (select between cur_playing and cur_streaming) 2015-04-09 22:33:23 +02:00
ejurgensen
e72447954a Some cleaning up of ICY artwork retrieval 2015-04-09 22:22:42 +02:00
ejurgensen
f1931bfc1a Abandon raop_metadata_arg, and defer metadata time setting 2015-04-09 21:04:35 +02:00
ejurgensen
ad81e05ab4 Better thread safety by making sure that the raop globals are only accessed through the player thread 2015-04-07 23:35:56 +02:00
ejurgensen
e49c941a00 Add a worker thread to support async tasks from the player thread
(and maybe others later)
2015-03-31 23:05:24 +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
chme
4a1bff500a [mpd] fixes for commands noidle, list (handle special case with second
argument 'album'), addid (sql error if virtual path contains
character ') and fix error messages in various commands
2015-03-10 22:12:33 +01:00
ejurgensen
1a0d2ef59b Reduce log severity 2015-02-28 15:16:19 +01:00
chme
1923e7b67d silence compiler warning in player.c "warning: ignoring return value of
‘read’ ..."
2015-02-28 08:00:10 +01:00
chme
63a480d5fc refactor playback_start, added comments to clarify the use of
item_range, renamed some variables (avoid using "song")
2015-02-14 22:39:51 +01:00
chme
830054bd71 Initial support for mpd protocol 2015-02-14 08:50:18 +01:00
chme
07b4d6b6a9 first song not shuffled 2015-02-01 10:51:43 +01:00
ejurgensen
b1903e4551 Always try to start AirPlay when laudio fails (issue #86) 2015-01-16 23:18:21 +01:00
ejurgensen
a3a689573f Better define in player.c 2014-09-28 22:14:30 +02:00
ejurgensen
1ffbfd8c45 Proper update to libevent 2 in player.c 2014-09-28 22:09:22 +02:00
ejurgensen
965df4fdfc Delete event after disarming timer (maybe not necessary, but for safety) 2014-09-28 15:30:52 +02:00
ejurgensen
cf5b702460 Fix malplaced declaration 2014-09-27 23:12:18 +02:00
ejurgensen
4078542eb4 Forgot an include 2014-09-27 23:08:43 +02:00
ejurgensen
861635eb4d timer_delete() instead of close() for FreeBSD timer 2014-09-27 23:05:22 +02:00
ejurgensen
65110a9f39 Fix FreeBSD sound timing problems 2014-09-27 22:59:19 +02:00
ejurgensen
27e7148405 Use STOB() in player.c since it is defined right in player.h 2014-09-19 22:14:31 +02:00
ejurgensen
f543b768ac Merge pull request #41 from chme/skipprev
rfc: Change behavior of skip to previous song
2014-09-12 21:45:15 +02:00
ejurgensen
6d8e4c67aa Support for LastFM scrobbling (issue #19) 2014-08-15 23:36:54 +02:00
chme
05e6402dc6 Fix skip to next song while the last song in Up Next is playing
(introduced in a6c2a25)
2014-08-02 07:25:18 +02:00
chme
a6c2a25642 If reshuffling with repeat all songs in queue active, set shuffle-head
to current playing song. Previously the shuffle-head was set to the next
song after the current, therefor the UpNext-queue appeared empty after
adding new songs to the queue.
2014-07-25 18:51:34 +02:00
chme
87b415b0d4 Fix segfault on reshuffling one item 2014-07-25 18:25:20 +02:00
chme
5065c3e4a0 Use query parameter if queuefilter parameter is unkown 2014-07-19 08:45:40 +02:00
chme
4d79a85780 Change behavior of skip to previous song to start the current song from
the beginning, if it is playing for more than 3 seconds
2014-07-17 20:14:21 +02:00
chme
fe2abfd123 clear queue on playback abort 2014-07-17 20:12:19 +02:00
chme
9527e06f71 reshuffle only songs in the UpNext queue 2014-07-17 20:12:19 +02:00
chme
a4fbeed81e Added comments to queue_clear and queue_empty 2014-05-29 09:45:04 +02:00
chme
b7cb0da2c2 Modifications to the playqueue-clear command:
- do not stop playback when clearing the UpNext queue
- clear history, if mode=0x68697374 ("hist")
2014-05-24 07:34:59 +02:00
ejurgensen
8468f55910 Honor the "ek" (encryption) flag for RAOP_DEV_OTHER + slight rewrite of raop_device_cb 2014-05-18 17:19:50 +02:00
chme
a1b09903c0 - Fix crash when calling add-next and cur_playing/cur_streaming are NULL
- Append songs after cur_streaming
2014-05-17 14:13:18 +02:00
ejurgensen
44c3dba3d9 queue_remove was removing wrong item 2014-05-06 22:55:59 +02:00
ejurgensen
305c1a141c Indentation 2014-05-04 22:36:37 +02:00
chme
7e43a42c88 Remove dead code: playback_next_bh and playback_prev_bh are only called
during playback_pause. In playback_pause "cur_playing" is always set to
NULL so that in playback_next_bh and playback_prev_bh only the
else-clause can become true.
2014-05-04 05:45:53 +02:00
chme
8036a5a6d3 fixes for playqueue-contents 2014-05-03 20:16:51 +02:00
chme
5f307c7ce1 Added support for playqueue-contents with negativ span value (returns the previously played songs) 2014-05-03 20:16:51 +02:00
ejurgensen
20539c0c08 Remove unused variable in queue_next_add 2014-04-30 23:33:42 +02:00
chme
eab4c1c3d2 Fix "play next" command - the queue was not circular anymore due the
missing setting of pl_prev of the next song and start the shuffle-queue
with ps_shuffle
2014-04-23 20:44:40 +02:00
ejurgensen
8eb6b46ed2 Adjustments to queue_move/queue_remove, mostly for consistency 2014-04-21 21:21:40 +02:00
chme
01cc83f819 respect coding convention and changed log level 2014-04-20 06:43:01 +02:00
chme
32c3b57fcd added support for the playqueueedit add next command 2014-04-19 09:12:58 +02:00
chme
475a2f4e8f added support for the playqueueedit remove command 2014-04-19 08:35:07 +02:00
chme
c3c2c421d2 added support for the playqueueedit move command 2014-04-19 08:09:32 +02:00
ejurgensen
365c5a3bc9 Only queue the rest of the album on quirky query 2014-04-18 22:39:17 +02:00
ejurgensen
6062ca014b Make the player able to stream from pipes 2014-03-31 13:10:18 +02:00
ejurgensen
9efc97d702 Add support for query-modifier=containers in DACP playqueue-edit 2014-03-31 01:53:46 +02:00
ejurgensen
708b76ce1e Play only a single item when playspec has item-spec (Podcasts/Audiobooks) 2014-03-21 23:38:14 +01:00
ejurgensen
3f1edc0082 Oops 2014-03-18 11:35:47 +01:00
ejurgensen
9484c43601 Prevent notify_main_thread from mucking with SPOTIFY_EVENT before an
event has been processed
2014-03-18 11:31:48 +01:00
ejurgensen
59b6462ba6 Small logging change 2014-03-18 10:01:06 +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
ejurgensen
190f91114e Support songartistid (asri) in group requests and queuefilter=artist
- credit misenhower of wp8remote.com
2014-02-21 20:39:57 +01:00
ejurgensen
23a7e82a1f Add support for max volume for AirPlay devices (raop) 2014-02-09 16:07:00 +01:00
ejurgensen
258163e6ce hi-res timer commit broke FreeBSD. This attempts to go back to the
old code for FreeBSD.
2014-02-08 22:59:07 +01:00
ejurgensen
01f290cc2a Replace AirTunes with AirPlay in doc and log messages 2014-02-07 22:10:40 +01:00
Anthony Doko
949cf3808d Add support for embedded platforms that don't have high-res timers. 2014-02-05 18:11:10 -08:00
ejurgensen
4842751527 Reduce log level verbosity when no real error (eg no md field) 2014-02-03 21:54:46 +01:00
ejurgensen
ae51922f57 Try to autoselect a non-selected raop device if no valid output was
selected. This should make life easier for users of Remote on iPhone
where speakers can only be selected after playback has started (I
think...)
2014-01-13 23:24:45 +01:00
ejurgensen
7079e524b6 Fix bug where dbmfi is referenced after being freed 2014-01-05 22:56:44 +01:00
ejurgensen
a42377991d Use songartistid instead of album_artist for playlist query 2014-01-05 14:20:42 +01:00
ejurgensen
161338752c Support for genre tag in dacp playqueue-edit queuefilter 2013-12-02 22:19:12 +01:00
ejurgensen
c360bdd5bd Also account for playqueue-edit?...queuefilter=album:(null) 2013-11-23 23:05:13 +01:00
ejurgensen
1199a459ac Obey device "md" (metadata) tag - credit @couteau
- original patch https://gist.github.com/couteau/7532531
2013-11-23 11:25:30 +01:00
ejurgensen
9760a43ccf Add support for mode 2 (shuffle) in playqueue-edit and -contents 2013-11-22 22:05:55 +01:00
ejurgensen
afd25b79d9 Support for playqueue-edit 2013-11-22 16:41:57 +01:00
ejurgensen
a4c16741d9 Better support for playqueue-edit (command add, mode 1)
- reply message not fixed
2013-11-21 23:33:03 +01:00
ejurgensen
f42bbd37e1 Add basic support for playqueue-contents (real reply) and add placeholder
for playqueue-edit
2013-11-14 23:14:58 +01:00
ejurgensen
84b8a7653d Enable play count with Remote
The purpose is to get the "Unplayed" tab for Podcasts in Remote
working, which requires that we increase the counter even when
playback is with Remote/RAOP (and not just iTunes streaming, which
was already working)
2013-10-26 23:13:02 +02:00
ejurgensen
6fb718b55e Fix for Apple TV update 6.0
- don't send Apple Challenge and RSA/AES key/iv if no encryption
- assume no password if no pw field
- clean up some indentation in raop.c
2013-10-13 21:48:15 +02:00
ejurgensen
9704a1e65d Bug fix when trying to restart single song in playlist
cur_streaming may be null, so can't address cur_streaming->ctx
2013-09-25 20:14:13 +02:00
ejurgensen
04ae27f914 Autoselecting local audio just messes up speaker selection. 2013-08-31 12:47:13 +02:00
ejurgensen
b6df68b75b Fix: Clearing retransmit buffer after player stop could crash due
to reading pointer from free'd memory (in raop.c). Also added some
safeguards against passing invalid file descripters to close()
in player.c.
2013-08-17 23:05:50 +02:00
Scott Atkinson
b52bd94380 Update to support some older, encrytped APEs
Some APEs report their am value as something like `AirPort4,107` (Old
version) or `AirPort10,115` (new version). (There is some evidence in
the player.c code that some old APEs do not report an AM value at all,
but all three of mine do.

As far as I can tell, the following is true of APEs with AM values:
- am="AirPort4..." - Encrypted (so devtype should remove
`RAOP_DEV_APEX_80211N`)
- am="Airport10..." - Not encrypted (so devtype should be set to
`OTHER`)

So, I suggest the following change to line 28:
```
else if (strncmp(p, "AirPort4", strlen("AirPort4")) != 0)
```

There may be other flavors of APEs that may fail this test, but it's
the best I can suggest with the devices I have.
2013-07-26 10:24:08 +02:00
Kai Elwert
49ab2a3ce4 Allow playback on non apple airplay devices 2013-07-04 14:57:00 +02:00
Julien BLACHE
2cead60432 Remove unused prev variable 2011-04-24 18:43:58 +02:00
Julien BLACHE
53588f36af Wire up metadata handling in player and RAOP
This enables sending out metadata to AppleTV.
2011-04-09 10:11:35 +02:00
Julien BLACHE
d208ca79d4 Add support for metadata handling in player 2011-04-09 10:11:35 +02:00
Julien BLACHE
db67f4ed6f Set has_video flag for AppleTV devices 2011-04-09 10:11:34 +02:00
Julien BLACHE
f3e7836453 Introduce struct spk_flags to reduce argument count for enumeration callback 2011-04-09 10:11:34 +02:00
Julien BLACHE
0d0877de9c Honour IPv6 config option in player/RAOP 2011-03-20 12:20:07 +01:00
Julien BLACHE
d8b7980fe4 Do not ask mDNS for IPv6 addresses if RAOP can't use IPv6 2011-03-15 19:20:38 +01:00
Julien BLACHE
ec7c3d108c Let player know about IPv6 status in RAOP 2011-03-15 19:20:38 +01:00
Julien BLACHE
d0fa636643 Properly take ownership of new device address
Added addresses are transferred from dev to the existing rd. Set the
address to NULL in dev to avoid free()ing it in device_free() a few lines
down the road.
2011-03-15 19:20:38 +01:00
Julien BLACHE
e08c42b3c0 Player wants IPv4/IPv6/IPv6LL from mDNS for _raop._tcp 2011-03-10 21:08:25 +01:00
Julien BLACHE
6cd59a1240 Introduce mDNS browser flags for address type selection
Allow each user to specify the address types that should be returned
through the mDNS browse callback.
2011-03-10 21:08:25 +01:00
Raivo Hool
86a90fe81f Fix conversion to per-command lock & condition for FreeBSD
Leftover from commit 7f79ca5709
2011-02-23 19:09:26 +01:00
Julien BLACHE
2011c33526 Cosmetic fix to RAOP device type strings 2010-12-12 10:27:04 +01:00
Julien BLACHE
00c6de15ae Make player_playback_stop() a synchronous call for real
Also, don't stop RAOP devices, just FLUSH them; this saves time when we
restart playback soon after stopping.
2010-12-12 10:25:21 +01:00
Julien BLACHE
507cdb00e8 Rename playback_stop() to playback_abort() and make it an internal helper 2010-12-12 10:12:39 +01:00
Julien BLACHE
dc31d75801 Fix endless loop on source errors under some REPEAT settings
Let source_read() propagate errors so playback_write() can abort if a
source error occurs.
2010-12-12 10:00:43 +01:00
Julien BLACHE
02ea6f4823 Downgrade volume computations to float (from double)
Although we lose precision, this is still enough for computing relative,
absolute and RAOP volume and will make a difference on embedded CPUs.
2010-12-04 16:15:49 +01:00
Julien BLACHE
0df4ab4555 Implement master volume & per-speaker relative volume
Volume is set independently for each speaker relative to the master
volume. Methods allow to set speaker volume independently and in relation
to the master volume.
2010-12-04 15:08:07 +01:00
Julien BLACHE
9e9c3e42cc Rework RAOP volume setting to be per-speaker
Player now pilots RAOP volume setting directly on a per-speaker basis.
2010-12-04 15:08:06 +01:00
Julien BLACHE
9bd6d459a2 Maintain per-speaker volume information 2010-12-04 15:08:06 +01:00
Julien BLACHE
9507f8d059 Switch speaker state-saving to new db_speaker_* interface 2010-12-04 15:08:06 +01:00
Julien BLACHE
7de9408a10 Make sure device is deselected before removing it 2010-12-02 19:56:26 +01:00
Julien BLACHE
78df98ba35 Introduce speaker selection/deselection helpers 2010-12-02 19:56:26 +01:00
Julien BLACHE
55f0c7cfcd Rename volume to master_volume 2010-12-02 19:53:36 +01:00
Julien BLACHE
edfcf955a7 Replace device autoselect deadline with a boolean flag
Devices can be autoselected until we first get into the PLAY_PLAYING state.
This avoids having to check the player state when adding devices.
2010-12-02 19:53:36 +01:00
Julien BLACHE
25cdedc343 Remove device list lock (dev_lck)
No longer necessary now that all device list operations happen in the
player thread.
2010-12-02 19:53:36 +01:00
Julien BLACHE
320d3b9dde Manage devices entirely in the player thread
Provide non-blocking player commands to the mDNS callback to manage
the device list. All operations on the device list now happen in the
player thread.
2010-12-02 19:52:45 +01:00
Julien BLACHE
389e3f1123 Introduce non-blocking commands 2010-12-02 19:51:50 +01:00
Julien BLACHE
ec4299e6c7 Turn speaker enumeration into a sync command 2010-12-02 19:51:08 +01:00
Julien BLACHE
418e818bee Move code around, no functional changes 2010-11-28 17:37:48 +01:00
Julien BLACHE
c3e24a0d9a Hide get_pos() debug messages behind DEBUG_SYNC 2010-11-28 17:33:19 +01:00
Julien BLACHE
45e3d55ee0 Enumerate all active or advertised speakers
We need to include speakers that are currently active in our enumeration,
even if they're not advertising anymore; until the session is declared failed
by RAOP, we are streaming to this device, even if it's not advertising
anymore - which may be a temporary condition.
2010-11-28 17:33:00 +01:00
Julien BLACHE
8cc3d4841f Move last_active check into raop_device_find_or_new()
Removes some of the clutter in the mDNS callback and ensures the check is only
done for new devices.
2010-11-02 19:13:46 +01:00
Kai Elwert
6bfc4a65e2 Implement sort=artist for DACP/player 2010-10-26 18:06:36 +02:00
Julien BLACHE
a8e7a7aeeb Fix missing command_init() call in player_playback_next() 2010-10-07 21:06:40 +02:00
Julien BLACHE
aa33b520ed Identify RAOP device type
Identify the device type in the mDNS callback and decide features & quirk
in RAOP based on the identified device type.
2010-10-07 21:06:40 +02:00
Julien BLACHE
309ad6060e RAOP device discovery rework, rework add/update 2010-09-30 19:24:34 +02:00
Julien BLACHE
48de711301 RAOP device discovery rework, remove add/remove branch & reindent 2010-09-30 19:18:49 +02:00
Julien BLACHE
999066d703 RAOP device discovery rework, split remove code 2010-09-30 19:15:17 +02:00