Esempio n. 1
0
    def Stop(self, channel_change=0):
        mixer = plugin.getbyname('MIXER')
        if mixer and not channel_change:
            mixer.setLineinVolume(0)
            mixer.setMicVolume(0)
            mixer.setIgainVolume(0)  # Input on emu10k cards.

        if config.OSD_SINGLE_WINDOW:
            osd.video_window.hide()

        self.app.stop('quit\n')

        rc.remove_app(self)

        if os.path.exists('/tmp/freevo.wid'): os.unlink('/tmp/freevo.wid')

        if config.MPLAYER_OLDTVCHANNELCHANGE:
            lastchanfile = os.path.join(config.FREEVO_CACHEDIR, 'lastchan')
            lcfp = open(lastchanfile, "w")
            lastchan = self.fc.getChannel()
            lastchannum = self.fc.getChannelNum()
            lcfp.write(str(lastchan))
            lcfp.write('\n')
            lcfp.write(str(lastchannum))
            lcfp.write('\n')
            lcfp.close()

        dialog.disable_overlay_display()
Esempio n. 2
0
    def Stop(self, channel_change=0):
        mixer = plugin.getbyname('MIXER')
        if mixer and not channel_change:
            mixer.setLineinVolume(0)
            mixer.setMicVolume(0)
            mixer.setIgainVolume(0) # Input on emu10k cards.

        if config.OSD_SINGLE_WINDOW:
            osd.video_window.hide()
            
        self.app.stop('quit\n')

        rc.remove_app(self)

        if os.path.exists('/tmp/freevo.wid'): os.unlink('/tmp/freevo.wid')

        if config.MPLAYER_OLDTVCHANNELCHANGE:
            lastchanfile = os.path.join(config.FREEVO_CACHEDIR, 'lastchan')
            lcfp = open(lastchanfile, "w")
            lastchan = self.fc.getChannel()
            lastchannum = self.fc.getChannelNum()
            lcfp.write(str(lastchan))
            lcfp.write('\n')
            lcfp.write(str(lastchannum))
            lcfp.write('\n')
            lcfp.close()

        dialog.disable_overlay_display()
Esempio n. 3
0
    def stop(self):
        """
        Stop mplayer
        """
        if not self.app:
            return

        self.app.stop()
        dialog.disable_overlay_display()
Esempio n. 4
0
    def stop(self):
        """
        Stop mplayer
        """
        if not self.app:
            return

        self.app.stop()
        dialog.disable_overlay_display()
Esempio n. 5
0
 def Stop(self):
     """ Stop the xine player """
     logger.debug('XineIvtv.Stop()')
     dialog.disable_overlay_display()
     self.mixer.Stop()
     self.tuner.Stop()
     self.xine.Stop()
     rc.remove_app(self)
     rc.post_event(PLAY_END)
     logger.debug('Stopped %r app', self.mode)
Esempio n. 6
0
 def Stop(self):
     """ Stop the xine player """
     logger.debug('XineIvtv.Stop()')
     dialog.disable_overlay_display()
     self.mixer.Stop()
     self.tuner.Stop()
     self.xine.Stop()
     rc.remove_app(self)
     rc.post_event(PLAY_END)
     logger.debug('Stopped %r app', self.mode)
Esempio n. 7
0
 def stop(self):
     """
     Stop playback and go into idle.
     """
     logger.debug('Stopping play back.')
     display.get_osd().hide()
     dialog.disable_overlay_display()
     self.player.stop()
     self.stop_time = time.time()
     self.backend.set_events_enabled(False)
     self.__change_state(State.IDLE)
     self.disable_buffering_timer.start(config.LIVE_PAUSE2_BUFFER_TIMEOUT)
     return True
Esempio n. 8
0
    def stop(self, channel_change=0):
        """
        Stop xine
        """
        if self.app:
            if config.OSD_SINGLE_WINDOW:
                osd.video_window.hide()

            self.app.stop('quit\n')
            rc.remove_app(self)
            dialog.disable_overlay_display()

            if not channel_change:
                pass
Esempio n. 9
0
    def stop(self, channel_change=0):
        """
        Stop xine
        """
        if self.app:
            if config.OSD_SINGLE_WINDOW:
                osd.video_window.hide()

            self.app.stop('quit\n')
            rc.remove_app(self)
            dialog.disable_overlay_display()

            if not channel_change:
                pass
Esempio n. 10
0
    def stop(self):
        """
        Stop mplayer
        """
        for p in self.plugins:
            command = p.stop()

        if not self.app:
            return
        
        if config.OSD_SINGLE_WINDOW:
            osd.video_window.hide()
            osd.video_window.set_geometry((0,0), (config.CONF.width,config.CONF.height))
        self.app.stop('quit\n')
        rc.remove_app(self)
        dialog.disable_overlay_display()
        self.app = None
        self.play_state_dialog = None
Esempio n. 11
0
    def stop(self):
        """
        Stop mplayer
        """
        for p in self.plugins:
            command = p.stop()

        if not self.app:
            return

        if config.OSD_SINGLE_WINDOW:
            osd.video_window.hide()
            osd.video_window.set_geometry(
                (0, 0), (config.CONF.width, config.CONF.height))
        self.app.stop('quit\n')
        rc.remove_app(self)
        dialog.disable_overlay_display()
        self.app = None
        self.play_state_dialog = None
Esempio n. 12
0
    def stop(self, event=None):
        """ Stop xine """
        logger.log(9, 'stop(event=%r)', event)
        if not self.app:
            return

        if config.OSD_SINGLE_WINDOW:
            osd.video_window.hide()

        if self.tmp_playlist:
            try:
                os.remove(self.tmp_playlist)
            except:
                pass
            self.tmp_playlist = None

        if config.XINE_BOOKMARK:
            # if the file ends do nothing, else get elapsed time
            if event in (STOP, USER_END):
                command = "%s -S get_time --stdctl --no-splash --hide-gui" % config.CONF.xine
                handle = subprocess.Popen(command,
                                          shell=True,
                                          stdin=subprocess.PIPE,
                                          stdout=subprocess.PIPE)
                (cin, cout) = (handle.stdin, handle.stdout)
                try:
                    position = cout.read()
                    logger.debug("Elapsed = %s", position)
                    if position:
                        self.item.elapsed = int(position)
                finally:
                    #xine should exit nicely, but if the first xine is already closed this xine will hang
                    exit_code = handle.poll()
                    if not exit_code and not cin.closed:
                        cin.write('quit\n')

        self.app.stop('quit\n')
        rc.remove_app(self)
        dialog.disable_overlay_display()
        self.app = None
        self.play_state_dialog = None
Esempio n. 13
0
    def stop(self, event=None):
        """ Stop xine """
        logger.log( 9, 'stop(event=%r)', event)
        if not self.app:
            return

        if config.OSD_SINGLE_WINDOW:
            osd.video_window.hide()

        if self.tmp_playlist:
            try:
                os.remove(self.tmp_playlist)
            except:
                pass
            self.tmp_playlist = None

        if config.XINE_BOOKMARK:
            # if the file ends do nothing, else get elapsed time
            if event in (STOP, USER_END):
                command = "%s -S get_time --stdctl --no-splash --hide-gui" % config.CONF.xine
                handle = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE )
                (cin, cout) = (handle.stdin, handle.stdout)
                try:
                    position = cout.read();
                    logger.debug("Elapsed = %s", position)
                    if position:
                        self.item.elapsed = int(position)
                finally:
                    #xine should exit nicely, but if the first xine is already closed this xine will hang
                    exit_code = handle.poll()
                    if not exit_code and not cin.closed:
                        cin.write('quit\n')

        self.app.stop('quit\n')
        rc.remove_app(self)
        dialog.disable_overlay_display()
        self.app = None
        self.play_state_dialog = None