[mythtv-commits] Ticket #2598: Use MythMediaMonitor in plugins

MythTV mythtv at cvs.mythtv.org
Sun Nov 26 23:43:15 UTC 2006


#2598: Use MythMediaMonitor in plugins
-------------------------+--------------------------------------------------
 Reporter:  nigel        |        Owner:  nigel  
     Type:  enhancement  |       Status:  new    
 Priority:  minor        |    Milestone:  unknown
Component:  mythmusic    |      Version:  0.20   
 Severity:  low          |   Resolution:         
-------------------------+--------------------------------------------------
Comment (by myth at eskil.org):

 Description of cdstore.patch ;

 Introduce two new classes, StoreManager and Store; !StoreManager creates
 Stores when given a MythMediaDevice via an event from MediaMonitor
 (passed to it from whoever is registered as the event handler). The
 returned store is a subclass that can handle the actual
 store. Currently only a subclass for CDs is implemented, but I've also
 got an iPod store in the works.

 Store is responsible for creating the metadata objects that represent
 the store, as well as it's name. The intent here is that this object
 will later be the one that can add/remove tracks from a portable
 player (iPod...).

 Add a call to CdDecoder so you can override the configured device. If
 there's an event on a CD device, it should be up to !MediaMonitor to
 decide whether to issue an event or not, and if, !CdDecoder should just
 accept the device it's given.

 Give GenericTree two templated methods findNode and isNodeInPath that
 traverses a path and looks for a specific in a path
 respectively. findNode replaces recursiveNodeFinder and isNodeInPath
 replaces checkNode. recursiveNoderFinder seemed overly complex and
 didn't even look like it was correct.

 Change UIManagedTreeListType to use these and to not return a pointer
 to the path when getRouteToActive is called. All calls would
 dereference the pointer and copy it anyway.

 Change !MediaMonitor to post events for OPEN and UNPLUGGED as well for
 USEABLE and MOUNTED. Otherwise listeners couldn't detect that a CD had
 been removed.

 Added some helpers (setPathTo/getPathTo) to playbackbox.cpp to replace
 the many many places where it would construct a path to "Active
 Queue".

 Make DatabaseBox and PlaybackBoxMusic use the !StoreManager, and kinda
 prepare !PlaybackBoxMusic to be able to handle multiple connected
 devices. For DatabaseBox, this also kills off ReadCDThread, as this is
 now handled by !StoreManager, which does the loading in a thread.

 Change MusicNode::writeTree to assign the given counter as the int
 component of the !GenericTree node, also return the created node so
 that a caller (!PlaybackBoxMusic) can remember which node was
 added. This lets !PlaybackBoxMusic easily insert new nodes at the root
 for new devices, and when the device is removed, move out from that
 branch if necessary and remove it from the tree.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/2598#comment:5>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list