Commit 7458af47 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

libvlc: add libvlc_media_get_codec_description

Get codec description from media elementary stream.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 84bc465a
......@@ -589,6 +589,21 @@ LIBVLC_API
unsigned libvlc_media_tracks_get( libvlc_media_t *p_md,
libvlc_media_track_t ***tracks );
/**
* Get codec description from media elementary stream
*
* \version LibVLC 3.0.0 and later.
*
* \see libvlc_media_track_t
*
* \param i_type i_type from libvlc_media_track_t
* \param i_codec i_codec or i_original_fourcc from libvlc_media_track_t
*
* \return codec description
*/
LIBVLC_API
const char *libvlc_media_get_codec_description( libvlc_track_type_t i_type,
uint32_t i_codec );
/**
* Release media descriptor's elementary streams description array
......
......@@ -83,6 +83,7 @@ libvlc_media_discoverer_start
libvlc_media_discoverer_stop
libvlc_media_duplicate
libvlc_media_event_manager
libvlc_media_get_codec_description
libvlc_media_get_duration
libvlc_media_get_meta
libvlc_media_get_mrl
......
......@@ -868,6 +868,26 @@ libvlc_media_tracks_get( libvlc_media_t *p_md, libvlc_media_track_t *** pp_es )
return i_es;
}
/**************************************************************************
* Get codec description from media elementary stream
**************************************************************************/
const char *
libvlc_media_get_codec_description( libvlc_track_type_t i_type,
uint32_t i_codec )
{
switch( i_type )
{
case libvlc_track_audio:
return vlc_fourcc_GetDescription( AUDIO_ES, i_codec );
case libvlc_track_video:
return vlc_fourcc_GetDescription( VIDEO_ES, i_codec );
case libvlc_track_text:
return vlc_fourcc_GetDescription( SPU_ES, i_codec );
case libvlc_track_unknown:
default:
return vlc_fourcc_GetDescription( UNKNOWN_ES, i_codec );
}
}
/**************************************************************************
* Release media descriptor's elementary streams description array
......
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