Commit Graph
344 Commits
Author SHA1 Message Date
Mike Brady 1ca0b28e53 Clean up player.c with clang_format. 2018-06-05 19:07:10 +01:00
Mike Brady 370d70651b Add a pthread_cancel cleanup routine to put_packet to unlock that rw thread when cancelled. 2018-06-05 18:58:36 +01:00
Mike Brady 78f4a24caa Quieten the last-ditch message a bit. 2018-06-03 20:05:10 +01:00
Mike Brady 6eab2d1617 Use shutdown() before close() and separate out the cancel requests for the timing, control and audio threads, see if we can see anything. 2018-06-03 19:59:24 +01:00
Mike Brady eee822b932 add some more debugging messages. 2018-06-01 16:00:20 +01:00
Mike Brady 497d49dda6 Move the resend requests to outside the ab_mutex lock and put a send timeout on the resend requester. 2018-06-01 14:23:34 +01:00
Mike Brady 8e92da35b2 move get_frame iteration message and enable error messaging if condwait timeout. 2018-06-01 11:58:31 +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 f018a18495 Add yet more debugging to the TEARDOWN sequence. 2018-05-30 15:00:37 +01:00
Mike Brady 510424dc5f quieten a few compiler warnings 2018-05-20 15:12:33 +01:00
Mike Brady 8f9aaf7211 Drop a player_flush request if a read lock can't be acquired on the player thread. 2018-05-18 08:33:21 +01:00
Mike Brady 6d08725539 If the player thread is locked, don't block player_put_packet. Instead, discard the packet. 2018-05-17 16:15:17 +01:00
Mike Brady d0237fb420 Change some debug messages. 2018-05-17 11:29:59 +01:00
Mike Brady a8cd696f8d Fix an off-by-one bug causing excessive resend requests. 2018-05-17 10:58:22 +01:00
Mike Brady 8a5a29e2c2 Move to using pthread_cancel in place of pthread_kill -- due to a problem in CYGWIN, but the move makes the code simpler and more rugged. Tidy up the code a bit and remove a clobbering warning. 2018-05-17 10:29:59 +01:00
Mike Brady 7d0eb37958 Move to using pthread_cancel in place of pthread_kill -- due to a problem in CYGWIN, but the move makes the code simpler and more rugged. 2018-05-17 10:16:44 +01:00
Mike Brady 8f06651c47 Make the resend failure message a bit less chatty and more informative. 2018-05-15 12:45:26 +01:00
Mike Brady b9d3a036b1 Revise resend interval calculation to spread it out over a long latency. 2018-05-15 12:08:01 +01:00
Mike Brady 431586726d Allow a great number of buffers and parameterise the fixed latency limits. 2018-05-15 09:11:50 +01:00
Mike Brady 4addf7d215 Fix a misue of rwlock and unlock -- they must be made on the same thread. 2018-05-13 14:41:15 +01:00
Mike Brady 6f8c9e9aa2 split player_flush into two -- make do_flush for internal use, player_flush for external use. 2018-05-12 15:57:23 +01:00
Mike Brady b6fcabca0d Add a read-write mutex to protect a player thread when it's being created or deleted; make player_put_packet get a read lock. 2018-05-12 15:35:51 +01:00
Mike Brady 418b1ba7c7 Add a read-write mutex to protect a player thread when it's being created or deleted; make player_flush get a read lock to get access. 2018-05-12 15:10:27 +01:00
Mike Brady 23e286e877 Add a few debug messages to see how far it gets 2018-05-10 09:05:40 +01:00
Mike Brady 46fae8feb3 Hack alert. If a very large number of frames to flush is calculate -- shome mhistake -- set it to something smaller. 2018-05-09 17:15:28 +01:00
Mike Brady 6d66b2ed33 Stop erroneously assuming that the buffer passed to the player is not changed -- sometimes it is, it seems. Tidy up some typing. 2018-05-07 22:00:01 +01:00
Mike Brady 41241681e3 Make resend error backoff work better and set it to 0.5 seconds. Quieten some routine debug messages. 2018-04-23 13:09:44 +01:00
Mike Brady 3e72bb216e Send resend requests via control channel rather than the audio channel. This makes it compatilbe iwht AirAudio and confformant with the unofficial guide to the airplay protocol. Brown bag time. 2018-04-19 10:16:28 +01:00
Mike Brady ad48056686 Improvements in handling non-existent DACP server, slightly more informative debug messages. 3.2RC4. 2018-04-18 10:34:50 +01:00
Mike Brady ae94daf259 Add a little more detail to the resend requests 2018-04-17 21:08:29 +01:00
Mike Brady 70c72821c9 Add code to skip occasional outgoing and icoming timing and resnd packets to simulate a bad network. Quieten some debug messages. 2018-04-14 17:33:45 +01:00
Mike Brady deb9f4b86b Add logic to skip an occasional outbound timing requester or to discard an occasional incoming timing packet, all to simulate a poor network. 2018-04-14 16:07:13 +01:00
Mike Brady 49d5486df6 Keep timestamp info from the incoming audio packet 2018-04-14 13:56:44 +01:00
Mike Brady e76a636668 Fix serious and long-standing bugs in the control, audio and timing threads that could be responsible for low resilience on noisy and unrealiable networks. Add ability to simiulate UDP receive and send failures on timing, control and audio ports. Significantly improve resend requesting and handling. 2018-04-14 13:01:42 +01:00
Mike Brady c40d1ad53c Change the order of port allocation in rtp setup. Change some debug weights. 2018-04-12 22:47:42 +01:00
Mike Brady a9d6e0a2e6 Remove some debug messages 2018-04-11 10:34:09 +01:00
Mike Brady 665a53a8b5 Allow sps to deal with duplicate RTSP messages like RECORD and SETUP. Add some diagnostics to the player. 2018-04-10 17:35:39 +01:00
Mike Brady d3e2cb5d92 Modify latency detection to use the second word of a sync packet to decide whether to add an extra delay or not. Use all sync packets, not just one with the exception flag. Use 1024 buffers -- a bit profligate, but hey. 2018-04-02 16:44:16 +01:00
Mike Brady 8bf83c149f Modify latency detection to use the second word of a sync packet to decide whether to add an extra delay or not. Use all sync packets, not just one with the exception flag. Use 1024 buffers -- a bit profligate, but hey. 2018-04-02 16:42:46 +01:00
Mike Brady 32c7a535a1 Make scanning for DACP port part of the dacp handler. Only emit 'clip' and 'svip' for a play connection, suppress 'pfls' until 'pffr' has been emitted 2018-03-31 17:34:59 +01:00
Mike Brady 69b3b5d776 Send rtsp events to the metadata thteread for handling. Begin to clean up signals. 2018-03-31 12:39:26 +01:00
Mike Brady cbbe84d8ba Add some more D-Bus facilities. Countermand faulty D-Bus commands. 2018-03-24 17:48:32 +00:00
Mike Brady 340e365a62 Format after adding a few new elements ot the native dbus interface 2018-03-23 21:29:38 +00:00
Mike Brady 6dc30c6ca9 Add a few new elements ot the native dbus interface 2018-03-23 21:28:28 +00:00
Mike Brady d692fab9e4 Clean up native dbus interface files and associated changes to existing files. 2018-03-20 16:31:59 +00:00
Mike Brady 5db1cbfc3d Fix compilation error when dacp support not needed 2018-03-19 17:31:02 +00:00
Mike Brady c02e53ea80 Add server status -- i.e. can we still send commands to the DACP server. Hook it up as "Server" property in basic remote control. 2018-03-19 16:53:58 +00:00
Mike Brady fba40733f3 Add more basic remote control stuff, but SPS gets confused about who it can control. 2018-03-18 19:10:45 +00:00