/** * @since Available in iOS 8.0 and later. */ public static NSObject observeFailedToDecode(AVSampleBufferDisplayLayer object, final VoidBlock2<AVSampleBufferDisplayLayer, NSError> block) { return NSNotificationCenter.getDefaultCenter().addObserver(FailedToDecodeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { NSDictionary<?, ?> data = a.getUserInfo(); NSError error = null; if (data.containsKey(FailedToDecodeNotificationErrorKey())) { error = (NSError) data.get(FailedToDecodeNotificationErrorKey()); } block.invoke((AVSampleBufferDisplayLayer)a.getObject(), error); } }); } }
@Override public void invoke(NSNotification a) { NSDictionary<?, ?> data = a.getUserInfo(); NSError error = null; if (data.containsKey(FailedToDecodeNotificationErrorKey())) { error = (NSError) data.get(FailedToDecodeNotificationErrorKey()); } block.invoke((AVSampleBufferDisplayLayer)a.getObject(), error); } });
@Override public void invoke(NSNotification a) { NSDictionary<?, ?> data = a.getUserInfo(); NSError error = null; if (data.containsKey(FailedToDecodeNotificationErrorKey())) { error = (NSError) data.get(FailedToDecodeNotificationErrorKey()); } block.invoke((AVSampleBufferDisplayLayer)a.getObject(), error); } });
/** * @since Available in iOS 8.0 and later. */ public static NSObject observeFailedToDecode(AVSampleBufferDisplayLayer object, final VoidBlock2<AVSampleBufferDisplayLayer, NSError> block) { return NSNotificationCenter.getDefaultCenter().addObserver(FailedToDecodeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { NSDictionary<?, ?> data = a.getUserInfo(); NSError error = null; if (data.containsKey(FailedToDecodeNotificationErrorKey())) { error = (NSError) data.get(FailedToDecodeNotificationErrorKey()); } block.invoke((AVSampleBufferDisplayLayer)a.getObject(), error); } }); } }
@Override public void invoke(NSNotification a) { NSDictionary<?, ?> data = a.getUserInfo(); NSError error = null; if (data.containsKey(FailedToDecodeNotificationErrorKey())) { error = (NSError) data.get(FailedToDecodeNotificationErrorKey()); } block.invoke((AVSampleBufferDisplayLayer)a.getObject(), error); } });
/** * @since Available in iOS 8.0 and later. */ public static NSObject observeFailedToDecode(AVSampleBufferDisplayLayer object, final VoidBlock2<AVSampleBufferDisplayLayer, NSError> block) { return NSNotificationCenter.getDefaultCenter().addObserver(FailedToDecodeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { NSDictionary<?, ?> data = a.getUserInfo(); NSError error = null; if (data.containsKey(FailedToDecodeNotificationErrorKey())) { error = (NSError) data.get(FailedToDecodeNotificationErrorKey()); } block.invoke((AVSampleBufferDisplayLayer)a.getObject(), error); } }); } }