Recording game play
Quicktime seems to be doing additional checks on movie files now:
http://docs.info.apple.com/article.html?artnum=305947
This (supposedly) only applies to Rosetta, but just in case:
http://docs.info.apple.com/article.html?artnum=306043
http://docs.info.apple.com/article.html?artnum=305947
This (supposedly) only applies to Rosetta, but just in case:
http://docs.info.apple.com/article.html?artnum=306043
Well it's been a headache of a morning getting SGF and family up and running, but here's where I'm at with it:
I actually tried installing Boost and it took almost an hour building and installing everything on my Intel Mac Mini to... nowhere! I forgot to sudo for write permissions to usr/local
So the second time around I figured out that I could just build the thread lib by itself, which was a relief, and only took a few minutes for just the thread lib, plus installing all of the Boost headers. Problem is that apparently they changed the naming conventions for Boost 1_34, compared to whatever version you're using (and header install location goes to /usr/local/include/boost-1_34/boost by default too). So I took the closest one, named libboost_thread-mt.a, made a copy and renamed it to libboost_thread.a so the project could find it. Seems to work fine! I probably should have just (re)included the correctly named new lib instead, but whatever...
BTW, For anyone else interested in Boost for use with SGF, you really don't need to actually install Boost if you don't want to, you just need to build the boost thread lib wherever you want, and then make sure you have a copy of the headers somewhere convenient, and be sure to tell SGF projects where to find the headers. All it takes is reading the installation instructions carefully and setting the right options for ./configure
Getting Boost set up was a pain, but moving along to get SGFAppModeTest running:
GLEW has been giving me grief (or so I *think* it is GLEW). I have zero experience with GLEW so I have no idea what I'm doing. What I've had to do so far is comment out any instance of glActiveTexture and glBegin/end blocks using glMultiTexCoord2i in GuassianCombineFilter.cpp. I've been able to replace glActiveTexture where absolutely needed with glActiveTextureARB. But other than that, it works! Woohoo!
One of the first things I noticed is that your glView does not get properly copied to the window's backing store during miniaturization (cmd-m).
Onward to RecordingTest:
Same thing with glActiveTexture in RecordingApp.mm, had to replace it with glActiveTextureARB. But that runs too! Until I pressed the record button that is...
Crash occurred at glGenBuffers on line 147, in QTRecorder::createBuffer EXC_BAD_ACCESS. Cmd-double click and it's a GLEW define again. I don't know what to do about that one, so I guess that's where my testing ends for now. I would assume that is probably not the same cause of your crashing though.
Other things of note:
My version of QT is still 7.1.6 for whatever reason (My system is still 10.4.9 too)
I get a couple of noteworthy warnings from QTEncoder.mm:
--> NewGWorld is deprecated
--> QTEncoder.mm:163: warning: passing negative value 'kQTNativeDefaultPathStyle' for argument 2
I actually tried installing Boost and it took almost an hour building and installing everything on my Intel Mac Mini to... nowhere! I forgot to sudo for write permissions to usr/local

BTW, For anyone else interested in Boost for use with SGF, you really don't need to actually install Boost if you don't want to, you just need to build the boost thread lib wherever you want, and then make sure you have a copy of the headers somewhere convenient, and be sure to tell SGF projects where to find the headers. All it takes is reading the installation instructions carefully and setting the right options for ./configure
Getting Boost set up was a pain, but moving along to get SGFAppModeTest running:
GLEW has been giving me grief (or so I *think* it is GLEW). I have zero experience with GLEW so I have no idea what I'm doing. What I've had to do so far is comment out any instance of glActiveTexture and glBegin/end blocks using glMultiTexCoord2i in GuassianCombineFilter.cpp. I've been able to replace glActiveTexture where absolutely needed with glActiveTextureARB. But other than that, it works! Woohoo!
One of the first things I noticed is that your glView does not get properly copied to the window's backing store during miniaturization (cmd-m).
Onward to RecordingTest:
Same thing with glActiveTexture in RecordingApp.mm, had to replace it with glActiveTextureARB. But that runs too! Until I pressed the record button that is...
Crash occurred at glGenBuffers on line 147, in QTRecorder::createBuffer EXC_BAD_ACCESS. Cmd-double click and it's a GLEW define again. I don't know what to do about that one, so I guess that's where my testing ends for now. I would assume that is probably not the same cause of your crashing though.
Other things of note:
My version of QT is still 7.1.6 for whatever reason (My system is still 10.4.9 too)
I get a couple of noteworthy warnings from QTEncoder.mm:
--> NewGWorld is deprecated
--> QTEncoder.mm:163: warning: passing negative value 'kQTNativeDefaultPathStyle' for argument 2
AnotherJake Wrote:Crash occurred at glGenBuffers on line 147, in QTRecorder::createBuffer EXC_BAD_ACCESS. Cmd-double click and it's a GLEW define again. I don't know what to do about that one, so I guess that's where my testing ends for now. I would assume that is probably not the same cause of your crashing though.
Actually, it might be the same thing. I think we all here can remember an occasion when Xcode simply won't tell you where your crash occurred. Can you send me a complete stack trace?
AnotherJake Wrote:Other things of note:
My version of QT is still 7.1.6 for whatever reason (My system is still 10.4.9 too)
Well, there goes my patented just-blame-apple-for-my-own-damn-mistakes approach

AnotherJake Wrote:I get a couple of noteworthy warnings from QTEncoder.mm:
--> NewGWorld is deprecated
--> QTEncoder.mm:163: warning: passing negative value 'kQTNativeDefaultPathStyle' for argument 2
Unfortuntately, there's nothing I can do about this ( yet ). QTKit does a lot, but it doesn't let you create an empty clip and add frames to it. To do that, you've got to use deprecated code. Well, at least I can blame apple for that!
P.S. GLEW is by and large pretty good. Don't write it off yet. That being said, in my experience, glActiveTexture will crash on the intel 950 ( or whatever it is the mini and macbook use ) whereas glActiveTextureARB works fine. I should have replaced all my calls with the ARB versions, but I was lazy.
If I can fix this, I'll let you know. SGF was really just meant to scratch an itch for me, it's not a game "engine", just an easy way to get a window on the screen and do common stuff. Since I wrote the build I released, I've improved it a bit. Except for crashy recording.
So, please send me the stack trace from Xcode. I need to see the error and the line it occurred on. Since Xcode won't tell me on my mac.
TomorrowPlusX Wrote:Unfortuntately, there's nothing I can do about this ( yet ). QTKit does a lot, but it doesn't let you create an empty clip and add frames to it. To do that, you've got to use deprecated code. Well, at least I can blame apple for that!If that's the case, how does Apple expect you to create new clips in memory on x86-64, where those deprecated APIs don't exist?

ThemsAllTook Wrote:If that's the case, how does Apple expect you to create new clips in memory on x86-64, where those deprecated APIs don't exist?
From Apple's Leopard Technology Overview:
Quote:QuickTime Improvements
Working with video using QuickTime has long been a strength of Mac OS X. Now, it’s as easy to build video capture into your application as it is to work with pre-recorded video. By using the QTKit Capture API, you can capture video from an iSight, USB (VDC) and FireWire (IIDC) devices, and DV cameras. The API even lets you output to multiple outputs.
Maybe QTKit Capture implements whatever is needed for that? In this page it says:
Quote:QTKit, the premier method for Cocoa developers to access QuickTime, offers significant improvements for Leopard. Come see how to use QTKit for high-definition playback and to programmatically create movie content and capture video.(click on "416 - Integrating QuickTime Support into Your Application with QTKit")
TomorrowPlusX Wrote:So, please send me the stack trace from Xcode. I need to see the error and the line it occurred on. Since Xcode won't tell me on my mac.I sent you a PM for email.
BTW, I'm running these in release mode with debug symbols turned on. I was unable to get the debug mode of the test app to find the boost headers for some strange reason, so I've just been running in release (for now). Maybe that's why it's picking up for me; I've had that happen before with other projects.
Meanwhile, whilst I'm waiting, I've been messing around more with GaussianCombinerFilter and I just don't know enough about it to make it work. I had to replace glMultiTexCoord2f/i with the ARB versions just so it wouldn't crash, but the rendering gets whacky. Things just aren't working in that class on the GMA950. So I simply return at the top of GaussianCombinerFilter::display for now to bypass it.
Does anybody know how to output the stack trace from Xcode? I've never tried, and I can't seem to figure out how to myself.

Thanks to AnotherJake, the bug is solved. It has nothing to do with Quicktime 7.2, so I apologize to Apple for impugning the quality of their updates.
For future reference, in case this ever bites anybody: Boost 1.33_1 builds libboost_thread.a, where boost 1.34 builds libboost_thread-mt.a. I was linking against the old one!
For future reference, in case this ever bites anybody: Boost 1.33_1 builds libboost_thread.a, where boost 1.34 builds libboost_thread-mt.a. I was linking against the old one!
TomorrowPlusX Wrote:Thanks to AnotherJake, the bug is solved...Hehe, it was pure dumb luck, based upon my laziness, and the fact that I didn't have a prior version of Boost installed. Had I not been so lazy as to rename the 1.34 library to match the old one's name, instead of (re)including the newly named 1.34 lib, as I should have... Well, I can't imagine the pain and suffering TomorrowPlusX would have endured trying to track that one down. Win a few, lose a few I guess...
To serendipity!
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Video recording app capable of recording opengl games smooothly? | Najdorf | 7 | 7,180 |
Jan 8, 2009 07:59 AM Last Post: monteboyd |
|
Recording Mac screen | Carlos Camacho | 2 | 4,407 |
Sep 3, 2008 07:44 AM Last Post: JustinFic |