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