Browse Source

VLCFullscreenMovieTVViewController, VLCMovieViewController : remove knowledge of mediaplayer and replace it by new methods from playbackcontroller

Carola Nitz 7 years ago
parent
commit
c879807da5

+ 55 - 68
Apple-TV/Playback/VLCFullscreenMovieTVViewController.m

@@ -208,11 +208,10 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
 
 - (void)panGesture:(UIPanGestureRecognizer *)panGestureRecognizer
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
             return;
         }
@@ -281,13 +280,12 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
 
 - (void)selectButtonPressed
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
-            [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionActivate];
+            [vpc performNavigationAction:VLCMediaPlaybackNavigationActionActivate];
             return;
         }
     }
@@ -295,14 +293,13 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
     [self showPlaybackControlsIfNeededForUserInteraction];
     [self setScanState:VLCPlayerScanStateNone];
 
-    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
     VLCTransportBar *bar = self.transportBar;
     if (bar.scrubbing) {
         bar.playbackFraction = bar.scrubbingFraction;
         [self stopScrubbing];
-        [vpc.mediaPlayer setPosition:bar.scrubbingFraction];
-    } else if(vpc.mediaPlayer.playing) {
-        [vpc.mediaPlayer pause];
+        [vpc setPlaybackPosition:bar.scrubbingFraction];
+    } else if(vpc.isPlaying) {
+        [vpc playPause];
     }
 }
 - (void)menuButtonPressed:(UITapGestureRecognizer *)recognizer
@@ -321,13 +318,12 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
 
 - (void)showInfoVCIfNotScrubbing
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
-            [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionDown];
+            [vpc performNavigationAction:VLCMediaPlaybackNavigationActionDown];
             return;
         }
     }
@@ -349,26 +345,24 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
 
 - (void)handleIRPressUp
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
-            [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionUp];
+            [vpc performNavigationAction:VLCMediaPlaybackNavigationActionUp];
         }
     }
 }
 
 - (void)handleIRPressLeft
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
-            [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionLeft];
+            [vpc performNavigationAction:VLCMediaPlaybackNavigationActionLeft];
             return;
         }
     }
@@ -390,13 +384,12 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
 
 - (void)handleIRPressRight
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
-            [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionRight];
+            [vpc performNavigationAction:VLCMediaPlaybackNavigationActionRight];
             return;
         }
     }
@@ -417,36 +410,35 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
 
 - (void)handleSiriRemote:(VLCSiriRemoteGestureRecognizer *)recognizer
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
             switch (recognizer.state) {
                 case UIGestureRecognizerStateBegan:
                 case UIGestureRecognizerStateChanged:
                     if (recognizer.isLongPress) {
-                        [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionActivate];
+                        [vpc performNavigationAction:VLCMediaPlaybackNavigationActionActivate];
                         break;
                     }
                     break;
                 case UIGestureRecognizerStateEnded:
                     if (recognizer.isClick && !recognizer.isLongPress) {
-                        [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionActivate];
+                        [vpc performNavigationAction:VLCMediaPlaybackNavigationActionActivate];
                     } else {
                         switch (recognizer.touchLocation) {
                             case VLCSiriRemoteTouchLocationLeft:
-                                [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionLeft];
+                                [vpc performNavigationAction:VLCMediaPlaybackNavigationActionLeft];
                                 break;
                             case VLCSiriRemoteTouchLocationRight:
-                                [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionRight];
+                                [vpc performNavigationAction:VLCMediaPlaybackNavigationActionRight];
                                 break;
                             case VLCSiriRemoteTouchLocationUp:
-                                [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionUp];
+                                [vpc performNavigationAction:VLCMediaPlaybackNavigationActionUp];
                                 break;
                             case VLCSiriRemoteTouchLocationDown:
-                                [mediaPlayer performNavigationAction:VLCMediaPlaybackNavigationActionDown];
+                                [vpc performNavigationAction:VLCMediaPlaybackNavigationActionDown];
                                 break;
                             case VLCSiriRemoteTouchLocationUnknown:
                                 break;
@@ -533,9 +525,8 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
     NSAssert(self.isSeekable, @"Tried to seek while not media is not seekable.");
 
     VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
-    VLCMediaPlayer *player = vpc.mediaPlayer;
 
-    if (player.isPlaying) {
+    if (vpc.isPlaying) {
         [self jumpInterval:VLCJumpInterval];
     } else {
         [self scrubbingJumpInterval:VLCJumpInterval];
@@ -546,9 +537,8 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
     NSAssert(self.isSeekable, @"Tried to seek while not media is not seekable.");
 
     VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
-    VLCMediaPlayer *player = vpc.mediaPlayer;
 
-    if (player.isPlaying) {
+    if (vpc.isPlaying) {
         [self jumpInterval:-VLCJumpInterval];
     } else {
         [self scrubbingJumpInterval:-VLCJumpInterval];
@@ -564,12 +554,11 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
         return;
     }
     VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
-    VLCMediaPlayer *player = vpc.mediaPlayer;
 
     CGFloat intervalFraction = ((CGFloat)interval)/((CGFloat)duration);
-    CGFloat currentFraction = player.position;
+    CGFloat currentFraction = vpc.playbackPosition;
     currentFraction += intervalFraction;
-    player.position = currentFraction;
+    vpc.playbackPosition = currentFraction;
 }
 
 - (void)scrubbingJumpInterval:(NSInteger)interval
@@ -668,7 +657,7 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
 
 - (BOOL)isSeekable
 {
-    return [VLCPlaybackController sharedInstance].mediaPlayer.isSeekable;
+    return [[VLCPlaybackController sharedInstance] isSeekable];
 }
 
 - (BOOL)canJump
@@ -712,7 +701,7 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
     self.transportBar.scrubbing = NO;
     [self updateDimmingView];
     VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
-    [vpc.mediaPlayer play];
+    [vpc playPause];
 }
 
 - (void)updateDimmingView
@@ -755,11 +744,10 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
 }
 - (void)showPlaybackControlsIfNeededForUserInteraction
 {
-    VLCMediaPlayer *mediaPlayer = [VLCPlaybackController sharedInstance].mediaPlayer;
-    NSInteger currentTitle = mediaPlayer.currentTitleIndex;
-    NSArray *titles = mediaPlayer.titleDescriptions;
-    if (currentTitle < titles.count) {
-        NSDictionary *title = titles[currentTitle];
+    VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
+    NSInteger currentTitle = [vpc indexOfCurrentTitle];
+    if (currentTitle < [vpc numberOfTitles]) {
+        NSDictionary *title = [vpc titleDescriptionsDictAtIndex:currentTitle];
         if ([[title objectForKey:VLCTitleDescriptionIsMenu] boolValue]) {
             return;
         }
@@ -933,11 +921,10 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 - (void)updateTransportBarPosition
 {
     VLCPlaybackController *controller = [VLCPlaybackController sharedInstance];
-    VLCMediaPlayer *mediaPlayer = controller.mediaPlayer;
     VLCTransportBar *transportBar = self.transportBar;
-    transportBar.remainingTimeLabel.text = [[mediaPlayer remainingTime] stringValue];
-    transportBar.markerTimeLabel.text = [[mediaPlayer time] stringValue];
-    transportBar.playbackFraction = mediaPlayer.position;
+    transportBar.remainingTimeLabel.text = [[controller remainingTime] stringValue];
+    transportBar.markerTimeLabel.text = [[controller playedTime] stringValue];
+    transportBar.playbackFraction = controller.playbackPosition;
 }
 
 - (void)playbackPositionUpdated:(VLCPlaybackController *)controller

+ 34 - 41
Sources/VLCMovieViewController.m

@@ -743,15 +743,15 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 - (void)_seekFromTap
 {
     NSMutableString *hudString = [NSMutableString string];
-    VLCMediaPlayer *mediaPlayer = _vpc.mediaPlayer;
+
     int seekDuration = (int)_numberOfTapSeek * SHORT_JUMP_DURATION;
 
     if (seekDuration > 0) {
-        [mediaPlayer shortJumpForward];
+        [_vpc jumpForward:10];
         [hudString appendString:@"⇒ "];
         _previousJumpState = VLCMovieJumpStateForward;
     } else {
-        [mediaPlayer shortJumpBackward];
+        [_vpc jumpBackward:10];
         [hudString appendString:@"⇐ "];
         _previousJumpState = VLCMovieJumpStateBackward;
     }
@@ -841,7 +841,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 - (void)_setPositionForReal
 {
     if (!_positionSet) {
-        _vpc.mediaPlayer.position = self.timeNavigationTitleView.positionSlider.value;
+        [_vpc setPlaybackPosition:self.timeNavigationTitleView.positionSlider.value];
         [_vpc setNeedsMetadataUpdate];
         _positionSet = YES;
     }
@@ -895,12 +895,11 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
 - (void)updateTimeDisplayButton
 {
-    VLCMediaPlayer *mediaPlayer = _vpc.mediaPlayer;
     UIButton *timeDisplayButton = self.timeNavigationTitleView.timeDisplayButton;
     if (_displayRemainingTime)
-        [timeDisplayButton setTitle:[[mediaPlayer remainingTime] stringValue] forState:UIControlStateNormal];
+        [timeDisplayButton setTitle:[[_vpc remainingTime] stringValue] forState:UIControlStateNormal];
     else
-        [timeDisplayButton setTitle:[[mediaPlayer time] stringValue] forState:UIControlStateNormal];
+        [timeDisplayButton setTitle:[[_vpc playedTime] stringValue] forState:UIControlStateNormal];
     [self.timeNavigationTitleView setNeedsLayout];
 }
 
@@ -924,9 +923,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
 - (void)playbackPositionUpdated:(VLCPlaybackController *)controller
 {
-    VLCMediaPlayer *mediaPlayer = controller.mediaPlayer;
     if (!_isScrubbing) {
-        self.timeNavigationTitleView.positionSlider.value = [mediaPlayer position];
+        self.timeNavigationTitleView.positionSlider.value = [controller playbackPosition];
     }
 
     [self updateTimeDisplayButton];
@@ -1274,7 +1272,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     if (!_playPauseGestureEnabled)
         return;
 
-    [_vpc.mediaPlayer isPlaying] ? [_vpc.listPlayer pause] : [_vpc.listPlayer play];
+    [_vpc playPause];
     if (_controlsHidden)
         [self setControlsHidden:NO animated:YES];
 }
@@ -1313,15 +1311,14 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     if (_currentPanType == VLCPanTypeSeek) {
         if (!_seekGestureEnabled)
             return;
-        VLCMediaPlayer *mediaPlayer = _vpc.mediaPlayer;
-        double timeRemainingDouble = (-mediaPlayer.remainingTime.intValue*0.001);
+        double timeRemainingDouble = (-[_vpc remainingTime].intValue*0.001);
         int timeRemaining = timeRemainingDouble;
 
         if (panDirectionX > 0) {
             if (timeRemaining > 2 ) // to not go outside duration , video will stop
-                [mediaPlayer jumpForward:1];
+                [_vpc jumpForward:1];
         } else
-            [mediaPlayer jumpBackward:1];
+            [_vpc jumpBackward:1];
     } else if (_currentPanType == VLCPanTypeVolume) {
         if (!_volumeGestureEnabled)
             return;
@@ -1384,7 +1381,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
         //Invalidate saved location when the gesture is ended
         if (_mediaHasProjection)
             _saveLocation = CGPointMake(-1.f, -1.f);
-        if ([_vpc.mediaPlayer isPlaying])
+        if ([_vpc isPlaying])
             [_vpc.listPlayer play];
     }
 }
@@ -1397,26 +1394,26 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
         return;
 
     NSString * hudString = @" ";
-    VLCMediaPlayer *mediaPlayer = _vpc.mediaPlayer;
+
     int swipeForwardDuration = (_variableJumpDurationEnabled) ? ((int)(_mediaDuration*0.001*0.05)) : FORWARD_SWIPE_DURATION;
     int swipeBackwardDuration = (_variableJumpDurationEnabled) ? ((int)(_mediaDuration*0.001*0.05)) : BACKWARD_SWIPE_DURATION;
 
     if (swipeRecognizer.direction == UISwipeGestureRecognizerDirectionRight) {
-        double timeRemainingDouble = (-mediaPlayer.remainingTime.intValue*0.001);
+        double timeRemainingDouble = (-[_vpc remainingTime].intValue*0.001);
         int timeRemaining = timeRemainingDouble;
 
         if (swipeForwardDuration < timeRemaining) {
             if (swipeForwardDuration < 1)
                 swipeForwardDuration = 1;
-            [mediaPlayer jumpForward:swipeForwardDuration];
+            [_vpc jumpForward:swipeForwardDuration];
             hudString = [NSString stringWithFormat:@"⇒ %is", swipeForwardDuration];
         } else {
-            [mediaPlayer jumpForward:(timeRemaining - 5)];
+            [_vpc jumpForward:(timeRemaining - 5)];
             hudString = [NSString stringWithFormat:@"⇒ %is",(timeRemaining - 5)];
         }
     }
     else if (swipeRecognizer.direction == UISwipeGestureRecognizerDirectionLeft) {
-        [mediaPlayer jumpBackward:swipeBackwardDuration];
+        [_vpc jumpBackward:swipeBackwardDuration];
         hudString = [NSString stringWithFormat:@"⇐ %is",swipeBackwardDuration];
     }else if (swipeRecognizer.direction == UISwipeGestureRecognizerDirectionUp) {
         [self backward:self];
@@ -1426,7 +1423,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     }
 
     if (swipeRecognizer.state == UIGestureRecognizerStateEnded) {
-        if ([mediaPlayer isPlaying])
+        if ([_vpc isPlaying])
             [_vpc.listPlayer play];
 
         [self.statusLabel showStatusMessage:hudString];
@@ -1488,28 +1485,24 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 
 - (IBAction)videoFilterSliderAction:(id)sender
 {
-    VLCMediaPlayer *mediaPlayer = _vpc.mediaPlayer;
-
     if (sender == self.hueSlider)
-        mediaPlayer.hue = (int)self.hueSlider.value;
-    else if (sender == self.contrastSlider)
-        mediaPlayer.contrast = self.contrastSlider.value;
-    else if (sender == self.brightnessSlider) {
-        if ([[UIDevice currentDevice] VLCHasExternalDisplay])
-            mediaPlayer.brightness = self.brightnessSlider.value;
-        else
-            [[UIScreen mainScreen] setBrightness:(self.brightnessSlider.value / 2.)];
-    } else if (sender == self.saturationSlider)
-        mediaPlayer.saturation = self.saturationSlider.value;
-    else if (sender == self.gammaSlider)
-        mediaPlayer.gamma = self.gammaSlider.value;
+        _vpc.hue = self.hueSlider.value;
+    if (sender == self.contrastSlider)
+        _vpc.contrast = self.contrastSlider.value;
+    if (sender == self.brightnessSlider)
+        _vpc.brightness = self.brightnessSlider.value;
+    if (sender == self.saturationSlider)
+        _vpc.saturation = self.saturationSlider.value;
+    if (sender == self.gammaSlider)
+        _vpc.gamma = self.gammaSlider.value;
+
     else if (sender == self.resetVideoFilterButton) {
-        mediaPlayer.hue = self.hueSlider.value = 0.;
-        mediaPlayer.contrast = self.contrastSlider.value = 1.;
-        mediaPlayer.brightness = self.brightnessSlider.value = 1.;
-        [[UIScreen mainScreen] setBrightness:(self.brightnessSlider.value / 2.)];
-        mediaPlayer.saturation = self.saturationSlider.value = 1.;
-        mediaPlayer.gamma = self.gammaSlider.value = 1.;
+        self.hueSlider.value = 0.;
+        self.contrastSlider.value = 1.;
+        self.brightnessSlider.value = 1.;
+        self.saturationSlider.value = 1.;
+        self.gammaSlider.value = 1.;
+        [_vpc resetFilters];
     } else
         APLog(@"unknown sender for videoFilterSliderAction");
     [self _resetIdleTimer];

+ 13 - 1
Sources/VLCPlaybackController.h

@@ -67,6 +67,13 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 @property (nonatomic, readwrite) float audioDelay; // in seconds, default = 0.0
 @property (nonatomic, readwrite) float playbackPosition; // in seconds, default = 0.0
 @property (nonatomic, readwrite) float subtitleDelay; // in seconds, default = 0.0
+
+@property (nonatomic, readwrite) float hue; // default = 0.0
+@property (nonatomic, readwrite) float contrast; // default = 1.0
+@property (nonatomic, readwrite) float brightness; // default = 1.0
+@property (nonatomic, readwrite) float saturation; // default = 1.0
+@property (nonatomic, readwrite) float gamma; // default = 1.0
+
 @property (readonly) NSInteger indexOfCurrentAudioTrack;
 @property (readonly) NSInteger indexOfCurrentSubtitleTrack;
 @property (readonly) NSInteger indexOfCurrentTitle;
@@ -90,6 +97,11 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 - (void)playPause;
 - (void)next;
 - (void)previous;
+- (void)jumpForward:(int)interval;
+- (void)jumpBackward:(int)interval;
+
+- (void)resetFilters;
+- (VLCTime *)remainingTime;
 
 - (NSString *)audioTrackNameAtIndex:(NSInteger)index;
 - (NSString *)videoSubtitleNameAtIndex:(NSInteger)index;
@@ -108,7 +120,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 
 - (void)setNeedsMetadataUpdate;
 - (void)scheduleSleepTimerWithInterval:(NSTimeInterval)timeInterval;
-
+- (void)performNavigationAction:(VLCMediaPlaybackNavigationAction)action;
 - (void)playMediaList:(VLCMediaList *)mediaList firstIndex:(NSInteger)index subtitlesFilePath:(NSString *)subsFilePath;
 - (void)openVideoSubTitlesFromFile:(NSString *)pathToFile;
 

+ 93 - 0
Sources/VLCPlaybackController.m

@@ -505,6 +505,74 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
     return _mediaPlayer.currentVideoSubTitleDelay/1000000.;
 }
 
+- (float)hue
+{
+    return _mediaPlayer.hue;
+}
+
+- (void)setHue:(float)hue
+{
+    _mediaPlayer.hue = hue;
+}
+
+- (float)contrast
+{
+    return _mediaPlayer.contrast;
+}
+
+- (void)setConstrast:(float)contrast
+{
+    _mediaPlayer.hue = contrast;
+}
+
+- (float)brightness
+{
+    return _mediaPlayer.brightness;
+}
+#if TARGET_OS_IOS
+- (void)setBrightness:(float)brightness
+{
+    if (![[UIDevice currentDevice] VLCHasExternalDisplay])
+        _mediaPlayer.brightness = brightness;
+    else
+        [[UIScreen mainScreen] setBrightness:(brightness / 2.)];
+}
+#else
+- (void)setBrightness:(float)brightness
+{
+    _mediaPlayer.brightness = brightness;
+}
+#endif
+- (float)saturation
+{
+    return _mediaPlayer.saturation;
+}
+
+- (void)setSaturation:(float)saturation
+{
+    _mediaPlayer.saturation = saturation;
+}
+
+- (void)setGamma:(float)gamma
+{
+    _mediaPlayer.gamma = gamma;
+}
+
+- (float)gamma
+{
+    return _mediaPlayer.gamma;
+}
+
+- (void)resetFilters
+{
+    _mediaPlayer.hue = 0.;
+    _mediaPlayer.contrast = 1.;
+    _mediaPlayer.brightness = 1.;
+    [self setBrightness:(1/2.)];
+    _mediaPlayer.saturation = 1.;
+    _mediaPlayer.gamma = 1.;
+}
+
 - (NSInteger)indexOfCurrentAudioTrack
 {
     return [_mediaPlayer.audioTrackIndexes indexOfObject:@(_mediaPlayer.currentAudioTrackIndex)];
@@ -605,6 +673,21 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
     }
 }
 
+- (void)shortJumpForward
+{
+    [_mediaPlayer shortJumpForward];
+}
+
+- (void)shortJumpBackward
+{
+    [_mediaPlayer shortJumpBackward];
+}
+
+- (VLCTime *)remainingTime
+{
+    return [_mediaPlayer remainingTime];
+}
+
 - (void)mediaPlayerStateChanged:(NSNotification *)aNotification
 {
     VLCMediaPlayerState currentState = _mediaPlayer.state;
@@ -716,6 +799,16 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
     }
 }
 
+- (void)jumpForward:(int)interval
+{
+    [_mediaPlayer jumpForward:interval];
+}
+
+- (void)jumpBackward:(int)interval
+{
+    [_mediaPlayer jumpBackward:interval];
+}
+
 - (void)switchAspectRatio
 {
     if (_currentAspectRatio == VLCAspectRatioSixteenToTen) {