i'm trying write extension of GPUImage for marmalade Framework. For this i used oficial documentation and Extension Development Kit (EDK) Marmalade. I write some sample code, compile with:
mkb s3egpuimage_iphone.mkb --arm --release --compiler clang
It's compile fine, and i get library and headers and make link with deploying tool marlmalade and linkage complete fine. But i write ipa into iPod touch and run this code, i get or freez application or crash application. Crash or freez begin of i call:
[videoCamera startCameraCapture]
ofcourse i initialized videoCamera with
[[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack];
and make easy target:
textureOutput = [[GPUImageTextureOutput alloc] init];
...
[videoCamera addTarget:textureOutput];
[videoCamera startCameraCapture];
NSString *pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Movie.m4v"];
unlink([pathToMovie UTF8String]);
NSURL *movieURL = [NSURL fileURLWithPath:pathToMovie];
movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(480.0, 640.0)];
movieWriter.shouldPassthroughAudio = YES;
videoCamera.audioEncodingTarget = movieWriter;
[movieWriter startRecording];
i think about this, but i not understand it. With you help please?
Again I'd comment if I could but.... So this is a partial answer.
Worth looking through the log to see if any messages come up you were not expecting. However you've not shown the s4e file but a few things to consider:
1) At the lower level, are you running on the OS thread (either by stating it in the s4e file or rolling your own)? Find out what it should be accessed in, and be consistent - don't mix and match.
2) If you are in the os thread, look out for any exceptions. [the marmalade code that calls across the os thread does not like unhandled exceptions.]
3) The API that calls across threads uses varargs (...). This looks powerful but there are known issues with varargs and we'd now advise against - issues relate to 64-bit and similar allignment problems. Suggest creating a parameter block for each function and passing that instead.
If you find any more feel free to post.