This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework 'Cocoa' | |
framework 'QuartzCore' | |
class NSColor | |
def toCGColor | |
colorRGB = self.colorUsingColorSpaceName NSCalibratedRGBColorSpace | |
components = Array.new(4){Pointer.new(:double)} | |
colorRGB.getRed components[0], green:components[1], blue:components[2], alpha:components[3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'hornetseye_ffmpeg' | |
require 'hornetseye_xorg' | |
require 'hornetseye_alsa' | |
include Hornetseye | |
input = AVInput.new 'sintel.mp4' | |
alsa = AlsaOutput.new 'default:0', input.sample_rate, input.channels | |
audio_frame = input.read_audio | |
X11Display.show 600, :output => XVideoOutput do |display| | |
img = input.read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cat | |
def self.speak # this is a class method | |
puts "Meow" | |
end | |
end | |
class Lion < Cat | |
def roar | |
puts "Roar Roar !!!!" #now this is just an ordinary method. |
NewerOlder