pantson.Theora v2.0
BlitzMax Forums/BlitzMax Programming/pantson.Theora v2.0
| ||
Good news and bad news... Bad news Still no sound. I've tried and tried and cannot get sound working. Good news A lot of internal improvements have happened. - Update Theora lib to beta3 - Added better internal timers. On slow machines, the movie never played.. now the movie output is forced to screen. - New command set thats makes it easier to integrate into peoples frameworks. (Problem noticed on GreyAliens framework, but now fixed) Download links in signature. Have fun... |
| ||
Thanks! |
| ||
I copied pantson.mod/theora.mod to my mod folder. Building modules fails -- I get errors that files in libogg and libtheora can't be found. e.g. ogg/config_types.h. Checking manually, the libogg and libtheora folders are there, but there is no ogg folder for example. Does there need to be some kind of preprocessing of libogg and libtheora before building in blitzmax? I'm on OS X First few lines of build result is below Building Modules Compiling:apiwrapper.c In file included from /Users/pss143/dev/BlitzMax/mod/pantson.mod/theora.mod/libogg-1.1.3/include/ogg/ogg.h:24, from /Users/pss143/dev/BlitzMax/mod/pantson.mod/theora.mod/libtheora-1.0beta3/lib/dec/apiwrapper.h:20, from /Users/pss143/dev/BlitzMax/mod/pantson.mod/theora.mod/libtheora-1.0beta3/lib/dec/apiwrapper.c:21: /Users/pss143/dev/BlitzMax/mod/pantson.mod/theora.mod/libogg-1.1.3/include/ogg/os_types.h:123:32: error: ogg/config_types.h: No such file or directory The contents of the libogg folder: AUTHORS* config.sub* ltmain.sh* CHANGES* configure* macos/ COPYING* configure.in* macosx/ Makefile.am* debian/ missing* Makefile.in* depcomp* ogg-uninstalled.pc.in* README* doc/ ogg.m4* aclocal.m4* include/ ogg.pc.in* compile* install-sh* src/ config.guess* libogg.spec* win32/ config.h.in* libogg.spec.in* |
| ||
i'll check the archibe. OGG lib is required (maybe I gorgot to put it in the archive) |
| ||
it aint detected the OS. os_types.h .. #else # include <sys/types.h> # include <ogg/config_types.h> #endif yet in theora.bmx it should add the complier flags if on macos ?macos ModuleInfo "CC_OPTS: -D__MACOSX__" ? unless your OS doesn't detect ?macos when compiling. What do you usually use? |
| ||
robw, what version of BlitzMax are you using? You'll need at least 1.26 for those "ModuleInfo" options to work. |
| ||
you could always try to remove the OS query from the above line of theora.bmxModuleInfo "CC_OPTS: -D__MACOSX__" this would force the lib to be MAC compiled. |
| ||
I'm using 1.26 on Intel mac I found the OS query in theora.bmx and removed it but I still see the same build error. So is blitzmax meant to run config/make in order to create config_types.h ? |
| ||
Apologies. You need to be running at *least* 1.28 for CC_OPTS to be used, or else download and install the Tweaked BMK mentioned HERE. The changes to BMK allow custom compile options and things to be used for modules. |
| ||
Ah, that was it. Thanks for your help. And thanks pantson for this fine module! |
| ||
A question for pantson I'm playing a movie using the technique in project/main.bmx, using ProcessTheora, which checks for updates and draws if necessary I need to use looping animation, which this technique allows. The first time through the loop, the animation is sharp and clear. Howevr, the second and later loops show some ghosting. The ghosting is constant, ie it doesn't get worse and worse. I've tried clearing the pixmap before DrawTheoraPixmap, but this doesn't change anything. If I turn autoloop off, play the movie once (looks clear), then m.start(0), and play again, I see the same ghosting on the second play |
| ||
thanks Brucey (again) Not sure why it would ghost on the second play... I will look into this this weekend. |
| ||
I can't test teh code at the moment.. but looking through it can you change the OpenTheora function to the following to see if it fixes the problem.Rem bbdoc: Opens a Theora file ready for drawing. returns: A handle to the Theora movie. NULL if the file doesn't exist End Rem Function OpenTheora:Ttheora(filename:String,buffersize:Int=4096) Local t:Ttheora If LOOKUP = 0 Then ' init YUV variables _TYUVinit() LOOKUP = 1 EndIf t = New Ttheora t.color = True 'False t.decoder = _initdecoder() _opentheora(t.decoder,filename) _theoraheader(t.decoder) t.headerlength = 0 t.width = TheoraWidth(t) t.height = TheoraHeight(t) t.fps = _theorafps(t.decoder) t.buffer = CreateBank(buffersize) t.buffersize = buffersize t.filename = filename t.movie = LittleEndianStream(OpenStream(t.filename,True,False)) t.sync = True StartTheora(t) Return t End Function You will need to recompile it to see the changes |
| ||
Thanks, I appreciate you investigating this. OK, with this change to theora.bmx, main.bmx in the project folder crashes sometime after the first call to ProcessTheora and sometime before completing DrawTheoraPixmap Rob ' loop While Not KeyDown(key_escape) ' basic fps equation fps = (ticks*1000)/Max(1,(MilliSecs()-start)) ' process all theoras and check for update If ProcessTheora() Print ticks ' if an update occoured, draw movie. DrawTheoraPixmap(m,p) Print ticks ' CRASHES WITHOUT PRINTING THIS LINE ' draw pixap DrawPixmap p,0,0 Print ticks ' display FPS DrawText fps,20,20 ticks:+1 Flip EndIf Wend |
| ||
ok.. i can see the problem now and I kinda know why its happening. I haven't got a fix for it yet, but am still working on it. |
| ||
many apologies.. I've started a new job recenetly and its keeping my very busy. (its nice to be busy for a change). Becuase of the new job I haven't had the energy to do any programming when I get home. When I get some time, I will fix the ghosting in pantson.Theora many thanks for your patience. |