class Gst::Bus - gstreamer-2.2.5 Documentation

# class Gst::Bus

### Public Instance Methods

add_watch(priority=GLib::PRIORITY_DEFAULT, &block) click to toggle source

    # File lib/gst/bus.rb, line 20
    def add_watch(priority=GLib::PRIORITY_DEFAULT, &block)
      add_watch_full(priority, &block)
    end

Also aliased as: add_watch_full
add_watch_full(priority=GLib::PRIORITY_DEFAULT, &block)
Alias for: add_watch
sync_handler(&block) click to toggle source

    # File lib/gst/bus.rb, line 24
    def sync_handler(&block)
      @sync_handler = lambda do |bus, message|
        begin
          block.call(bus, message)
        rescue Exception
          $stderr.puts("An exception is raised in " +
                         "#{self.class}\##{__method__} callback: #{block}")
          $stderr.puts("#{$!.class}: #{$!.message}")
          $stderr.puts($@)
          BusSyncReply::DROP
        end
      end
      set_sync_handler(&@sync_handler)
    end