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

Modified Files:
        mplayer.py 
Log Message:
exception handling

Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/plugins/mplayer.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mplayer.py  11 Jul 2003 19:47:08 -0000      1.5
--- mplayer.py  27 Jul 2003 17:12:37 -0000      1.6
***************
*** 21,24 ****
--- 21,27 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.6  2003/07/27 17:12:37  dischi
+ # exception handling
+ #
  # Revision 1.5  2003/07/11 19:47:08  dischi
  # close file after parsing
***************
*** 170,173 ****
--- 173,177 ----
  import time, os
  import threading, signal
+ import traceback
  
  import config     # Configuration handler. reads config file.
***************
*** 456,502 ****
              return self.item.eventhandler(event)
  
!         if event == VIDEO_SEND_MPLAYER_CMD:
!             self.thread.app.write('%s\n' % event.arg)
!             return TRUE
! 
!         if event == MENU:
!             if self.mode == 'dvdnav':
!                 self.thread.app.write('dvdnav 5\n')
                  return TRUE
  
!         if event == TOGGLE_OSD:
!             self.thread.app.write('osd\n')
!             return TRUE
! 
!         if event == PAUSE or event == PLAY:
!             self.thread.app.write('pause\n')
!             return TRUE
! 
!         if event == SEEK:
!             self.thread.app.write('seek %s\n' % event.arg)
!             return TRUE
! 
!         #if event == rc.UP and self.mode == 'dvdnav':
!         #    self.thread.app.write('dvdnav 1\n')
!         #    return TRUE
  
!         #if event == rc.DOWN:
!         #    if self.mode == 'dvdnav':
!         #        self.thread.app.write('dvdnav 2\n')
!         #        return TRUE
  
!         #if event == rc.LEFT:
!         #    if self.mode == 'dvdnav':
!         #        self.thread.app.write('dvdnav 3\n')
!         #    else:
!         #        self.thread.app.write('seek -60\n')
!         #    return TRUE
  
!         #if event == rc.RIGHT:
!         #    if self.mode == 'dvdnav':
!         #        self.thread.app.write('dvdnav 4\n')
!         #    else:
!         #        self.thread.app.write('seek 60\n')
!         #    return TRUE
          
          # nothing found? Try the eventhandler of the object who called us
--- 460,488 ----
              return self.item.eventhandler(event)
  
!         try:
!             if event == VIDEO_SEND_MPLAYER_CMD:
!                 self.thread.app.write('%s\n' % event.arg)
                  return TRUE
  
!             if event == MENU:
!                 if self.mode == 'dvdnav':
!                     self.thread.app.write('dvdnav 5\n')
!                     return TRUE
  
!             if event == TOGGLE_OSD:
!                 self.thread.app.write('osd\n')
!                 return TRUE
  
!             if event == PAUSE or event == PLAY:
!                 self.thread.app.write('pause\n')
!                 return TRUE
  
!             if event == SEEK:
!                 self.thread.app.write('seek %s\n' % event.arg)
!                 return TRUE
!         except:
!             print 'Exception while sending command to mplayer:'
!             traceback.print_exc()
!             return TRUE
          
          # nothing found? Try the eventhandler of the object who called us




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to