how do I do this: Ogre::TheoraVideoManager* mgr = Ogre::The

oskitar

27-03-2010 18:59:37

what library I need to include? :oops:
this example was taken from this thread viewtopic.php?f=18&t=12022&sid=3adef434950cba4c9b8dbdd8e1eb35ea#p68020
Ogre::TheoraVideoManager* mgr = Ogre::TheoraVideoManager::getSingletonPtr();

I have now: OgreTheoraDataStream.h, OgreVideoExport.h, OgreVideoManager.h do I need other? (it seems so)
And Im linking to Plugin_TheoraVideoSystem.lib (do I need other?).
where to get them (I did already an checkout of the svn, what I need is suposed to be there?) sorry for my foolishness. :oops:

Kreso

27-03-2010 19:13:33

Hi Oskitar,

OgreVideo Plugin is the Ogre wrapper for the Theora Playback Library I wrote (http://libtheoraplayer.sf.net)

you need to include OgreVideoManager.h, TheoraVideoClip.h (from libtheoraplayer) if you want to manipulate videos directly.
and you need to link to TheoraVideoSystem.lib and libtheoraplayer.lib

you can check the player demo from the SVN trunk, everything is already set up there to compile and run fine.

let me know if it works for you and if you have any further problems.

oskitar

27-03-2010 20:23:51

sorry again for my stupidity but.. :oops: ... what do I need to compile the plugin or the player or theoralib ? :oops:
the only file the im still missing is TheoraVideoSystem.lib. thanks.

Kreso

27-03-2010 20:30:19

here's the procedure. Use Visual Studio 2008 SP1:

1) compile libogg,libvorbis & libtheora
2) use those .lib and .h files and compile libtheoraplayer from the SVN, there is a VC++ solution file so it should be straightforward
3) then use OgreVideo's solution file to compile the ogrevideo plugin. you'll ofcourse need to adjust the include and library locations for all dependancies.

oskitar

27-03-2010 23:16:56

thanks,
so after all this compiling stuff I will get TheoraVideoSystem.lib?
im trying...

Kreso

27-03-2010 23:27:57

yes. although I think you should get OgreVideoPlugin.lib or smtg like that. make sure you're using the latest svn revision of ogrevideo plugin.

oskitar

27-03-2010 23:43:50

compiled it!! :D sadly ... there is no TheoraVideoSystem.lib there, what I get is "plugin_ogreVideo.lib" and the same but .dll :cry:

when I try to compile this: TheoraVideoManager* mgr = Ogre::The....etc, etc..
(in my own proyect) the exact error is this:
1>zVideo.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class TheoraVideoManager * __cdecl TheoraVideoManager::getSingletonPtr(void)" (__imp_?getSingletonPtr@TheoraVideoManager@@SAPAV1@XZ)

now im using libtheoraplayer.lib, Plugin_OgreVide.lib and Plugin_TheoraVideoSystem.lib but still no luck.

Kreso

28-03-2010 09:48:16

yes, that is the name of the library. so in fact you've succesfully compiled it, congratulations!
TheoraVideoSystem.lib was the name of the old library, I've renamed it.

use class OgreVideoManager, not TheoraVideoManager. check the player demo code in ogrevideo's SVN.

as for linking, you'll need plugin_ogreVideo.lib and libtheoraplayer.lib

oskitar

28-03-2010 20:13:02

yes, that is the name of the library. so in fact you've succesfully compiled it, congratulations!
TheoraVideoSystem.lib was the name of the old library, I've renamed it.
use class OgreVideoManager, not TheoraVideoManager. check the player demo code in ogrevideo's SVN.
as for linking, you'll need plugin_ogreVideo.lib and libtheoraplayer.lib

big thanks!!! it worked! following your instructions I got compiled (and linked :D ) this:
TheoraVideoManager * mgr = OgreVideoManager::getSingletonPtr();

now im going for the fun stuff, thanks again. :P

oskitar

28-03-2010 21:09:54

should this work? suposing videoName.ogv is a valid file name.
OgreVideoManager* mgr=(OgreVideoManager*) OgreVideoManager::getSingletonPtr();
TheoraVideoClip * clip;
clip = mgr->getVideoClipByName("videoName.ogv");

it's not working, indeed whatever I try using the "mgr" fails (gives an exception) or "this aplication has requested termination" or something.
maybe is because there is still a video running (via ogre material), I dont know.... I just want to be able of reset whatever video is beeing played at that time and/or start from begining a video.

Kreso

30-03-2010 07:57:47

that's odd :/ can you check the status of the mgr variable once you call getSingleton?

also, you can debug the player demo and see what happens there and whether you can achieve what you want there.

There is a problem with getVideoClipByName, I'm not sure anymore which format the names are, I'll investigate soon and let you know, it's likely that the full path of the video is taken.

oskitar

30-03-2010 20:07:42

mgr->getVersion() works
mgr->getFPS() fails!
mgr->getInputName().c_str() fails!

can Ogre version be relevant? i'm using 1.6.5 :shock:

Im not using a framelistener too.

edit: now Im switching to ogre 1.7 to see what happens.

Kreso

30-03-2010 20:28:05

okay, I'll investigate as soon as I can.

I haven't tested it on Ogre 1.7; I too have tried on 1.6.5 and Visual C++ 2008.
Though I haven't tested it much, I only developed as much as I need to run the player demo. as said, will look into and fix as soon as I can.

oskitar

30-03-2010 20:37:25

Edit: I rolled back to 1.6.5 !! :D
now I got other question :P what plugin should I set in plugin.cfg till now I was using "Plugin_TheoraVideoSystem" but now I got Plugin_OgreVIdeo.dll so should I use Plugin=Plugin_OgreVIdeo ? instead of the other.

other thing, the mgr is null!! im not getting it.
I tryed this:
OgreVideoManager* mgr= 0L;
mgr = (OgreVideoManager*) TheoraVideoManager::getSingletonPtr(); //(OgreVideoManager*) OgreVideoManager::getSingletonPtr();
_cprintf("MGR:%d \n", mgr);

and this:
OgreVideoManager* mgr= 0L;
mgr = (OgreVideoManager*) OgreVideoManager::getSingletonPtr();
_cprintf("MGR:%d \n", mgr);

and I got in both cases I get printed '0', thanks for any further help