summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--mencoder.c39
-rw-r--r--mpcommon.c45
-rw-r--r--mpcommon.h2
-rw-r--r--mplayer.c43
-rwxr-xr-xversion.sh2
6 files changed, 51 insertions, 82 deletions
diff --git a/Makefile b/Makefile
index ce91463ca0..d6c8036ac8 100644
--- a/Makefile
+++ b/Makefile
@@ -848,7 +848,7 @@ version.h:
###### dependency declarations / specific CFLAGS ######
codec-cfg.d: codecs.conf.h
-mencoder.d mplayer.d vobsub.d gui/win32/gui.d libmpdemux/muxer_avi.d osdep/mplayer-rc.o stream/network.d stream/stream_cddb.d: version.h
+mpcommon.d vobsub.d gui/win32/gui.d libmpdemux/muxer_avi.d osdep/mplayer-rc.o stream/network.d stream/stream_cddb.d: version.h
$(DEPS): help_mp.h
libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\" $(CFLAGS_LIBDVDCSS)
diff --git a/mencoder.c b/mencoder.c
index f3947b4840..df85a37974 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -36,13 +36,9 @@
#include <sys/time.h>
-
-#include "version.h"
#include "mp_msg.h"
#include "help_mp.h"
-#include "cpudetect.h"
-
#include "codec-cfg.h"
#include "m_option.h"
#include "m_config.h"
@@ -421,40 +417,7 @@ user_correct_pts = 0;
// Preparse the command line
m_config_preparse_command_line(mconfig,argc,argv);
- mp_msg(MSGT_CPLAYER,MSGL_INFO, "MEncoder " VERSION " (C) 2000-2009 MPlayer Team\n");
-
- /* Test for cpu capabilities (and corresponding OS support) for optimizing */
- GetCpuCaps(&gCpuCaps);
-#if ARCH_X86
- mp_msg(MSGT_CPLAYER,MSGL_INFO,"CPUflags: Type: %d MMX: %d MMX2: %d 3DNow: %d 3DNow2: %d SSE: %d SSE2: %d\n",
- gCpuCaps.cpuType,gCpuCaps.hasMMX,gCpuCaps.hasMMX2,
- gCpuCaps.has3DNow, gCpuCaps.has3DNowExt,
- gCpuCaps.hasSSE, gCpuCaps.hasSSE2);
-#ifdef RUNTIME_CPUDETECT
- mp_msg(MSGT_CPLAYER,MSGL_INFO, MSGTR_CompiledWithRuntimeDetection);
-#else
- mp_msg(MSGT_CPLAYER,MSGL_INFO, MSGTR_CompiledWithCPUExtensions);
-#if HAVE_MMX
- mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX");
-#endif
-#if HAVE_MMX2
- mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX2");
-#endif
-#if HAVE_3DNOW
- mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNow");
-#endif
-#if HAVE_3DNOWEX
- mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNowEx");
-#endif
-#if HAVE_SSE
- mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE");
-#endif
-#if HAVE_SSE2
- mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE2");
-#endif
- mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n\n");
-#endif
-#endif
+ print_version("MEncoder");
#if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL)
set_path_env();
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;
diff --git a/mpcommon.h b/mpcommon.h
index bdee63d898..a0c6fb8ff8 100644
--- a/mpcommon.h
+++ b/mpcommon.h
@@ -8,6 +8,8 @@
extern double sub_last_pts;
extern struct ass_track_s *ass_track;
extern subtitle *vo_sub_last;
+
+void print_version(const char* name);
void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset);
void update_teletext(sh_video_t *sh_video, demuxer_t *demuxer, int reset);
int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang);
diff --git a/mplayer.c b/mplayer.c
index e78dcbb33e..dd9e9dc699 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -36,8 +36,6 @@
#include <errno.h>
-#include "version.h"
-
#include "mp_msg.h"
#define HELP_MP_DEFINE_STATIC
@@ -74,8 +72,6 @@
#include "osdep/getch2.h"
#include "osdep/timer.h"
-#include "cpudetect.h"
-
#ifdef CONFIG_GUI
#include "gui/interface.h"
#endif
@@ -2396,43 +2392,6 @@ static void pause_loop(void)
#endif
}
-void print_version(void){
- mp_msg(MSGT_CPLAYER, MSGL_INFO, "%s\n", MP_TITLE);
-
-/* Test for CPU capabilities (and corresponding OS support) for optimizing */
- GetCpuCaps(&gCpuCaps);
-#if ARCH_X86
- mp_msg(MSGT_CPLAYER,MSGL_INFO,"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_INFO, MSGTR_CompiledWithRuntimeDetection);
-#else
- mp_msg(MSGT_CPLAYER,MSGL_INFO, MSGTR_CompiledWithCPUExtensions);
-#if HAVE_MMX
- mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX");
-#endif
-#if HAVE_MMX2
- mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX2");
-#endif
-#if HAVE_3DNOW
- mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNow");
-#endif
-#if HAVE_3DNOWEX
- mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNowEx");
-#endif
-#if HAVE_SSE
- mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE");
-#endif
-#if HAVE_SSE2
- mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE2");
-#endif
- mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n");
-#endif /* RUNTIME_CPUDETECT */
-#endif /* ARCH_X86 */
-}
-
// Find the right mute status and record position for new file position
static void edl_seek_reset(MPContext *mpctx)
@@ -2570,7 +2529,7 @@ int gui_no_filename=0;
// Preparse the command line
m_config_preparse_command_line(mconfig,argc,argv);
- print_version();
+ print_version("MPlayer");
#if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL)
set_path_env();
#endif
diff --git a/version.sh b/version.sh
index c9e5dd3b73..50a757c333 100755
--- a/version.sh
+++ b/version.sh
@@ -9,7 +9,7 @@ test $svn_revision || svn_revision=UNKNOWN
NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""
OLD_REVISION=`cat version.h 2> /dev/null`
-TITLE="#define MP_TITLE \"MPlayer dev-SVN-r${svn_revision}${extra} (C) 2000-2009 MPlayer Team\""
+TITLE="#define MP_TITLE \"%s dev-SVN-r${svn_revision}${extra} (C) 2000-2009 MPlayer Team\\\n\""
# Update version.h only on revision changes to avoid spurious rebuilds
if test "$NEW_REVISION" != "$OLD_REVISION"; then