From 2067a1f7507402da2a3692258cadf5de2c003705 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 25 Jan 2009 20:35:58 +0000 Subject: 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 --- mpcommon.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'mpcommon.c') 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; -- cgit v1.2.3