[MPlayer-dev-eng] [PATCH] (Almost) all of PLD linux MPlayer patches

Torinthiel torinthiel at megapolis.pl
Thu Aug 19 17:52:07 CEST 2004


Here are almost all patches that PLD linux has added to
MPlayer-1.0-pre5.
I haven't attached only one that dumps half of the codecs.conf (I think
the windows ones, but I'm not sure if only) and another that changes a
lot in fonts (it's not in CVS, and it's Poland-related, that's why).
I've also dropped two that I sent on the list separately.
But don't ask me for any sense in it, I'll ask the distro people and
tell you IF I find out anything.
Torinthiel

-- 
 Waclaw "Torinthiel" Schiller       GG#: 542916, 3073512
   torinthiel(at)megapolis(dot)pl
   gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8  7346 2B6E 39F2 B069 01F1
 "No classmates may be used during this examination"
-------------- next part --------------
diff -uNr MPlayer-0.90pre10/mencoder.c MPlayer-0.90pre10-350/mencoder.c
--- MPlayer-0.90pre10/mencoder.c	Thu Nov  7 00:54:21 2002
+++ MPlayer-0.90pre10-350/mencoder.c	Thu Nov 21 05:54:48 2002
@@ -1214,6 +1214,7 @@
     vobsub_out_close(vobsub_writer);
 
 if(out_video_codec==VCODEC_FRAMENO && mux_v->timer>100){
+    printf(MSGTR_RecommendedVideoBitrate,"350MB",(int)((350*1024*1024-muxer_f_size)/mux_v->timer/125));
     printf(MSGTR_RecommendedVideoBitrate,"650MB",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125));
     printf(MSGTR_RecommendedVideoBitrate,"700MB",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125));
     printf(MSGTR_RecommendedVideoBitrate,"800MB",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125));
-------------- next part --------------
--- MPlayer-1.0pre2/libavcodec/alpha/mpegvideo_alpha.c.orig	2003-10-05 18:12:00.000000000 +0200
+++ MPlayer-1.0pre2/libavcodec/alpha/mpegvideo_alpha.c	2003-11-23 00:01:14.955663712 +0100
@@ -29,6 +29,7 @@
     uint64_t correction;
     DCTELEM *orig_block = block;
     DCTELEM block0;
+    int use_mvi;
 
     qadd = WORD_VEC((qscale - 1) | 1);
     qmul = qscale << 1;
@@ -49,6 +50,11 @@
         n_coeffs = s->intra_scantable.raster_end[s->block_last_index[n]];
     }
 
+#ifdef RUNTIME_CPUDETECT
+    use_mvi = (amask(AMASK_MVI) == 0);
+#else
+    use_mvi = 1;
+#endif
     for(i = 0; i <= n_coeffs; block += 4, i += 4) {
         uint64_t levels, negmask, zeros, add;
 
@@ -59,13 +65,18 @@
 #ifdef __alpha_max__
         /* I don't think the speed difference justifies runtime
            detection.  */
+	/* but - you cannot use MVI if building with runtime detection
+	 * and at runtime CPU doesn't support it */
+	if(use_mvi) {
         negmask = maxsw4(levels, -1); /* negative -> ffff (-1) */
         negmask = minsw4(negmask, 0); /* positive -> 0000 (0) */
-#else
+	} else
+#endif
+	{
         negmask = cmpbge(WORD_VEC(0x7fff), levels);
         negmask &= (negmask >> 1) | (1 << 7);
         negmask = zap(-1, negmask);
-#endif
+	}
 
         zeros = cmpbge(0, levels);
         zeros &= zeros >> 1;
--- MPlayer-1.0pre2/configure.orig	2003-10-05 17:34:40.000000000 +0200
+++ MPlayer-1.0pre2/configure	2003-11-23 00:09:38.111172448 +0100
@@ -996,6 +996,11 @@
   if ppc; then
     _altivec=yes
   fi
+  if test "$host_arch" = "alpha" -a "$_cc_major" -ge "3"; then
+    _def_gcc_mvi_support="#define CAN_COMPILE_ALPHA_MVI 1"
+  else
+    _def_gcc_mvi_support="#undef CAN_COMPILE_ALPHA_MVI"
+  fi
 fi
 
 if x86 && test "$_runtime_cpudetection" = no ; then
-------------- next part --------------
--- MPlayer-1.0pre2/configure.orig	2003-11-23 00:09:38.000000000 +0100
+++ MPlayer-1.0pre2/configure	2003-11-23 00:20:52.337674440 +0100
@@ -1173,6 +1173,7 @@
 _inet6=auto
 _gethostbyname2=auto
 _ftp=yes
+_disable_altivec=no
 for ac_option do
   case "$ac_option" in
   # Skip 1st pass
@@ -1483,7 +1484,7 @@
   --enable-3dnowex) _3dnow=yes _3dnowex=yes ;;
   --disable-3dnowex) _3dnowex=no ;;
   --enable-altivec) _altivec=yes ;;
-  --disable-altivec) _altivec=no ;;
+  --disable-altivec) _altivec=no; _disable_altivec=yes ;;
   --enable-mmx)	_mmx=yes ;;
   --disable-mmx) # 3Dnow! and MMX2 require MMX
         _3dnow=no _3dnowex=no _mmx=no _mmx2=no ;;
@@ -1623,7 +1624,7 @@
 
     _altivec_gcc_flags=''
 
-    if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
+    if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes -a "$_disable_altivec" != "yes"; then
         echocheck "GCC altivec support"
         
         p=''
-------------- next part --------------
--- MPlayer-1.0pre4/configure.orig	2004-07-11 12:56:31.000000000 +0000
+++ MPlayer-1.0pre4/configure	2004-07-11 13:31:30.000000000 +0000
@@ -6307,15 +6307,19 @@
 
 /* Define this if your system has strlcpy */
 $_def_strlcpy
+#ifndef __ASSEMBLY__
 #ifndef HAVE_STRLCPY
 unsigned int strlcpy (char *dest, char *src, unsigned int size);
 #endif
+#endif
 
 /* Define this if your system has strlcat */
 $_def_strlcat
+#ifndef __ASSEMBLY__
 #ifndef HAVE_STRLCAT
 unsigned int strlcat (char *dest, char *src, unsigned int size);
 #endif
+#endif
 
 /* Define this if your system has fseeko */
 $_def_fseeko
@@ -6323,8 +6327,10 @@
 /* Need these for FILE and off_t an config.h is usually before other includes*/
 #include <stdio.h>
 #include <sys/types.h>
+#ifndef __ASSEMBLY__
 int fseeko(FILE *, off_t, int);
 #endif
+#endif
 
 $_def_localtime_r
 
--- MPlayer-1.0pre4/libavcodec/Makefile.orig	2004-04-27 23:21:27.000000000 +0000
+++ MPlayer-1.0pre4/libavcodec/Makefile	2004-07-11 13:58:24.000000000 +0000
@@ -209,7 +209,7 @@
 	$(CC) $(CFLAGS) -c -o $@ $< 
 
 %.o: %.S
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
 
 depend: $(SRCS)
 	$(CC) -MM $(CFLAGS) $^ 1>.depend
-------------- next part --------------
diff -burN MPlayer-1.0pre3.orig/configure MPlayer-1.0pre3/configure
--- MPlayer-1.0pre3.orig/configure	2004-01-02 15:29:02.000000000 +0100
+++ MPlayer-1.0pre3/configure	2004-01-02 15:45:49.000000000 +0100
@@ -314,8 +314,7 @@
   --with-sdl-config=PATH   path to sdl*-config (e.g. /opt/bin/sdl-config)
   --with-freetype-config=PATH  path to freetype-config
                                (e.g. /opt/bin/freetype-config)
-  --with-gtk-config=PATH   path to gtk*-config (e.g. /opt/bin/gtk-config)
-  --with-glib-config=PATH  path to glib*-config (e.g. /opt/bin/glib-config)
+  --with-pkg-config=PATH   path to pkg-config (e.g. /opt/bin/pkg-config)
   --with-livelibdir=DIR    path to LIVE.COM Streaming Media libraries
   --with-xmmsplugindir=DIR path to XMMS plugins
   --with-xmmslibdir=DIR    path to libxmms.so.1
@@ -1542,11 +1541,8 @@
   --with-fribidi-config=*)
     _fribidiconfig=`echo $ac_option | cut -d '=' -f 2`
     ;;
-  --with-gtk-config=*)
-    _gtkconfig=`echo $ac_option | cut -d '=' -f 2`
-    ;;
-  --with-glib-config=*)
-    _glibconfig=`echo $ac_option | cut -d '=' -f 2`
+  --with-pkg-config=*)
+    _pkgconfig=`echo $ac_option | cut -d '=' -f 2`
     ;;
 # dvdnav disabled, it does not work
 #  --with-dvdnav-config=*)
@@ -5538,37 +5534,38 @@
   echores "$_xshape"
 
 
-  # Check for GTK:
-  echocheck "gtk version"
-  if test -z "$_gtkconfig" ; then
-    if ( gtk-config --version ) >/dev/null 2>&1 ; then
-      _gtkconfig="gtk-config"
-    elif ( gtk12-config --version ) >/dev/null 2>&1 ; then
-      _gtkconfig="gtk12-config"
-    else
-      die "The GUI requires GTK devel packages (which were not found)."
+  # Check for pkg-config
+  echocheck "pkg-config"
+  if test -z "$_pkgconfig"; then
+    if ( pkg-config --version ) > /dev/null 2>&1; then
+      _pkgconfig="pkg-config"
+    else
+      die "The GUI requires pkg-config (which was not found)."
     fi
   fi
-  _gtk=`$_gtkconfig --version 2>&1`
-  _inc_gtk=`$_gtkconfig --cflags 2>&1`
-  _ld_gtk=`$_gtkconfig --libs 2>&1`
-  echores "$_gtk (using $_gtkconfig)"
+
+  # Check for GTK
+  if ( $_pkgconfig --modversion gtk+-2.0 ) > /dev/null 2>&1; then
+    :
+  else
+    die "the GUI requires GTK (which was not found)"
+  fi
+  _gtk=`$_pkgconfig --modversion gtk+-2.0 2>&1`
+  _inc_gtk=`$_pkgconfig --cflags gtk+-2.0 2>&1`
+  _ld_gtk=`$_pkgconfig  --libs   gtk+-2.0 2>&1`
+  echores "$_gtk (using $_pkconfig)"
 
   # Check for GLIB
   echocheck "glib version"
-  if test -z "$_glibconfig" ; then
-    if ( glib-config --version ) >/dev/null 2>&1 ; then
-      _glibconfig="glib-config"
-    elif ( glib12-config --version ) >/dev/null 2>&1 ; then
-      _glibconfig="glib12-config"
-    else
-      die "The GUI requires GLib devel packages (which were not found)"
-    fi
+  if ( $_pkgconfig --modversion glib-2.0 ) > /dev/null 2>&1 ; then
+    :
+  else
+    die "The GUI requires GLIB (which was not found)"
   fi
-  _glib=`$_glibconfig --version 2>&1`
-  _inc_glib=`$_glibconfig --cflags 2>&1`
-  _ld_glib=`$_glibconfig --libs 2>&1`
-  echores "$_glib (using $_glibconfig)"
+  _glib=`$_pkgconfig --modversion glib-2.0 2>&1`
+  _inc_glib=`$_pkgconfig --cflags glib-2.0 2>&1`
+  _ld_glib=`$_pkgconfig  --libs   glib-2.0 2>&1`
+  echores "$_glib (using $_pkgconfig)"
 
   _def_gui='#define HAVE_NEW_GUI 1'
   _ld_gui='$(GTKLIB) $(GLIBLIB)'
diff -burN MPlayer-1.0pre3.orig/Gui/mplayer/gtk/about.c MPlayer-1.0pre3/Gui/mplayer/gtk/about.c
--- MPlayer-1.0pre3.orig/Gui/mplayer/gtk/about.c	2004-01-02 15:29:01.000000000 +0100
+++ MPlayer-1.0pre3/Gui/mplayer/gtk/about.c	2004-01-02 15:56:07.000000000 +0100
@@ -67,11 +67,20 @@
   gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 );
   gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
 
+#ifdef USE_GTK1
   AboutText=gtk_text_new( NULL,NULL );
+#else
+  AboutText=gtk_text_view_new();
+  gtk_text_view_set_editable( GTK_TEXT_VIEW( AboutText ), FALSE );
+#endif
   gtk_widget_set_name( AboutText,"AboutText" );
   gtk_widget_show( AboutText );
   gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
+#ifdef USE_GTK1
   gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL,
+#else
+  gtk_text_buffer_set_text( gtk_text_view_get_buffer( AboutText), 
+#endif
   	"\n" 
 	MSGTR_ABOUT_UHU 
 	"             (http://www.uhulinux.hu/)\n" 
-------------- next part --------------
diff -Nur Mplayer-0.90pre4.orig/get_path.c MPlayer-0.90pre4.chng/get_path.c
--- Mplayer-0.90pre4.orig/get_path.c	Tue Dec 25 21:41:04 2001
+++ MPlayer-0.90pre4.chng/get_path.c	Tue Jun  4 11:46:43 2002
@@ -2,22 +2,30 @@
 char *get_path(char *filename){
 	char *homedir;
 	char *buff;
-	static char *config_dir = "/.mplayer";
+	static char *config_dir;
+	char *cfgdir;
 	int len;
 
 	if ((homedir = getenv("HOME")) == NULL)
 		return NULL;
-	len = strlen(homedir) + strlen(config_dir) + 1;
-	if (filename == NULL) {
-		if ((buff = (char *) malloc(len)) == NULL)
-			return NULL;
-		sprintf(buff, "%s%s", homedir, config_dir);
+		
+	cfgdir = getenv("CONFIG_DIR");
+	if (filename) {
+	    if (cfgdir) config_dir = "/mplayer/";
+	    else { config_dir = "/.mplayer/"; cfgdir = ""; }
 	} else {
-		len += strlen(filename) + 1;
-		if ((buff = (char *) malloc(len)) == NULL)
-			return NULL;
-		sprintf(buff, "%s%s/%s", homedir, config_dir, filename);
+	    filename = "";
+	    if (cfgdir) config_dir = "/mplayer";
+	    else { config_dir = "/.mplayer"; cfgdir = ""; }
 	}
+	
+	len = strlen(cfgdir) + strlen(config_dir) 
+		+ strlen(homedir) + strlen(filename) + 2;
+	
+	if ((buff = (char *) malloc(len)) == NULL)
+	    return NULL;
+
+	sprintf(buff, "%s/%s%s%s", homedir, cfgdir, config_dir, filename);
 	mp_msg(MSGT_GLOBAL,MSGL_V,"get_path('%s') -> '%s'\n",filename,buff);
 	return buff;
 }
-------------- next part --------------
--- MPlayer-0.60/configure.orig	Thu Jan 17 23:04:00 2002
+++ MPlayer-0.60/configure	Thu Jan 17 23:07:04 2002
@@ -1084,7 +1084,6 @@
 int main(void) { (void) gethostbyname(0); return 0; }
 EOF
 cc_check -lsocket && _ld_sock="-lsocket"
-cc_check -lnsl && _ld_sock="-lnsl"
 cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl"
 if test "$_ld_sock" ; then
   echores "yes (using $_ld_sock)"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040819/367b6a2a/attachment.pgp>


More information about the MPlayer-dev-eng mailing list