def Scenario1(self):
        """ Read Scenario file
        """
        if self.labelend.text()=="Version 1":

            self.mediaplayer.stop()
            self.OpenFile('Dyn1_Spa_Test.mkv')
            while vlc.libvlc_audio_get_track(self.mediaplayer)!=2:
                vlc.libvlc_audio_set_track(self.mediaplayer, 2)
            #else :
            #    self.OpenFile('MVI_1124.AVI')
            self.setWindowTitle("Version 2")
            self.label.setText("Scenario 1")
            self.labelend.setText("Version 2")
            self.resize(1280, 720)
        elif self.labelend.text()=="Version 2":
            self.mediaplayer.stop()
            #self.OpenFile('MVI_1124.AVI')
            self.OpenFile('Dyn1_Spa_Test.mkv')
            while vlc.libvlc_audio_get_track(self.mediaplayer)!=1:
                vlc.libvlc_audio_set_track(self.mediaplayer, 1)
            self.setWindowTitle("Version 2")
            self.label.setText("Scenario 1")
            self.labelend.setText("Version 1")
            self.resize(1280, 720)
        else:
            self.mediaplayer.stop()
            self.OpenFile('Dyn1_Spa_Test.mkv')
            #else :
            #    self.OpenFile('MVI_1124.AVI')
            self.setWindowTitle("Version 1")
            self.label.setText("Scenario 1")
            self.labelend.setText("Version 1")
            self.resize(1280, 720)
 def PlayPause(self):
     """Toggle play/pause status
     """
     if self.mediaplayer.is_playing():
         self.mediaplayer.pause()
         self.playbutton.setText("Play")
         self.isPaused = True
         #self.labelend.setText("bla")
     else:
         if self.mediaplayer.play() == -1:
             #self.labelend.setText("bli")
             self.OpenFile()
             return
         self.mediaplayer.play()
         if self.labelend.text()=="Version 2":
             while vlc.libvlc_audio_get_track(self.mediaplayer)!=2:
                 vlc.libvlc_audio_set_track(self.mediaplayer, 2)
             self.labelend.setText("Version 2")
             #self.labelend.setText("blo")
         else:
             while vlc.libvlc_audio_get_track(self.mediaplayer)!=1:
                 vlc.libvlc_audio_set_track(self.mediaplayer, 1)
             self.labelend.setText("Version 1")
             #self.labelend.setText("blu")
         self.playbutton.setText("Pause")
         self.timer.start()
         self.isPaused = False
         self.resize(1280, 720)
 def SwitchAudioTrack(self):
     """Switch the audio track
     """
     nb_tracks = vlc.libvlc_audio_get_track_count(self.mediaplayer)
     track_Id = vlc.libvlc_audio_get_track(self.mediaplayer)
     if nb_tracks<2:
         return
     if track_Id==1:
         vlc.libvlc_audio_set_track(self.mediaplayer, 2)
         self.labelend.setText("Audio track 2")
     else:
         vlc.libvlc_audio_set_track(self.mediaplayer, 1)
         self.labelend.setText("Audio track 1")
 def SwitchAudioTrack(self):
     """Switch the Version
     """
     nb_tracks = vlc.libvlc_audio_get_track_count(self.mediaplayer)
     track_Id = vlc.libvlc_audio_get_track(self.mediaplayer)
     if nb_tracks<2:
         return
     #self.PlayPause()
     self.mediaplayer.pause()
     if track_Id==1:
         while vlc.libvlc_audio_get_track(self.mediaplayer)!=2:
             vlc.libvlc_audio_set_track(self.mediaplayer, 2)
         self.labelend.setText("Version 2")
     else:
         while vlc.libvlc_audio_get_track(self.mediaplayer)!=1:
             vlc.libvlc_audio_set_track(self.mediaplayer, 1)
         self.labelend.setText("Version 1")
     #self.PlayPause()
     self.mediaplayer.play()
     track_Id = vlc.libvlc_audio_get_track(self.mediaplayer)
     if track_Id==1:
         self.labelend.setText("Version 1")
     else:
         self.labelend.setText("Version 2")