indexzero / celluloid

Celluloid is a reactive, input-output oriented language with support for blocks and timelines designed to make both simple and complex media composition operations more comprehensible to the author.

Home | Edit | New

Celluloid Language Framework Code


device Audio accepts audio
  def play(time playAt)
    //TODO: Implement this function
  end
  
  def pause(time pauseAt)
    //TODO: Implement this function
  end
  
  def stop(time stopAt)
    //TODO: Implement this function
  end
  
  def rewind(time rewindAt, number speed)
    //TODO: Implement this function
  end
  
  def ffwd(time fforwardAt, number speed)
    //TODO: Implement this function
  end

  def seek(time jumpAt, time jumpTo)
    //TODO: Implement this function
  end
end

device Video accepts video
  def play(time playAt)
    //TODO: Implement this function
  end
  
  def pause(time pauseAt)
    //TODO: Implement this function
  end
  
  def stop(time stopAt)
    //TODO: Implement this function
  end
  
  def rewind(time rewindAt, number speed)
    //TODO: Implement this function
  end
  
  def ffwd(time fforwardAt, number speed)
    //TODO: Implement this function
  end

  def seek(time jumpAt, time jumpTo)
    //TODO: Implement this function
  end
end

constraint continuous_media_flow 
  play
  drop
end

constraint discrete_media_flow requires continuous_media_flow announces started, paused, stopped, finished
  pause
  stop
  rewind
  ffwd
  seek
  
  announce started when play @start
  announce paused when pause
  announce stopped when stop
  announce finished when stop @end
end

constraint input requires mediaflow
end

constraint output
end

constraint audio requires input, output
end

constraint video requires audio
end

event started
end

event paused
end

event stopped
end

event finished
end

Last edited by indexzero, Tue Nov 03 21:11:26 -0800 2009
Home | Edit | New
Versions: