Problem, video freezes

Seikent

05-03-2010 20:40:07

Hey,

I would be grateful if you can help me with the following :D.

I'm running the theora plug-in last version with Ogre 1.6.5.

My issue is simple, I have the following code:


OgreVideoManager* videoManager =(OgreVideoManager*) OgreVideoManager::getSingletonPtr();
videoManager->setInputName("fedora01.ogg");
videoManager->createDefinedTexture("video_material"); //the one in the example material

Ogre::Entity* cubo_test = mSceneMgr->createEntity("testenti", "cube.mesh");
Ogre::SceneNode* node_vid = mSceneMgr->getRootSceneNode()->createChildSceneNode( "testsnode", Ogre::Vector3(0, 0, 300));
node_vid->attachObject(cubo_test);

cubo_test->setMaterialName("video_material");
node_vid->setPosition(300,100,-500);

TheoraVideoClip* clip= videoManager->getVideoClipByName("fedora01.ogg");
clip->play();
clip->setAutoRestart(true);


The clip plays ok, but just a couple times. After the 2nd or 3rd time, the video frezees itself. If I get the clip->getTimePosition() , it goes beyond the end of the clip, but restarting it manually doesn't work (the timer restart itself, but the image is the same). Changing the clip to "konqi.ogg" doesn't help, it freezes at second 13 approx.

That's it. Thx!

Kreso

05-03-2010 23:20:58

Hmm, interesting, i'll take a look; does the player demo have the same problem on your pc?

Seikent

08-03-2010 13:14:54

The demoplayer works fine, it's strange considering that I'm using almost the same code.

Some extra info is that my app does a lot of things (background math stuff without ogre), rendering is just a part.

PD: the demoplayer has a bug, it crashes if I change the colors from YUV to RGB.

Kreso

08-03-2010 13:17:44

strange indeed! ps: yeah i know about the bug :) it's probably in theora player