Commit adcea581 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

control/audio.c: Implement get_audio_track_count. (Patch by Enrique Osuna).

parent 64659b28
...@@ -114,6 +114,23 @@ void libvlc_audio_set_volume( libvlc_instance_t *p_instance, int i_volume, ...@@ -114,6 +114,23 @@ void libvlc_audio_set_volume( libvlc_instance_t *p_instance, int i_volume,
} }
} }
/*****************************************************************************
* libvlc_audio_get_track_count : Get the number of available audio tracks
*****************************************************************************/
int libvlc_audio_get_track_count( libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e )
{
input_thread_t *p_input_thread = libvlc_get_input_thread( p_mi, p_e );
vlc_value_t val_list;
if( !p_input_thread )
return -1;
var_Change( p_input_thread, "audio-es", VLC_VAR_GETCHOICES, &val_list, NULL );
vlc_object_release( p_input_thread );
return val_list.p_list->i_count;
}
/***************************************************************************** /*****************************************************************************
* libvlc_audio_get_track : Get the current audio track * libvlc_audio_get_track : Get the current audio track
*****************************************************************************/ *****************************************************************************/
...@@ -152,6 +169,7 @@ int libvlc_audio_get_track( libvlc_media_instance_t *p_mi, ...@@ -152,6 +169,7 @@ int libvlc_audio_get_track( libvlc_media_instance_t *p_mi,
return i_track; return i_track;
} }
/***************************************************************************** /*****************************************************************************
* libvlc_audio_set_track : Set the current audio track * libvlc_audio_set_track : Set the current audio track
*****************************************************************************/ *****************************************************************************/
......
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