Пример #1
0
    def _init_vlc(self):
        """
        To avoid a bug on Ubuntu Intrepid and Jaunty that causes the
        GUI to instantly exit, we need to delay importing vlc and
        seting the window.
        """
        import vlc
        from BaseLib.Video.VideoServer import VideoRawVLCServer

        # avoid another init
        self.initialized = True

        self.vlc = vlc

        #
        # With VLC 0.9.x came changes to the MediaControl API. In particular,
        # there is no longer a concept of a playlist. The VLCWrapper can now
        # deal with both versions of the API.
        #
        try:
            vlc.Instance
            self.VLC_MEDIACONTROL_API_VERSION = "0.2"
        except:
            # print_exc()
            self.VLC_MEDIACONTROL_API_VERSION = "0.1"

        self.media = self.get_vlc_mediactrl()
        self.videorawserv = VideoRawVLCServer.getInstance()

        if not self.window is None:
            self.set_window(self.window)
Пример #2
0
    def _init_vlc(self):
        """
        To avoid a bug on Ubuntu Intrepid and Jaunty that causes the
        GUI to instantly exit, we need to delay importing vlc and
        seting the window.
        """
        import vlc
        from BaseLib.Video.VideoServer import VideoRawVLCServer

        # avoid another init
        self.initialized = True

        self.vlc = vlc
    
        #
        # With VLC 0.9.x came changes to the MediaControl API. In particular,
        # there is no longer a concept of a playlist. The VLCWrapper can now
        # deal with both versions of the API.
        #
        try:
            vlc.Instance
            self.VLC_MEDIACONTROL_API_VERSION = "0.2"
        except:
            # print_exc()
            self.VLC_MEDIACONTROL_API_VERSION = "0.1"

        self.media = self.get_vlc_mediactrl()
        self.videorawserv = VideoRawVLCServer.getInstance()

        if not self.window is None:
            self.set_window(self.window)
Пример #3
0
    def __init__(self, httpport=6880):
        if VideoPlayer.__single:
            raise RuntimeError, "VideoPlayer is singleton"
        VideoPlayer.__single = self
        self.videoframe = None
        self.extprogress = None
        self.vod_download = None
        self.playbackmode = None
        self.preferredplaybackmode = None
        self.vod_postponed_downloads = []
        self.other_downloads = None
        self.closeextplayercallback = None

        self.videohttpservport = httpport
        self.videohttpserv = None
        # Must create the instance here, such that it won't get garbage collected
        self.videorawserv = VideoRawVLCServer.getInstance()
    def __init__(self,httpport=6880):
        if VideoPlayer.__single:
            raise RuntimeError, "VideoPlayer is singleton"
        VideoPlayer.__single = self
        self.videoframe = None
        self.extprogress = None
        self.vod_download = None
        self.playbackmode = None
        self.preferredplaybackmode = None
        self.vod_postponed_downloads = []
        self.other_downloads = None
        self.closeextplayercallback = None

        self.videohttpservport = httpport
        self.videohttpserv = None
        # Must create the instance here, such that it won't get garbage collected
        self.videorawserv = VideoRawVLCServer.getInstance()