Ejemplo n.º 1
0
 def _VLCmarquee(self, size=36):
     # put video marquee at the bottom-center
     p = self.player
     m = vlc.VideoMarqueeOption  # Enum
     # <http://Wiki.VideoLan.org/Documentation:Modules/marq/=>
     p.video_set_marquee_int(m.Enable, 1)
     p.video_set_marquee_int(m.Size, int(size))  # pixels
     p.video_set_marquee_int(m.Position, vlc.Position.Bottom)
     p.video_set_marquee_int(m.Opacity, 255)  # 0-255
     p.video_set_marquee_int(m.Timeout, 0)  # millisec, 0==forever
     p.video_set_marquee_int(m.Refresh, 1000)  # millisec (or sec?)
     p.video_set_marquee_string(m.Text, str2bytes('%Y-%m-%d  %T  %z'))
Ejemplo n.º 2
0
def _VLCplayer(marquee, size=24):  # video.height / 24
    if marquee:
        # <http://wiki.videolan.org/Documentation:Modules/marq/>
        v = vlc.VideoMarqueeOption
        i = vlc.Instance('--sub-source=marq')
        p = i.media_player_new()
        p.video_set_marquee_int(v.Enable, 1)
        p.video_set_marquee_int(v.Size, int(size))  # pixels
        p.video_set_marquee_int(v.Position, vlc.Position.Bottom)
        p.video_set_marquee_int(v.Opacity, 255)  # 0-255
        p.video_set_marquee_int(v.Timeout, 0)  # millisec, 0==forever
        p.video_set_marquee_int(v.Refresh, 1000)  # millisec (or sec?)
        p.video_set_marquee_string(v.Text, str2bytes('%Y-%m-%d  %T  %z'))
    else:
        p = vlc.MediaPlayer()
    return p