Browse Source

media player: deprecate FramesPerSecond

(cherry picked from commit f3fac35fe50dca70c646ee681765f2fddd23eaac)
Felix Paul Kühne 9 years ago
parent
commit
b14680304b
3 changed files with 6 additions and 4 deletions
  1. 4 2
      Headers/Public/VLCMediaPlayer.h
  2. 1 1
      NEWS
  3. 1 1
      Sources/VLCMediaPlayer.m

+ 4 - 2
Headers/Public/VLCMediaPlayer.h

@@ -239,9 +239,11 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
 
 /**
  * Frames per second
- * \return current media's frames per second value
+ * \note Deprecated, provided for API compatibility only
+ * \note To retrieve a media's FPS, use VLCMediaTracksInformationFrameRate.
+ * \returns 0
  */
-@property (NS_NONATOMIC_IOSONLY, readonly) float framesPerSecond;
+@property (NS_NONATOMIC_IOSONLY, readonly) float framesPerSecond __attribute__((deprecated));
 
 #pragma mark -
 #pragma mark time

+ 1 - 1
NEWS

@@ -34,7 +34,7 @@ New APIs:
 
 Deprecated APIs:
 - VLCMediaPlayer
-  - titles, chaptersForTitleIndex:, countOfTitles
+  - titles, chaptersForTitleIndex:, countOfTitles, framesPerSecond
 - VLCAudio
   - setMute:
 

+ 1 - 1
Sources/VLCMediaPlayer.m

@@ -623,7 +623,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
 
 - (float)framesPerSecond
 {
-    return libvlc_media_player_get_fps(_playerInstance);
+    return .0;
 }
 
 - (void)setTime:(VLCTime *)value