Exemple #1
0
    def initOutput(self, *args, **kwargs):

        self.port = self.findPort()
        pipe = "appsrc name=appsrc !mpegtsparse ! rtpmp2tpay ! queue ! udpsink host=127.0.0.1 port=" + str(
            self.port)

        self.player = gst.parse_launch(pipe)

        self.appsrc = self.player.get_by_name('appsrc')
        self.appsrc.props.format = 4

        self.playing = False
        if not vlc_path():
            self.log.error('vlc is not installed')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError('you need to install vlc player')
            return

        if getVlcHexVersion() < getVlcReqHexVersion():
            self.log.error('the version of vlc is wrong')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError(
                'version %s of vlc is old.\n version %s or greater is needed' %
                (getVlcVersion(), getVlcReqVersion()))
            return
Exemple #2
0
    def initInput(self, *args, **kwargs):

        self.playing = False

        if not vlc_path():
            self.log.error('vlc is not installed')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError('you need to install vlc player')
            return

        if getVlcHexVersion() < getVlcReqHexVersion():
            self.log.error('the version of vlc is wrong')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError(
                'version %s of vlc is old.\n version %s or greater is needed' %
                (getVlcVersion(), getVlcReqVersion()))
            return

        if getVlcVersion() <= '2.0.8':
            self.acodec = 'mp4a'
        else:
            self.acodec = 'mpga'
        self.input = kwargs['input']
        self.videoRate = self.input['videoRate']
        self.hasPlayer = False

        try:
            self.videoRate = int(self.videoRate)
        except:
            self.videoRate = 0

        self.height = self.input['height']
        self.width = self.input['width']
Exemple #3
0
    def initOutput(self, *args, **kwargs):
        self.log.debug('http vlc output loaded')
        self.playing = False

        self.ip = kwargs['output']['ip']['value']
        self.port = kwargs['output']['port']['value']

        if not vlc_path():
            self.log.error('vlc is not installed')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError('you need to install vlc player')
            return

        if getVlcHexVersion() < getVlcReqHexVersion():
            self.log.error('the version of vlc is wrong')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError(
                'version %s of vlc is old.\n version %s or greater is needed' %
                (getVlcVersion(), getVlcReqVersion()))
            return
Exemple #4
0
    def initOutput(self, *args, **kwargs):
        self.log.debug('flv vlc output loaded')
        self.playing = False
        self.web = WebUI(_parent=self.root)
        """
        try:
            self.so=kwargs['output']['sout']['value']
        except:
            self.so=None
        """

        if not vlc_path():
            self.log.error('vlc is not installed')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError('you need to install vlc player')
            return

        if getVlcHexVersion() < getVlcReqHexVersion():
            self.log.error('the version of vlc is wrong')
            reactor.callLater(0, self.streamComponent.stop)
            self.interface.displayError(
                'version %s of vlc is old.\n version %s or greater is needed' %
                (getVlcVersion(), getVlcReqVersion()))
            return