Game Development Community

Problems with Theora Gui Ctrl

by Jeremy Anderson · in Torque Game Builder · 12/27/2007 (5:20 pm) · 4 replies

I am having no luck getting theora to work on my project. I've set up a simple Gui which should load a video file into an 800 x 400 box when it comes active. Problem is, I'm getting erratic behavior...for the first round of tests, Torque was reporting in the console (you can see the debug code I wrote at the bottom to verify the file) that it couldn't find the file. Now whenever I try to open the gui in the editor, or launch my game project, TGB crashes as soon as it attempts to draw the Gui.

I figued I would check and see if anyone sees any glaring issues with my implementation before I address this as a bug. As a side note, the editor also doesn't seem to allow me to assign an ".ogg" content file to the gui...no big issue, since I'm assigning via code anyway.

Just for reference, I'm using TGB 1.6 on Mac OS X 10.3.9

//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(cinemaGui) {
   canSaveDynamicFields = "0";
   isContainer = "1";
   Profile = "GuiDefaultProfile";
   HorizSizing = "right";
   VertSizing = "bottom";
   position = "0 0";
   Extent = "800 600";
   MinExtent = "8 2";
   canSave = "1";
   Visible = "1";
   hovertime = "1000";

   new GuiTheoraCtrl(myVideo) {
      canSaveDynamicFields = "0";
      isContainer = "0";
      Profile = "GuiDefaultProfile";
      HorizSizing = "right";
      VertSizing = "bottom";
      position = "0 80";
      Extent = "800 400";
      MinExtent = "8 2";
      canSave = "1";
      Visible = "1";
      hovertime = "1000";
      done = "0";
      stopOnSleep = "1";
      backgroundColor = "0 0 0 255";
   };
};
//--- OBJECT WRITE END ---

function cinemaGui::onWake(%this)
{
	if (isFile("game/data/cine/test.ogg"))
		{
		echo("I can see it");
		}
	myVideo.setFile("game/data/cine/test.ogg");
}

#1
01/02/2008 (9:04 pm)
Issue resolved. Discovered that the Quicktime Components encode Theora files that will crash TGB. Using the command line encoder and now it works.
#2
01/03/2008 (1:15 pm)
Can you provide a little more detail on what exactly you did to fix this? Ie what command line encoder did you use? I havent looked into the Theora stuff yet but this is something I do plan on using so any pre-emptive knowledge of pitfalls would be appreciated.
#3
01/03/2008 (6:14 pm)
Ffmpeg2theora has always worked over here.
http://v2v.cc/~j/ffmpeg2theora/
#4
03/07/2009 (2:23 pm)
For those trying to figure out this problem, this post helped fill in a lot of blanks:

http://www.garagegames.com/community/forums/viewthread/48713

My only issue now is trying to figure out how to add functions to this .gui so I can control the click through & load next level command.

I pulled the functions from the GuiAviBitmapCtrl code, but can't seem to integrate them into theora even though they both have very similar structures.