theoraplayer.monkey2 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. Namespace theoraplayer
  2. #If __TARGET__<>"emscripten"
  3. #Import "<openal>"
  4. #Import "makefile.monkey2"
  5. #Import "native/ogg/include/*.h"
  6. #Import "native/vorbis/lib/*.h"
  7. #Import "native/vorbis/include/*.h"
  8. #Import "native/theora/include/*.h"
  9. #Import "native/theoraplayer/include/*.h"
  10. #Import "native/theoraplayer/include/theoraplayer/*.h"
  11. #Import "native/theoraplayer/src/*.h"
  12. #Import "native/theoraplayer/src/formats/*.h"
  13. #Import "native/theoraplayer/src/YUV/*.h"
  14. #Import "native/theoraplayer/src/YUV/libyuv/include/*.h"
  15. #Import "<theoraplayer.h>"
  16. #Import "<theoraplayer/Manager.h>"
  17. #Import "<theoraplayer/VideoClip.h>"
  18. #Import "<theoraplayer/VideoFrame.h>"
  19. #Import "native/OpenAL_AudioInterface.cpp"
  20. #Import "native/OpenAL_AudioInterface.h"
  21. #Import "native/monkey2_glue.cpp"
  22. #Import "native/monkey2_glue.h"
  23. Extern
  24. Enum OutputMode="theoraplayer::OutputMode"
  25. End
  26. Class VideoManager Extends Void="theoraplayer::Manager"
  27. Method setAudioInterfaceFactory( audioFactory:AudioInterfaceFactory )
  28. Method getAudioInterfaceFactory:AudioInterfaceFactory()
  29. Method createVideoClip:VideoClip( filename:CString ) Extension="bb_theoraplayer_createVideoClip"
  30. Method createVideoClip:VideoClip( data:Void Ptr,length:Int ) Extension="bb_theoraplayer_createVideoClip"
  31. Method destroyVideoClip( clip:VideoClip )
  32. Method update( time_increase:Float )
  33. Function getInstance:VideoManager()="bb_theoraplayer_getManager"
  34. End
  35. Class VideoClip Extends Void="theoraplayer::VideoClip"
  36. Method getWidth:Int()
  37. Method getHeight:Int()
  38. Method hasAlphaChannel:Bool()
  39. Method getSubFrameX:Int()
  40. Method getSubFrameY:Int()
  41. Method getSubFrameWidth:Int()
  42. Method getSubFrameHeight:Int()
  43. Method getStride:Int()
  44. Method getTimePosition:Float()
  45. Method getDuration:Float()
  46. Method getFps:Float()
  47. Method getFramesCount:Int()
  48. Method getAudioGain:Float()
  49. Method setAudioGain( gain:Float )
  50. Method getPlaybackSpeed:Float()
  51. Method setPlaybackSpeed( speed:Float )
  52. Method getOutputMode:OutputMode()
  53. Method setOutputMode( mode:OutputMode )
  54. Method isAutoRestart:Bool()
  55. Method setAutoRestart( value:Bool )
  56. Method getPriority:Float()
  57. Method setPriority( priority:Float )
  58. Method getPriorityIndex:Int()
  59. Method getPrecachedFramesCount:Int()
  60. Method setPrecachedFramesCount( count:Int )
  61. Method getReadyFramesCount:Int()
  62. Method getDisplayedFramesCount:Int()
  63. Method getDroppedFramesCount:Int()
  64. Method isDone:Bool()
  65. Method isPaused:Bool()
  66. Method updateTimerToNextFrame:Float()
  67. Method fetchNextFrame:VideoFrame()
  68. Method popFrame()
  69. Method play()
  70. Method pause()
  71. Method stop()
  72. Method restart()
  73. Method seek( time:Float )
  74. Method seekToFrame( frame:Int )
  75. Method waitForCache:Float( desiredCacheFactor:Float=0.5,maxWaitTime:Float=1.0 )
  76. End
  77. Class VideoFrame Extends Void="theoraplayer::VideoFrame"
  78. Method getBuffer:UByte Ptr()
  79. Method getFrameNumber:Int()
  80. End
  81. Class AudioInterfaceFactory Extends Void="theoraplayer::AudioInterfaceFactory"
  82. End
  83. Class OpenAL_AudioInterfaceFactory Extends AudioInterfaceFactory
  84. End
  85. #End