コード例 #1
0
ファイル: discoverer.py プロジェクト: kyotobay/pitivi
    def _installMissingPluginsCallback(self, result, factory):
        rescan = False

        if result in (pbutils.INSTALL_PLUGINS_SUCCESS, pbutils.INSTALL_PLUGINS_PARTIAL_SUCCESS):
            gst.update_registry()
            rescan = True
        elif result == pbutils.INSTALL_PLUGINS_USER_ABORT and factory.getOutputStreams():
            self._emitDone(factory)
        else:
            self._emitErrorMissingPlugins()

        self._finishAnalysisAfterResult(rescan=rescan)
コード例 #2
0
ファイル: Event.py プロジェクト: Barbosabyte/bard
    def install_plugin_cb(self, result):
        self._installing_plugins = False
        # hardcode gst.pbutils.INSTALL_PLUGINS_SUCCESS to avoid conditional gst.pbutils import
        INSTALL_PLUGINS_SUCCESS = 0
        if result == INSTALL_PLUGINS_SUCCESS:
            gst.update_registry()
            self.GenerateWaveform()
            return

            # FIXME: send a better error
        msg = "failed to install plugins: %s" % result
        self.emit("corrupt", msg)
コード例 #3
0
    def install_plugin_cb(self, result):
        self._installing_plugins = False
        # hardcode gst.pbutils.INSTALL_PLUGINS_SUCCESS to avoid conditional gst.pbutils import
        INSTALL_PLUGINS_SUCCESS = 0
        if result == INSTALL_PLUGINS_SUCCESS:
            gst.update_registry()
            self.GenerateWaveform()
            return

        # FIXME: send a better error
        msg = "failed to install plugins: %s" % result
        self.emit("corrupt", msg)
コード例 #4
0
ファイル: gstreamer.py プロジェクト: nueces/soundconverter
 def install_plugin_cb(self, result):
     if result in (gst.pbutils.INSTALL_PLUGINS_SUCCESS, gst.pbutils.INSTALL_PLUGINS_PARTIAL_SUCCESS):
         gst.update_registry()
         self.restart()
         return
     if result == gst.pbutils.INSTALL_PLUGINS_USER_ABORT:
         self.error = _("Plugin installation aborted.")
         global user_canceled_codec_installation
         user_canceled_codec_installation = True
         self.done()
         return
     self.done()
     show_error("Error", "failed to install plugins: %s" % gobject.markup_escape_text(str(result)))
コード例 #5
0
    def _installMissingPluginsCallback(self, result, factory):
        rescan = False

        if result in (INSTALL_PLUGINS_SUCCESS,
                      INSTALL_PLUGINS_PARTIAL_SUCCESS):
            gst.update_registry()
            rescan = True
        elif result == INSTALL_PLUGINS_USER_ABORT \
                and factory.getOutputStreams():
            self._emitDone(factory)
        else:
            self._emitErrorMissingPlugins()

        self._finishAnalysisAfterResult(rescan=rescan)
コード例 #6
0
 def install_plugin_cb(self, result):
     if result in (gst.pbutils.INSTALL_PLUGINS_SUCCESS,
                   gst.pbutils.INSTALL_PLUGINS_PARTIAL_SUCCESS):
         gst.update_registry()
         self.restart()
         return
     if result == gst.pbutils.INSTALL_PLUGINS_USER_ABORT:
         self.error = _('Plugin installation aborted.')
         global user_canceled_codec_installation
         user_canceled_codec_installation = True
         self.done()
         return
     self.done()
     show_error('Error', 'failed to install plugin!')
コード例 #7
0
 def install_plugin_cb(self, result):
     if result in (gst.pbutils.INSTALL_PLUGINS_SUCCESS,
                   gst.pbutils.INSTALL_PLUGINS_PARTIAL_SUCCESS):
         gst.update_registry()
         self.restart()
         return
     if result == gst.pbutils.INSTALL_PLUGINS_USER_ABORT:
         self.error = _('Plugin installation aborted.')
         global user_canceled_codec_installation
         user_canceled_codec_installation = True
         self.done()
         return
     self.done()
     show_error('Error', 'failed to install plugin!')
コード例 #8
0
 def donemessage(self, donemessage, null):
     if donemessage == gst.pbutils.INSTALL_PLUGINS_SUCCESS:
         # print "success " + str(donemessage)
         if gst.update_registry():
             print "Plugin registry updated, trying again"
         else:
             print "GStreamer registry update failed"
         self._start_transcoding()
     elif donemessage == gst.pbutils.INSTALL_PLUGINS_PARTIAL_SUCCESS:
         #print "partial success " + str(donemessage)
         self.check_for_elements()
     elif donemessage == gst.pbutils.INSTALL_PLUGINS_NOT_FOUND:
         # print "not found " + str(donemessage)
         context_id = self.StatusBar.get_context_id("EOS")
         self.StatusBar.push(context_id, _("Plugins not found, choose different codecs."))
         self.FileChooser.set_sensitive(True)
         self.containerchoice.set_sensitive(True)
         self.CodecBox.set_sensitive(True)
         self.cancelbutton.set_sensitive(False)
         self.transcodebutton.set_sensitive(True)
     elif donemessage == gst.pbutils.INSTALL_PLUGINS_USER_ABORT:
         context_id = self.StatusBar.get_context_id("EOS")
         self.StatusBar.push(context_id, _("Codec installation aborted."))
         self.FileChooser.set_sensitive(True)
         self.containerchoice.set_sensitive(True)
         self.CodecBox.set_sensitive(True)
         self.cancelbutton.set_sensitive(False)
         self.transcodebutton.set_sensitive(True)
     else:
         context_id = self.StatusBar.get_context_id("EOS")
         self.StatusBar.push(context_id, _("Missing plugin installation failed: ")) + gst.pbutils.InstallPluginsReturn()
コード例 #9
0
 def donemessage(self, donemessage, null):
     if donemessage == gst.pbutils.INSTALL_PLUGINS_SUCCESS:
         # print "success " + str(donemessage)
         if gst.update_registry():
             print "Plugin registry updated, trying again"
         else:
             print "GStreamer registry update failed"
         if self.containertoggle == False:
             # print "done installing plugins, starting transcode"
             # FIXME - might want some test here to check plugins needed are
             # actually installed
             # but it is a rather narrow corner case when it fails
             self._start_transcoding()
     elif donemessage == gst.pbutils.INSTALL_PLUGINS_PARTIAL_SUCCESS:
         self.check_for_elements()
     elif donemessage == gst.pbutils.INSTALL_PLUGINS_NOT_FOUND:
         context_id = self.StatusBar.get_context_id("EOS")
         self.StatusBar.push(context_id, \
                 _("Plugins not found, choose different codecs."))
         self.FileChooser.set_sensitive(True)
         self.containerchoice.set_sensitive(True)
         self.CodecBox.set_sensitive(True)
         self.cancelbutton.set_sensitive(False)
         self.transcodebutton.set_sensitive(True)
     elif donemessage == gst.pbutils.INSTALL_PLUGINS_USER_ABORT:
         context_id = self.StatusBar.get_context_id("EOS")
         self.StatusBar.push(context_id, _("Codec installation aborted."))
         self.FileChooser.set_sensitive(True)
         self.containerchoice.set_sensitive(True)
         self.CodecBox.set_sensitive(True)
         self.cancelbutton.set_sensitive(False)
         self.transcodebutton.set_sensitive(True)
     else:
         context_id = self.StatusBar.get_context_id("EOS")
         self.StatusBar.push(context_id, _("Missing plugin installation failed: ")) + gst.pbutils.InstallPluginsReturn()
コード例 #10
0
ファイル: codec_buddy.py プロジェクト: lovesnow/pygtknotebook
    def install_plugin(self, result):
        if result == gst.pbutils.INSTALL_PLUGINS_SUCCESS:
            gst.update_registry()
            self.play()
            return
        if result == gst.pbutils.INSTALL_PLUGINS_USER_ABORT:
            dialog = gtk.MessageDialog(
                parent=None,
                flags=gtk.DIALOG_MODAL,
                type=gtk.MESSAGE_INFO,
                buttons=gtk.BUTTONS_OK,
                message_format="Plugin installation aborted.",
            )
            dialog.run()
            dialog.hide()
            return

        error.show("Error", "failed to install plugins: %s" % str(result))
コード例 #11
0
ファイル: gstreamer.py プロジェクト: schuay/soundconverter
    def install_plugin_cb(self, result):
        if result in (gst.pbutils.INSTALL_PLUGINS_SUCCESS,
                      gst.pbutils.INSTALL_PLUGINS_PARTIAL_SUCCESS):
            gst.update_registry()
            self.parsed = False
            self.duration = None
            self.finished()
            vfs_unlink(self.output_filename)
            self.play()
            return
        self.done()
        if result == gst.pbutils.INSTALL_PLUGINS_USER_ABORT:
            dialog = gtk.MessageDialog(parent=None, flags=gtk.DIALOG_MODAL,
                type=gtk.MESSAGE_INFO,
                buttons=gtk.BUTTONS_OK,
                message_format='Plugin installation aborted.')
            dialog.run()
            dialog.hide()
            return

        show_error('Error', 'failed to install plugins: %s' % gobject.markup_escape_text(str(result)))