[mythtv-commits] Ticket #4877: Eject button on DVD drive disabled
MythTV
mythtv at cvs.mythtv.org
Thu Aug 7 03:22:11 UTC 2008
#4877: Eject button on DVD drive disabled
-------------------------------------------+--------------------------------
Reporter: Robin Gilks <g8ecj at gilks.org> | Owner: awithers
Type: defect | Status: infoneeded_new
Priority: minor | Milestone:
Component: mythvideo | Version: 0.21-fixes
Severity: low | Resolution:
Mlocked: 0 |
-------------------------------------------+--------------------------------
Comment(by nigel):
That last change has introduced an inefficiency - the unmounted media
causes MythCDROMLinux::checkMedia() to always call isMounted(). The state
transitions now can jump back from USEABLE to UNMOUNTED. This extra check
helps, but it probably needs an extra state?
{{{
Index: libs/libmyth/mythcdrom-linux.cpp
===================================================================
--- libs/libmyth/mythcdrom-linux.cpp (revision 18089)
+++ libs/libmyth/mythcdrom-linux.cpp (working copy)
@@ -377,11 +377,16 @@
VERBOSE(VB_MEDIA, getDevicePath() + " Disk OK, type = "
+ MediaTypeString(m_MediaType) );
// 1. Audio CDs are not mounted
- // 2. If we don't know the media type yet,
+ // 2. After we glean their type, DVDs and VCDs are
unmounted
+ // 3. If we don't know the media type yet,
// test the disk after this switch exits
if (m_MediaType == MEDIATYPE_AUDIO ||
m_MediaType == MEDIATYPE_UNKNOWN)
break;
+ if (m_Status == MEDIASTAT_USEABLE &&
+ (m_MediaType == MEDIATYPE_DVD ||
+ m_MediaType == MEDIATYPE_VCD) )
+ break; // If we have tried to mount
and failed, don't keep trying:
if (m_Status == MEDIASTAT_ERROR)
return m_Status;
}}}
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4877#comment:15>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list