Commit Graph
488 Commits
Author SHA1 Message Date
Mike Brady 1240c6efab Adds checks for posession of the player in order to handle flush, teardown requests. 2018-11-29 15:32:06 +00:00
Mike Brady fdd5ce430d Check in SETUP and RECORD that the player is available, clean up setup code by removing gotos. 2018-11-29 13:13:51 +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 4ab81ce0b7 Add extra diagnostic to capture a meg_write_response error. 2018-11-27 22:53:27 +00:00
Mike Brady 227c38a89c Try to capture what happens after a write error. 2018-11-27 22:03:56 +00:00
Mike Brady 998e7cea2c clang-format 2018-11-24 11:16:57 +00:00
Mike Brady a932298d3a Small correction to port selection logic. If a new sesion waits for an existing session to close that it hasn't interrupted, reset the ports base. Quieten some debug messages. 2018-11-24 11:06:20 +00:00
Mike Brady d93aeec50a Quieten a few debug messages. 2018-11-23 15:11:04 +00:00
Mike Brady ae1453f8aa Stop going to verbosity level 3 on occasion. It's not so useful now. 2018-11-23 13:57:34 +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 3709ac8180 experimental 2018-11-23 08:53:27 +00:00
Mike Brady 303a85c3b5 Add back in the ability to interrupt a session. Clean up a few debug messages. 2018-11-21 21:32:18 +00:00
Mike Brady 36e13535e9 Forgot!
Merge branch 'development' of https://github.com/mikebrady/shairport-sync into development
2018-11-20 23:49:46 +00:00
Mike Brady 0529a58179 Wait properly when a session is being interrupted. 2018-11-20 23:49:22 +00:00
Mike Brady ccc4fe09af Tidy up the formats. 2018-11-20 22:56:53 +00:00
Mike Brady 6e6c8213e6 Put in a cancellation point explicitly in the player_thread main loop. Tidy up some debug messages. 2018-11-20 14:18:33 +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 d3ff806412 Put a timeout on the rtsp writeback call. 2018-11-16 10:05:37 +00:00
Mike Brady ca3c05f8b5 Fix silly issue with diagnostic code. 2018-11-14 17:31:39 +00:00
Mike Brady 99374ac113 Add a little diagnostic to see what's in the POST message.: 2018-11-14 17:21:30 +00:00
Mike Brady 67083665ad Get more diagnostic messages when a TuneBlade-induced error occurs. 2018-11-13 11:00:05 +00:00
Mike Brady 501e349466 Add better error handling if a reply header message is faulty. 2018-11-12 16:41:29 +00:00
Mike Brady 2f1f259d03 Use "/dev/urandom" instead of "/dev/random" to generate a nonce for AirPlay passwords. 2018-11-03 12:46:17 +00:00
Mike Brady e0a4e5cde8 Format tidy-up 2018-10-21 17:10:23 +01:00
Mike Brady e5259e8764 Remove a few compiler warnings. 2018-10-21 17:00:56 +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 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 577449dffa Remove use of SIGUSR1 and pthread_kill to stop threads. Not debugged! 2018-07-27 10:58:36 +01:00
Mike Brady a30c254bb6 Quieten some debug messages. 2018-07-23 14:26:48 +01:00
Mike Brady dc4e577d8f Improve some debug messages. 2018-07-23 13:56:54 +01:00
Mike Brady 865c71b1d0 Remove an unwanted debug messages 2018-07-22 16:29:36 +01:00
Mike Brady 2eaaa9cdb3 Fix a bug where the dacp notification handlers are called 2018-07-21 15:35:07 +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 c8c70b6016 Add quit commands to the MPRIS and native D-Bus command set. Not tested ecologically. 2018-07-18 15:32:07 +01:00
Mike Brady a4eaace76b Begin to try to get Shairport Sync to quit cleanly, relinquishing memory and ports etc. properly so that valgrind can be more useful. 2018-07-17 10:28:06 +01:00
Mike Brady dc84d87b7b Make session interruption work properly. 2018-07-15 15:20:25 +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 d3b79b965d Make more of the code amenable to pthread cancel 2018-07-14 19:34:31 +01:00
Mike Brady bae7585cff Make pc add and get items work if pthread_cancel occurs 2018-07-14 14:32:22 +01:00
Mike Brady c2e3fa5aa7 Move ab_mutex, flow control CV and flush mutex initialisation and teardown out of the player thread. Thus remove need for player theread lock. Format some of the surce files. 2018-07-14 13:38:29 +01:00
Mike Brady d49333a81a Do some very elementary checking of an ANNOUNCE packet -- check for content length over 1k and for negative remaining line lengths... 2018-06-30 15:47:54 +01:00
Till Zimmermann 02694948f3 Initial MQTT Version 2018-06-19 19:40:08 +02:00
Mike Brady 69e0a4836e Modify the RTSP write response code to output the entire response in one go. 2018-06-11 20:18:05 +01:00
Mike Brady f14389e455 Quieten some debug messaging around TEARDOWN 2018-06-11 15:42:01 +01:00
Mike Brady d0dda0b095 Increase debugging temporarily for a TEARDOWN. 2018-05-29 21:53:38 +01:00
Mike Brady 452e1f72fb Include all RTSP messages in debug level 2 except for the OPTIONS message; tidy up some other debug messages. 2018-05-25 13:48:12 +01:00