[MPlayer-dev-eng] Re: [PATCH] -identify vids, aids, sids, alangs and slangs

Nico Sabbi nsabbi at tiscali.it
Thu Nov 11 08:59:20 CET 2004


kiriuja wrote:

>Attached is the updated patch with all the suggested changes, plus some
>major improvements in the demux_ts part and some minor ones in vobsub.c.
>
>Nico, could you please check the demux_ts part?
>
>Thanks.
>
>--
>kiriuja
>
>Index: libmpdemux/demux_ts.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ts.c,v
>retrieving revision 1.19
>diff -u -p -u -r1.19 demux_ts.c
>--- libmpdemux/demux_ts.c	11 Oct 2004 06:57:57 -0000	1.19
>+++ libmpdemux/demux_ts.c	10 Nov 2004 17:11:56 -0000
>@@ -53,6 +53,7 @@ int ts_prog;
> int ts_keep_broken=0;
> off_t ts_probe = TS_MAX_PROBE_SIZE;
> extern char *dvdsub_lang, *audio_lang;	//for -alang
>+extern int demux_aid_vid_mismatch;
> 
> typedef enum
> {
>@@ -498,12 +499,20 @@ static off_t ts_detect_streams(demuxer_t
> 
> 			if(is_video)
> 			{
>+				if (identify)
>+					mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VIDEO_ID=%d\n", es.pid);
>     				chosen_pid = (req_vpid == es.pid);
> 				if((! chosen_pid) && (req_vpid > 0))
> 					continue;
> 			}
> 			else if(is_audio)
> 			{
>+				if (identify)
>+				{
>+					mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AUDIO_ID=%d\n", es.pid);
>+					if (es.lang[0] > 0)
>+						mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AID_%d_LANG=%s\n", es.pid, es.lang);
>+				}
> 				if(req_apid > 0)
> 				{
> 					chosen_pid = (req_apid == es.pid);
>@@ -521,6 +530,12 @@ static off_t ts_detect_streams(demuxer_t
> 			}
> 			else if(is_sub)
> 			{
>+				if (identify)
>+				{
>+					mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", es.pid);
>+					if (es.lang[0] > 0)
>+						mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_SID_%d_LANG=%s\n", es.pid, es.lang);
>+				}
> 				chosen_pid = (req_spid == es.pid);
> 				if((! chosen_pid) && (req_spid > 0))
> 					continue;
>@@ -776,6 +791,7 @@ demuxer_t *demux_open_ts(demuxer_t * dem
> 	demuxer->sub->id = params.spid;
> 	priv->prog = params.prog;
> 
>+	demux_aid_vid_mismatch = 1; // don't identify in new_sh_* since ids don't match
> 
> 	if(params.vtype != UNKNOWN)
> 	{
>  
>

usually these info are printed with MSGL_V; anyway the demux_ts part 
seems ok to commit
with all the rest




More information about the MPlayer-dev-eng mailing list