I’m looking for a list of elements.
here the code (i try to use d3dvideosink) :
require “gtk3”
require “gst”
Gem.loaded_specs.map {|n,g| puts " | %10s %6s " %
[g.name,g.version] }
window = Gtk::Window.new
wid=Gtk::DrawingArea.new()
wid.set_size_request(200,100)
v =Gst::ElementFactory.make('playbin')
v.video_sink = Gst::ElementFactory.make('d3dvideosink')
require('win32api');
handle = Win32API.new('user32', 'GetForegroundWindow', [], 'N').call
p window.window.methods
v.video_sink.xwindow_id(handle) # !!!!scratch!!!!
v.uri = "file:///d:/usr/local/video/avi/film3.avi"
wid.events |= ( ::Gdk::Event::Mask::BUTTON_PRESS_MASK |
::Gdk::Event:
:POINTER_MOTION_MASK |
::Gdk::Event:
:BUTTON_RELEASE_MASK)
wid.signal_connect(‘draw’) do |w1,e| end
window.signal_connect("destroy") {Gtk.main_quit}
window.add(wid)
window.show_all
Gtk.main
And the execution:
d:\usr\Ruby\local\Ruiby\samples>ruby v.rb
| pkg-config 1.1.4
| glib2 2.0.2
| gio2 2.0.2
| atk 2.0.2
| cairo 1.12.6
| pango 2.0.2
| gdk_pixbuf2 2.0.2
| gdk3 2.0.2
| gtk3 2.0.2
| gobject-introspection 2.0.2
| gstreamer 2.0.2
DL is deprecated, please use Fiddle
[:to_i, :to_f, :to_s, :to_a, :to_h, :inspect, :&, :|, :^, :nil?, :to_r,
:rationalize, :to_c, :===, :=~, :!~, :eql?, :hash, :<=>, :class,
:singleton_class, :clone, :dup, :taint, :tainted?, :untaint, :untrust,
:untrusted?, :trust, :freeze, :frozen?, :methods, :singleton_methods,
:protected_methods, :private_methods, :public_methods,
:instance_variables, :instance_variable_get, :instance_variable_set,
:instance_variable_defined?, :remove_instance_variable, :instance_of?,
:kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :extend,
:display, :method, :public_method, :define_singleton_method, :object_id,
:to_enum, :enum_for, :==, :equal?, :!, :!=, :instance_eval,
:instance_exec, :send, :id]
(ruby.exe:7228): GStreamer-CRITICAL **: gst_child_proxy_get_property:
assertion G_IS_VALUE (value)' failed v.rb:15:in
‘: undefined method `xwindow_id’ for
#<GLib::Value:0692E3B0 ptr=06902908 own=true> (NoMethodError)