pantson.Theora v2.2


Plays Theora ogg movies. No sound support. Based on a BSD license. Free for commercial use

Download here

Use FFMPEG2Theora to convert your movies.
Download example to test.

v2.2
- updated lib to use V1 of Theora lib from Xiph.
- updated internal vars so that i can start writing a movie encoder BlitzMax.

v2.1
- Fixed ghosting when looping of movie.

v2.0
- NEW COMMAND SET. Due to some confusion with the old command set and it fitting into peoples frameworks, a new and improved command set is avaliable. See demos.
- Internal timers and counters are now per movie and not global.

v1.5
- Updated Theora lib to beta3.
- Fixed timing when processing is too slow.

v1.4
- Updated Theora lib to beta2.
- Fixed creation of lookup tables.

v1.3
- Fix for compiling on MAC. Many thanks to Bruscey for this.
- Fixed green screen at beginning of movies.
- Add PlayTheora command.




THEORA reference
  pantson.theora: Functions Types Modinfo  

THEORA

Functions Summary

CloseTheora Close a movie and sets to NULL.
DrawTheora OBSOLETE.
DrawTheoraImage Draws a theora movie onto an image frame.
DrawTheoraPixmap Draws a theora movie onto a pixamp.
EOT Check to see if a Theora movie has ended.
OpenTheora Opens a Theora file ready for drawing.
PauseTheora Pauses or unpauses a theora movie.
PlayTheora Plays a theora movie at co-ords x and y. specific width and height and if it should keep the aspect ratio when drawing.
ProcessTheora Process a theora thread. If passed NULL (default) all theora threads are processed.
StartTheora Gets a Theora movie ready for drawing. Can only be started from the beginning of a Theora movie.
TheoraFullscreen Set the drawing scale so that the Theora movie will fit the full screen.
TheoraHeight Get height of a theora movie.
TheoraWidth Get width of theora movie.

Types Summary

Ttheora Theora movie type.

Functions

Function CloseTheora:Int(movie:Ttheora)
ReturnsOnce closed the movie cannot be drawn.
DescriptionClose a movie and sets to NULL.

Function DrawTheora:Int(movie:Ttheora,pixmap:TPixmap=Null)
ReturnsError message about command set.
DescriptionOBSOLETE.

Function DrawTheoraImage:Int(theora:Ttheora,image:Timage,frame:Int=0)
ReturnsTrue if an update to the image occoured.
DescriptionDraws a theora movie onto an image frame.

Function DrawTheoraPixmap:Int(theora:Ttheora,pixmap:TPixmap)
ReturnsTrue if an update to the pixamp occoured.
DescriptionDraws a theora movie onto a pixamp.

Function EOT:Int(movie:Ttheora)
ReturnsTrue if end of Theora, false otherwise.
DescriptionCheck to see if a Theora movie has ended.

Function OpenTheora:Ttheora(filename:String,buffersize:Int=4096)
ReturnsA handle to the Theora movie. NULL if the file doesn't exist.
DescriptionOpens a Theora file ready for drawing.

Function PauseTheora:Int(movie:Ttheora)
Returnstrue if paused. false if resumed.
DescriptionPauses or unpauses a theora movie.

Function PlayTheora:Int(filename:String,x:Int=0,y:Int=0,w:Int=0,h:Int=0,aspect:Int=False)
ReturnsTrue if the movie was drawn.
DescriptionPlays a theora movie at co-ords x and y. specific width and height and if it should keep the aspect ratio when drawing.

Function ProcessTheora:Int(movie:Ttheora=Null)
ReturnsTrue if an update to a frame exists.
DescriptionProcess a theora thread. If passed NULL (default) all theora threads are processed.

Function StartTheora:Int(movie:Ttheora,seconds:Float=0)
Returnstrue.
DescriptionGets a Theora movie ready for drawing. Can only be started from the beginning of a Theora movie.

Function TheoraFullscreen:Int(movie:Ttheora)
ReturnsThis function auto calls the setscale command. Any drawing commands after setting this value will be affected too.
DescriptionSet the drawing scale so that the Theora movie will fit the full screen.

Function TheoraHeight:Int(movie:Ttheora,width:Int=Null)
ReturnsThe height. If provided with a width, it will Return a value that is in proportion.
DescriptionGet height of a theora movie.

Function TheoraWidth:Int(movie:Ttheora,height:Int=Null)
ReturnsThe width. If provided with a height, it will return a value that is in proportion.
DescriptionGet width of theora movie.

Types

Type Ttheora
DescriptionTheora movie type.
Methods Summary
draw Check to see if a frame has been drawn on the specified pixmap.
pause Pauses or unpauses a theora movie.
start Gets a Theora movie ready for drawing. Can only be started from the beginning of a Theora movie.
Method draw:Int()
ReturnsTrue if a frame has been drawn.
DescriptionCheck to see if a frame has been drawn on the specified pixmap.
Method pause:Int()
Returnstrue if paused. false if resumed.
DescriptionPauses or unpauses a theora movie.
Method start(t:Float=0)
Returnstrue.
DescriptionGets a Theora movie ready for drawing. Can only be started from the beginning of a Theora movie.

Module Information

Version2.1
AuthorRichard Hanson (PantsOn)
Modserverpantson
TestingBrucey, James Rozee
TheoraJust enough for me and my dawg
CC_OPTS-D__MACOSX__