[MPlayer-dev-eng] [PATCH] (Almost) all of PLD linux MPlayer patches
Attila Kinali
attila at kinali.ch
Sun Aug 22 03:18:23 CEST 2004
On Thu, Aug 19, 2004 at 05:52:07PM +0200, Torinthiel wrote:
> 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));
350MB ? Half size CD ?
Well...
> --- 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 ;;
Rejected, no means no. We dont need another variable to flag that we
really disabled altivec.
> --- 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
WTF ?
.S files should never include config.h (and actualy dont)
Rejected.
> 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)'
Removing functionality: Rejected.
> 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"
No idea.
> 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");
Never heard of this env variable. Prolly their own non-standard stuff.
Thus rejected.
> --- 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)"
Removing a test case and thus linking in libsocket in when
only libnsl is needed: bad: rejected.
Attila Kinali
More information about the MPlayer-dev-eng
mailing list