mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 21:06:00 +00:00
with -identify show audio and video id; patch by Andrew Savchenko (Bircoph list ru)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23028 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3b97b07397
commit
dfd0190a6d
@ -634,6 +634,10 @@ static char help_text[]=
|
||||
#define MSGTR_NoBindFound "No bind found for key '%s'."
|
||||
#define MSGTR_FailedToOpen "Failed to open %s.\n"
|
||||
|
||||
#define MSGTR_VideoID "[%s] Video stream found, -vid %d\n"
|
||||
#define MSGTR_AudioID "[%s] Audio stream found, -aid %d\n"
|
||||
#define MSGTR_SubtitleID "[%s] Subtitle stream found, -sid %d\n"
|
||||
|
||||
// dec_video.c & dec_audio.c:
|
||||
#define MSGTR_CantOpenCodec "Could not open codec.\n"
|
||||
#define MSGTR_CantCloseCodec "Could not close codec.\n"
|
||||
|
@ -417,6 +417,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
|
||||
audio_pos += 64; //16+16+4+4+4+16+4;
|
||||
buffer = &hdr[audio_pos];
|
||||
sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F);
|
||||
++audio_streams;
|
||||
if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &audio_pos, &buffer, hdr, hdr_len))
|
||||
goto len_err_out;
|
||||
@ -451,6 +452,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
|
||||
switch(ASF_LOAD_GUID_PREFIX(streamh->type)){
|
||||
case ASF_GUID_PREFIX_audio_stream: {
|
||||
sh_audio_t* sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F);
|
||||
++audio_streams;
|
||||
if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &pos, &buffer, hdr, hdr_len))
|
||||
goto len_err_out;
|
||||
@ -459,6 +461,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
|
||||
}
|
||||
case ASF_GUID_PREFIX_video_stream: {
|
||||
sh_video_t* sh_video=new_sh_video(demuxer,streamh->stream_no & 0x7F);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "asfheader", streamh->stream_no & 0x7F);
|
||||
unsigned int len=streamh->type_size-(4+4+1+2);
|
||||
float asp_ratio;
|
||||
++video_streams;
|
||||
|
@ -192,11 +192,13 @@ while(1){
|
||||
++stream_id;
|
||||
if(h.fccType==streamtypeVIDEO){
|
||||
sh_video=new_sh_video(demuxer,stream_id);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "aviheader", stream_id);
|
||||
memcpy(&sh_video->video,&h,sizeof(h));
|
||||
sh_video->stream_delay = (float)sh_video->video.dwStart * sh_video->video.dwScale/sh_video->video.dwRate;
|
||||
} else
|
||||
if(h.fccType==streamtypeAUDIO){
|
||||
sh_audio=new_sh_audio(demuxer,stream_id);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "aviheader", stream_id);
|
||||
memcpy(&sh_audio->audio,&h,sizeof(h));
|
||||
sh_audio->stream_delay = (float)sh_audio->audio.dwStart * sh_audio->audio.dwScale/sh_audio->audio.dwRate;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
// #include "help_mp.h"
|
||||
#include "help_mp.h"
|
||||
|
||||
#include "stream/stream.h"
|
||||
#include "demuxer.h"
|
||||
@ -305,6 +305,7 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
|
||||
if(priv->audio_streams >= MAX_A_STREAMS)
|
||||
break;
|
||||
sh_audio=new_sh_audio(demuxer, i);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "lavf", i);
|
||||
if(!sh_audio)
|
||||
break;
|
||||
priv->astreams[priv->audio_streams] = i;
|
||||
@ -379,6 +380,7 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
|
||||
if(priv->video_streams >= MAX_V_STREAMS)
|
||||
break;
|
||||
sh_video=new_sh_video(demuxer, i);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", i);
|
||||
if(!sh_video) break;
|
||||
priv->vstreams[priv->video_streams] = i;
|
||||
priv->video_streams++;
|
||||
|
@ -659,6 +659,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
|
||||
int version, adjust;
|
||||
int is_vorbis = 0;
|
||||
sh_audio_t* sh=new_sh_audio(demuxer,priv->track_db);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "mov", priv->track_db);
|
||||
sh->format=trak->fourcc;
|
||||
|
||||
// crude audio delay from editlist0 hack ::atm
|
||||
@ -982,6 +983,7 @@ quit_vorbis_block:
|
||||
int hdr_ptr = 76; // the byte just after depth
|
||||
unsigned char *palette_map;
|
||||
sh_video_t* sh=new_sh_video(demuxer,priv->track_db);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "mov", priv->track_db);
|
||||
int depth;
|
||||
sh->format=trak->fourcc;
|
||||
|
||||
@ -1311,6 +1313,7 @@ quit_vorbis_block:
|
||||
trak->fourcc == mmioFOURCC('t','x','3','g') ||
|
||||
trak->fourcc == mmioFOURCC('t','e','x','t')) {
|
||||
sh_sub_t *sh = new_sh_sub(demuxer, priv->track_db);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "mov", priv->track_db);
|
||||
if (trak->fourcc == mmioFOURCC('m','p','4','s'))
|
||||
init_vobsub(sh, trak);
|
||||
else
|
||||
|
@ -100,6 +100,7 @@ static demuxer_t * demux_open_nut(demuxer_t * demuxer) {
|
||||
calloc(sizeof(WAVEFORMATEX) +
|
||||
s[i].codec_specific_len, 1);
|
||||
sh_audio_t* sh_audio = new_sh_audio(demuxer, i);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "nut", i);
|
||||
int j;
|
||||
|
||||
sh_audio->wf= wf; sh_audio->ds = demuxer->audio;
|
||||
@ -135,6 +136,7 @@ static demuxer_t * demux_open_nut(demuxer_t * demuxer) {
|
||||
calloc(sizeof(BITMAPINFOHEADER) +
|
||||
s[i].codec_specific_len, 1);
|
||||
sh_video_t * sh_video = new_sh_video(demuxer, i);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "nut", i);
|
||||
int j;
|
||||
|
||||
sh_video->bih = bih;
|
||||
|
@ -1271,6 +1271,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
|
||||
} else {
|
||||
/* audio header */
|
||||
sh_audio_t *sh = new_sh_audio(demuxer, stream_id);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "real", stream_id);
|
||||
char buf[128]; /* for codec name */
|
||||
int frame_size;
|
||||
int sub_packet_size;
|
||||
@ -1483,6 +1484,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
|
||||
}
|
||||
} else if (strstr(mimet,"X-MP3-draft-00")) {
|
||||
sh_audio_t *sh = new_sh_audio(demuxer, stream_id);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "real", stream_id);
|
||||
|
||||
/* Emulate WAVEFORMATEX struct: */
|
||||
sh->wf = malloc(sizeof(WAVEFORMATEX));
|
||||
@ -1516,6 +1518,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
|
||||
} else {
|
||||
/* video header */
|
||||
sh_video_t *sh = new_sh_video(demuxer, stream_id);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "real", stream_id);
|
||||
|
||||
sh->format = stream_read_dword_le(demuxer->stream); /* fourcc */
|
||||
mp_msg(MSGT_DEMUX,MSGL_V,"video fourcc: %.4s (%x)\n", (char *)&sh->format, sh->format);
|
||||
|
Loading…
Reference in New Issue
Block a user