Commit 2da709ac authored by Soomin Lee's avatar Soomin Lee Committed by Jean-Baptiste Kempf

VLCMediaPlayer: Change the return values of methods to unify it with libvlc

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3e838457
...@@ -36,6 +36,14 @@ New APIs: ...@@ -36,6 +36,14 @@ New APIs:
- Note: - Note:
- play's return type was changed from BOOL to void - play's return type was changed from BOOL to void
- hue is now a float instead of an integer - hue is now a float instead of an integer
- WARNING:
- Return value of the following methods changed from INT_MAX to -1
(int)currentVideoTrackIndex
(int)currentVideoSubTitleIndex
(int)currentChapterIndex
(int)currentTitleIndex
(int)currentAudioTrackIndex
- VLCMedia - VLCMedia
- added keys: VLCMetaInformationTrackTotal, VLCMetaInformationDirector, - added keys: VLCMetaInformationTrackTotal, VLCMetaInformationDirector,
......
...@@ -367,7 +367,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self) ...@@ -367,7 +367,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
{ {
int count = libvlc_video_get_track_count(_playerInstance); int count = libvlc_video_get_track_count(_playerInstance);
if (count <= 0) if (count <= 0)
return INT_MAX; return -1;
return libvlc_video_get_track(_playerInstance); return libvlc_video_get_track(_playerInstance);
} }
...@@ -426,7 +426,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self) ...@@ -426,7 +426,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
NSInteger count = libvlc_video_get_spu_count(_playerInstance); NSInteger count = libvlc_video_get_spu_count(_playerInstance);
if (count <= 0) if (count <= 0)
return INT_MAX; return -1;
return libvlc_video_get_spu(_playerInstance); return libvlc_video_get_spu(_playerInstance);
} }
...@@ -702,7 +702,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self) ...@@ -702,7 +702,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
{ {
int count = libvlc_media_player_get_chapter_count(_playerInstance); int count = libvlc_media_player_get_chapter_count(_playerInstance);
if (count <= 0) if (count <= 0)
return INT_MAX; return -1;
int result = libvlc_media_player_get_chapter(_playerInstance); int result = libvlc_media_player_get_chapter(_playerInstance);
return result; return result;
} }
...@@ -750,7 +750,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self) ...@@ -750,7 +750,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
{ {
NSInteger count = libvlc_media_player_get_title_count(_playerInstance); NSInteger count = libvlc_media_player_get_title_count(_playerInstance);
if (count <= 0) if (count <= 0)
return INT_MAX; return -1;
return libvlc_media_player_get_title(_playerInstance); return libvlc_media_player_get_title(_playerInstance);
} }
...@@ -897,7 +897,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self) ...@@ -897,7 +897,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
{ {
NSInteger count = libvlc_audio_get_track_count(_playerInstance); NSInteger count = libvlc_audio_get_track_count(_playerInstance);
if (count <= 0) if (count <= 0)
return INT_MAX; return -1;
return libvlc_audio_get_track(_playerInstance); return libvlc_audio_get_track(_playerInstance);
} }
......
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