Commit 07b22bcb authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Soomin Lee

VLCMediaPlayerDelegate: fix protocol declaration and drop unneeded casts

(cherry picked from commit a3c35664)
Signed-off-by: Soomin Lee's avatarSoomin Lee <bubu@mikan.io>
parent b9deb79a
......@@ -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
/**
......
......@@ -1557,12 +1557,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