mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 11:18:32 +00:00
add -identify switch
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7865 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
9823a4e64e
commit
d5a36f752c
@ -937,6 +937,11 @@ Zeigt eine kurze Zusammenfassung der Optionen.
|
|||||||
.B \-hardframedrop (siehe auch \-framedrop Option)
|
.B \-hardframedrop (siehe auch \-framedrop Option)
|
||||||
Intensiveres Framedropping (unterbricht die Dekodierung). Führt zu Bildverzerrungen!
|
Intensiveres Framedropping (unterbricht die Dekodierung). Führt zu Bildverzerrungen!
|
||||||
.TP
|
.TP
|
||||||
|
.B \-identify
|
||||||
|
Zeigt die Dateiparameter in einem leicht weiter zu verarbeitendem Format an.
|
||||||
|
Das Script TOOLS/midentify unterdrückt andere Ausgaben von MPlayer und führt ein
|
||||||
|
Shellescaping der Dateinamen durch.
|
||||||
|
.TP
|
||||||
.B \-include <Konfigurationsdatei>
|
.B \-include <Konfigurationsdatei>
|
||||||
Gibt eine Konfigurationsdatei an, welche nach der normalen ausgewertet werden soll.
|
Gibt eine Konfigurationsdatei an, welche nach der normalen ausgewertet werden soll.
|
||||||
.TP
|
.TP
|
||||||
|
@ -217,6 +217,11 @@ Show short summary of options.
|
|||||||
More intense frame dropping (breaks decoding).
|
More intense frame dropping (breaks decoding).
|
||||||
Leads to image distortion!
|
Leads to image distortion!
|
||||||
.TP
|
.TP
|
||||||
|
.B \-identify
|
||||||
|
Show file parameters in easy parsable format. The wrapper script
|
||||||
|
TOOLS/midentify suppresses the other mplayer output and (hopefully)
|
||||||
|
shellescapes the filenames.
|
||||||
|
.TP
|
||||||
.B \-input <commands>
|
.B \-input <commands>
|
||||||
This option can be used to configure certain parts of the input system.
|
This option can be used to configure certain parts of the input system.
|
||||||
Paths are relative to ~/\:.mplayer/.
|
Paths are relative to ~/\:.mplayer/.
|
||||||
|
@ -378,6 +378,7 @@ static config_t mplayer_opts[]={
|
|||||||
#include "cfg-common.h"
|
#include "cfg-common.h"
|
||||||
#undef MAIN_CONF
|
#undef MAIN_CONF
|
||||||
|
|
||||||
|
{"identify", &identify, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
|
||||||
{"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
|
{"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
|
||||||
{"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
|
{"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
|
||||||
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
|
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
|
||||||
|
30
mplayer.c
30
mplayer.c
@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
int slave_mode=0;
|
int slave_mode=0;
|
||||||
int verbose=0;
|
int verbose=0;
|
||||||
|
int identify=0;
|
||||||
static int quiet=0;
|
static int quiet=0;
|
||||||
|
|
||||||
#define ABS(x) (((x)>=0)?(x):(-(x)))
|
#define ABS(x) (((x)>=0)?(x):(-(x)))
|
||||||
@ -1148,6 +1149,35 @@ if(sh_audio){
|
|||||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
|
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(identify) {
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_FILENAME=%s\n", filename);
|
||||||
|
if (sh_video) {
|
||||||
|
/* Assume FOURCC if all bytes >= 0x20 (' ') */
|
||||||
|
if (sh_video->format >= 0x20202020)
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%.4s\n", &sh_video->format);
|
||||||
|
else
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%d\n", sh_video->format);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_BITRATE=%d\n", sh_video->i_bps*8);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_WIDTH=%d\n", sh_video->disp_w);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_HEIGHT=%d\n", sh_video->disp_h);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FPS=%5.3f\n", sh_video->fps);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_ASPECT=%1.2f\n", sh_video->aspect);
|
||||||
|
}
|
||||||
|
if (sh_audio) {
|
||||||
|
if (sh_audio->codec)
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_CODEC=%s\n", sh_audio->codec->name);
|
||||||
|
/* Assume FOURCC if all bytes >= 0x20 (' ') */
|
||||||
|
if (sh_audio->format >= 0x20202020)
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_FORMAT=%.4s\n", &sh_audio->format);
|
||||||
|
else
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_FORMAT=%d\n", sh_audio->format);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_BITRATE=%d\n", sh_audio->i_bps*8);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_RATE=%d\n", sh_audio->samplerate);
|
||||||
|
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_NCH=%d\n", sh_audio->channels);
|
||||||
|
}
|
||||||
|
goto goto_next_file;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sh_video) goto main; // audio-only
|
if(!sh_video) goto main; // audio-only
|
||||||
|
|
||||||
//================== Init VIDEO (codec & libvo) ==========================
|
//================== Init VIDEO (codec & libvo) ==========================
|
||||||
|
Loading…
Reference in New Issue
Block a user