check samples on the trunk ...
and the tutorial ..

http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gst

pgoetzin@pgoetzin-nc6000:~/Desktop/ruby-gnome2/ruby-gnome2/tags/0.9.1/gstreamer/sample$ more mp3-player.rb

require 'gst'

def usage
    puts "Usage: #{__FILE__} mp3-file"
    exit
end

def main
    usage if ARGV.length != 1
    file = ARGV[0]
   
    # Create a pipeline to hold the elements
    pipeline = Gst::Pipeline.new("my_pipeline")
   
    # Create a disk reader
    filesrc = Gst::ElementFactory.make("filesrc", "my_disk_source")
    filesrc.location = file

    # Now it's time to get the MP3 decoder
    decoder = Gst::ElementFactory.make("mad", "my_decoder")

    # And an audio sink
    audiosink = Gst::ElementFactory.make("osssink", "my_audio_player")

    # Add objects to the main pipeline
    pipeline.add(filesrc, decoder, audiosink)

    # Link disk source => decoder => audio player
    filesrc >> decoder >> audiosink

    # Start playing
    puts "Playing #{file}..."
    pipeline.play

    begin
        # Wait until the file is played
        while pipeline.iterate do end
    rescue Interrupt
    ensure
        # Stop the pipeline
        pipeline.stop
    end
end

Gst.init
main

pgoetzin@pgoetzin-nc6000:~/Desktop/ruby-gnome2/ruby-gnome2/tags/0.9.1/gstreamer/sample$





2008/5/29 Marc Heiler <ruby-forum-incoming@andreas-s.net>:
Pat Kiatchaipipat wrote:
> How can I do this?? ruby gnome has fuction to play it??

There are gstreamer bindings. I am not sure about their status, but IMO
the biggest problem with gstreamer is that it is overdesigned for such
simple tasks :D

By the way, I think there is no need to use '??'.
A simple '?' should suffice.
--
Posted via http://www.ruby-forum.com/.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ruby-gnome2-devel-en mailing list
ruby-gnome2-devel-en@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en