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);
* Formal protocol declaration for playback delegates. Allows playback messages
* to be trapped by delegated objects.
*/
@protocol VLCMediaPlayerDelegate
@protocol VLCMediaPlayerDelegate <NSObject>
@optional
/**
......
......@@ -1554,12 +1554,12 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self)
BOOL isRecording = [arguments.firstObject[@"isRecording"] boolValue];
if (isRecording) {
if ([(NSObject *)_delegate respondsToSelector:@selector(mediaPlayerStartedRecording:)]) {
if ([_delegate respondsToSelector:@selector(mediaPlayerStartedRecording:)]) {
[_delegate mediaPlayerStartedRecording:self];
}
} else {
if ([(NSObject *)_delegate respondsToSelector:@selector(mediaPlayer:recordingStoppedAtPath:)]) {
[self.delegate mediaPlayer:self recordingStoppedAtPath:filePath];
if ([_delegate respondsToSelector:@selector(mediaPlayer:recordingStoppedAtPath:)]) {
[_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