how to reset or stop playing? (using the plugin)

oskitar

24-03-2010 01:40:47

Hi, Im using the plugin (the precompiled submitted for diogutierre here in this forum), I made a text material script as described in the wiki. And place the dll in the folder etc... and it WORKS!!! :D (I even using my own video file!!)
By the way IM using a "Rectangle2D" to put the material on. When im done with the playing I just hide the rectangle (setVisible(false)).
Well not all is going that good. When I try to play another video (no imediately after the first, lets say 30 seconds later), it plays but starts not in the beggining (im switching videos by changing the material over the rectangle2d) but a seconds after its real begining. I think this because I need to tell (in some way) to the plugin to restart the player or something.
So that's question: ¿how can I stop or reset the player? (must I include some lib and .h to do so? but if its a plugin why should that needed?)
thanks for whatever help. :P

bye, bye.

Kreso

24-03-2010 08:25:15

Hi oskitar,

I would reccomend switching over to the new version of the plugin, you can compile it from the project's SVN repository. the version by diogutierre is quite old and has some design flaws whice are now corrected.

you'll need to first compile ogg, vorbis and theora, but that's just opening a soulution file and clicking compile, works out of the box.
then libtheoraplayer andt then ogrevideo.

the best way to stop playing is to call clip_variable->stop() if you don't need the video any more, destroy it, no need to use up memory.

yeah, it's a plugin and it works without headers and libs, but if you want more control, you'll need to include it. otherwise you're dependant on OgreExternalTextureManager to control the plugin which is quite limited.

oskitar

24-03-2010 14:33:36

Thanks, I'll try that and post the results later. :)
... one last question: if Im going to use that lib and include in order to use "clip_variable->stop()" ¿what is exactly? I got Plugin_TheoraVideoSystem.lib but I can't find the corresponding "Plugin_TheoraVideoSystem.h" header... or are others to include and other libs??? which must be? thanks.

Kreso

08-04-2010 07:16:08

you should have plugin_OgreVideo.lib

and headers are in include/

check the demo app for includes and usage.