[mythtv-commits] Ticket #4931: When avoiding conflicts with LiveTV, HandleGetNextFreeRecorder iterates through encoders in wrong order

MythTV mythtv at cvs.mythtv.org
Wed Mar 12 03:37:09 UTC 2008


#4931: When avoiding conflicts with LiveTV, HandleGetNextFreeRecorder iterates
through encoders in wrong order
-------------------------------------------------------------+--------------
 Reporter:  Nick Morrott <knowledgejunkie(at)gmail(dot)com>  |       Owner:  ijr    
     Type:  defect                                           |      Status:  new    
 Priority:  minor                                            |   Milestone:  unknown
Component:  mythtv                                           |     Version:  head   
 Severity:  medium                                           |     Mlocked:  0      
-------------------------------------------------------------+--------------
 When "Avoid conflicts between live TV and scheduled shows" is enabled,
 MainServer::HandleGetNextFreeRecorder seemingly iterates through the
 available encoders in the wrong order.

 If the iterator reaches the end of the encoder list, the function resets
 the iterator to the beginning of the list
 (mythtv/programs/mythbackend/mainserver.cpp, lines 2755-8), which surely
 results in returning the *best* encoder available (and therefore most
 likely to be used for recordings), rather than the next least-worst
 encoder (which is the next least likely to conflict with scheduled
 recordings).

 Because the behaviour does not change whether "Avoid conflicts between
 live TV and scheduled shows" is enabled or not, the only benefit currently
 seems to be that the *first* card chosen for LiveTV is unlikely to
 conflict with LiveTV, as MainServer::HandleGetFreeRecorder takes
 LastFreeCard into account, whereas MainServer::HandleGetNextFreeRecorder
 does not.

 As an example, on my system I have 4 currently configured cards. I have
 'avoid conflicts' enabled, and if I fire up Live TV I get the last encoder
 (#4) as expected. If I then choose the next tuner, I would expect to get
 the next least-worse (#3) but it cycles back to #1 (the best encoder, if
 available), and then iterates forwards until the end of the list is
 reached again.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4931>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list