Commit Graph
139 Commits
Author SHA1 Message Date
Mike Brady e76cfa69fe remove dependency on libdaemon -- leave it in by default, but allow the new configuration option --with-libdaemon. 2019-02-05 15:12:51 +00:00
Mike Brady 94f68798c8 Merge branch 'unstable' of https://github.com/mikebrady/shairport-sync into unstable
Merging two unstable branchses that have diverged
2019-01-27 13:57:46 +00:00
Mike Brady 4188eba571 Fix a cause of a memory leak using OpenSSL for Base 64 encoding. 2019-01-27 13:48:06 +00:00
Mike Brady 0a9063fafe move malloc_cleanup to common.c 2019-01-23 16:34:34 +00:00
Mike Brady 2e4428538d Add an "active" mode that can time out after a period -- 10 seconds by default -- after play ends. 2019-01-21 21:43:55 +00:00
Mike Brady 604ca8dee4 Hook up active mode stuff to metadata, add two four-char codes, improve external command calling. 2019-01-21 21:18:40 +00:00
Mike Brady 99fd6b85d0 make OpenSSL routines un-cancellable, in case there is a possible memory leak 2019-01-18 16:31:36 +00:00
Mike Brady 4483037719 Block on command_execute for unfixable errors. 2019-01-15 08:30:00 +00:00
Mike Brady b9d78c8af6 Avoid wrapping back to the first three UDP ports when assigning ports using nextFreeUDPPort because the call resetFreeUDPPorts, called when not interrupting an existing session, will assign the first three ports without checking (or knowing) if they were recently in use. 2019-01-11 10:42:17 +00:00
Mike Brady 8f20e5808b clang format 2019-01-10 16:12:57 +00:00
Mike Brady 9f8b8a25c9 add actual waiting time for a failing timed mutex. 2019-01-10 16:09:52 +00:00
Mike Brady 4046c0e73d Fix dither, add dither to silences during lead-in, interpolatied frames and keeping out of standby, only if the output device doesn't use a mixer. Check configuration at initialisation. 2018-12-14 15:07:00 +00:00
Mike Brady 9d5ff22f2d Connect up the stall response to the external command calling -- add a single argument to the unfixable error call. 2018-12-10 22:28:52 +00:00
Mike Brady 12611b5521 Fix small error in uncancellable sleep -- it was calling itself! 2018-12-08 17:48:47 +00:00
Mike Brady 277d401d24 Ensure watchdog always starts with the starting time of the thread. Add watchdog bark count. On the third bark, execute an unfixable error script if present. 2018-12-04 17:25:15 +00:00
Mike Brady 8c9b159011 Stop using an unsigned integer for time when we want to watch if it goes negative. Only release the playing_conn if we already own it! 2018-12-02 18:13:20 +00:00
Mike Brady bcf9b1a843 Quieten a debug message 2018-11-29 13:12:53 +00:00
Mike Brady ca45d2ecbe Clang formatted. 2018-11-29 12:18:07 +00:00
Mike Brady c318796e55 Add an uncancellable usleep timer. Make the player and UDP thread cleanups uncancellable. 2018-11-29 11:37:56 +00:00
Mike Brady 22f3e3e318 Move watchdog to cover connection from start, not just from start of play. Start investigating UDP port allocation. Tidy up handling or RTSP write errors -- remove the pselect code from before a write. 2018-11-28 17:18:03 +00:00
Mike Brady 998e7cea2c clang-format 2018-11-24 11:16:57 +00:00
Mike Brady dcd8fbc1ec Remove some unnecessary test code from the debug messaging. 2018-11-23 16:10:18 +00:00
Mike Brady 4c5790de28 Fix off-by-one error in UDP range counting 2018-11-23 13:39:23 +00:00
Mike Brady 093bf1dd46 Rotate usage of UDP ports if a session is interrupted. Avoids out-of-date packets landing in a new session. 2018-11-23 13:29:09 +00:00
Mike Brady ccc4fe09af Tidy up the formats. 2018-11-20 22:56:53 +00:00
Mike Brady ec7d46bc32 Double check debug is not a cancellation point and move the dacp monitor initialisation code to after the subsidiary session threads are created. 2018-11-20 12:06:13 +00:00
Mike Brady 8991a08278 Make debug_mutex lock and unlock completely quiet if the debug level is chosen to be 0. 2018-11-19 20:51:49 +00:00
Mike Brady f7342a70df Add the sort-of mutex name to the debug_mutex_lock and _unlock. Also, setting the debug level to 0 turns off the debug logging of them. Handy. 2018-11-19 20:12:57 +00:00
Mike Brady d4435e2068 Try to make the debug stuff pthread_cancel-proof including the debug / warn / inform / die and debug_mutex calls. Tidy up usage of program_stop. 2018-11-19 18:26:03 +00:00
Mike Brady 58a66ebb0e Make debuglev volatile, over player_vol past the cleanup push, add some temporary diagnostics. 2018-11-19 14:24:24 +00:00
Mike Brady 539c501174 Fix the volume-changed command caller. A space went missing. 2018-09-28 09:33:10 +01:00
Mike Brady 1b18f45fac Clang Format Cleanup 2018-09-09 20:43:01 +01:00
Mike Brady c9b3d2a2f4 Many changes to compilation and linking flags. Stop using HAVE_* flags except where necessary, use CONFIG_* for optional stuff, use HAS_* for immediate definitions, use USE_* for AM definitions. Probably introduced bgs, sigh. 2018-09-09 20:41:31 +01:00
Mike Brady 69642bb7de Partly clean up use of automake, autoconfig and compiler flags. Works but still not consistent. 2018-09-09 14:12:20 +01:00
Mike Brady 6c6dda9cce Add ability for the jack back end to automaticlly connect a client when the jack server comes up and to drop the client when a play session is finished. 2018-09-02 17:25:29 +01:00
Mike Brady 76c5dd9285 Stop using SIGUSR1 for cancelling threads, use pthread_cancel and friends instead, fix some memory leaks, add accurate ouput rate calculation to statistics, add "quit" verb to MPRIS and native d-bus interfaces. Probably still buggy. 2018-07-30 10:07:11 +01:00
Mike Brady ea20840d6c Make the play function return a status (ignored for the present). Clean up audio_alsa by removing all the die calls and placing the alsa_mutex calls in pthread cleanup routines. 2018-07-29 13:45:42 +01:00
Mike Brady f153a1f570 Remove some unwanted debug messages 2018-07-22 16:26:47 +01:00
Mike Brady 5f750ba9b7 Fix a few memory leaks. 2018-07-22 16:12:52 +01:00
Mike Brady f1d4503431 Try to add proper cancellation code to all threads -- not complete, buggy. 2018-07-20 13:50:38 +01:00
Mike Brady 01f2a374b9 Use pthread_cancel to stop a player thread rather than SIGUSR1 and pthread_kill. 2018-07-15 13:54:33 +01:00
Mike Brady 768dc7759a Tidy up log output and add timers to inform statements. Move more stuff to the player thread pop function. Warn about cancellation points in debug versions of mutex lock and unlock. Ensure they are not cancellation points when debug not in use. Warn about Mac OS X cancellation points. 2018-07-15 11:54:48 +01:00
Mike Brady d3b79b965d Make more of the code amenable to pthread cancel 2018-07-14 19:34:31 +01:00
Mike Brady 0d48a3d96a improve the timed mutex lock code and make it compatible with os x, we hope. 2018-06-21 16:15:53 +01:00
Till Zimmermann 3d1086ea2e Fixed not connected bug, added version string 2018-06-20 18:58:34 +02:00
Mike Brady eee822b932 add some more debugging messages. 2018-06-01 16:00:20 +01:00
Mike Brady d224f47e37 Remove unneeded volume control mutex, adjust some timings, add wait time to slow mutex locks. 2018-06-01 11:21:16 +01:00
Mike Brady 93f410599f Add debug_mutex_unlock code in place of a regular pthread_mutex_unlock in some places. 2018-06-01 09:28:28 +01:00
Mike Brady 18b37ea254 Replace all pthread_mutex_locks with debug_mutex_lock with a message and timer. Not really tested. 2018-06-01 08:29:48 +01:00
Mike Brady d392f75c1c Add warnings to tell us if the time info might overflow, quieten some debug messages in rtp. 2018-04-11 20:56:38 +01:00