[vlc-commits] lib: remove deprecated libvlc_media_get_tracks_info()
Rémi Denis-Courmont
git at videolan.org
Sun Jul 15 14:16:36 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 12 19:47:01 2018 +0300| [0bc226d7a255473dc8c70922d8ae5a99a205289c] | committer: Rémi Denis-Courmont
lib: remove deprecated libvlc_media_get_tracks_info()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0bc226d7a255473dc8c70922d8ae5a99a205289c
---
include/vlc/deprecated.h | 21 -----------------
include/vlc/libvlc_media.h | 27 ---------------------
lib/libvlc.sym | 1 -
lib/media.c | 58 ----------------------------------------------
4 files changed, 107 deletions(-)
diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h
index 5168f451f9..62fa1a12f8 100644
--- a/include/vlc/deprecated.h
+++ b/include/vlc/deprecated.h
@@ -58,7 +58,6 @@ void libvlc_track_description_release( libvlc_track_description_t *p_track_descr
*
* \see libvlc_media_parse_with_options
* \see libvlc_media_get_meta
- * \see libvlc_media_get_tracks_info
*
* \param p_md media descriptor object
*/
@@ -82,7 +81,6 @@ libvlc_media_parse( libvlc_media_t *p_md );
* \see libvlc_media_parse
* \see libvlc_MediaParsedChanged
* \see libvlc_media_get_meta
- * \see libvlc_media_get_tracks_info
*
* \param p_md media descriptor object
*/
@@ -105,25 +103,6 @@ libvlc_media_parse_async( libvlc_media_t *p_md );
LIBVLC_DEPRECATED LIBVLC_API int
libvlc_media_is_parsed( libvlc_media_t *p_md );
-/**
- * Get media descriptor's elementary streams description
- *
- * Note, you need to call libvlc_media_parse() or play the media at least once
- * before calling this function.
- * Not doing this will result in an empty array.
- *
- * \deprecated Use libvlc_media_tracks_get() instead
- *
- * \param p_md media descriptor object
- * \param tracks address to store an allocated array of Elementary Streams
- * descriptions (must be freed by the caller) [OUT]
- *
- * \return the number of Elementary Streams
- */
-LIBVLC_DEPRECATED LIBVLC_API
-int libvlc_media_get_tracks_info( libvlc_media_t *p_md,
- libvlc_media_track_info_t **tracks );
-
/** @}*/
/**
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 3c36bd0c74..314d5c20b8 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -139,33 +139,6 @@ typedef struct libvlc_media_stats_t
float f_send_bitrate;
} libvlc_media_stats_t;
-typedef struct libvlc_media_track_info_t
-{
- /* Codec fourcc */
- uint32_t i_codec;
- int i_id;
- libvlc_track_type_t i_type;
-
- /* Codec specific */
- int i_profile;
- int i_level;
-
- union {
- struct {
- /* Audio specific */
- unsigned i_channels;
- unsigned i_rate;
- } audio;
- struct {
- /* Video specific */
- unsigned i_height;
- unsigned i_width;
- } video;
- } u;
-
-} libvlc_media_track_info_t;
-
-
typedef struct libvlc_audio_track_t
{
unsigned i_channels;
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 07de61fcc7..2ea3c81ed4 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -80,7 +80,6 @@ libvlc_media_get_state
libvlc_media_get_stats
libvlc_media_get_type
libvlc_media_get_user_data
-libvlc_media_get_tracks_info
libvlc_media_is_parsed
libvlc_media_get_parsed_status
libvlc_media_library_load
diff --git a/lib/media.c b/lib/media.c
index 2b32f9d337..7fc44d5c65 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -912,64 +912,6 @@ libvlc_media_get_user_data( libvlc_media_t * p_md )
return p_md->p_user_data;
}
-/**************************************************************************
- * Get media descriptor's elementary streams description
- **************************************************************************/
-int
-libvlc_media_get_tracks_info( libvlc_media_t *p_md, libvlc_media_track_info_t ** pp_es )
-{
- assert( p_md );
-
- input_item_t *p_input_item = p_md->p_input_item;
- vlc_mutex_lock( &p_input_item->lock );
-
- const int i_es = p_input_item->i_es;
- *pp_es = (i_es > 0) ? vlc_alloc( i_es, sizeof(libvlc_media_track_info_t) ) : NULL;
-
- if( !*pp_es ) /* no ES, or OOM */
- {
- vlc_mutex_unlock( &p_input_item->lock );
- return 0;
- }
-
- /* Fill array */
- for( int i = 0; i < i_es; i++ )
- {
- libvlc_media_track_info_t *p_mes = *pp_es+i;
- const es_format_t *p_es = p_input_item->es[i];
-
- p_mes->i_codec = p_es->i_codec;
- p_mes->i_id = p_es->i_id;
-
- p_mes->i_profile = p_es->i_profile;
- p_mes->i_level = p_es->i_level;
-
- switch(p_es->i_cat)
- {
- case UNKNOWN_ES:
- default:
- p_mes->i_type = libvlc_track_unknown;
- break;
- case VIDEO_ES:
- p_mes->i_type = libvlc_track_video;
- p_mes->u.video.i_height = p_es->video.i_visible_height;
- p_mes->u.video.i_width = p_es->video.i_visible_width;
- break;
- case AUDIO_ES:
- p_mes->i_type = libvlc_track_audio;
- p_mes->u.audio.i_channels = p_es->audio.i_channels;
- p_mes->u.audio.i_rate = p_es->audio.i_rate;
- break;
- case SPU_ES:
- p_mes->i_type = libvlc_track_text;
- break;
- }
- }
-
- vlc_mutex_unlock( &p_input_item->lock );
- return i_es;
-}
-
unsigned
libvlc_media_tracks_get( libvlc_media_t *p_md, libvlc_media_track_t *** pp_es )
{
More information about the vlc-commits
mailing list