Class: Gst::Bus
- Inherits:
-
Object
- Object
- Gst::Bus
- Defined in:
- lib/gst/bus.rb
Instance Method Summary collapse
- #add_watch(priority = GLib::PRIORITY_DEFAULT, &block) ⇒ Object
- #add_watch_full ⇒ Object
- #sync_handler(&block) ⇒ Object
Instance Method Details
#add_watch(priority = GLib::PRIORITY_DEFAULT, &block) ⇒ Object
20 21 22 |
# File 'lib/gst/bus.rb', line 20 def add_watch(priority=GLib::PRIORITY_DEFAULT, &block) add_watch_full(priority, &block) end |
#add_watch_full ⇒ Object
19 |
# File 'lib/gst/bus.rb', line 19 alias_method :add_watch_full, :add_watch |
#sync_handler(&block) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/gst/bus.rb', line 24 def sync_handler(&block) @sync_handler = lambda do |bus, | begin block.call(bus, ) rescue Exception $stderr.puts("An exception is raised in " + "#{self.class}\##{__method__} callback: #{block}") $stderr.puts("#{$!.class}: #{$!.}") $stderr.puts($@) BusSyncReply::DROP end end set_sync_handler(&@sync_handler) end |