Example #1
0
 def addRecordAction(self):
     self.debug("renderaction %r", self.renderaction)
     if self.renderaction == None:
         self.pipeline.connect('position', self._positionCb)
         self.pipeline.connect('eos', self._eosCb)
         self.debug("Setting pipeline to STOP")
         self.pipeline.stop()
         settings = export_settings_to_render_settings(
             self.settings, self.have_video, self.have_audio)
         self.debug("Creating RenderAction")
         sources = [
             factory for factory in self.pipeline.factories
             if isinstance(factory, SourceFactory)
         ]
         self.renderaction = render_action_for_uri(self.outfile, settings,
                                                   *sources)
         self.debug("setting action on pipeline")
         self.pipeline.addAction(self.renderaction)
         self.debug("Activating render action")
         self.renderaction.activate()
         self.debug("Setting all active ViewAction to sync=False")
         for ac in self.pipeline.actions:
             if isinstance(ac, ViewAction) and ac.isActive():
                 ac.setSync(False)
         self.debug("Updating all sources to render settings")
         self._changeSourceSettings(self.settings)
         self.debug("setting pipeline to PAUSE")
         self.pipeline.pause()
         self.debug("done")
Example #2
0
 def addRecordAction(self):
     self.debug("renderaction %r", self.renderaction)
     if self.renderaction == None:
         self.pipeline.connect('position', self._positionCb)
         self.pipeline.connect('eos', self._eosCb)
         self.debug("Setting pipeline to STOP")
         self.pipeline.stop()
         settings = export_settings_to_render_settings(self.settings,
                 self.have_video, self.have_audio)
         self.debug("Creating RenderAction")
         sources = [factory for factory in self.pipeline.factories
                 if isinstance(factory, SourceFactory)]
         self.renderaction = render_action_for_uri(self.outfile,
                 settings, *sources)
         self.debug("setting action on pipeline")
         self.pipeline.addAction(self.renderaction)
         self.debug("Activating render action")
         self.renderaction.activate()
         self.debug("Setting all active ViewAction to sync=False")
         for ac in self.pipeline.actions:
             if isinstance(ac, ViewAction) and ac.isActive():
                 ac.setSync(False)
         self.debug("Updating all sources to render settings")
         self._changeSourceSettings(self.settings)
         self.debug("setting pipeline to PAUSE")
         self.pipeline.pause()
         self.debug("done")
Example #3
0
    def addAction(self):
        self.debug("action %r", self.action)
        if self.action == None:
            if self.actioner == self.RENDERER:
                self.pipeline.connect('position', self._positionCb)
            self.pipeline.connect('eos', self._eosCb)
            self.pipeline.connect('error', self._errorCb)
            self.debug("Setting pipeline to STOP")
            self.pipeline.stop()
            self.debug("Creating action")
            if len(self.pipeline.factories) == 0:
                sources = [self.project.factory]
            else:
                sources = [
                    factory for factory in self.pipeline.factories
                    if isinstance(factory, SourceFactory)
                ]
            if self.actioner == self.PREVIEWER:
                self.action = ViewAction()
                self.action.addProducers(*sources)
                self.ui.setAction(self.action)
                self.ui.setPipeline(self.pipeline)
            elif self.actioner == self.RENDERER:
                settings = export_settings_to_render_settings(
                    self.settings, self.have_video, self.have_audio)
                self.action = render_action_for_uri(self.outfile, settings,
                                                    *sources)
            #else:
            # BIG FAT ERROR HERE

            self.debug("setting action on pipeline")
            self.pipeline.addAction(self.action)
            self.debug("Activating action")
            self.action.activate()
            if self.actioner == self.RENDERER:
                self.debug("Setting all active ViewAction to sync=False")
                for ac in self.pipeline.actions:
                    if isinstance(ac, ViewAction) and ac.isActive():
                        ac.setSync(False)
            self.debug("Updating all sources to render settings")
            self._changeSourceSettings(self.settings)
            self.debug("setting pipeline to PAUSE")
            self.pipeline.pause()
            self.debug("done")
Example #4
0
    def addAction(self):
        self.debug("action %r", self.action)
        if self.action == None:
            if self.actioner == self.RENDERER:
                self.pipeline.connect('position', self._positionCb)
            self.pipeline.connect('eos', self._eosCb)
            self.pipeline.connect('error', self._errorCb)
            self.debug("Setting pipeline to STOP")
            self.pipeline.stop()
            self.debug("Creating action")
            if len(self.pipeline.factories) == 0:
                sources = [self.project.factory]
            else:
                sources = [factory for factory in self.pipeline.factories
                        if isinstance(factory, SourceFactory)]
            if self.actioner == self.PREVIEWER:
                self.action = ViewAction()
                self.action.addProducers(*sources)
                self.ui.setAction(self.action)
                self.ui.setPipeline(self.pipeline)
            elif self.actioner == self.RENDERER:
                settings = export_settings_to_render_settings(self.settings,
                        self.have_video, self.have_audio)
                self.action = render_action_for_uri(self.outfile,
                        settings, *sources)
            #else:
                # BIG FAT ERROR HERE

            self.debug("setting action on pipeline")
            self.pipeline.addAction(self.action)
            self.debug("Activating action")
            self.action.activate()
            if self.actioner == self.RENDERER:
                self.debug("Setting all active ViewAction to sync=False")
                for ac in self.pipeline.actions:
                    if isinstance(ac, ViewAction) and ac.isActive():
                        ac.setSync(False)
            self.debug("Updating all sources to render settings")
            self._changeSourceSettings(self.settings)
            self.debug("setting pipeline to PAUSE")
            self.pipeline.pause()
            self.debug("done")