コード例 #1
0
 def updatePipeline(self, pipeline, analysis, tees, timeout=None):
     tag = self._getTranscodingTag()
     config = self._getTranscodingConfig()
     outputPath = self._getOutputPath()
     if analysis.hasAudio:
         audioEncBin = makeAudioEncodeBin(config, analysis, tag,
                                          pipelineInfo=self._pipelineInfo,
                                          logger=self)
     else:
         audioEncBin = None
     if analysis.hasVideo:
         videoEncBin = makeVideoEncodeBin(config, analysis, tag,
                                          pipelineInfo=self._pipelineInfo,
                                          logger=self)
     else:
         videoEncBin = None
     encBin = makeMuxerEncodeBin(outputPath, config, analysis, tag,
                                 audioEncBin, videoEncBin,
                                 pipelineInfo=self._pipelineInfo,
                                 logger=self)
     pipeline.add(encBin)
     if videoEncBin:
         tees['videosink'].get_pad('src%d').link(encBin.get_pad('videosink'))
         self._bins["video-encoder"] = videoEncBin
     if audioEncBin:
         tees['audiosink'].get_pad('src%d').link(encBin.get_pad('audiosink'))
         self._bins["audio-encoder"] = audioEncBin
コード例 #2
0
 def updatePipeline(self, pipeline, analysis, tees, timeout=None):
     tag = self._getTranscodingTag()
     config = self._getTranscodingConfig()
     outputPath = self._getOutputPath()
     audioEncBin = makeAudioEncodeBin(config, analysis, tag,
                                      pipelineInfo=self._pipelineInfo,
                                      logger=self)
     encBin = makeMuxerEncodeBin(outputPath, config, analysis, tag,
                                 audioEncBin, None,
                                 pipelineInfo=self._pipelineInfo,
                                 logger=self)
     pipeline.add(encBin)
     tees['audiosink'].get_pad('src%d').link(encBin.get_pad('audiosink'))
     self._bins["audio-encoder"] = audioEncBin