Commit 51fd51a8 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

MacOSX/Framework/VLCMediaPlayer.m: Implement Chapter and Audio selection. (Patch by Enrique Osuna).

parent 7750a98c
......@@ -110,9 +110,14 @@ extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state);
*/
- (VLCTime *)time;
- (void)setChapter:(int)value;
- (int)chapter;
- (int)countOfChapters;
/* Audio Options */
- (void)setAudioTrack:(int)value;
- (int)audioTrack;
- (int)countOfAudioTracks;
- (void)setAudioChannel:(int)value;
- (int)audioChannel;
......
......@@ -296,6 +296,29 @@ NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state)
return [VLCTime timeWithNumber:[NSNumber numberWithLongLong:time]];
}
- (void)setChapter:(int)value;
{
libvlc_media_instance_set_chapter( instance, value, NULL );
}
- (int)chapter
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_media_instance_get_chapter( instance, &ex );
quit_on_exception( &ex );
return result;
}
- (int)countOfChapters
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_media_instance_get_chapter_count( instance, &ex );
quit_on_exception( &ex );
return result;
}
- (void)setAudioTrack:(int)value
{
libvlc_audio_set_track( instance, value, NULL );
......@@ -310,6 +333,15 @@ NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state)
return result;
}
- (int)countOfAudioTracks
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_audio_get_track_count( instance, &ex );
quit_on_exception( &ex );
return result;
}
- (void)setAudioChannel:(int)value
{
libvlc_audio_set_channel( instance, value, NULL );
......
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