Example #1
0
    def test_add(self):
        player = Player()

        path = '/home/BIG/music/trance'
        filter = Filter(exclude_file=joinpath(path, 'exclude'), random=True)

        player.add(path, filter)
Example #2
0
def cmd_vstart(ssn: Session, inp_file: str) -> None:
    import subprocess
    from vlc_ctrl.player import Player

    if not inp_file or len(inp_file) <= 0:
        raise ArgError('Video file name expected')

    input('Press Enter to start...')
    with open(os.devnull, "w") as out:
        p = Player()
        subprocess.Popen(['vlc', inp_file], stderr=out)
        time.sleep(0.5)  # give some time to launch
        p.get_dbus_interface()
        duration = float(p.track_info()['length']) + 1
        p.pause()
        time.sleep(0.5)
        # do the board setup
        p.prev()  # reset the timing
        print('Running video sequence')
        time.sleep(duration)
        # stop recording
        p.quit(None, None, 0)
Example #3
0
 def test_toggle(self):
     player = Player()
     player.toggle()
Example #4
0
 def test_quit_condition(self):
     player = Player()
     player.quit("grep test123 a.txt", (10, 10), 5)
Example #5
0
 def test_quit(self):
     player = Player()
     player.quit(None, (1, 0), 5)
Example #6
0
 def test_launch(self):
     player = Player()
     player.launch()
Example #7
0
 def test_metadata(self):
     player = Player()
     print player.track_info()
Example #8
0
 def test_fade_volume(self):
     player = Player()
     player.fade_volume(0.2, 10)
Example #9
0
 def test_volume(self):
     player = Player()
     v = player.volume
     print v
     player.volume = (v + 0.01)
     print player.volume