demo player

jonlolo

19-07-2010 21:32:26

well, after compiling everything, finaly got the Plugin_OgreVideo, but i couldnt actually use it.
so i decided to check if i could build the Demo_Player. i built the CEGUI against my OGRESDK (1.7.0 if i remember well), but then back to the Demo_Player, there were missing files, or different names, im guessing the demo was made for an older CEGUI version. i tried to 'translate' the code to the newest CEGUI code, but i failed, not a CEGUI expert :[

anyway, i'd really appreciate if anyone could share with me the source code for a working, up2date example using Plugin_OgreVideo (with or without CEGUI). just a simple demo player, so i can start using it myself :]

thanks

jonlolo

04-08-2010 19:09:56

well, hi again
i still need some help using the ogrevideo plugin. i have everything compiled now (ogg, vorbis, theora, theoraplayer, and the ogrevide) but i dont know how do i use this last one. i've checked the demo but i cant make it work, guess its because the old OGRE and CEGUI SKDs version, and there are some things i dont understand, im not so familiar working with textures and materials.
anyway, just need some basic steps or code lines to manually load the video, and display it using all the program screen. nothing more complex.
thanks, ill be waiting for an answer

Kreso

04-08-2010 21:37:31

sorry, really can't spare any extra time to work on this plugin at this time. I'll see about getting some free time soon to finally resume working on this plugin. the demos need updating. Demo_Player works on 1.6.x and cegui 0.6.x. Haven't tried it on anything newer.

as for the demo, you could just strip all the cegui code and let it display an Ogre quad with the video texture.

posibility number two, download ogre 1.6.5 sdk (has cegui as well) and compile with that. just to see if it'll work on your machine.

and also, test libtheoraplayer's demos, they should work and have no cegui dependancies.

jonlolo

05-08-2010 02:07:58

thanks for the quick reply ^^
ok, think ill try with the OGRE SDK 1.6.5, just to be sure as you said.
i compiled the libtheoraplayer demos/examples and they worked fine too

and i think i tried doing that, just adding a quad without any cegui things, but didnt work, not sure why, could anybody help me with this? how should the code look?
from what i remember, i tried it, but i saw nothing but a black screen with the FPS box.

thanks

jonlolo

05-08-2010 04:01:17

ok, downloaded the SDK 1.6.5, compiled the plugin, and the demo, it went fine till then.
when running the proyect, i can see all the cegui buttons and stuffs (at least i think so), but instead of the video, all i see is black, as its shown in the attachment. something, though, is happehing i think, the FPS is lower when playing the video, the proyect displays the duration of the video, and it doest throw error cos of not founding the file, and it does if i change the file name. and i added the plugin to the plugins.cfg file too.
and it actually loads the video;

23:43:35: OgreVideo: Creating video from data source: konqi.ogg
23:43:36: OgreVideo: konqi.ogg: file duration is 31.240 seconds

[attachment=0]ogrevideo.JPG[/attachment]

the material script is:

material video_material
{
technique
{
pass
{
cull_software none
cull_hardware none
lighting off
ambient 0 0 0
diffuse 1 1 1
texture_unit
{

}

}
}
}


so... what happened ?

jonlolo

05-08-2010 13:06:38

sorry for the triple post, but i just tried the same proyect with same SDK and everything, on another computer in school (i was working at my home)
and the demo worked 100%, as you can see in the screenshot
[attachment=0]ogrevideo.JPG[/attachment]
so, i beliave im missing a 'something' in my computer. any idea what could it be ?

Kreso

05-08-2010 13:08:01

not sure. which system do you have at home?

jonlolo

05-08-2010 13:32:12

at home im using Windows XP Professional (SP2 or 3, cant remember)
and here at school Windows XP Professional SP3

Kreso

05-08-2010 14:56:51

the only thing that comes to mind is due to a difference in handling texture formats on these machines (their display cards).

can you experiment a bit with that? you can choose the texture format when you create a new video object.

jonlolo

06-08-2010 18:54:51

mmm im not sure what you meant with that exactly, would you mind to explain a bit ?
by the way, will this code be enough to display a video using 1.7.1 (assuming the plugin works in the SDK version) ?

ManualObject* model = SceneMgr->createManualObject(name);
model->begin(material_name);
model->position(right,bottom,0); model->textureCoord(1,1);
model->position(right,top ,0); model->textureCoord(1,0);
model->position(left ,top ,0); model->textureCoord(0,0);
model->position(left ,top ,0); model->textureCoord(0,0);
model->position(right,bottom,0); model->textureCoord(1,1);
model->position(left, bottom,0); model->textureCoord(0,1);
model->end();
model->setUseIdentityProjection(true);
model->setUseIdentityView(true);
SceneNode* node = SceneMgr->getRootSceneNode()->createChildSceneNode();
node->attachObject(model);
OgreVideoManager* mgr=(OgreVideoManager*) OgreVideoManager::getSingletonPtr();
mgr->setInputName(VIDEO_FILE);
mgr->createDefinedTexture("video_material");
TheoraVideoClip* clip = mgr->getVideoClipByName(VIDEO_FILE);
clip->play();


thanks