Opened 19 years ago
Closed 15 years ago
#2598 closed enhancement (fixed)
Use MythMediaMonitor in plugins
Reported by: | Nigel | Owned by: | Nigel |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | Plugin - MythMusic | Version: | 0.20 |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
MythMusic, and mtd (the transcoding part of MythDVD) use active polling to detect CD/DVD insertion. To get these working with multiple drives, or on OS X, they need to use MythMediaMonitor. Fairly simple - see [11333]
Attachments (6)
Change History (25)
comment:1 Changed 19 years ago by
Changed 19 years ago by
Patches to mtd to use DiskArbitration? Framework on Mac OS X
Changed 19 years ago by
Attachment: | mtd-darwin.cpp added |
---|
mtd-darwin.cpp - Darwin subclass of mtd disk checking thread uses DiskArbitration?
Changed 19 years ago by
Attachment: | mtd-darwin.h added |
---|
mtd-darwin.h - Darwin subclass of mtd disk checking thread uses DiskArbitration?
comment:2 Changed 19 years ago by
Using the MythMediaMonitor classes directly looks really rather complicated - since the Media Monitor posts custom events to the main thread for handling in a window whenever the media changes (disks inserted etc).
Since mtd doesn't (and wouldn't I think) ever have a window to handle such events it seemed more straight forward to leverage the DiskArbitration? changes from MythMediaMonitor and create a darwin/disk arbitration specific thread to handle the OS disk insertion/removal events.
comment:3 Changed 19 years ago by
I should add that my patches and new files are only for mtd - I don't use mythmusic myself so I've not tackled whatever media 'sniffing' it does.
comment:4 Changed 19 years ago by
I've actually been working on making MythMusic use MythMediaMonitor to look for CDs. I'm nearly done, just need to fix PlaybackBoxMusic? to it can actually play the audio tracks when detected. I hope I'll have a submittable patch sometime next week.
comment:5 Changed 19 years ago by
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.
Changed 19 years ago by
Attachment: | cdstore.3.patch added |
---|
updated to latest svn and fixes a wrong include.
comment:6 Changed 18 years ago by
comment:7 Changed 18 years ago by
comment:8 Changed 18 years ago by
(In [13364]) Multiple DVD drive with media manager in Video Plugin. See #3077. See #2598. Not real happy about the structure here (TitleDialog? and DVDRipBox need to share the same dvd_device, and it the needs to get passed to mtd for use?), but that will have to wait for some extra, um, "brave pills". Until then, setting DVDDeviceLocation to "default" should let you play from multiple drives, but will break ripping.
comment:9 Changed 18 years ago by
(In [13829]) Add commands to allow setting (and forgetting) DVD device path. See #2598. Should enable multiple-drive support. Changes in the caller (DVDRipBox) will be next, and when the MediaMonitor? chain is modified to also send OPEN/UNPLUGGED/NOTMOUNTED messages, the disc checking thread can be removed
comment:10 Changed 18 years ago by
(In [13838]) Add code so MythMusic tells the MTD what drive to monitor/rip. Users with multiple DVD drives should now be able to rip from all of them. Either through the MythMediaMonitor, or by setting DVDDeviceLocation to default. See #2598
comment:11 Changed 18 years ago by
comment:12 Changed 18 years ago by
comment:13 Changed 18 years ago by
comment:14 Changed 18 years ago by
comment:15 Changed 17 years ago by
Status: | new → assigned |
---|
comment:16 Changed 16 years ago by
Component: | mythmusic → Plugin - MythMusic |
---|
comment:18 Changed 15 years ago by
Status: | assigned → infoneeded |
---|
comment:19 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | infoneeded → closed |
Appears fixed, can be re-opened as necessary if not. No change in three years.
(In [11602]) Tidyup of DVD/VCD/SVCD directory detection. Tested on OS X, but have only tried compiling on Linux. Includes Mac OS X audio detection hack which will be needed for plugin MythMediaMonitor upgrade. See #2598