comparison libmpdemux/demux_ts.c @ 14046:4802041ab8e3

Output more information about vids, aids, sids, alangs and slangs with -identify. Patch by kiriuja <mplayer-patches@en-directo.net>
author mosu
date Thu, 25 Nov 2004 22:24:00 +0000
parents 7ac60a1c576e
children 512a57bbe68d
comparison
equal deleted inserted replaced
14045:7a129428a408 14046:4802041ab8e3
52 52
53 int ts_prog; 53 int ts_prog;
54 int ts_keep_broken=0; 54 int ts_keep_broken=0;
55 off_t ts_probe = TS_MAX_PROBE_SIZE; 55 off_t ts_probe = TS_MAX_PROBE_SIZE;
56 extern char *dvdsub_lang, *audio_lang; //for -alang 56 extern char *dvdsub_lang, *audio_lang; //for -alang
57 extern int demux_aid_vid_mismatch;
57 58
58 typedef enum 59 typedef enum
59 { 60 {
60 UNKNOWN = -1, 61 UNKNOWN = -1,
61 VIDEO_MPEG1 = 0x10000001, 62 VIDEO_MPEG1 = 0x10000001,
508 if((! is_audio) && (! is_video) && (! is_sub)) 509 if((! is_audio) && (! is_video) && (! is_sub))
509 continue; 510 continue;
510 511
511 if(is_video) 512 if(is_video)
512 { 513 {
514 if (identify)
515 mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VIDEO_ID=%d\n", es.pid);
513 chosen_pid = (req_vpid == es.pid); 516 chosen_pid = (req_vpid == es.pid);
514 if((! chosen_pid) && (req_vpid > 0)) 517 if((! chosen_pid) && (req_vpid > 0))
515 continue; 518 continue;
516 } 519 }
517 else if(is_audio) 520 else if(is_audio)
518 { 521 {
522 if (identify)
523 {
524 mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AUDIO_ID=%d\n", es.pid);
525 if (es.lang[0] > 0)
526 mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AID_%d_LANG=%s\n", es.pid, es.lang);
527 }
519 if(req_apid > 0) 528 if(req_apid > 0)
520 { 529 {
521 chosen_pid = (req_apid == es.pid); 530 chosen_pid = (req_apid == es.pid);
522 if(! chosen_pid) 531 if(! chosen_pid)
523 continue; 532 continue;
531 param->apid = req_apid = es.pid; 540 param->apid = req_apid = es.pid;
532 } 541 }
533 } 542 }
534 else if(is_sub) 543 else if(is_sub)
535 { 544 {
545 if (identify)
546 {
547 mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", es.pid);
548 if (es.lang[0] > 0)
549 mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_SID_%d_LANG=%s\n", es.pid, es.lang);
550 }
536 chosen_pid = (req_spid == es.pid); 551 chosen_pid = (req_spid == es.pid);
537 if((! chosen_pid) && (req_spid > 0)) 552 if((! chosen_pid) && (req_spid > 0))
538 continue; 553 continue;
539 } 554 }
540 555
786 demuxer->audio->id = params.apid; 801 demuxer->audio->id = params.apid;
787 demuxer->video->id = params.vpid; 802 demuxer->video->id = params.vpid;
788 demuxer->sub->id = params.spid; 803 demuxer->sub->id = params.spid;
789 priv->prog = params.prog; 804 priv->prog = params.prog;
790 805
806 demux_aid_vid_mismatch = 1; // don't identify in new_sh_* since ids don't match
791 807
792 if(params.vtype != UNKNOWN) 808 if(params.vtype != UNKNOWN)
793 { 809 {
794 sh_video = new_sh_video(demuxer, 0); 810 sh_video = new_sh_video(demuxer, 0);
795 sh_video->ds = demuxer->video; 811 sh_video->ds = demuxer->video;