From: ashbb Date: 2012-01-07T18:15:45+09:00 Subject: [ruby-list:48592] Re: [ANN] Ruby-GNOME2 1.1.0 --0016e6d778d721b11a04b5ec9cbc Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit > 次にmp3, mp4ファイルの再生を試してみます。 以下のsnippetで5行めをsong.ogg, song.mp3, video.mp4にして試してみました。 require 'gtk2' require 'gst' require 'win32api' play_bin = Gst::ElementFactory.make('playbin2') play_bin.uri = 'file://c/tmp/song.mp3' play_bin.video_sink = Gst::ElementFactory.make('directdrawsink') play_bin.bus.add_watch do |b, message| case message.type when Gst::Message::WARNING, Gst::Message::ERROR p message.parse else #p message.type end true end window = Gtk::Window.new window.signal_connect('expose-event')do play_bin.video_sink.xwindow_id = Win32API.new('user32', 'GetForegroundWindow', [], 'N').call end window.show_all play_bin.play Gtk.main 結果は、.oggと .mp4は上手く再生できました。素晴らしい! ですが、.mp3では以下のエラーが出て再生できませんでした。 C:/ruby/lib/ruby/gems/1.9.1/gems/glib2-1.1.0-x86-mingw32/lib/1.9/glib2.so: warning: no super class for `GLib::IOChannelWin32Socket', Object assumed [#, "gsturidecodebin.c(867): unknown_type_cb (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0"] [#, "gstdecodebin2.c(3233): gst_decode_bin_expose (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20:\nno suitable plugins found"] [#, "gstdecodebin2.c(3233): gst_decode_bin_expose (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20:\nno suitable plugins found"] [#, "gstbaseparse.c(2695): gst_base_parse_loop (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMpegAudioParse:mpegaudioparse0:\nstreaming stopped, reason not-linked"] 以前OSSbuildで試した時に、.mp3を再生するためには - GStreamer-WinBuilds-LGPL-x86.msi だけでなく、 - GStreamer-WinBuilds-GPL-x86.msi もインストールする必要があったような気がするのですが。 今回リリースして頂いた gstreamer-1.1.0-x86-mingw32 は 全部入りでしょうか。 ashbb --0016e6d778d721b11a04b5ec9cbc--