On Tue, Aug 19, 2008 at 2:33 PM, Carmen Cerino Jr. <[EMAIL PROTECTED]> wrote:
> Sorry about the sketchy details. Basically I have a wrapper class for the
> Sequence Grabber, and I want to setup a delegate for the decompression
> callback.
>
> This is where I use the respondsToSelector method:
> static void SGVideoDecompTrackingCallback(
>                void *decompressionTrackingRefCon,
>                OSStatus result,
>                ICMDecompressionTrackingFlags decompressionTrackingFlags,
>                CVPixelBufferRef pixelBuffer,
>                TimeValue64 displayTime,
>                TimeValue64 displayDuration,
>                ICMValidTimeFlags validTimeFlags,
>                void *reserved,
>                void *sourceFrameRefCon )
> {
> #pragma unused(reserved)
> #pragma unused(sourceFrameRefCon)
>
>        SGVideo* sgVideoChan = (SGVideo*)decompressionTrackingRefCon;
>        id _delegate = sgVideoChan.delegate;
>
>        if (result == noErr){
>
>        if ([_delegate respondsToSelector: @selector(SGDecompDataProc:)]){
>
>            [_delegate SGDecompDataProc:pixelBuffer
>              trackingFlags:decompressionTrackingFlags
>              displayTime:displayTime
>              displayDuration:displayDuration
>              validTimeFlags:validTimeFlags];
>        }
>    }
> }
>
>
> Header file where the function I am checking is prototyped:
>
> @interface VideoController : NSObject {
>        SeqGrab* mSeqGrab;
>        SGVideo* mVideoChan;
>        IBOutlet SampleCIView* mPreview;
> }
>
> -(void)SGDecompDataProc: (CVPixelBufferRef)pixelBuffer
> trackingFlags:(ICMDecompressionTrackingFlags)decompressionTrackingFlags
> displayTime:(TimeValue64)displayTime
> displayDuration:(TimeValue64)displayDuration
> validTimeFlags:(ICMValidTimeFlags)validTimeFlags;
>
>
> @end
>
> Please let me know if you need to see anything else. Once again I apologize
> for the sketchy details.
>
> Thank you all for your help!

Heya - that's not the entire selector.  You want to use :

if ([_delegate respondsToSelector: @selector(SGDecompDataProc:
trackingFlags: displayTime: displayDuration: validTimeFlags:)]) {
...
}
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to