Parcourir la source

Remove API deprecated in VLCKit 2.0 and 2.1

Felix Paul Kühne il y a 10 ans
Parent
commit
b692c77bbd
4 fichiers modifiés avec 12 ajouts et 94 suppressions
  1. 0 8
      Headers/Public/VLCMedia.h
  2. 3 34
      Headers/Public/VLCMediaPlayer.h
  3. 9 0
      NEWS
  4. 0 52
      Sources/VLCMediaPlayer.m

+ 0 - 8
Headers/Public/VLCMedia.h

@@ -101,14 +101,6 @@ typedef NS_ENUM(NSInteger, VLCMediaState) {
 @optional
 
 /**
- * Delegate method called whenever the meta has changed for the receiver.
- * \param aMedia The media resource whose meta data has been changed.
- * \param oldValue The old meta data value.
- * \param key The key of the value that was changed.
- */
-- (void)media:(VLCMedia *)aMedia metaValueChangedFrom:(id)oldValue forKey:(NSString *)key __attribute__((deprecated));
-
-/**
  * Delegate method called whenever the media's meta data was changed for whatever reason
  * \note this is called more often than mediaDidFinishParsing, so it may be less efficient
  * \param aMedia The media resource whose meta data has been changed.

+ 3 - 34
Headers/Public/VLCMediaPlayer.h

@@ -249,20 +249,12 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
 
 @property (nonatomic, readonly, weak) VLCTime *remainingTime;
 
-/**
- * Frames per second
- * \note this property is deprecated. use (float)fps instead.
- * \return current media's frames per second value
- */
-@property (readonly) NSUInteger fps __attribute__((deprecated));
-
 #pragma mark -
 #pragma mark ES track handling
 
 /**
  * Return the current video track index
- * Note that the handled values do not match the videoTracks array indexes
- * but refer to videoSubTitlesIndexes.
+ *
  * \return 0 if none is set.
  *
  * Pass -1 to disable.
@@ -288,16 +280,8 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
 @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfVideoTracks;
 
 /**
- * Return the video tracks
- *
- * It includes the disabled fake track at index 0.
- */
-- (NSArray *)videoTracks __attribute__((deprecated));
-
-/**
  * Return the current video subtitle index
- * Note that the handled values do not match the videoSubTitles array indexes
- * but refer to videoSubTitlesIndexes
+ *
  * \return 0 if none is set.
  *
  * Pass -1 to disable.
@@ -323,13 +307,6 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
 @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfSubtitlesTracks;
 
 /**
- * Return the video subtitle tracks
- * \note this property is deprecated. use (NSArray *)videoSubtitleNames instead.
- * It includes the disabled fake track at index 0.
- */
-- (NSArray *)videoSubTitles __attribute__((deprecated));
-
-/**
  * Load and set a specific video subtitle, from a file.
  * \param path to a file
  * \return if the call succeed..
@@ -405,8 +382,7 @@ extern NSString *const VLCTitleDescriptionIsMenu;
 
 /**
  * Return the current audio track index
- * Note that the handled values do not match the audioTracks array indexes
- * but refer to audioTrackIndexes.
+ *
  * \return 0 if none is set.
  *
  * Pass -1 to disable.
@@ -431,13 +407,6 @@ extern NSString *const VLCTitleDescriptionIsMenu;
  */
 @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfAudioTracks;
 
-/**
- * Return the audio tracks
- *
- * It includes the "Disable" fake track at index 0.
- */
-- (NSArray *)audioTracks __attribute__((deprecated));
-
 #pragma mark -
 #pragma mark audio functionality
 

+ 9 - 0
NEWS

@@ -23,6 +23,15 @@ Deprecated APIs:
 - VLCMediaPlayer
   - titles, chaptersForTitleIndex:, countOfTitles
 
+Removed APIs:
+- VLCMedia:
+  - fps
+  - media:metaValueChangedFrom:forKey:
+- VLCMediaPlayer
+  - audioTracks
+  - videoTracks
+  - videoSubTitles
+
 Version 2.2.2:
 --------------
 New APIs:

+ 0 - 52
Sources/VLCMediaPlayer.m

@@ -334,23 +334,6 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
     return [NSArray arrayWithArray: tempArray];
 }
 
-- (NSArray *)videoTracks
-{
-    NSInteger count = libvlc_video_get_track_count(_playerInstance);
-    if (count <= 0)
-        return @[];
-
-    libvlc_track_description_t *tracks = libvlc_video_get_track_description(_playerInstance);
-    NSMutableArray *tempArray = [NSMutableArray array];
-    for (NSUInteger i = 0; i < count ; i++) {
-        [tempArray addObject:@(tracks->psz_name)];
-        tracks = tracks->p_next;
-    }
-    libvlc_track_description_list_release(tracks);
-
-    return [NSArray arrayWithArray: tempArray];
-}
-
 - (int)numberOfVideoTracks
 {
     return libvlc_video_get_track_count(_playerInstance);
@@ -418,19 +401,6 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
     return libvlc_video_set_subtitle_file(_playerInstance, [path UTF8String]);
 }
 
-- (NSArray *)videoSubTitles
-{
-    libvlc_track_description_t *currentTrack = libvlc_video_get_spu_description(_playerInstance);
-
-    NSMutableArray *tempArray = [NSMutableArray array];
-    while (currentTrack) {
-        [tempArray addObject:@(currentTrack->psz_name)];
-        currentTrack = currentTrack->p_next;
-    }
-    libvlc_track_description_list_release(currentTrack);
-    return [NSArray arrayWithArray: tempArray];
-}
-
 - (void)setCurrentVideoSubTitleDelay:(NSInteger)index
 {
     libvlc_video_set_spu_delay(_playerInstance, index);
@@ -627,11 +597,6 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
     return _cachedRemainingTime;
 }
 
-- (NSUInteger)fps
-{
-    return libvlc_media_player_get_fps(_playerInstance);
-}
-
 #pragma mark -
 #pragma mark Chapters
 - (void)setCurrentChapterIndex:(int)value;
@@ -875,23 +840,6 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
     return [NSArray arrayWithArray: tempArray];
 }
 
-- (NSArray *)audioTracks
-{
-    NSInteger count = libvlc_audio_get_track_count(_playerInstance);
-    if (count <= 0)
-        return @[];
-
-    libvlc_track_description_t *tracks = libvlc_audio_get_track_description(_playerInstance);
-    NSMutableArray *tempArray = [NSMutableArray array];
-    for (NSUInteger i = 0; i < count ; i++) {
-        [tempArray addObject:@(tracks->psz_name)];
-        tracks = tracks->p_next;
-    }
-    libvlc_track_description_list_release(tracks);
-
-    return [NSArray arrayWithArray: tempArray];
-}
-
 - (int)numberOfAudioTracks
 {
     return libvlc_audio_get_track_count(_playerInstance);