Sunset Lake Software - Comments for "Extracting frames from the stream" http://www.sunsetlakesoftware.com/forum/extracting-frames-stream Comments for "Extracting frames from the stream" en Aha! That's fantastic, it http://www.sunsetlakesoftware.com/forum/extracting-frames-stream#comment-1538 <p>Aha! That's fantastic, it works a treat.</p> <p>Thank you</p> <p>Marcus</p> pubDate Fri, 03 Aug 2012 14:54:02 +0000 dc:creator marcusr guid false comment 1538 at http://www.sunsetlakesoftware.com There's no need to subclass. http://www.sunsetlakesoftware.com/forum/extracting-frames-stream#comment-1535 <p>There's no need to subclass. Simply set the newFrameAvailableBlock to a block that you'd like to run on every new processed frame.</p> pubDate Fri, 03 Aug 2012 14:46:56 +0000 dc:creator Brad Larson guid false comment 1535 at http://www.sunsetlakesoftware.com I started off inheriting from http://www.sunsetlakesoftware.com/forum/extracting-frames-stream#comment-1534 <p>I started off inheriting from GPUImageFilter but GPUImageRawDataOutput makes a lot more sense.</p> <p>Am I right to think that I create a new class that inherits from GPUImageRawDataOutput and then overrides newFrameReadyAtTime as below, so that when this is called I have a new frame to fun some processing on (some opencv processing in my case).</p> <p>Thanks </p> <p>- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex;<br /> {</p> <p> NSLog(@"newFrameReady");<br /> [super newFrameReadyAtTime:frameTime atIndex:textureIndex];</p> <p> // my code here</p> <p>}</p> pubDate Fri, 03 Aug 2012 14:40:56 +0000 dc:creator marcusr guid false comment 1534 at http://www.sunsetlakesoftware.com How do you want to extract http://www.sunsetlakesoftware.com/forum/extracting-frames-stream#comment-1533 <p>How do you want to extract them? There are several ways to do this.</p> <p>For grabbing UIImages, you can use the -imageFromCurrentlyProcessedOutput method on any filter. However, this is fairly slow because of the need to convert to a UIImage.</p> <p>There's also the GPUImageRawDataOutput, which has callbacks that allow you to access the raw bytes in the filter chain at that point.</p> pubDate Fri, 03 Aug 2012 14:34:21 +0000 dc:creator Brad Larson guid false comment 1533 at http://www.sunsetlakesoftware.com