Commit a3c35664 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMediaPlayerDelegate: fix protocol declaration and drop unneeded casts

parent 4a5db98b
...@@ -97,7 +97,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -97,7 +97,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
* Formal protocol declaration for playback delegates. Allows playback messages * Formal protocol declaration for playback delegates. Allows playback messages
* to be trapped by delegated objects. * to be trapped by delegated objects.
*/ */
@protocol VLCMediaPlayerDelegate @protocol VLCMediaPlayerDelegate <NSObject>
@optional @optional
/** /**
......
...@@ -1554,12 +1554,12 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self) ...@@ -1554,12 +1554,12 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self)
BOOL isRecording = [arguments.firstObject[@"isRecording"] boolValue]; BOOL isRecording = [arguments.firstObject[@"isRecording"] boolValue];
if (isRecording) { if (isRecording) {
if ([(NSObject *)_delegate respondsToSelector:@selector(mediaPlayerStartedRecording:)]) { if ([_delegate respondsToSelector:@selector(mediaPlayerStartedRecording:)]) {
[_delegate mediaPlayerStartedRecording:self]; [_delegate mediaPlayerStartedRecording:self];
} }
} else { } else {
if ([(NSObject *)_delegate respondsToSelector:@selector(mediaPlayer:recordingStoppedAtPath:)]) { if ([_delegate respondsToSelector:@selector(mediaPlayer:recordingStoppedAtPath:)]) {
[self.delegate mediaPlayer:self recordingStoppedAtPath:filePath]; [_delegate mediaPlayer:self recordingStoppedAtPath:filePath];
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment