Commit 0ad3f78e authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMediaPlayer: expand the API by adding setter/getter for audio delay

parent b16ede5c
......@@ -260,6 +260,14 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
- (void)setAudioChannel:(NSInteger)value;
- (NSInteger)audioChannel;
/**
* Get the current audio delay. Positive values means audio is delayed further,
* negative values less.
*
* \return time (in microseconds) the audio playback is being delayed
*/
@property (readwrite) NSInteger currentAudioPlaybackDelay;
/* Media Options */
- (void)setMedia:(VLCMedia *)value;
- (VLCMedia *)media;
......
......@@ -353,7 +353,6 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
return libvlc_video_get_spu_delay(instance);
}
#pragma mark -
#pragma mark Video Crop geometry
......@@ -569,6 +568,19 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
return libvlc_audio_get_channel(instance);
}
- (void)setCurrentAudioPlaybackDelay:(NSInteger)index
{
libvlc_audio_set_delay(instance, index);
}
- (NSInteger)currentAudioPlaybackDelay
{
return libvlc_audio_get_delay(instance);
}
#pragma mark -
#pragma mark set/get media
- (void)setMedia:(VLCMedia *)value
{
if (media != value)
......@@ -588,6 +600,9 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
return media;
}
#pragma mark -
#pragma mark playback
- (BOOL)play
{
libvlc_media_player_play(instance);
......
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