Commit 6b8b4f73 authored by Felix Paul Kühne's avatar Felix Paul Kühne

media player: fix a few endianess-issues

parent d3bfc427
......@@ -302,7 +302,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
*
* Pass -1 to disable.
*/
@property (readwrite) NSUInteger currentVideoSubTitleIndex;
@property (readwrite) int currentVideoSubTitleIndex;
/**
* Returns the video subtitle track names, usually a language name or a description
......@@ -378,7 +378,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
*
* Pass -1 to disable.
*/
@property (readwrite) NSUInteger currentAudioTrackIndex;
@property (readwrite) int currentAudioTrackIndex;
/**
* Returns the audio track names, usually a language name or a description
......
......@@ -349,12 +349,12 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
#pragma mark -
#pragma mark Subtitles
- (void)setCurrentVideoSubTitleIndex:(NSUInteger)index
- (void)setCurrentVideoSubTitleIndex:(int)index
{
libvlc_video_set_spu(_playerInstance, (int)index);
libvlc_video_set_spu(_playerInstance, index);
}
- (NSUInteger)currentVideoSubTitleIndex
- (int)currentVideoSubTitleIndex
{
NSInteger count = libvlc_video_get_spu_count(_playerInstance);
......@@ -713,19 +713,18 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
#pragma mark -
#pragma mark Audio tracks
- (void)setCurrentAudioTrackIndex:(NSUInteger)value
- (void)setCurrentAudioTrackIndex:(int)value
{
libvlc_audio_set_track(_playerInstance, (int)value);
libvlc_audio_set_track(_playerInstance, value);
}
- (NSUInteger)currentAudioTrackIndex
- (int)currentAudioTrackIndex
{
NSInteger count = libvlc_audio_get_track_count(_playerInstance);
if (count <= 0)
return NSNotFound;
NSUInteger result = libvlc_audio_get_track(_playerInstance);
return result;
return libvlc_audio_get_track(_playerInstance);
}
- (NSArray *)audioTrackNames
......
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