Ruby-LibFAME

Description
	Ruby-LibFAME is a ruby wrapper of libFAME, which is a library for fast (real-time) MPEG video encoding, written in C and assembly (http://fame.sourceforge.net/).

Requirements
	libFame (http://fame.sorceforge.net/).

Installation/Setup
	See file "INSTALL" for installation and setup info.

Usage
	Ruby-LibFAME provides several Classes under LibFAME module:
		- LibFAME::Fame
		- LibFAME::Parameters
		- LibFAME::Yuv
		- LibFAME::Frame_statistics
		- LibFAME::Object
	Before using LibFAME, write "require 'libfame'" in your ruby script.
	Example (note: following example does not have some definitions of variables)
		require "libfame"
		params = LibFAME::Parameters.new
		params.width = frame_width
		params.height = frame_height
		fame = LibFAME::Fame.open
		begin
		  fame.init(params,buffer_size)
		  yuv = LibFAME::Yuv.new
	  	  yuv.w = params.width
		  yuv.h = params.height
		  yuv.p = params.width
		  File.open(filename,"w") do |file|
		    frame_number.times do |i|
		      yuv.y = y  # String whose length is width*height
		      yuv.u = u  # String whose length is width*height/4
		      yuv.v = v  # String whose length is width*height/4
		      fame.start_frame(yuv)
		      while (str=fame.encode_slice)!=""
		        file.print str
		      end
		      state = fame.end_frame
		    end
		  end
		ensure
		  fame.close
		end
