[mythtv] [patch] Frontend QSocket -> QSocketDevice

avalanche at beyondmonkey.com avalanche at beyondmonkey.com
Sat Nov 29 21:22:03 EST 2003


This patch converts the frontend to use QSocketDevice.

Some notes on the changes:
Buffer size. QSocket is double buffered, QSocketDevice is not.
I'm now setting the raw TCP socket buffer size to 130k. We have
to be careful not to request to much data or the socket will 
get stuffed. Changed the ringbuffer block size from 128k to 
64k. This seems to work well for me but there might be better 
combinations. The whole buffer strategy might need some 
adjusting. I'm not sure if using 130k TCP socket buffer is 
good, might be better to stick with a smaller 64k buffer with 
smaller packets. Since we lose the buffer, event and locking 
overhead and are now doing truly threaded transfers it's 
probably faster anyway.

Distributed events from the backend are now handled on the
frontend by it's own event socket. This should remain a 
QSocket connection since it uses the QSocket signals to 
read the events. Still same port for everything.

Error handling is a bit more complicated with QSocketDevice
since we can't tell if the socket is still connected. I
added a timeout param to the SendReciveStringlist method, 
defaults to 30 seconds, 'quick' is 4 seconds. 

I've done some livetv testing with a reckless Saturday morning 
cartoon session, no problems so far but it's probably good to 
keep an eye on the console the next few days. The best part is 
that the EPG-PIP doesn't stop anymore if the edit recording 
dialog is displayed. ;) I still haven't managed to setup a 
remote frontend so that is completely untested.

av
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qsd.zip
Type: application/octet-stream
Size: 7316 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031130/e6b94920/qsd.obj


More information about the mythtv-dev mailing list