From 1e0610a4ab98bc63e45045a9dabe05fe2b959dab Mon Sep 17 00:00:00 2001 From: Rocky Bernstein Date: Mon, 29 Mar 2004 00:45:53 +0000 Subject: [PATCH] Populate "Stream and Media Info" --- src/input/input_programs.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/input/input_programs.c b/src/input/input_programs.c index f5b08b1011..b958340600 100644 --- a/src/input/input_programs.c +++ b/src/input/input_programs.c @@ -600,6 +600,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input, es_descriptor_t * p_es; vlc_value_t val, text; char *psz_var = NULL; + char *psz_type = NULL; p_es = (es_descriptor_t *)malloc( sizeof(es_descriptor_t) ); if( p_es == NULL ) @@ -662,13 +663,37 @@ es_descriptor_t * input_AddES( input_thread_t * p_input, { case AUDIO_ES: psz_var = "audio-es"; + psz_type = _("audio"); break; case SPU_ES: psz_var = "spu-es"; + psz_type = _("subtitle"); break; case VIDEO_ES: psz_var = "video-es"; + psz_type = _("video"); break; + case NAV_ES: + psz_type = _("navigation"); + break; + case UNKNOWN_ES: + psz_type = _("unknown"); + break; + default: + psz_type = _("error"); + } + +#define TITLE_MAX 30 + /* Add stream info. */ + { + input_info_category_t *p_cat; + char psz_streamid[TITLE_MAX]; + + snprintf(psz_streamid, TITLE_MAX, "%s%04x", _("Stream "), i_es_id); + p_cat = input_InfoCategory( p_input, psz_streamid ); + input_AddInfo( p_cat, _("Type"), "%s", psz_type ); + if ( psz_desc && *psz_desc ) + input_AddInfo( p_cat, _("Description"), "%s", psz_desc ); } if( psz_var )