diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-01-25 20:35:58 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-01-25 20:35:58 +0000 |
commit | 2067a1f7507402da2a3692258cadf5de2c003705 (patch) | |
tree | 9e00f66df01d3cd76242d756df44cbcb1ca43e4d /mpcommon.c | |
parent | ccb0647f897b7e484cb5c593f62d7b8b0bc61adf (diff) | |
download | mpv-2067a1f7507402da2a3692258cadf5de2c003705.tar.bz2 mpv-2067a1f7507402da2a3692258cadf5de2c003705.tar.xz |
Factorize print_version().
Print CPU information in verbose mode instead of by default.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28360 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mpcommon.c')
-rw-r--r-- | mpcommon.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mpcommon.c b/mpcommon.c index 79af866cab..0d64027b67 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -5,7 +5,11 @@ #include "mplayer.h" #include "libvo/sub.h" #include "libvo/video_out.h" +#include "cpudetect.h" +#include "help_mp.h" +#include "mp_msg.h" #include "spudec.h" +#include "version.h" #include "vobsub.h" #ifdef CONFIG_TV_TELETEXT #include "stream/tv.h" @@ -24,6 +28,47 @@ ass_track_t* ass_track = 0; // current track to render sub_data* subdata = NULL; subtitle* vo_sub_last = NULL; + +void print_version(const char* name) +{ + mp_msg(MSGT_CPLAYER, MSGL_INFO, MP_TITLE, name); + + /* Test for CPU capabilities (and corresponding OS support) for optimizing */ + GetCpuCaps(&gCpuCaps); +#if ARCH_X86 + mp_msg(MSGT_CPLAYER, MSGL_V, + "CPUflags: MMX: %d MMX2: %d 3DNow: %d 3DNow2: %d SSE: %d SSE2: %d\n", + gCpuCaps.hasMMX, gCpuCaps.hasMMX2, + gCpuCaps.has3DNow, gCpuCaps.has3DNowExt, + gCpuCaps.hasSSE, gCpuCaps.hasSSE2); +#ifdef RUNTIME_CPUDETECT + mp_msg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithRuntimeDetection); +#else + mp_msg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithCPUExtensions); +#if HAVE_MMX + mp_msg(MSGT_CPLAYER,MSGL_V," MMX"); +#endif +#if HAVE_MMX2 + mp_msg(MSGT_CPLAYER,MSGL_V," MMX2"); +#endif +#if HAVE_3DNOW + mp_msg(MSGT_CPLAYER,MSGL_V," 3DNow"); +#endif +#if HAVE_3DNOWEX + mp_msg(MSGT_CPLAYER,MSGL_V," 3DNowEx"); +#endif +#if HAVE_SSE + mp_msg(MSGT_CPLAYER,MSGL_V," SSE"); +#endif +#if HAVE_SSE2 + mp_msg(MSGT_CPLAYER,MSGL_V," SSE2"); +#endif + mp_msg(MSGT_CPLAYER,MSGL_V,"\n"); +#endif /* RUNTIME_CPUDETECT */ +#endif /* ARCH_X86 */ +} + + void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) { unsigned char *packet=NULL; |