Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv9838

Modified Files:
        rom_drives.py 
Log Message:
move to CDROM.py stuff and remove external eject

Index: rom_drives.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugins/rom_drives.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** rom_drives.py       21 Aug 2003 20:54:44 -0000      1.19
--- rom_drives.py       23 Aug 2003 12:10:00 -0000      1.20
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.20  2003/08/23 12:10:00  dischi
+ # move to CDROM.py stuff and remove external eject
+ #
  # Revision 1.19  2003/08/21 20:54:44  gsbarbieri
  #    *ROM media just shows up when needed, ie: audiocd is not displayed in
***************
*** 73,76 ****
--- 76,81 ----
  import string
  import copy
+ from CDROM import *
+ import traceback
  
  import config
***************
*** 98,111 ****
  
  
- # taken from cdrom.py so we don't need to import cdrom.py
- CDROM_DRIVE_STATUS=0x5326
- CDSL_CURRENT=( (int ) ( ~ 0 >> 1 ) )
- CDS_DISC_OK=4
- CDROM_DISC_STATUS=0x5327
- CDS_AUDIO=100
- CDS_MIXED=105
- CDROM_SELECT_SPEED=0x5322
- 
- 
  # Identify_Thread
  im_thread = None
--- 103,106 ----
***************
*** 277,285 ****
  
          if dir == 'open':
!             if DEBUG: print 'Ejecting disc in drive %s' % self.drivename
              if notify:
                  pop = PopupBox(text='Ejecting disc in drive %s' % self.drivename) 
                  pop.show()
!             os.system('eject %s' % self.devicename)
              self.tray_open = 1
              if notify:
--- 272,295 ----
  
          if dir == 'open':
!             if DEBUG:
!                 print 'Ejecting disc in drive %s' % self.drivename
! 
              if notify:
                  pop = PopupBox(text='Ejecting disc in drive %s' % self.drivename) 
                  pop.show()
! 
!             try:
!                 fd = os.open(self.devicename, os.O_RDONLY | os.O_NONBLOCK)
!                 s = ioctl(fd, CDROMEJECT)
!                 os.close(fd)
!             except:
!                 traceback.print_exc()
!                 # maybe we need to close the fd if ioctl fails, maybe
!                 # open fails and there is no fd
!                 try:
!                     os.close(fd)
!                 except:
!                     pass
! 
              self.tray_open = 1
              if notify:
***************
*** 288,292 ****
          
          elif dir == 'close':
!             if DEBUG: print 'Inserting %s' % self.drivename
              if notify:
                  pop = PopupBox(text='Reading disc in drive %s' % self.drivename)
--- 298,304 ----
          
          elif dir == 'close':
!             if DEBUG:
!                 print 'Inserting %s' % self.drivename
! 
              if notify:
                  pop = PopupBox(text='Reading disc in drive %s' % self.drivename)
***************
*** 295,299 ****
              # close the tray, identifymedia does the rest,
              # including refresh screen
!             os.system('eject -t %s' % self.devicename)
              self.tray_open = 0
              global im_thread
--- 307,323 ----
              # close the tray, identifymedia does the rest,
              # including refresh screen
!             try:
!                 fd = os.open(self.devicename, os.O_RDONLY | os.O_NONBLOCK)
!                 s = ioctl(fd, CDROMCLOSETRAY)
!                 os.close(fd)
!             except:
!                 traceback.print_exc()
!                 # maybe we need to close the fd if ioctl fails, maybe
!                 # open fails and there is no fd
!                 try:
!                     os.close(fd)
!                 except:
!                     pass
! 
              self.tray_open = 0
              global im_thread
***************
*** 336,339 ****
--- 360,364 ----
          # Check drive status (tray pos, disc ready)
          try:
+             CDSL_CURRENT = ( (int ) ( ~ 0 >> 1 ) )
              fd = os.open(media.devicename, os.O_RDONLY | os.O_NONBLOCK)
              s = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT)




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to