]> git.sesse.net Git - vlc/commitdiff
* Bug fixes and enhancements in the Gtk+/Gnome interfaces.
authorSam Hocevar <sam@videolan.org>
Thu, 15 Mar 2001 01:42:20 +0000 (01:42 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 15 Mar 2001 01:42:20 +0000 (01:42 +0000)
   o the slider should behave correctly and stop jumping here and
     there (this bug is _not_ related to Stef's similar bug)
   o added an "open network" menu (useless since the input doesn't
     handle it properly yet)
   o tried to reorganize gnome_callbacks.c and gtk_callbacks.c
   o stream date is now displayed instead of percentage
   o renamed gnome_sys.h to intf_gnome.h, and gtk_sys.h to intf_gtk.h

  * Changed documentation and package creation files.

   o added versioned conflicts/replaces to vlc-gtk (Closes Debian bug #88796)
   o removed useless or outdated documentation from doc/*
   o moved vlc.1 manpage from debian/vlc.1 to doc/vlc.1

  * Added basic Qt interface.

   o working features: slide bar, open file, toolbar, popup menu
   o added "qvlc" alias, equivalent to "vlc -I qt"
   o known issues : no "open disc" or "open network" menus yet
                    the IntfWindow class is never cleaned on destruction
                    the popup menu always pop at the middle of the screen

  * Misc fixes/updates.

   o renamed netutils.h functions from input_* to network_*
   o renamed *plst* files and functions to *playlist* (it was stupid
     from me to name them "plst")
   o made a few input error messages more meaningful
   o added -I, -A and -V short flags, corresponding to --intf, --audio
     and --video

    I got a lot of conflicts on this commit, lart me if I forgot a
  file or made old bugs reappear.

45 files changed:
INSTALL
Makefile.in
configure
configure.in
debian/changelog
debian/changelog-css
debian/control
debian/control-css
debian/rules
doc/bugs [deleted file]
doc/headers [deleted file]
doc/portage [deleted file]
doc/vlan-server [deleted file]
doc/vlc.1 [moved from debian/vlc.1 with 94% similarity]
include/intf_playlist.h [moved from include/intf_plst.h with 82% similarity]
include/netutils.h
include/tests.h
plugins/beos/intf_beos.cpp
plugins/gnome/gnome_callbacks.c
plugins/gnome/gnome_callbacks.h
plugins/gnome/gnome_interface.c
plugins/gnome/gnome_interface.h
plugins/gnome/intf_gnome.c
plugins/gnome/intf_gnome.glade
plugins/gnome/intf_gnome.h [moved from plugins/gnome/gnome_sys.h with 79% similarity]
plugins/gtk/gtk_callbacks.c
plugins/gtk/gtk_callbacks.h
plugins/gtk/gtk_interface.c
plugins/gtk/gtk_interface.h
plugins/gtk/gtk_playlist.c
plugins/gtk/intf_gtk.c
plugins/gtk/intf_gtk.glade
plugins/gtk/intf_gtk.h [moved from plugins/gtk/gtk_sys.h with 83% similarity]
plugins/mpeg/input_ps.c
plugins/qt/.cvsignore [new file with mode: 0644]
plugins/qt/intf_qt.cpp [new file with mode: 0644]
plugins/qt/qt.cpp [new file with mode: 0644]
src/input/input.c
src/input/input_ext-intf.c
src/input/input_programs.c
src/input/mpeg_system.c
src/interface/interface.c
src/interface/intf_playlist.c [moved from src/interface/intf_plst.c with 90% similarity]
src/interface/main.c
src/misc/netutils.c

diff --git a/INSTALL b/INSTALL
index db2309301495ddc2d5083565a2242608f84ad8af..a27e29d8d875baaa82bba9a78b909a7f4c4a13f9 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -12,11 +12,18 @@ See `./configure --help' for more information.
 
 Then, run `make' to build vlc.
 
-Here is a shortcut to copy-paste for a clean build:
+Here is a shortcut to copy-paste for a complete build:
 
    make distclean 2>/dev/null ; ./configure --prefix=/usr --enable-gnome \
       --enable-fb --with-glide --with-ggi --with-sdl --enable-esd \
-      --enable-alsa --enable-mga --enable-gtk && make
+      --enable-alsa --enable-mga --enable-gtk --enable-qt && make
+
+If you intend to debug stuff, you may want to disable optimizations:
+
+   make distclean 2>/dev/null ; ./configure --prefix=/usr --enable-gnome \
+      --enable-fb --with-glide --with-ggi --with-sdl --enable-esd \
+      --enable-alsa --enable-mga --enable-gtk --enable-qt \
+      --disable-optimizatons && make
 
 
 Installing and running VideoLAN
index 7bae51a485cecc16f458fb2b46996cd8a8ad0aa8..6d93cf520f0af45e4364f8900032211d588827f5 100644 (file)
@@ -190,7 +190,7 @@ INTERFACE = src/interface/main.o \
                src/interface/intf_msg.o \
                src/interface/intf_cmd.o \
                src/interface/intf_ctrl.o \
-               src/interface/intf_plst.o \
+               src/interface/intf_playlist.o \
                src/interface/intf_channels.o \
                src/interface/intf_console.o \
                src/interface/intf_urldecode.o \
@@ -334,9 +334,11 @@ PLUGIN_GNOME =     plugins/gnome/gnome.o \
                plugins/gnome/gnome_interface.o \
                plugins/gnome/gnome_support.o
 
+PLUGIN_QT =    plugins/qt/qt.o \
+               plugins/qt/intf_qt.o
+
 PLUGIN_KDE =   plugins/kde/kde.o \
-               plugins/kde/intf_kde.o \
-               plugins/kde/kvlc.o
+               plugins/kde/intf_kde.o
 
 PLUGIN_IDCT =  plugins/idct/idct.o \
                plugins/idct/idct_common.o
@@ -431,6 +433,7 @@ NONSTD_PLUGIN_OBJ = \
 
 NONSTD_CPP_PLUGIN_OBJ = \
                $(PLUGIN_BEOS) \
+               $(PLUGIN_QT) \
                $(PLUGIN_KDE)
 
 #
@@ -456,7 +459,7 @@ all: vlc @ALIASES@ plugins
 clean:
        rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
        rm -f plugins/*/*.o src/*/*.o lib/*.so
-       rm -f vlc kvlc gvlc
+       rm -f vlc gvlc kvlc qvlc
 
 distclean: clean
        rm -f src/*/*.o plugins/*/*.o **/*~ *.log
@@ -494,7 +497,7 @@ show:
 snapshot:
        rm -rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
        # copy archive in /tmp
-       find -type d | grep -v CVS | grep -v '^\.dep' | while read i ; \
+       find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
                do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
        done
        find debian -mindepth 1 -maxdepth 1 -type d | \
@@ -534,7 +537,7 @@ FORCE:
 # GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
 # the namespace
 #
-gvlc kvlc: vlc
+gvlc kvlc qvlc: vlc
        rm -f $@ && ln -s vlc $@
 
 
@@ -569,18 +572,25 @@ $(STD_PLUGIN_OBJ): %.o: %.c
 $(PLUGIN_GTK): %.o: Makefile.dep
 $(PLUGIN_GTK): %.o: .dep/%.d
 $(PLUGIN_GTK): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) `glib-config --cflags glib` `gtk-config --cflags gtk` -c -o $@ $<
+       $(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
 
 $(PLUGIN_GNOME): %.o: Makefile.dep
 $(PLUGIN_GNOME): %.o: .dep/%.d
 $(PLUGIN_GNOME): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) `glib-config --cflags glib` `gnome-config --cflags gnomeui` -c -o $@ $<
+       $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
 
 $(PLUGIN_GLIDE): %.o: Makefile.dep
 $(PLUGIN_GLIDE): %.o: .dep/%.d
 $(PLUGIN_GLIDE): %.o: %.c
        $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
 
+$(PLUGIN_QT): %.o: Makefile.dep
+$(PLUGIN_QT): %.o: .dep/%.dpp
+$(PLUGIN_QT): %.o: %.moc
+       $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/qt -c -o $@ $(<:%.moc=%.cpp)
+$(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
+       moc -i $< -o $@
+
 $(PLUGIN_KDE): %.o: Makefile.dep
 $(PLUGIN_KDE): %.o: .dep/%.dpp
 $(PLUGIN_KDE): %.o: %.cpp
@@ -621,6 +631,9 @@ endif
 lib/dsp.so: $(PLUGIN_DSP)
        $(CC) $(PCFLAGS) -shared -o $@ $^
 
+lib/qt.so: $(PLUGIN_QT)
+       $(CC) $(PCFLAGS) -shared -o $@ $^ -lqt
+
 lib/kde.so: $(PLUGIN_KDE)
        $(CC) $(PCFLAGS) -shared -o $@ $^ -lkdeui -lkdecore -lqt -ldl
 
index 4c1e52bc183f74fa9e695da1394637190b043914..46c3f4799b9fceaa3128d4bf25c03d2dc7e5edd5 100755 (executable)
--- a/configure
+++ b/configure
@@ -41,6 +41,8 @@ ac_help="$ac_help
   --with-glide[=name]     Glide (3dfx) support (default disabled)"
 ac_help="$ac_help
   --enable-ncurses        ncurses interface support (default disabled)"
+ac_help="$ac_help
+  --enable-qt             Qt interface support (default disabled)"
 ac_help="$ac_help
   --enable-kde            KDE interface support (default disabled)"
 ac_help="$ac_help
@@ -589,7 +591,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:593: checking host system type" >&5
+echo "configure:595: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -616,7 +618,7 @@ VLC_CODENAME=Urumov
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:620: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:622: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -646,7 +648,7 @@ if test -z "$CC"; then
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:650: checking for $ac_word" >&5
+echo "configure:652: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -676,7 +678,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:680: checking for $ac_word" >&5
+echo "configure:682: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -727,7 +729,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:731: checking for $ac_word" >&5
+echo "configure:733: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -759,7 +761,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -770,12 +772,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 774 "configure"
+#line 776 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -801,12 +803,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:807: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:810: checking whether we are using GNU C" >&5
+echo "configure:812: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -815,7 +817,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -834,7 +836,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:838: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:840: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -868,7 +870,7 @@ fi
 fi
 if test -z "$CPP"; then
   echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:872: checking how to run the C preprocessor" >&5
+echo "configure:874: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -883,13 +885,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 887 "configure"
+#line 889 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -900,13 +902,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 904 "configure"
+#line 906 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -917,13 +919,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 921 "configure"
+#line 923 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -961,7 +963,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:965: checking for a BSD compatible install" >&5
+echo "configure:967: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1015,18 +1017,18 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1019: checking for working const" >&5
+echo "configure:1021: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1024 "configure"
+#line 1026 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -1069,7 +1071,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1090,14 +1092,14 @@ EOF
 fi
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1094: checking whether byte ordering is bigendian" >&5
+echo "configure:1096: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 1101 "configure"
+#line 1103 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1108,11 +1110,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 1116 "configure"
+#line 1118 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1123,7 +1125,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -1143,7 +1145,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1147 "configure"
+#line 1149 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -1156,7 +1158,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:1160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -1181,9 +1183,9 @@ fi
 
 
 echo $ac_n "checking whether compiler accepts bswap x86 instruction""... $ac_c" 1>&6
-echo "configure:1185: checking whether compiler accepts bswap x86 instruction" >&5
+echo "configure:1187: checking whether compiler accepts bswap x86 instruction" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1187 "configure"
+#line 1189 "configure"
 #include "confdefs.h"
 unsigned int foo( unsigned int x )
    { __asm__("bswap %0" : "=r" (x) : "0" (x)); return x; }
@@ -1191,7 +1193,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define HAVE_X86_BSWAP 1
@@ -1208,12 +1210,12 @@ rm -f conftest*
 for ac_func in gettimeofday select strerror strtod strtol
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1212: checking for $ac_func" >&5
+echo "configure:1214: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1217 "configure"
+#line 1219 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1236,7 +1238,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1263,12 +1265,12 @@ done
 for ac_func in setenv putenv
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1267: checking for $ac_func" >&5
+echo "configure:1269: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1272 "configure"
+#line 1274 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1291,7 +1293,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1316,12 +1318,12 @@ fi
 done
 
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1320: checking for connect" >&5
+echo "configure:1322: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1325 "configure"
+#line 1327 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -1344,7 +1346,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -1362,7 +1364,7 @@ if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1366: checking for connect in -lsocket" >&5
+echo "configure:1368: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1370,7 +1372,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1374 "configure"
+#line 1376 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1381,7 +1383,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1411,12 +1413,12 @@ fi
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1415: checking for gethostbyname" >&5
+echo "configure:1417: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1420 "configure"
+#line 1422 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -1439,7 +1441,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -1457,7 +1459,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1461: checking for gethostbyname in -lnsl" >&5
+echo "configure:1463: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1465,7 +1467,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1469 "configure"
+#line 1471 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1476,7 +1478,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1506,12 +1508,12 @@ fi
 fi
 
 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:1510: checking for nanosleep" >&5
+echo "configure:1512: checking for nanosleep" >&5
 if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1515 "configure"
+#line 1517 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char nanosleep(); below.  */
@@ -1534,7 +1536,7 @@ nanosleep();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_nanosleep=yes"
 else
@@ -1552,7 +1554,7 @@ if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:1556: checking for nanosleep in -lrt" >&5
+echo "configure:1558: checking for nanosleep in -lrt" >&5
 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1560,7 +1562,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1564 "configure"
+#line 1566 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1571,7 +1573,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1597,7 +1599,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:1601: checking for nanosleep in -lposix4" >&5
+echo "configure:1603: checking for nanosleep in -lposix4" >&5
 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1605,7 +1607,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1609 "configure"
+#line 1611 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1616,7 +1618,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1650,12 +1652,12 @@ fi
 for ac_func in usleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1654: checking for $ac_func" >&5
+echo "configure:1656: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1659 "configure"
+#line 1661 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1678,7 +1680,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1703,12 +1705,12 @@ fi
 done
 
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:1707: checking for inet_aton" >&5
+echo "configure:1709: checking for inet_aton" >&5
 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1712 "configure"
+#line 1714 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -1731,7 +1733,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_inet_aton=yes"
 else
@@ -1749,7 +1751,7 @@ if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:1753: checking for inet_aton in -lresolv" >&5
+echo "configure:1755: checking for inet_aton in -lresolv" >&5
 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1757,7 +1759,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+#line 1763 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1768,7 +1770,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1800,12 +1802,12 @@ fi
 for ac_func in vasprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1804: checking for $ac_func" >&5
+echo "configure:1806: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1809 "configure"
+#line 1811 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1828,7 +1830,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1856,17 +1858,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1860: checking for $ac_hdr" >&5
+echo "configure:1862: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1865 "configure"
+#line 1867 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1895,12 +1897,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1899: checking for $ac_func" >&5
+echo "configure:1901: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1904 "configure"
+#line 1906 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1923,7 +1925,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1948,7 +1950,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1952: checking for working mmap" >&5
+echo "configure:1954: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1956,7 +1958,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1960 "configure"
+#line 1962 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1983,15 +1985,12 @@ else
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
 
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
 # ifndef HAVE_SYS_PARAM_H
@@ -2046,7 +2045,7 @@ main()
        /*
         * First, make a file with some known garbage in it.
         */
-       data = (char*)malloc(pagesize);
+       data = malloc(pagesize);
        if (!data)
                exit(1);
        for (i = 0; i < pagesize; ++i)
@@ -2067,7 +2066,7 @@ main()
        fd = open("conftestmmap", O_RDWR);
        if (fd < 0)
                exit(1);
-       data2 = (char*)malloc(2 * pagesize);
+       data2 = malloc(2 * pagesize);
        if (!data2)
                exit(1);
        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -2085,7 +2084,7 @@ main()
         */
        for (i = 0; i < pagesize; ++i)
                *(data2 + i) = *(data2 + i) + 1;
-       data3 = (char*)malloc(pagesize);
+       data3 = malloc(pagesize);
        if (!data3)
                exit(1);
        if (read(fd, data3, pagesize) != pagesize)
@@ -2099,7 +2098,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2122,12 +2121,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2126: checking return type of signal handlers" >&5
+echo "configure:2125: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2131 "configure"
+#line 2130 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2144,7 +2143,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2163,7 +2162,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2167: checking for dlopen in -ldl" >&5
+echo "configure:2166: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2171,7 +2170,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2175 "configure"
+#line 2174 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2182,7 +2181,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2210,7 +2209,7 @@ else
 fi
 
 echo $ac_n "checking for optarg in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:2214: checking for optarg in -lgnugetopt" >&5
+echo "configure:2213: checking for optarg in -lgnugetopt" >&5
 ac_lib_var=`echo gnugetopt'_'optarg | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2218,7 +2217,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgnugetopt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2222 "configure"
+#line 2221 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2229,7 +2228,7 @@ int main() {
 optarg()
 ; return 0; }
 EOF
-if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2257,7 +2256,7 @@ else
 fi
 
 echo $ac_n "checking for _ in -lbe""... $ac_c" 1>&6
-echo "configure:2261: checking for _ in -lbe" >&5
+echo "configure:2260: checking for _ in -lbe" >&5
 ac_lib_var=`echo be'_'_ | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2265,7 +2264,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbe  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2269 "configure"
+#line 2268 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2276,7 +2275,7 @@ int main() {
 _()
 ; return 0; }
 EOF
-if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2304,7 +2303,7 @@ else
 fi
 
 echo $ac_n "checking for _ in -lgame""... $ac_c" 1>&6
-echo "configure:2308: checking for _ in -lgame" >&5
+echo "configure:2307: checking for _ in -lgame" >&5
 ac_lib_var=`echo game'_'_ | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2312,7 +2311,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgame  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2316 "configure"
+#line 2315 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2323,7 +2322,7 @@ int main() {
 _()
 ; return 0; }
 EOF
-if { (eval echo configure:2327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2351,7 +2350,7 @@ else
 fi
 
 echo $ac_n "checking for _ in -lroot""... $ac_c" 1>&6
-echo "configure:2355: checking for _ in -lroot" >&5
+echo "configure:2354: checking for _ in -lroot" >&5
 ac_lib_var=`echo root'_'_ | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2359,7 +2358,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lroot  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2363 "configure"
+#line 2362 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2370,7 +2369,7 @@ int main() {
 _()
 ; return 0; }
 EOF
-if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2398,7 +2397,7 @@ else
 fi
 
 echo $ac_n "checking for powl in -lm""... $ac_c" 1>&6
-echo "configure:2402: checking for powl in -lm" >&5
+echo "configure:2401: checking for powl in -lm" >&5
 ac_lib_var=`echo m'_'powl | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2406,7 +2405,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2410 "configure"
+#line 2409 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2417,7 +2416,7 @@ int main() {
 powl()
 ; return 0; }
 EOF
-if { (eval echo configure:2421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2445,7 +2444,7 @@ else
 fi
 
 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2449: checking for pthread_create in -lpthread" >&5
+echo "configure:2448: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2453,7 +2452,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2457 "configure"
+#line 2456 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2464,7 +2463,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2492,7 +2491,7 @@ else
 fi
 
 echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
-echo "configure:2496: checking for thread_create in -lthreads" >&5
+echo "configure:2495: checking for thread_create in -lthreads" >&5
 ac_lib_var=`echo threads'_'thread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2500,7 +2499,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2504 "configure"
+#line 2503 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2511,7 +2510,7 @@ int main() {
 thread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2540,12 +2539,12 @@ fi
 
 
 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:2544: checking for getopt_long" >&5
+echo "configure:2543: checking for getopt_long" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2549 "configure"
+#line 2548 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -2568,7 +2567,7 @@ getopt_long();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_getopt_long=yes"
 else
@@ -2595,17 +2594,17 @@ for ac_hdr in stddef.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2599: checking for $ac_hdr" >&5
+echo "configure:2598: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2604 "configure"
+#line 2603 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2635,17 +2634,17 @@ for ac_hdr in getopt.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2639: checking for $ac_hdr" >&5
+echo "configure:2638: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2644 "configure"
+#line 2643 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2675,17 +2674,17 @@ for ac_hdr in sys/sockio.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2679: checking for $ac_hdr" >&5
+echo "configure:2678: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2684 "configure"
+#line 2683 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2715,17 +2714,17 @@ for ac_hdr in fcntl.h sys/time.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2719: checking for $ac_hdr" >&5
+echo "configure:2718: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2724 "configure"
+#line 2723 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2755,17 +2754,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2759: checking for $ac_hdr" >&5
+echo "configure:2758: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2764 "configure"
+#line 2763 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2795,17 +2794,17 @@ for ac_hdr in dlfcn.h image.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2799: checking for $ac_hdr" >&5
+echo "configure:2798: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2804 "configure"
+#line 2803 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2835,17 +2834,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2839: checking for $ac_hdr" >&5
+echo "configure:2838: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2844 "configure"
+#line 2843 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2875,17 +2874,17 @@ for ac_hdr in machine/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2879: checking for $ac_hdr" >&5
+echo "configure:2878: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2884 "configure"
+#line 2883 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2916,17 +2915,17 @@ for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2920: checking for $ac_hdr" >&5
+echo "configure:2919: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2925 "configure"
+#line 2924 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2957,9 +2956,9 @@ save_CFLAGS=$CFLAGS
 
 CFLAGS="${CFLAGS} -Wall -Werror"
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:2961: checking for ntohl in sys/param.h" >&5
+echo "configure:2960: checking for ntohl in sys/param.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2963 "configure"
+#line 2962 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 void foo() { int meuh; ntohl(meuh); }
@@ -2967,7 +2966,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define NTOHL_IN_SYS_PARAM_H 1
@@ -2984,16 +2983,16 @@ rm -f conftest*
 
 CFLAGS="${CFLAGS} -rdynamic"
 echo $ac_n "checking if \$CC accepts -rdynamic""... $ac_c" 1>&6
-echo "configure:2988: checking if \$CC accepts -rdynamic" >&5
+echo "configure:2987: checking if \$CC accepts -rdynamic" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2990 "configure"
+#line 2989 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   DYNAMIC_FLAG="-rdynamic"
  echo "$ac_t""yes" 1>&6
@@ -3008,9 +3007,9 @@ rm -f conftest*
 CFLAGS=$save_CFLAGS
 
 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3012: checking for boolean_t in sys/types.h" >&5
+echo "configure:3011: checking for boolean_t in sys/types.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 3014 "configure"
+#line 3013 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 void quux() { boolean_t foo; }
@@ -3018,7 +3017,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define BOOLEAN_T_IN_SYS_TYPES_H 1
@@ -3034,18 +3033,18 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3038: checking for working const" >&5
+echo "configure:3037: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3043 "configure"
+#line 3042 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -3088,7 +3087,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3109,12 +3108,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3113: checking for ANSI C header files" >&5
+echo "configure:3112: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3118 "configure"
+#line 3117 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3122,7 +3121,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3139,7 +3138,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3143 "configure"
+#line 3142 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3157,7 +3156,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3161 "configure"
+#line 3160 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3178,7 +3177,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
+#line 3181 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3189,7 +3188,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3213,12 +3212,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3217: checking for size_t" >&5
+echo "configure:3216: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3222 "configure"
+#line 3221 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3246,12 +3245,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3250: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3249: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3255 "configure"
+#line 3254 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3260,7 +3259,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3292,17 +3291,17 @@ for ac_hdr in sys/ioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3296: checking for $ac_hdr" >&5
+echo "configure:3295: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3301 "configure"
+#line 3300 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3327,17 +3326,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3331: checking for $ac_hdr" >&5
+echo "configure:3330: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3336 "configure"
+#line 3335 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3364,7 +3363,7 @@ fi
 done
 
    cat > conftest.$ac_ext <<EOF
-#line 3368 "configure"
+#line 3367 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -3443,7 +3442,6 @@ if test x$host_os = xbeos; then
 else
 
 GVLC=0
-KVLC=0
 
 # Check whether --enable-dummy or --disable-dummy was given.
 if test "${enable_dummy+set}" = set; then
@@ -3534,10 +3532,16 @@ if test "${enable_ncurses+set}" = set; then
   if test x$enable_ncurses = xyes; then PLUGINS=${PLUGINS}"ncurses "; fi
 fi
 
+# Check whether --enable-qt or --disable-qt was given.
+if test "${enable_qt+set}" = set; then
+  enableval="$enable_qt"
+  if test x$enable_qt = xyes; then PLUGINS=${PLUGINS}"qt "; ALIASES=${ALIASES}"qvlc "; fi
+fi
+
 # Check whether --enable-kde or --disable-kde was given.
 if test "${enable_kde+set}" = set; then
   enableval="$enable_kde"
-  if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; KVLC=1; fi
+  if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; ALIASES=${ALIASES}"kvlc "; fi
 fi
 
 # Check whether --enable-gnome or --disable-gnome was given.
@@ -3566,17 +3570,17 @@ if test "${enable_alsa+set}" = set; then
   enableval="$enable_alsa"
   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
-echo "configure:3570: checking for sys/asoundlib.h" >&5
+echo "configure:3574: checking for sys/asoundlib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3575 "configure"
+#line 3579 "configure"
 #include "confdefs.h"
 #include <sys/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3593,7 +3597,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:3597: checking for main in -lasound" >&5
+echo "configure:3601: checking for main in -lasound" >&5
 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3601,14 +3605,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3605 "configure"
+#line 3609 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3638,7 +3642,6 @@ fi
 
 
 if test x$GVLC = x1 ; then ALIASES=${ALIASES}"gvlc "; fi
-if test x$KVLC = x1 ; then ALIASES=${ALIASES}"kvlc "; fi
 
 fi
 
index c8a3d616fc6018bd7af2adebf5bdafd79498a94e..5d826eaf8759e3fd696b2eafe2e6bb58e21fbeaa 100644 (file)
@@ -148,7 +148,6 @@ dnl default case
 else
 
 GVLC=0
-KVLC=0
 
 AC_ARG_ENABLE(dummy,
   [  --disable-dummy         dummy module (default enabled)])
@@ -209,9 +208,12 @@ AC_ARG_WITH(glide,
 AC_ARG_ENABLE(ncurses,
   [  --enable-ncurses        ncurses interface support (default disabled)],
   [if test x$enable_ncurses = xyes; then PLUGINS=${PLUGINS}"ncurses "; fi])
+AC_ARG_ENABLE(qt,
+  [  --enable-qt             Qt interface support (default disabled)],
+  [if test x$enable_qt = xyes; then PLUGINS=${PLUGINS}"qt "; ALIASES=${ALIASES}"qvlc "; fi])
 AC_ARG_ENABLE(kde,
   [  --enable-kde            KDE interface support (default disabled)],
-  [if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; KVLC=1; fi])
+  [if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; ALIASES=${ALIASES}"kvlc "; fi])
 AC_ARG_ENABLE(gnome,
   [  --enable-gnome          Gnome interface support (default disabled)],
   [if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"gnome "; GVLC=1; fi])
@@ -227,7 +229,6 @@ AC_ARG_ENABLE(alsa,
   [if test x$enable_alsa = xyes; then AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false") if test $have_alsa = true; then PLUGINS=${PLUGINS}"alsa "; fi; fi])
 
 if test x$GVLC = x1 ; then ALIASES=${ALIASES}"gvlc "; fi
-if test x$KVLC = x1 ; then ALIASES=${ALIASES}"kvlc "; fi
 
 fi
 
index b45def20ef12e83e8c08c2e25cad9aae013d76cf..6fff0b0bc2c2ad85b30365605dfcd000d5894f7d 100644 (file)
@@ -1,3 +1,9 @@
+vlc (0.2.63-3) unstable; urgency=low
+
+  * Added versioned conflicts/replaces to vlc-gtk (Closes: #88796).
+
+ -- Samuel Hocevar <sam@zoy.org>  Wed,  7 Mar 2001 20:47:48 +0100
+
 vlc (0.2.63-2) unstable; urgency=low
 
   * Glide shouldn't cause any non-x86 problems anymore (Closes: #88583).
index c2b32eb01d6a187616295294372c92ce93efe9aa..ec5c3697013754f9256c1b2e4caf327bd3bc4192 100644 (file)
@@ -1,3 +1,15 @@
+vlc-css (0.2.63-3) unstable; urgency=low
+
+  * New vlc package.
+
+ -- Samuel Hocevar <sam@zoy.org>  Wed,  7 Mar 2001 20:47:48 +0100
+
+vlc-css (0.2.63-2) unstable; urgency=low
+
+  * Fixed versioned dependencies against vlc.
+
+ -- Samuel Hocevar <sam@zoy.org>  Mon,  5 Mar 2001 21:37:19 +0100
+
 vlc-css (0.2.63-1) unstable; urgency=low
 
   * New upstream release.
index 64187b21dd696ef9f30d22264b0428be3e4b0e7b..6ea38a576ecbe76646e14dd39d4987c50a4556de 100644 (file)
@@ -26,6 +26,8 @@ Description: Gnome plugin for the VideoLAN Client
 Package: vlc-gtk
 Architecture: any
 Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
+Replaces: vlc-gnome (<= 0.2.63-2)
+Conflicts: vlc-gnome (<= 0.2.63-2)
 Description: Gtk+ plugin for the VideoLAN Client
  VideoLAN is a free MPEG, MPEG2 and DVD software solution.
  .
@@ -73,3 +75,19 @@ Description: Glide plugin for the VideoLAN Client
  VideoLAN is a free MPEG, MPEG2 and DVD software solution.
  .
  This is a Glide (3dfx) plugin for the VideoLAN Client.
+
+Package: vlc-qt
+Architecture: any
+Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
+Description: Qt plugin for the VideoLAN Client
+ VideoLAN is a free MPEG, MPEG2 and DVD software solution.
+ .
+ This plugin adds a Qt interface to the VideoLAN Client.
+
+Package: vlc-kde
+Architecture: any
+Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
+Description: KDE plugin for the VideoLAN Client
+ VideoLAN is a free MPEG, MPEG2 and DVD software solution.
+ .
+ This plugin adds a KDE interface to the VideoLAN Client.
index 7e2dcc9169e43c31535e5523eeb25c649c407427..efbc855877f67380deb8860ff4f7036b0864a8d4 100644 (file)
@@ -7,7 +7,7 @@ Standards-Version: 3.0.1
 
 Package: vlc-css
 Architecture: any
-Depends: ${shlibs:Depends}, vlc
+Depends: ${shlibs:Depends}, vlc (= ${Source-Version})
 Description: CSS plugin for the VideoLAN Client
  VideoLAN is a free MPEG, MPEG2 and DVD software solution.
  .
index 4e5670295b5ec10aef1b4a2a74ad9103e0230742..f3d0d2fbd9b3e72ae9f52189afd16a10a119b55b 100755 (executable)
@@ -18,13 +18,13 @@ build-stamp:
                --infodir=\$${prefix}/share/info \
                --enable-gnome --enable-gtk --enable-fb --with-glide \
                --with-ggi --with-sdl --enable-esd --enable-alsa \
-               --disable-ppro ; \
+               --with-qt --with-kde --disable-ppro ; \
        else \
        ./configure --prefix=/usr \
                --mandir=\$${prefix}/share/man \
                --infodir=\$${prefix}/share/info \
                --enable-gnome --enable-gtk --enable-fb --with-ggi \
-               --with-sdl --enable-esd --enable-alsa; \
+               --with-qt --with-kde --with-sdl --enable-esd --enable-alsa; \
        fi
 
        $(MAKE)
@@ -49,7 +49,12 @@ install: build
        DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
 
        # make symlinks for packages
-       for alias in ggi gtk gnome glide esd sdl alsa ; do \
+       if [ $(DEB_BUILD_ARCH) = i386 ]; then \
+               $$aliases="ggi gtk gnome glide esd sdl alsa qt kde" ; \
+       else \
+               $$aliases="ggi gtk gnome esd sdl alsa qt kde" ; \
+       fi ; \
+       for alias `echo $$aliases` ; do \
                mkdir -p debian/vlc-$$alias/usr/share/doc/ ; \
                ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \
                mkdir -p debian/vlc-$$alias/usr/lib/videolan/vlc/ ; \
@@ -59,12 +64,22 @@ install: build
 
        mkdir -p debian/vlc-gtk/usr/bin/
        mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/
+       mkdir -p debian/vlc-kde/usr/bin/
+       mv debian/vlc/usr/bin/kvlc debian/vlc-kde/usr/bin/
+       mkdir -p debian/vlc-qt/usr/bin/
+       mv debian/vlc/usr/bin/qvlc debian/vlc-qt/usr/bin/
+
        mkdir -p debian/vlc-gtk/usr/share/videolan/
        mv debian/vlc/usr/share/videolan/gvlc.png \
                debian/vlc/usr/share/videolan/gvlc.xpm \
                        debian/vlc-gtk/usr/share/videolan/
+
        mkdir -p debian/vlc-gtk/usr/share/man/man1/
        ln -s vlc.1.gz debian/vlc-gtk/usr/share/man/man1/gvlc.1.gz
+       mkdir -p debian/vlc-kde/usr/share/man/man1/
+       ln -s vlc.1.gz debian/vlc-kde/usr/share/man/man1/kvlc.1.gz
+       mkdir -p debian/vlc-qt/usr/share/man/man1/
+       ln -s vlc.1.gz debian/vlc-qt/usr/share/man/man1/qvlc.1.gz
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -83,10 +98,10 @@ binary-arch: build install
 #      dh_installpam
 #      dh_installinit
        dh_installcron
-       dh_installmanpages -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
+       dh_installmanpages -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa -Nvlc-qt -Nvlc-kde doc/vlc.1
        dh_installinfo
 #      dh_undocumented
-       dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
+       dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa -Nvlc-qt -Nvlc-kde
        dh_link
        dh_strip
        dh_compress
diff --git a/doc/bugs b/doc/bugs
deleted file mode 100644 (file)
index b58f991..0000000
--- a/doc/bugs
+++ /dev/null
@@ -1,28 +0,0 @@
-* interface :
-  + il semble que si l'on envoie 2 messages de logs l'un immediatement
-    apres l'autre, le 2e ne soit jamais affiche (cf debut du DemuxPES)
-  + l'envoi repeté de commandes dans la console provoque un segfault
-    - ce bug est du Ã  la xconsole, qu'il faudra de toute manière
-      reprogrammer avec un widget quelconque (je recommande wx, qui est
-      portable, mais moche il est vrai), donc je vais pas me casser Ã  le
-      corriger (Ptyx)
-    - vérifier qu'il est bien du Ã  xconsole et non Ã  intf_ExecCommand :-\
-      (Ptyx)
-
-* video_output/X11 :
-  + quand une XShmImage n'a jamais Ã©té affichée, la fermer provoque une
-    erreur (fatale ?) du serveur -> plantage de vout_thread
-  + erreur lors de la fermeture 'brutale' de la fenêtre
-    - en cours de correction - j'ai trouvé comment signaler au WM qu'une
-      fenêtre est capable de se fermer propremenet sur un ClientMessage,
-      mais pas encore comment intercepter ce ClientMessage :-\ (Ptyx)
-
-* input :
-  + lorsque le vlc est appelé avec --novideo, le son n'est pas joué, bien
-    que décodé... parce que la synchro ou l'input n'envoie pas de date Ã 
-    l'audio decoder... parce que les PCRs sont contenus dans la partie
-    video... solution : traiter TOUS les TS, afin de pouvoir récupérer les
-    PCRs (MaXX)
-
-* ac3_decoder :
-  + Ã©viter le SIGSEGV lorsque le décodeur se mange du garbage (MaXX)
diff --git a/doc/headers b/doc/headers
deleted file mode 100644 (file)
index 0fa4413..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-Schéma de dépendance des headers et règles d'écriture
-=====================================================
-
-Ce document décrit les dépendances entre les différents headers utilisés
-par le projet, ainsi que l'ordre dans lequel ils devraient Ãªtre appelés.
-La totalité de ces headers, dans l'ordre, est regroupé dans le fichier
-"all.h", pour faciliter la mise en place de nouvelles structures.
-
-Les headers inscrits entre parenthèses sont nécessaires indirectement.
-
-Merci de maintenir ce fichier Ã  jour.
-
-Headers systèmes (appelés par ordre de repertoire et alphabetique)
-------------------------------------------------------------------
-
-#include <pthread.h>
-#include <netinet/in.h>
-#include <sys/soundcard.h>
-#include <sys/uio.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XShm.h>
-#include <X11/xpm.h>
-
-Headers communs
----------------
-
-#include "config.h"
-#include "common.h"         -> may depend of "config.h"
-#include "mtime.h"
-#include "netutils.h"       -> <netinet/in.h>
-#include "xutils.h"         -> <X11/Xlib.h>
-
-
-Input
------
-
-#include "input.h"          -> <pthread.h>, <sys/uio.h>, "config.h", "common.h"
-#include "input_vlan.h"     -> <pthread>, <netinet/in.h>
-#include "decoder_fifo.h"   -> <pthread.h>, (<sys/uio.h>), ("config.h"), ("common.h"), "input.h"
-#include "netlist.h"        -> <prhtread.h>, (<sys/uio.h>), "config.h", ("common.h"), "input.h" 
-#include "pcr.h"            -> (<pthread.h>), (<sys/uio.h>), ("config.h"), ("common.h"), "input.h"
-#include "psi.h"            -> (<pthread.h>), (<sys/uio.h>), ("config.h"), ("common.h"), "input.h"
-
-Audio
------
-
-#include "audio_decoder.h"  -> *le néant :)*
-#include "audio_output.h"   -> <pthread.h>, <sys/soundcard.h>, "config.h", "common.h", "mtime.h"
-#include "audio_dsp.h"      -> (<pthread.h>), (<sys/soundcard.h>), ("config.h"), ("common.h"), 
-                                ("mtime.h"), "audio_output.h"
-
-Video
------
-
-#include "video.h"          -> ("config.h"), "common.h", "mtime.h"
-#include "video_graphics.h" -> ("config.h"), ("common.h"), ("mtime.h"), "video.h"
-#include "video_output.h"   -> <pthread.h>, "config.h", "common.h", ("mtime.h"), "video.h"
-#include "video_x11.h"      -> (<pthread.h>) <X11/Xlib.h>, <X11/extensions/XShm.h>,
-                                ("config.h"), ("common.h"), ("mtime.h"), "video.h", "video_output.h"
-#include "video_decoder.h"  -> <pthread.h>, (<sys/uio.h>), ("config.h"), "common.h", ("mtime.h"), 
-                                "input.h", "decoder_fifo.h", ("video.h"), "video_output.h"
-
-Interface
----------
-
-#include "xconsole.h"       -> <X11/Xlib.h>, "config.h"
-#include "interface.h"      -> (<pthread.h>), (<sys/uio.h>), (<X11/Xlib.h>), 
-                                (<X11/extensions/XShm.h>), "config.h", "common.h", ("mtime.h"),
-                                "input.h", ("video.h"), "video_output.h", "xconsole.h"
-#include "intf_msg.h"       -> <pthread.h>, "config.h", "common.h", "mtime.h"
-#include "intf_cmd.h"
-#include "control.h"        -> ??
-#include "intf_ctrl.h"      -> "intf_cmd.h"
-
-Ressources partagées
---------------------
-
-#include "pgm_data.h"       -> (<pthread.h>), (<netinet/in.h>), (<sys/soundcard.h>), (<sys/uio.h>),  
-                                (<X11/Xlib.h>),  
-                                (<X11/extensions/XShm.h>), ("config.h"), "common.h", ("mtime.h"), 
-                                "input.h", "input_vlan.h", "audio_output.h" , "video.h", 
-                                ("video_output.h"), "xconsole.h", "interface.h", "intf_msg.h"
-
-Autres headers, qui sont condamnés Ã  disparaitre ou ne sont pas utilisés
-------------------------------------------------------------------------
-
-#include "network.h"    illisible, uniquement utilisé dans network.c
-#include "rsc_files.h"
-xconsole will also change
-
-
-
-
-
-
-
diff --git a/doc/portage b/doc/portage
deleted file mode 100644 (file)
index ca4746c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-FreeBSD:
-    -#ifdef __FreeBSD__
-    -remplacer les sys/soundcard.h par machine/soundcard.c
-    -problème avec getopt
-
-LinuxPPC:
-    -problème avec la libpthreads ? (ou avec le serveur X ?)
diff --git a/doc/vlan-server b/doc/vlan-server
deleted file mode 100644 (file)
index 7cbd96e..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-Vlan server protocol and library *draft*
-========================================
-
-telnet-based protocol. Client commands are text, server responses are numbers followed by
-an explicative text (like irc). Common messages number should probalbly be grouped.
-
-Two different notions: session and connexion
-    session has a long timeout (several hours), and should not use server-side resources
-    connexion has a short timeout (a few minutes) and can use server-side resources (thread)
-
-A vlan resource (switch+port) is identified by a unique id. Changes can obviously be done
-with this id, but also, for administrative facilities, with other identifiers.
-
-Client commands:
-
-LOGIN <login> [<application>]
-    -> open connexion, required before any communication with server. Login and password should
-    correspond to groups (admin, users...) rather than individual ids. Application is for stats.
-    answers:    100: ok
-                101: rejected, invalid login
-                102: rejected, too many connexions
-                103: rejected, forbidden source 
-                104: rejected, already logged in
-                109: rejected, other reason    
-                password required
-
-PASS <password>
-
-LOGOUT -> close connexion
-    answer:     200: ok, session closed
-
-OPEN <client-session-id>
-    -> open session. required before any write operations
-    answers:    300: <server-session-id>
-                301: rejected, not authorized
-                302: rejected, too many sessions
-                399: rejected, other reason
-
-RECOVER <client-session-id> <server-session-id>
-    -> recover session. Both id are required for security.
-    answer:     400: ok
-                401: rejected, not authorized (invalid login or something else)
-                402: rejected, invalid ids
-                403: rejected, session already active on another connexion
-                499: rejected, other reason
-
-CLOSE [<server-session-id>]
-    -> close session. Session must be active for normal users.
-    answer:     500: ok, session closed
-                501: error, not loged in
-                502: error: active session
-                503: error: not authorized
-
-STATUS ME
-STATUS MAC <mac>
-STATUS IP <ip>
-STATUS ID <rsc-id>
-    give informations about something
-    answer:     600: mark beginning of status info
-                601: mark end of status info
-                602: error, not authorized
-                603: error, unknown
-                604: error, request failed             
-                610: <rsc-id>
-                611: <vlan>
-                612: <ip>
-                613: <mac>
-                614: <switch-ip>
-                615: <switch-port>
-                616: <number of interfaces dependant of this resource>
-                617: <lock info>
-                699: error, other reason
-
-LOCK ME
-LOCK MAC <mac>
-LOCK IP <ip>
-LOCK ID <rsc-id>
-    lock a resource id (session required)
-    answers:
-     
-UNLOCK ME
-UNLOCK MAC <mac>
-UNLOCK IP <ip>
-UNLOCK ID <id>
-    unlock a resource id (session required)
-    answers:
-
-CHANGE ME <vlan>
-CHANGE MAC <mac> <vlan>
-CHANGE IP <ip> <vlan>
-CHANGE ID <id> <vlan>
-    change a vlan (session required)
-
-Administrative commands:
-
-HELP
-    print list of commands
-    answer:     
-
-KICK
-
-RESET
-
-LIST IDS
-LIST MACS
-LIST IPS
-LIST SESSIONS
-LIST CONNECTIONS
-LIST LOGINS
-
-QUIT
-
-CONFIRM
-
-
-
similarity index 94%
rename from debian/vlc.1
rename to doc/vlc.1
index 6441a596fe52735c59f1160091a06635abbeacb2..3015c2007a8bff93cc45beb5798332c88e51e507 100644 (file)
+++ b/doc/vlc.1
@@ -2,7 +2,7 @@
 .\" First parameter, NAME, should be all caps
 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
 .\" other parameters are allowed: see man(7), man(1)
-.TH VLC 1 "August 15, 2000"
+.TH VLC 1 "March 10, 2001"
 .\" Please adjust this date whenever revising the manpage.
 .\"
 .\" Some roff macros, for reference:
@@ -16,7 +16,7 @@
 .\" .sp <n>    insert n+1 empty lines
 .\" for manpage-specific macros, see man(7)
 .SH NAME
-vlc, gvlc, kvlc \- The VideoLAN Client
+vlc, gvlc, kvlc, qvlc \- The VideoLAN Client
 .SH SYNOPSIS
 .B vlc
 .RI [ OPTIONS ]
@@ -25,15 +25,15 @@ vlc, gvlc, kvlc \- The VideoLAN Client
 .SH DESCRIPTION
 This manual page documents briefly the
 .B vlc
-, a free MPEG2 player.
+, a free MPEG, MPEG2 and DVD player.
 .SH OPTIONS
 .B vlc
 follows the usual GNU command line syntax, with long
 options starting with two dashes (`-').
 A summary of options is included below.
 .TP
-.B \-\-intf <module>
-Specify an interface module: "gnome", "curses", "shell", for instance.
+.B \-I, \-\-intf <module>
+Specify an interface module: "gnome", "curses", "qt", for instance.
 .TP
 .B \-\-warning <level>
 Select the warning level. 0 is the most verbose, 3 is almost mute.
@@ -41,7 +41,7 @@ Select the warning level. 0 is the most verbose, 3 is almost mute.
 .B \-\-noaudio
 Disable audio output.
 .TP
-.B \-\-aout <module>
+.B \-A, \-\-aout <module>
 Specify an audio output module: "dsp", "esd", for instance.
 .TP
 .B \-\-stereo, \-\-mono
@@ -50,7 +50,7 @@ Choose stereo or mono audio output
 .B \-\-novideo
 Disable video output.
 .TP
-.B \-\-vout <module>
+.B \-V, \-\-vout <module>
 Specify a video output module: "x11", "sdl", "fb", for instance.
 .TP
 .B \-\-motion <module>
@@ -88,7 +88,7 @@ heuristics based on CPU usage.
 displays I and P images and every second B image, and `IPB' forces
 displaying of all images.
 
-Note that vlc is certainly going to crash if you ask it to
+Note that vlc is not guaranteed to behave properly if you ask it to
 display more images than your CPU can cope with.
 .TP
 .B \-t, \-\-dvdtitle <title>
similarity index 82%
rename from include/intf_plst.h
rename to include/intf_playlist.h
index 35144a455b809af1686838499d4254e055920bda..86d4c7dd0e6d3d48db1c43c5ef9bd680ad0885bf 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * intf_plst.h : Playlist functions
+ * intf_playlist.h : Playlist functions
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
  *
@@ -51,7 +51,7 @@ typedef struct playlist_s
     playlist_item_t*      p_item;
 } playlist_t;
 
-/* Used by intf_PlstAdd */
+/* Used by intf_PlaylistAdd */
 #define PLAYLIST_START            0
 #define PLAYLIST_END             -1
 
@@ -67,13 +67,13 @@ typedef struct playlist_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-playlist_t * intf_PlstCreate   ( void );
-void         intf_PlstInit     ( playlist_t * p_playlist );
-int          intf_PlstAdd      ( playlist_t * p_playlist,
-                                 int i_pos, char * psz_item );
-int          intf_PlstDelete  ( playlist_t * p_playlist,
-                                 int i_pos );
-void         intf_PlstNext     ( playlist_t * p_playlist );
-void         intf_PlstPrev     ( playlist_t * p_playlist );
-void         intf_PlstDestroy  ( playlist_t * p_playlist );
-void         intf_PlstJumpto   ( playlist_t * p_playlist , int i_pos);
+playlist_t * intf_PlaylistCreate   ( void );
+void         intf_PlaylistInit     ( playlist_t * p_playlist );
+int          intf_PlaylistAdd      ( playlist_t * p_playlist,
+                                     int i_pos, const char * psz_item );
+int          intf_PlaylistDelete   ( playlist_t * p_playlist, int i_pos );
+void         intf_PlaylistNext     ( playlist_t * p_playlist );
+void         intf_PlaylistPrev     ( playlist_t * p_playlist );
+void         intf_PlaylistDestroy  ( playlist_t * p_playlist );
+void         intf_PlaylistJumpto   ( playlist_t * p_playlist , int i_pos);
+
index 803162b7a99292ace445fc5492e80e755733d456..c7649c2c272d0db542025fa0d9ddee27f42d5289 100644 (file)
@@ -3,7 +3,7 @@
  * This header describes miscellanous utility functions shared between several
  * modules.
  *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
+ * Copyright (C) 1999, 2000, 2001 VideoLAN
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Henri Fallon <henri@videolan.org>
@@ -26,5 +26,6 @@
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-int input_BuildLocalAddr( struct sockaddr_in *, int, boolean_t ); 
-int input_BuildRemoteAddr(struct sockaddr_in *, char * );
+int network_BuildLocalAddr ( struct sockaddr_in *, int, boolean_t ); 
+int network_BuildRemoteAddr( struct sockaddr_in *, char * );
+
index 47bc8b1a2751bdc5b5afb41410c8f4e263f10fff..c6bd76183bd3252b6f70c785771ee274fd13a030 100644 (file)
@@ -3,7 +3,7 @@
  *****************************************************************************
  * Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN
  *
- * Authors:
+ * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index c37ba6063ac948f29e5fadb4a06aee4def10cb0c..17559bad3368e0b19fd375e12264b1d3440a4872 100644 (file)
@@ -2,7 +2,7 @@
  * intf_beos.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: intf_beos.cpp,v 1.19 2001/03/07 16:32:59 richards Exp $
+ * $Id: intf_beos.cpp,v 1.20 2001/03/15 01:42:19 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -76,7 +76,7 @@ extern "C"
 #include "input_ext-intf.h"
 
 #include "interface.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 #include "intf_msg.h"
 #include "audio_output.h"
 #include "MsgVals.h"
@@ -263,7 +263,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
            if(p_message->FindString("device", device) != B_ERROR)
                {
                sprintf(device_method_and_name, "dvd:%s", *device); 
-               intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, device_method_and_name );
+               intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, device_method_and_name );
                }
        break;
 
@@ -387,8 +387,8 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
             if( p_message->FindRef( "refs", &ref ) == B_OK )
             {
                 BPath path( &ref );
-                char * psz_name = strdup(path.Path());
-                intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, psz_name );
+                intf_PlaylistAdd( p_main->p_playlist,
+                                  PLAYLIST_END, path.Path() );
             }
 
         }
index 67465adef89deffd4682a71490d32f08854505a6..6e38331af15244c2177867532f7c57d9b29f13cc 100644 (file)
 #include "input_ext-intf.h"
 
 #include "interface.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 #include "intf_msg.h"
 
-#include "gnome_sys.h"
 #include "gnome_callbacks.h"
 #include "gnome_interface.h"
 #include "gnome_support.h"
+#include "intf_gnome.h"
 
 #include "main.h"
 
@@ -58,9 +58,112 @@ static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent )
                                  "p_intf" ) );
 }
 
+
+/*****************************************************************************
+ * Interface callbacks
+ *****************************************************************************
+ * The following callbacks are related to the main interface window.
+ *****************************************************************************/
+void
+on_intf_window_destroy                 (GtkObject       *object,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_window" );
+
+    vlc_mutex_lock( &p_intf->change_lock );
+    p_intf->b_die = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
+}
+
+
+gboolean
+on_slider_button_press_event           (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
+
+    vlc_mutex_lock( &p_intf->change_lock );
+    p_intf->p_sys->b_slider_free = 0;
+    vlc_mutex_unlock( &p_intf->change_lock );
+
+    return FALSE;
+}
+
+
+gboolean
+on_slider_button_release_event         (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
+
+    vlc_mutex_lock( &p_intf->change_lock );
+    p_intf->p_sys->b_slider_free = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
+
+    return FALSE;
+}
+
+
+void
+on_intf_window_drag_data_received      (GtkWidget       *widget,
+                                        GdkDragContext  *drag_context,
+                                        gint             x,
+                                        gint             y,
+                                        GtkSelectionData *data,
+                                        guint            info,
+                                        guint            time,
+                                        gpointer         user_data)
+{
+    char *psz_text = data->data;
+    int i_len      = strlen( psz_text );
+
+    switch( info )
+    {
+    case DROP_ACCEPT_TEXT_PLAIN: /* FIXME: handle multiple files */
+
+        if( i_len < 1 )
+        {
+            return;
+        }
+
+        /* get rid of ' ' at the end */
+        *( psz_text + i_len - 1 ) = 0;
+
+        intf_WarnMsg( 1, "intf: dropped text/uri-list data `%s'", psz_text );
+        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
+
+        break;
+
+    case DROP_ACCEPT_TEXT_URI_LIST: /* FIXME: handle multiple files */
+
+        if( i_len < 2 )
+        {
+            return;
+        }
+
+        /* get rid of \r\n at the end */
+        *( psz_text + i_len - 2 ) = 0;
+
+        intf_WarnMsg( 1, "intf: dropped text/uri-list data `%s'", psz_text );
+        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
+        break;
+
+    default:
+
+        intf_ErrMsg( "intf error: unknown dropped type");
+        break;
+    }
+}
+
+
 /*****************************************************************************
- * Callbacks
- ******************************************************************************/
+ * Menubar callbacks
+ *****************************************************************************
+ * The following callbacks are related to the menubar of the main
+ * interface window.
+ *****************************************************************************/
 void
 on_menubar_open_activate               (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
@@ -80,13 +183,37 @@ on_menubar_open_activate               (GtkMenuItem     *menuitem,
 }
 
 
+void
+on_menubar_disc_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+
+    gtk_widget_show( p_intf->p_sys->p_disc );
+    gdk_window_raise( p_intf->p_sys->p_disc->window );
+}
+
+
+void
+on_menubar_network_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+
+    gtk_widget_show( p_intf->p_sys->p_network );
+    gdk_window_raise( p_intf->p_sys->p_network->window );
+}
+
+
 void
 on_menubar_exit_activate               (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
 
+    vlc_mutex_lock( &p_intf->change_lock );
     p_intf->b_die = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
 }
 
 
@@ -107,6 +234,75 @@ on_menubar_playlist_activate           (GtkMenuItem     *menuitem,
 }
 
 
+void
+on_menubar_audio_toggle                (GtkCheckMenuItem     *menuitem,
+                                        gpointer              user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+    es_descriptor_t *       p_es;
+
+    p_es = (es_descriptor_t*)user_data;
+
+    input_ChangeES( p_intf->p_input, p_es, 1 );
+}
+
+
+void
+on_menubar_subtitle_toggle             (GtkCheckMenuItem     *menuitem,
+                                        gpointer              user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+    es_descriptor_t *       p_es;
+
+    p_es = (es_descriptor_t*)user_data;
+
+    input_ChangeES( p_intf->p_input, p_es, 2 );
+}
+
+
+void
+on_menubar_title_toggle                (GtkCheckMenuItem     *menuitem,
+                                        gpointer              user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+
+    p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)user_data );
+    p_intf->p_sys->b_menus_update = 1;
+    input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
+}
+
+
+void
+on_menubar_chapter_toggle              (GtkCheckMenuItem     *menuitem,
+                                        gpointer              user_data)
+{
+    intf_thread_t * p_intf    = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+    input_area_t *  p_area    = p_intf->p_input->stream.p_selected_area;
+    gint            i_chapter = (gint)user_data;
+
+    p_area->i_part = i_chapter;
+
+    p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+    input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
+}
+
+void
+on_menubar_modules_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+
+    if( !GTK_IS_WIDGET( p_intf->p_sys->p_modules ) )
+    {
+        p_intf->p_sys->p_modules = create_intf_modules();
+        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_modules ),
+                             "p_intf", p_intf );
+    }
+    gtk_widget_show( p_intf->p_sys->p_modules );
+    gdk_window_raise( p_intf->p_sys->p_modules->window );
+}
+
+
 void
 on_menubar_preferences_activate        (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
@@ -132,6 +328,12 @@ on_menubar_about_activate              (GtkMenuItem     *menuitem,
 }
 
 
+/*****************************************************************************
+ * Toolbar callbacks
+ *****************************************************************************
+ * The following callbacks are related to the toolbar of the main
+ * interface window.
+ *****************************************************************************/
 void
 on_toolbar_open_clicked                (GtkButton       *button,
                                         gpointer         user_data)
@@ -151,6 +353,28 @@ on_toolbar_open_clicked                (GtkButton       *button,
 }
 
 
+void
+on_toolbar_disc_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+
+    gtk_widget_show( p_intf->p_sys->p_disc );
+    gdk_window_raise( p_intf->p_sys->p_disc->window );
+}
+
+
+void
+on_toolbar_network_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+
+    gtk_widget_show( p_intf->p_sys->p_network );
+    gdk_window_raise( p_intf->p_sys->p_network->window );
+}
+
+
 void
 on_toolbar_back_clicked                (GtkButton       *button,
                                         gpointer         user_data)
@@ -193,6 +417,32 @@ on_toolbar_pause_clicked               (GtkButton       *button,
 }
 
 
+void
+on_toolbar_slow_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
+    }
+}
+
+
+void
+on_toolbar_fast_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
+    }
+}
+
+
 void
 on_toolbar_playlist_clicked            (GtkButton       *button,
                                         gpointer         user_data)
@@ -219,8 +469,8 @@ on_toolbar_prev_clicked                (GtkButton       *button,
     if( p_intf->p_input != NULL )
     {
         /* FIXME: temporary hack */
-        intf_PlstPrev( p_main->p_playlist );
-        intf_PlstPrev( p_main->p_playlist );
+        intf_PlaylistPrev( p_main->p_playlist );
+        intf_PlaylistPrev( p_main->p_playlist );
         p_intf->p_input->b_eof = 1;
     }
 }
@@ -240,6 +490,12 @@ on_toolbar_next_clicked                (GtkButton       *button,
 }
 
 
+/*****************************************************************************
+ * Popup callbacks
+ *****************************************************************************
+ * The following callbacks are related to the popup menu. The popup
+ * menu is activated when right-clicking on the video output window.
+ *****************************************************************************/
 void
 on_popup_play_activate                 (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
@@ -267,355 +523,292 @@ on_popup_pause_activate                (GtkMenuItem     *menuitem,
 
 
 void
-on_popup_exit_activate                 (GtkMenuItem     *menuitem,
+on_popup_slow_activate                 (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
 
-    p_intf->b_die = 1;
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
+    }
 }
 
 
 void
-on_intf_window_destroy                 (GtkObject       *object,
+on_popup_fast_activate                 (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_window" );
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
 
-    /* FIXME don't destroy the window, just hide it */
-    p_intf->b_die = 1;
-    p_intf->p_sys->p_window = NULL;
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
+    }
 }
 
 
 void
-on_fileopen_ok_clicked                 (GtkButton       *button,
-                                        gpointer         user_data)
+on_popup_audio_toggle                  (GtkCheckMenuItem     *menuitem,
+                                        gpointer              user_data)
 {
-    GtkWidget *filesel;
-    gchar *filename;
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+    es_descriptor_t *       p_es;
 
-    filesel = gtk_widget_get_toplevel (GTK_WIDGET (button));
-    gtk_widget_hide (filesel);
-    filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel));
+    p_es = (es_descriptor_t*)user_data;
 
-    intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, (char*)filename );
+    input_ChangeES( p_intf->p_input, p_es, 1 );
 }
 
 
 void
-on_fileopen_cancel_clicked             (GtkButton       *button,
-                                        gpointer         user_data)
+on_popup_subtitle_toggle            (GtkCheckMenuItem     *menuitem,
+                                     gpointer              user_data)
 {
-    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
-}
-
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+    es_descriptor_t *       p_es;
 
-void
-on_intf_fileopen_destroy               (GtkObject       *object,
-                                        gpointer         user_data)
-{
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_fileopen" );
+    p_es = (es_descriptor_t*)user_data;
 
-    p_intf->p_sys->p_fileopen = NULL;
+    input_ChangeES( p_intf->p_input, p_es, 2 );
 }
 
 
 void
-on_popup_open_activate                 (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
+on_popup_navigation_toggle             (GtkCheckMenuItem     *menuitem,
+                                        gpointer             user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
-
-    /* If we have never used the file selector, open it */
-    if( p_intf->p_sys->p_fileopen == NULL)
+    if( menuitem->active )
     {
-        p_intf->p_sys->p_fileopen = create_intf_fileopen();
-        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
-                             "p_intf", p_intf );
-    }
+        intf_thread_t * p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+        input_area_t *  p_area;
+        gint            i_title;
+        gint            i_chapter;
 
-    gtk_widget_show( p_intf->p_sys->p_fileopen );
-    gdk_window_raise( p_intf->p_sys->p_fileopen->window );
+        i_title   = (gint)(user_data) / 100 ;
+        i_chapter = (gint)(user_data) - ( 100 * i_title );
+
+        if( i_title != p_intf->p_input->stream.p_selected_area->i_id )
+        {
+            p_intf->p_sys->b_menus_update = 1;
+        }
+
+        p_area = p_intf->p_input->stream.pp_areas[i_title];
+        p_area->i_part = i_chapter;
+
+        p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+                input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
+    }
 }
 
 
 void
-on_popup_about_activate                (GtkMenuItem     *menuitem,
+on_popup_open_activate                 (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
 
-    if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
+    /* If we have never used the file selector, open it */
+    if( p_intf->p_sys->p_fileopen == NULL)
     {
-        p_intf->p_sys->p_about = create_intf_about();
-        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_about ),
+        p_intf->p_sys->p_fileopen = create_intf_fileopen();
+        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
                              "p_intf", p_intf );
     }
-    gtk_widget_show( p_intf->p_sys->p_about );
-    gdk_window_raise( p_intf->p_sys->p_about->window );
-}
-
 
-void
-on_intf_playlist_destroy               (GtkObject       *object,
-                                        gpointer         user_data)
-{
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_playlist" );
-
-    p_intf->p_sys->p_playlist = NULL;
+    gtk_widget_show( p_intf->p_sys->p_fileopen );
+    gdk_window_raise( p_intf->p_sys->p_fileopen->window );
 }
 
 
 void
-on_playlist_close_clicked              (GtkButton       *button,
+on_popup_disc_activate                 (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+
+    gtk_widget_show( p_intf->p_sys->p_disc );
+    gdk_window_raise( p_intf->p_sys->p_disc->window );
 }
 
 
 void
-on_popup_slow_activate                 (GtkMenuItem     *menuitem,
+on_popup_network_activate              (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
 
-    if( p_intf->p_input != NULL )
-    {
-        input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
-    }
+    gtk_widget_show( p_intf->p_sys->p_network );
+    gdk_window_raise( p_intf->p_sys->p_network->window );
 }
 
 
 void
-on_popup_fast_activate                 (GtkMenuItem     *menuitem,
+on_popup_about_activate                (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
 
-    if( p_intf->p_input != NULL )
+    if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
     {
-        input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
+        p_intf->p_sys->p_about = create_intf_about();
+        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_about ),
+                             "p_intf", p_intf );
     }
+    gtk_widget_show( p_intf->p_sys->p_about );
+    gdk_window_raise( p_intf->p_sys->p_about->window );
 }
 
 
 void
-on_toolbar_slow_clicked                (GtkButton       *button,
+on_popup_exit_activate                 (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
 
-    if( p_intf->p_input != NULL )
-    {
-        input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
-    }
+    vlc_mutex_lock( &p_intf->change_lock );
+    p_intf->b_die = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
 }
 
 
+/*****************************************************************************
+ * Fileopen callbacks
+ *****************************************************************************
+ * The following callbacks are related to the file requester.
+ *****************************************************************************/
 void
-on_toolbar_fast_clicked                (GtkButton       *button,
+on_intf_fileopen_destroy               (GtkObject       *object,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_fileopen" );
 
-    if( p_intf->p_input != NULL )
-    {
-        input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
-    }
+    p_intf->p_sys->p_fileopen = NULL;
 }
 
 
-gboolean
-on_hscale_button_release_event         (GtkWidget       *widget,
-                                        GdkEventButton  *event,
+void
+on_fileopen_ok_clicked                 (GtkButton       *button,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
-
-    GtkAdjustment *p_adj = gtk_range_get_adjustment( GTK_RANGE(widget) );
-    off_t i_seek;
-
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
-
-    if( p_intf->p_input != NULL )
-    {
-        i_seek = (p_adj->value *
-                  p_intf->p_input->stream.p_selected_area->i_size) / 100;
-        input_Seek( p_intf->p_input, i_seek );
-    }
-    p_intf->p_sys->b_scale_isfree = 1;
+    GtkWidget *filesel;
+    gchar *filename;
 
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+    filesel = gtk_widget_get_toplevel (GTK_WIDGET (button));
+    gtk_widget_hide (filesel);
+    filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel));
 
-    return FALSE;
+    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (char*)filename );
 }
 
 
-gboolean
-on_hscale_button_press_event           (GtkWidget       *widget,
-                                        GdkEventButton  *event,
+void
+on_fileopen_cancel_clicked             (GtkButton       *button,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
-
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
-    p_intf->p_sys->b_scale_isfree = 0;
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
-
-    return FALSE;
+    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
 }
 
 
-
+/*****************************************************************************
+ * Playlist callbacks
+ *****************************************************************************
+ * The following callbacks are related to the playlist.
+ *****************************************************************************/
 void
-on_intf_modules_destroy                (GtkObject       *object,
+on_intf_playlist_destroy               (GtkObject       *object,
                                         gpointer         user_data)
 {
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_playlist" );
 
+    p_intf->p_sys->p_playlist = NULL;
 }
 
 
 void
-on_modules_ok_clicked                  (GtkButton       *button,
+on_playlist_ok_clicked                 (GtkButton       *button,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_modules" );
-
-    gtk_widget_hide( p_intf->p_sys->p_modules );
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_playlist" );
 
+    gtk_widget_hide( p_intf->p_sys->p_playlist );
 }
 
 
 void
-on_modules_apply_clicked               (GtkButton       *button,
+on_playlist_close_clicked              (GtkButton       *button,
                                         gpointer         user_data)
 {
-
+    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
 }
 
 
+
+/*****************************************************************************
+ * Module manager callbacks
+ *****************************************************************************
+ * The following callbacks are related to the module manager.
+ *****************************************************************************/
 void
-on_modules_cancel_clicked              (GtkButton       *button,
+on_intf_modules_destroy                (GtkObject       *object,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_modules" );
 
-    gtk_widget_hide( p_intf->p_sys->p_modules );
 }
 
 
 void
-on_playlist_ok_clicked                 (GtkButton       *button,
+on_modules_ok_clicked                  (GtkButton       *button,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_playlist" );
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_modules" );
 
-    gtk_widget_hide( p_intf->p_sys->p_playlist );
+    gtk_widget_hide( p_intf->p_sys->p_modules );
 }
 
 
 void
-on_menubar_modules_activate            (GtkMenuItem     *menuitem,
+on_modules_apply_clicked               (GtkButton       *button,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
 
-    if( !GTK_IS_WIDGET( p_intf->p_sys->p_modules ) )
-    {
-        p_intf->p_sys->p_modules = create_intf_modules();
-        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_modules ),
-                             "p_intf", p_intf );
-    }
-    gtk_widget_show( p_intf->p_sys->p_modules );
-    gdk_window_raise( p_intf->p_sys->p_modules->window );
 }
 
 
 void
-on_intf_window_drag_data_received      (GtkWidget       *widget,
-                                        GdkDragContext  *drag_context,
-                                        gint             x,
-                                        gint             y,
-                                        GtkSelectionData *data,
-                                        guint            info,
-                                        guint            time,
+on_modules_cancel_clicked              (GtkButton       *button,
                                         gpointer         user_data)
 {
-    char *psz_text = data->data;
-    int i_len      = strlen( psz_text );
-
-    switch( info )
-    {
-    case DROP_ACCEPT_TEXT_PLAIN: /* FIXME: handle multiple files */
-
-        if( i_len < 1 )
-        {
-            return;
-        }
-
-        /* get rid of ' ' at the end */
-        *( psz_text + i_len - 1 ) = 0;
-
-        intf_WarnMsg( 1, "intf: dropped text/uri-list data `%s'", psz_text );
-        intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
-
-        break;
-
-    case DROP_ACCEPT_TEXT_URI_LIST: /* FIXME: handle multiple files */
-
-        if( i_len < 2 )
-        {
-            return;
-        }
-
-        /* get rid of \r\n at the end */
-        *( psz_text + i_len - 2 ) = 0;
-
-        intf_WarnMsg( 1, "intf: dropped text/uri-list data `%s'", psz_text );
-        intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
-        break;
-
-    default:
-
-        intf_ErrMsg( "intf error: unknown dropped type");
-        break;
-    }
+    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
 }
 
 
+/*****************************************************************************
+ * Open disc callbacks
+ *****************************************************************************
+ * The following callbacks are related to the disc manager.
+ *****************************************************************************/
 void
-on_menubar_disc_activate               (GtkMenuItem     *menuitem,
+on_disc_dvd_toggled                    (GtkToggleButton *togglebutton,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
-
-    if( !GTK_IS_WIDGET( p_intf->p_sys->p_disc ) )
+    if( togglebutton->active )
     {
-        p_intf->p_sys->p_disc = create_intf_disc();
-        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_disc ),
-                             "p_intf", p_intf );
+        gtk_entry_set_text( GTK_ENTRY( lookup_widget(
+            GTK_WIDGET(togglebutton), "disc_name" ) ), "/dev/dvd" );
     }
-    gtk_widget_show( p_intf->p_sys->p_disc );
-    gdk_window_raise( p_intf->p_sys->p_disc->window );
 }
 
 
 void
-on_toolbar_disc_clicked                (GtkButton       *button,
+on_disc_vcd_toggled                    (GtkToggleButton *togglebutton,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
-
-    if( !GTK_IS_WIDGET( p_intf->p_sys->p_disc ) )
+    if( togglebutton->active )
     {
-        p_intf->p_sys->p_disc = create_intf_disc();
-        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_disc ),
-                             "p_intf", p_intf );
+        gtk_entry_set_text( GTK_ENTRY( lookup_widget(
+            GTK_WIDGET(togglebutton), "disc_name" ) ), "/dev/cdrom" );
     }
-    gtk_widget_show( p_intf->p_sys->p_disc );
-    gdk_window_raise( p_intf->p_sys->p_disc->window );
 }
 
 
@@ -649,7 +842,7 @@ on_disc_ok_clicked                     (GtkButton       *button,
     }
     else
     {
-        intf_ErrMsg( "intf error: unknown toggle button configuration" );
+        intf_ErrMsg( "intf error: unknown disc type toggle button position" );
         free( psz_source );
         return;
     }
@@ -665,7 +858,8 @@ on_disc_ok_clicked                     (GtkButton       *button,
 
     /* Build source name and add it to playlist */
     sprintf( psz_source, "%s:%s", psz_method, psz_device );
-    intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
+    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
+    free( psz_source );
 
     gtk_widget_hide( p_intf->p_sys->p_disc );
 }
@@ -675,175 +869,71 @@ void
 on_disc_cancel_clicked                 (GtkButton       *button,
                                         gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_disc" );
-
-    gtk_widget_hide( p_intf->p_sys->p_disc );
-}
-
-
-void
-on_disc_dvd_toggled                    (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
-{
-    if( togglebutton->active )
-    {
-        gtk_entry_set_text( GTK_ENTRY( lookup_widget(
-            GTK_WIDGET(togglebutton), "disc_name" ) ), "/dev/dvd" );
-    }
+    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
 }
 
 
+/*****************************************************************************
+ * Network stream callbacks
+ *****************************************************************************
+ * The following callbacks are related to the network stream manager.
+ *****************************************************************************/
 void
-on_disc_vcd_toggled                    (GtkToggleButton *togglebutton,
+on_network_ok_clicked                  (GtkButton       *button,
                                         gpointer         user_data)
 {
-    if( togglebutton->active )
-    {
-        gtk_entry_set_text( GTK_ENTRY( lookup_widget(
-            GTK_WIDGET(togglebutton), "disc_name" ) ), "/dev/cdrom" );
-    }
-}
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_network" );
+    char *psz_source, *psz_server, *psz_protocol;
+    unsigned int i_port;
 
+    psz_server = gtk_entry_get_text( GTK_ENTRY( lookup_widget(
+                                 GTK_WIDGET(button), "network_server" ) ) );
 
-void
-on_popup_disc_activate                 (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
-
-    if( !GTK_IS_WIDGET( p_intf->p_sys->p_disc ) )
+    /* Check which protocol was activated */
+    if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
+                                          "network_ts" ) )->active )
     {
-        p_intf->p_sys->p_disc = create_intf_disc();
-        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_disc ),
-                             "p_intf", p_intf );
+        psz_protocol = "ts";
     }
-    gtk_widget_show( p_intf->p_sys->p_disc );
-    gdk_window_raise( p_intf->p_sys->p_disc->window );
-}
-
-
-void
-on_popup_audio_toggle                  (GtkCheckMenuItem    *menuitem,
-                                        gpointer            user_data)
-{
-    if( menuitem->active )
+    else if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
+                                               "network_rtp" ) )->active )
     {
-        intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
-        es_descriptor_t *       p_es;
-    
-        p_es = (es_descriptor_t*)user_data;
-    
-        input_ChangeES( p_intf->p_input, p_es, 1 );
+        psz_protocol = "rtp";
     }
-}
-
-
-void
-on_popup_subtitle_toggle               (GtkCheckMenuItem     *menuitem,
-                                        gpointer             user_data)
-{
-    if( menuitem->active )
+    else
     {
-        intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
-        es_descriptor_t *       p_es;
-    
-        p_es = (es_descriptor_t*)user_data;
-    
-        input_ChangeES( p_intf->p_input, p_es, 2 );
+        intf_ErrMsg( "intf error: unknown protocol toggle button position" );
+        return;
     }
-}
-
 
-void
-on_menubar_audio_toggle                (GtkCheckMenuItem    *menuitem,
-                                        gpointer            user_data)
-{
-    if( menuitem->active )
+    /* Get the port number and make sure it will not overflow 5 characters */
+    i_port = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(
+                 lookup_widget( GTK_WIDGET(button), "network_port" ) ) );
+    if( i_port > 65535 )
     {
-        intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
-        es_descriptor_t *       p_es;
-
-        p_es = (es_descriptor_t*)user_data;
-
-        input_ChangeES( p_intf->p_input, p_es, 1 );
+        intf_ErrMsg( "intf error: invalid port %i", i_port );
     }
-}
-
 
-void
-on_menubar_subtitle_toggle             (GtkCheckMenuItem     *menuitem,
-                                        gpointer             user_data)
-{
-    if( menuitem->active )
+    /* Allocate room for "protocol://server:port" */
+    psz_source = malloc( strlen( psz_protocol ) + strlen( psz_server ) + 10 );
+    if( psz_source == NULL )
     {
-        intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
-        es_descriptor_t *       p_es;
-    
-        p_es = (es_descriptor_t*)user_data;
-    
-        input_ChangeES( p_intf->p_input, p_es, 2 );
+        return;
     }
-}
-
-
-void
-on_popup_navigation_toggle             (GtkCheckMenuItem     *menuitem,
-                                        gpointer             user_data)
-{
-    if( menuitem->active )
-    {
-        intf_thread_t * p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
-        input_area_t *  p_area;
-        gint            i_title;
-        gint            i_chapter;
-    
-        i_title   = (gint)(user_data) / 100 ;
-        i_chapter = (gint)(user_data) - ( 100 * i_title );
-
-        if( i_title != p_intf->p_input->stream.p_selected_area->i_id )
-        {
-            p_intf->p_sys->b_menus_update = 1;
-        }
+   
+    /* Build source name and add it to playlist */
+    sprintf( psz_source, "%s://%s:%i", psz_protocol, psz_server, i_port );
+    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
+    free( psz_source );
 
-        p_area = p_intf->p_input->stream.pp_areas[i_title];
-        p_area->i_part = i_chapter;
-    
-        p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
-                input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
-    }
+    gtk_widget_hide( p_intf->p_sys->p_network );
 }
 
 
 void
-on_menubar_title_toggle                (GtkCheckMenuItem     *menuitem,
-                                        gpointer             user_data)
+on_network_cancel_clicked              (GtkButton       *button,
+                                        gpointer         user_data)
 {
-    if( menuitem->active )
-    {
-        intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
-    
-        p_intf->p_input->pf_set_area( p_intf->p_input,
-                                      (input_area_t*)user_data );
-        p_intf->p_sys->b_menus_update = 1;
-        input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
-    }
+    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
 }
 
-
-void
-on_menubar_chapter_toggle              (GtkCheckMenuItem     *menuitem,
-                                        gpointer             user_data)
-{
-    if( menuitem->active )
-    {
-        intf_thread_t * p_intf    = GetIntf( GTK_WIDGET(menuitem),
-                                             "intf_window" );
-        input_area_t *  p_area    = p_intf->p_input->stream.p_selected_area;
-        gint            i_chapter = (gint)user_data;
-    
-        p_area->i_part = i_chapter;
-    
-        p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
-        input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
-    }
-}
index a27b0677acf9da9ab311be9d4dc6cd0612b41eab..7329a93910b01d3919d4201c61d05d63826796ab 100644 (file)
@@ -145,21 +145,6 @@ void
 on_toolbar_fast_clicked                (GtkButton       *button,
                                         gpointer         user_data);
 
-gboolean
-on_hscale_button_release_event         (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_hscale_button_release_event         (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_hscale_button_press_event           (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
 void
 on_intf_modules_destroy                (GtkObject       *object,
                                         gpointer         user_data);
@@ -254,6 +239,36 @@ void
 on_menubar_title_toggle                (GtkCheckMenuItem     *menuitem,
                                         gpointer             user_data);
 
+void
+on_menubar_network_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_toolbar_network_clicked             (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_network_ok_clicked                  (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_network_cancel_clicked              (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_popup_network_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+gboolean
+on_slider_button_press_event           (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_slider_button_release_event         (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
 void
 on_menubar_chapter_toggle              (GtkCheckMenuItem     *menuitem,
                                         gpointer             user_data);
index cf0f1bd99beb5c66c22bcfeeb6141fa4c2ca6ec6..44e58da8aaecf8395339870120a81b02c359aea9 100644 (file)
@@ -33,6 +33,13 @@ static GnomeUIInfo menubar_file_menu_uiinfo[] =
     GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CDROM,
     0, (GdkModifierType) 0, NULL
   },
+  {
+    GNOME_APP_UI_ITEM, N_("_Network Stream..."),
+    N_("Select a Network Stream"),
+    (gpointer) on_menubar_network_activate, NULL, NULL,
+    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_REFRESH,
+    0, (GdkModifierType) 0, NULL
+  },
   GNOMEUIINFO_SEPARATOR,
   GNOMEUIINFO_MENU_EXIT_ITEM (on_menubar_exit_activate, NULL),
   GNOMEUIINFO_END
@@ -117,6 +124,7 @@ create_intf_window (void)
   GtkWidget *tmp_toolbar_icon;
   GtkWidget *toolbar_file;
   GtkWidget *toolbar_disc;
+  GtkWidget *toolbar_network;
   GtkWidget *toolbar_back;
   GtkWidget *toolbar_stop;
   GtkWidget *toolbar_play;
@@ -127,10 +135,11 @@ create_intf_window (void)
   GtkWidget *toolbar_prev;
   GtkWidget *toolbar_next;
   GtkWidget *vbox2;
-  GtkWidget *entry1;
-  GtkWidget *label6;
-  GtkWidget *hscale;
-  GtkWidget *label13;
+  GtkWidget *hbox4;
+  GtkWidget *label_date;
+  GtkWidget *label_status;
+  GtkWidget *label_bar;
+  GtkWidget *slider;
   GtkWidget *appbar;
 
   intf_window = gnome_app_new ("VideoLAN Client", _("VideoLAN Client"));
@@ -160,15 +169,20 @@ create_intf_window (void)
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (menubar_file_menu_uiinfo[2].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator1",
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_network",
                             menubar_file_menu_uiinfo[2].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (menubar_file_menu_uiinfo[3].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_exit",
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator1",
                             menubar_file_menu_uiinfo[3].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
+  gtk_widget_ref (menubar_file_menu_uiinfo[4].widget);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_exit",
+                            menubar_file_menu_uiinfo[4].widget,
+                            (GtkDestroyNotify) gtk_widget_unref);
+
   gtk_widget_ref (menubar_uiinfo[1].widget);
   gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_view",
                             menubar_uiinfo[1].widget,
@@ -249,7 +263,6 @@ create_intf_window (void)
   gnome_app_add_toolbar (GNOME_APP (intf_window), GTK_TOOLBAR (toolbar), "toolbar",
                                 GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
                                 GNOME_DOCK_TOP, 1, 0, 2);
-  gtk_container_set_border_width (GTK_CONTAINER (toolbar), 1);
   gtk_toolbar_set_space_size (GTK_TOOLBAR (toolbar), 16);
   gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_SPACE_LINE);
   gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NONE);
@@ -278,6 +291,18 @@ create_intf_window (void)
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (toolbar_disc);
 
+  tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_REFRESH);
+  toolbar_network = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
+                                GTK_TOOLBAR_CHILD_BUTTON,
+                                NULL,
+                                _("Net"),
+                                _("Select a Network Stream"), NULL,
+                                tmp_toolbar_icon, NULL, NULL);
+  gtk_widget_ref (toolbar_network);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_network", toolbar_network,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (toolbar_network);
+
   gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
 
   tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_BACK);
@@ -400,40 +425,42 @@ create_intf_window (void)
   gtk_widget_show (vbox2);
   gnome_app_set_contents (GNOME_APP (intf_window), vbox2);
 
-  entry1 = gtk_entry_new ();
-  gtk_widget_ref (entry1);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "entry1", entry1,
+  hbox4 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_ref (hbox4);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "hbox4", hbox4,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (entry1);
-  gtk_box_pack_start (GTK_BOX (vbox2), entry1, FALSE, FALSE, 0);
-  gtk_entry_set_text (GTK_ENTRY (entry1), _("Tired of boring stub messages ? Write your own exciting message here !!"));
+  gtk_widget_show (hbox4);
+  gtk_box_pack_start (GTK_BOX (vbox2), hbox4, TRUE, TRUE, 0);
 
-  label6 = gtk_label_new (_("This part of the interface doesn't work yet. You can drag the slider below, though:"));
-  gtk_widget_ref (label6);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label6", label6,
+  label_date = gtk_label_new (_("-:--:--"));
+  gtk_widget_ref (label_date);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_date", label_date,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (label6);
-  gtk_box_pack_start (GTK_BOX (vbox2), label6, FALSE, FALSE, 0);
-  gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_LEFT);
-  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
-  gtk_misc_set_padding (GTK_MISC (label6), 5, 0);
+  gtk_widget_show (label_date);
+  gtk_box_pack_start (GTK_BOX (hbox4), label_date, FALSE, FALSE, 0);
 
-  hscale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 6.25, 0)));
-  gtk_widget_ref (hscale);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "hscale", hscale,
+  label_status = gtk_label_new (_("Status: foo"));
+  gtk_widget_ref (label_status);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_status", label_status,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (hscale);
-  gtk_box_pack_start (GTK_BOX (vbox2), hscale, FALSE, FALSE, 0);
-  gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_BOTTOM);
-  gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_DELAYED);
+  gtk_widget_show (label_status);
+  gtk_box_pack_start (GTK_BOX (hbox4), label_status, FALSE, FALSE, 0);
 
-  label13 = gtk_label_new (_("HEY ! YOU CAN DROP A FILE ON VLC TOO :-)"));
-  gtk_widget_ref (label13);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label13", label13,
+  label_bar = gtk_label_new (_("Bar: baz"));
+  gtk_widget_ref (label_bar);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_bar", label_bar,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (label13);
-  gtk_box_pack_start (GTK_BOX (vbox2), label13, FALSE, FALSE, 0);
-  gtk_misc_set_padding (GTK_MISC (label13), 0, 5);
+  gtk_widget_show (label_bar);
+  gtk_box_pack_start (GTK_BOX (hbox4), label_bar, FALSE, FALSE, 0);
+
+  slider = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 0, 6.25, 0)));
+  gtk_widget_ref (slider);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "slider", slider,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (slider);
+  gtk_box_pack_start (GTK_BOX (vbox2), slider, TRUE, TRUE, 0);
+  gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE);
+  gtk_scale_set_digits (GTK_SCALE (slider), 0);
 
   appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
   gtk_widget_ref (appbar);
@@ -455,6 +482,9 @@ create_intf_window (void)
   gtk_signal_connect (GTK_OBJECT (toolbar_disc), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_disc_clicked),
                       NULL);
+  gtk_signal_connect (GTK_OBJECT (toolbar_network), "clicked",
+                      GTK_SIGNAL_FUNC (on_toolbar_network_clicked),
+                      NULL);
   gtk_signal_connect (GTK_OBJECT (toolbar_back), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_back_clicked),
                       NULL);
@@ -482,16 +512,44 @@ create_intf_window (void)
   gtk_signal_connect (GTK_OBJECT (toolbar_next), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_next_clicked),
                       NULL);
-  gtk_signal_connect (GTK_OBJECT (hscale), "button_release_event",
-                      GTK_SIGNAL_FUNC (on_hscale_button_release_event),
+  gtk_signal_connect (GTK_OBJECT (slider), "button_press_event",
+                      GTK_SIGNAL_FUNC (on_slider_button_press_event),
                       NULL);
-  gtk_signal_connect (GTK_OBJECT (hscale), "button_press_event",
-                      GTK_SIGNAL_FUNC (on_hscale_button_press_event),
+  gtk_signal_connect (GTK_OBJECT (slider), "button_release_event",
+                      GTK_SIGNAL_FUNC (on_slider_button_release_event),
                       NULL);
 
   return intf_window;
 }
 
+static GnomeUIInfo popup_file_menu_uiinfo[] =
+{
+  {
+    GNOME_APP_UI_ITEM, N_("_Open File..."),
+    N_("Open a File"),
+    (gpointer) on_popup_open_activate, NULL, NULL,
+    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN,
+    0, (GdkModifierType) 0, NULL
+  },
+  {
+    GNOME_APP_UI_ITEM, N_("Open _Disc..."),
+    N_("Open a DVD or VCD"),
+    (gpointer) on_popup_disc_activate, NULL, NULL,
+    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CDROM,
+    0, (GdkModifierType) 0, NULL
+  },
+  {
+    GNOME_APP_UI_ITEM, N_("_Network Stream..."),
+    N_("Select a Network Stream"),
+    (gpointer) on_popup_network_activate, NULL, NULL,
+    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_REFRESH,
+    0, (GdkModifierType) 0, NULL
+  },
+  GNOMEUIINFO_SEPARATOR,
+  GNOMEUIINFO_MENU_ABOUT_ITEM (on_popup_about_activate, NULL),
+  GNOMEUIINFO_END
+};
+
 static GnomeUIInfo intf_popup_uiinfo[] =
 {
   {
@@ -523,21 +581,6 @@ static GnomeUIInfo intf_popup_uiinfo[] =
     0, (GdkModifierType) 0, NULL
   },
   GNOMEUIINFO_SEPARATOR,
-  {
-    GNOME_APP_UI_ITEM, N_("_Open File..."),
-    N_("Open a File"),
-    (gpointer) on_popup_open_activate, NULL, NULL,
-    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN,
-    0, (GdkModifierType) 0, NULL
-  },
-  {
-    GNOME_APP_UI_ITEM, N_("Open _Disc..."),
-    N_("Open a DVD or VCD"),
-    (gpointer) on_popup_disc_activate, NULL, NULL,
-    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CDROM,
-    0, (GdkModifierType) 0, NULL
-  },
-  GNOMEUIINFO_SEPARATOR,
   {
     GNOME_APP_UI_ITEM, N_("_Navigation"),
     N_("Navigate through titles and chapters"),
@@ -545,9 +588,8 @@ static GnomeUIInfo intf_popup_uiinfo[] =
     GNOME_APP_PIXMAP_NONE, NULL,
     0, (GdkModifierType) 0, NULL
   },
-  GNOMEUIINFO_SEPARATOR,
   {
-    GNOME_APP_UI_ITEM, N_("Audio"),
+    GNOME_APP_UI_ITEM, N_("_Audio"),
     N_("Select audio channel"),
     (gpointer) NULL, NULL, NULL,
     GNOME_APP_PIXMAP_NONE, NULL,
@@ -560,8 +602,8 @@ static GnomeUIInfo intf_popup_uiinfo[] =
     GNOME_APP_PIXMAP_NONE, NULL,
     0, (GdkModifierType) 0, NULL
   },
+  GNOMEUIINFO_MENU_FILE_TREE (popup_file_menu_uiinfo),
   GNOMEUIINFO_SEPARATOR,
-  GNOMEUIINFO_MENU_ABOUT_ITEM (on_popup_about_activate, NULL),
   GNOMEUIINFO_MENU_EXIT_ITEM (on_popup_exit_activate, NULL),
   GNOMEUIINFO_END
 };
@@ -597,61 +639,66 @@ create_intf_popup (void)
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (intf_popup_uiinfo[4].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator3",
                             intf_popup_uiinfo[4].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (intf_popup_uiinfo[5].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_navigation",
                             intf_popup_uiinfo[5].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_set_sensitive (intf_popup_uiinfo[5].widget, FALSE);
 
   gtk_widget_ref (intf_popup_uiinfo[6].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_disc",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio",
                             intf_popup_uiinfo[6].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_set_sensitive (intf_popup_uiinfo[6].widget, FALSE);
 
   gtk_widget_ref (intf_popup_uiinfo[7].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator3",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subtitle",
                             intf_popup_uiinfo[7].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_set_sensitive (intf_popup_uiinfo[7].widget, FALSE);
 
   gtk_widget_ref (intf_popup_uiinfo[8].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_navigation",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_file",
                             intf_popup_uiinfo[8].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_set_sensitive (intf_popup_uiinfo[8].widget, FALSE);
 
-  gtk_widget_ref (intf_popup_uiinfo[9].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator8",
-                            intf_popup_uiinfo[9].widget,
+  gtk_widget_ref (popup_file_menu_uiinfo[0].widget);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open",
+                            popup_file_menu_uiinfo[0].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
-  gtk_widget_ref (intf_popup_uiinfo[10].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio",
-                            intf_popup_uiinfo[10].widget,
+  gtk_widget_ref (popup_file_menu_uiinfo[1].widget);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_disc",
+                            popup_file_menu_uiinfo[1].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_set_sensitive (intf_popup_uiinfo[10].widget, FALSE);
 
-  gtk_widget_ref (intf_popup_uiinfo[11].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subtitle",
-                            intf_popup_uiinfo[11].widget,
+  gtk_widget_ref (popup_file_menu_uiinfo[2].widget);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_network",
+                            popup_file_menu_uiinfo[2].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_set_sensitive (intf_popup_uiinfo[11].widget, FALSE);
 
-  gtk_widget_ref (intf_popup_uiinfo[12].widget);
+  gtk_widget_ref (popup_file_menu_uiinfo[3].widget);
   gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator4",
-                            intf_popup_uiinfo[12].widget,
+                            popup_file_menu_uiinfo[3].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
-  gtk_widget_ref (intf_popup_uiinfo[13].widget);
+  gtk_widget_ref (popup_file_menu_uiinfo[4].widget);
   gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_about",
-                            intf_popup_uiinfo[13].widget,
+                            popup_file_menu_uiinfo[4].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
-  gtk_widget_ref (intf_popup_uiinfo[14].widget);
+  gtk_widget_ref (intf_popup_uiinfo[9].widget);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2",
+                            intf_popup_uiinfo[9].widget,
+                            (GtkDestroyNotify) gtk_widget_unref);
+
+  gtk_widget_ref (intf_popup_uiinfo[10].widget);
   gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_exit",
-                            intf_popup_uiinfo[14].widget,
+                            intf_popup_uiinfo[10].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
   return intf_popup;
@@ -703,6 +750,7 @@ create_intf_fileopen (void)
   intf_fileopen = gtk_file_selection_new (_("Open File"));
   gtk_object_set_data (GTK_OBJECT (intf_fileopen), "intf_fileopen", intf_fileopen);
   gtk_container_set_border_width (GTK_CONTAINER (intf_fileopen), 10);
+  gtk_window_set_modal (GTK_WINDOW (intf_fileopen), TRUE);
 
   fileopen_ok = GTK_FILE_SELECTION (intf_fileopen)->ok_button;
   gtk_object_set_data (GTK_OBJECT (intf_fileopen), "fileopen_ok", fileopen_ok);
@@ -918,6 +966,7 @@ create_intf_disc (void)
 
   intf_disc = gnome_dialog_new (_("Open Disc"), NULL);
   gtk_object_set_data (GTK_OBJECT (intf_disc), "intf_disc", intf_disc);
+  gtk_window_set_modal (GTK_WINDOW (intf_disc), TRUE);
   gtk_window_set_policy (GTK_WINDOW (intf_disc), FALSE, FALSE, FALSE);
 
   dialog_vbox4 = GNOME_DIALOG (intf_disc)->vbox;
@@ -1079,3 +1128,171 @@ create_intf_disc (void)
   return intf_disc;
 }
 
+GtkWidget*
+create_intf_network (void)
+{
+  GtkWidget *intf_network;
+  GtkWidget *vbox5;
+  GtkWidget *hbox3;
+  GtkWidget *frame3;
+  GtkWidget *vbox6;
+  GSList *network_group = NULL;
+  GtkWidget *network_ts;
+  GtkWidget *network_rtp;
+  GtkWidget *network_http;
+  GtkWidget *frame4;
+  GtkWidget *table2;
+  GtkWidget *label17;
+  GtkWidget *label18;
+  GtkObject *network_port_adj;
+  GtkWidget *network_port;
+  GtkWidget *network_server;
+  GtkWidget *hbuttonbox1;
+  GtkWidget *network_ok;
+  GtkWidget *network_cancel;
+
+  intf_network = gnome_dialog_new (_("Network Stream"), NULL);
+  gtk_object_set_data (GTK_OBJECT (intf_network), "intf_network", intf_network);
+  gtk_window_set_modal (GTK_WINDOW (intf_network), TRUE);
+  gtk_window_set_policy (GTK_WINDOW (intf_network), FALSE, FALSE, FALSE);
+
+  vbox5 = GNOME_DIALOG (intf_network)->vbox;
+  gtk_object_set_data (GTK_OBJECT (intf_network), "vbox5", vbox5);
+  gtk_widget_show (vbox5);
+
+  hbox3 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_ref (hbox3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "hbox3", hbox3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox3);
+  gtk_box_pack_start (GTK_BOX (vbox5), hbox3, TRUE, TRUE, 0);
+
+  frame3 = gtk_frame_new (_("Protocol"));
+  gtk_widget_ref (frame3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "frame3", frame3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame3);
+  gtk_box_pack_start (GTK_BOX (hbox3), frame3, TRUE, TRUE, 0);
+
+  vbox6 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox6);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "vbox6", vbox6,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox6);
+  gtk_container_add (GTK_CONTAINER (frame3), vbox6);
+
+  network_ts = gtk_radio_button_new_with_label (network_group, _("TS"));
+  network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_ts));
+  gtk_widget_ref (network_ts);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_ts", network_ts,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_ts);
+  gtk_box_pack_start (GTK_BOX (vbox6), network_ts, FALSE, FALSE, 0);
+
+  network_rtp = gtk_radio_button_new_with_label (network_group, _("RTP"));
+  network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_rtp));
+  gtk_widget_ref (network_rtp);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_rtp", network_rtp,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_rtp);
+  gtk_box_pack_start (GTK_BOX (vbox6), network_rtp, FALSE, FALSE, 0);
+  gtk_widget_set_sensitive (network_rtp, FALSE);
+
+  network_http = gtk_radio_button_new_with_label (network_group, _("HTTP"));
+  network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http));
+  gtk_widget_ref (network_http);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_http", network_http,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_http);
+  gtk_box_pack_start (GTK_BOX (vbox6), network_http, FALSE, FALSE, 0);
+  gtk_widget_set_sensitive (network_http, FALSE);
+
+  frame4 = gtk_frame_new (_("Server"));
+  gtk_widget_ref (frame4);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "frame4", frame4,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame4);
+  gtk_box_pack_start (GTK_BOX (hbox3), frame4, TRUE, TRUE, 0);
+
+  table2 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_ref (table2);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "table2", table2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table2);
+  gtk_container_add (GTK_CONTAINER (frame4), table2);
+  gtk_container_set_border_width (GTK_CONTAINER (table2), 5);
+  gtk_table_set_row_spacings (GTK_TABLE (table2), 5);
+  gtk_table_set_col_spacings (GTK_TABLE (table2), 5);
+
+  label17 = gtk_label_new (_("Address"));
+  gtk_widget_ref (label17);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "label17", label17,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label17);
+  gtk_table_attach (GTK_TABLE (table2), label17, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
+
+  label18 = gtk_label_new (_("Port"));
+  gtk_widget_ref (label18);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "label18", label18,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label18);
+  gtk_table_attach (GTK_TABLE (table2), label18, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);
+
+  network_port_adj = gtk_adjustment_new (1234, 0, 65535, 1, 10, 10);
+  network_port = gtk_spin_button_new (GTK_ADJUSTMENT (network_port_adj), 1, 0);
+  gtk_widget_ref (network_port);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_port", network_port,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_port);
+  gtk_table_attach (GTK_TABLE (table2), network_port, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  network_server = gtk_entry_new ();
+  gtk_widget_ref (network_server);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_server", network_server,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_server);
+  gtk_table_attach (GTK_TABLE (table2), network_server, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_text (GTK_ENTRY (network_server), _("vls"));
+
+  hbuttonbox1 = GNOME_DIALOG (intf_network)->action_area;
+  gtk_object_set_data (GTK_OBJECT (intf_network), "hbuttonbox1", hbuttonbox1);
+  gtk_widget_show (hbuttonbox1);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END);
+  gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 8);
+
+  gnome_dialog_append_button (GNOME_DIALOG (intf_network), GNOME_STOCK_BUTTON_OK);
+  network_ok = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_network)->buttons)->data);
+  gtk_widget_ref (network_ok);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_ok", network_ok,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_ok);
+  GTK_WIDGET_SET_FLAGS (network_ok, GTK_CAN_DEFAULT);
+
+  gnome_dialog_append_button (GNOME_DIALOG (intf_network), GNOME_STOCK_BUTTON_CANCEL);
+  network_cancel = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_network)->buttons)->data);
+  gtk_widget_ref (network_cancel);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_cancel", network_cancel,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_cancel);
+  GTK_WIDGET_SET_FLAGS (network_cancel, GTK_CAN_DEFAULT);
+
+  gtk_signal_connect (GTK_OBJECT (network_ok), "clicked",
+                      GTK_SIGNAL_FUNC (on_network_ok_clicked),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (network_cancel), "clicked",
+                      GTK_SIGNAL_FUNC (on_network_cancel_clicked),
+                      NULL);
+
+  return intf_network;
+}
+
index 2979135585d69ef6ac62f28c57e97be4e5cba78b..6aed3c6dcfff229e4b14fbe36848e97822f14be3 100644 (file)
@@ -9,3 +9,4 @@ GtkWidget* create_intf_fileopen (void);
 GtkWidget* create_intf_modules (void);
 GtkWidget* create_intf_playlist (void);
 GtkWidget* create_intf_disc (void);
+GtkWidget* create_intf_network (void);
index 9021e0635efeada030ba8cb20da033f0dcb8a463..34ee18a17ad126b8f1918d2518ed2dc41203e356 100644 (file)
@@ -2,7 +2,7 @@
  * intf_gnome.c: Gnome interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_gnome.c,v 1.21 2001/03/15 00:37:04 stef Exp $
+ * $Id: intf_gnome.c,v 1.22 2001/03/15 01:42:19 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 #include "intf_msg.h"
 #include "interface.h"
 
-#include "gnome_sys.h"
 #include "gnome_callbacks.h"
 #include "gnome_interface.h"
 #include "gnome_support.h"
+#include "intf_gnome.h"
 
 #include "main.h"
 
@@ -72,6 +72,7 @@ static gint GnomeChapterMenu  ( gpointer, GtkWidget *,
 static gint GnomeTitleMenu    ( gpointer, GtkWidget *, 
                               void (*pf_toggle)(GtkCheckMenuItem *, gpointer) );
 static gint GnomeSetupMenu    ( intf_thread_t * p_intf );
+static void GnomeDisplayDate  ( GtkAdjustment *p_adj );
 
 /*****************************************************************************
  * g_atexit: kludge to avoid the Gnome thread to segfault at exit
@@ -144,14 +145,11 @@ static int intf_Open( intf_thread_t *p_intf )
     p_intf->p_sys->b_playlist_changed = 0;
     p_intf->p_sys->b_menus_update = 1;
 
-    p_intf->p_sys->b_scale_isfree = 1;
+    p_intf->p_sys->b_slider_free = 1;
 
     p_intf->p_sys->pf_gtk_callback = NULL;
     p_intf->p_sys->pf_gdk_callback = NULL;
 
-    /* Initialize lock */
-    vlc_mutex_init( &p_intf->p_sys->change_lock );
-
     return( 0 );
 }
 
@@ -160,9 +158,6 @@ static int intf_Open( intf_thread_t *p_intf )
  *****************************************************************************/
 static void intf_Close( intf_thread_t *p_intf )
 {
-    /* Destroy lock */
-    vlc_mutex_destroy( &p_intf->p_sys->change_lock );
-
     /* Destroy structure */
     free( p_intf->p_sys );
 }
@@ -180,20 +175,26 @@ static void intf_Run( intf_thread_t *p_intf )
     /* gnome_init needs to know the command line. We don't care, so we
      * give it an empty one */
     char *p_args[] = { "" };
+    int   i_args   = 1;
 
     /* The data types we are allowed to receive */
     static GtkTargetEntry target_table[] =
     {
         { "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
-        { "text/plain", 0, DROP_ACCEPT_TEXT_PLAIN }
+        { "text/plain",    0, DROP_ACCEPT_TEXT_PLAIN }
     };
 
+    /* intf_Manage callback timeout */
+    int i_timeout;
+
     /* Initialize Gnome */
-    gnome_init( p_main->psz_arg0, VERSION, 1, p_args );
+    gnome_init( p_main->psz_arg0, VERSION, i_args, p_args );
 
     /* Create some useful widgets that will certainly be used */
     p_intf->p_sys->p_window = create_intf_window( );
     p_intf->p_sys->p_popup = create_intf_popup( );
+    p_intf->p_sys->p_disc = create_intf_disc( );
+    p_intf->p_sys->p_network = create_intf_network( );
 
     /* Set the title of the main window */
     gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
@@ -204,12 +205,28 @@ static void intf_Run( intf_thread_t *p_intf )
                        GTK_DEST_DEFAULT_ALL, target_table,
                        1, GDK_ACTION_COPY );
 
+    /* Get the interface labels */
+    #define P_LABEL( name ) GTK_LABEL( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), name ) )
+    p_intf->p_sys->p_label_date = P_LABEL( "label_date" );
+    p_intf->p_sys->p_label_status = P_LABEL( "label_status" );
+    #undef P_LABEL
+
+    /* Connect the date display to the slider */
+    #define P_SLIDER GTK_RANGE( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
+    p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
+
+    gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
+                         GTK_SIGNAL_FUNC( GnomeDisplayDate ), NULL );
+    p_intf->p_sys->f_adj_oldvalue = 0;
+    #undef P_SLIDER
+
     /* We don't create these ones yet because we perhaps won't need them */
     p_intf->p_sys->p_about = NULL;
     p_intf->p_sys->p_playlist = NULL;
     p_intf->p_sys->p_modules = NULL;
     p_intf->p_sys->p_fileopen = NULL;
-    p_intf->p_sys->p_disc = NULL;
 
     /* Store p_intf to keep an eye on it */
     gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
@@ -218,27 +235,40 @@ static void intf_Run( intf_thread_t *p_intf )
     gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
                          "p_intf", p_intf );
 
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_disc),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_network),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
+                         "p_intf", p_intf );
+
     /* Show the control window */
     gtk_widget_show( p_intf->p_sys->p_window );
 
     /* Sleep to avoid using all CPU - since some interfaces needs to access
      * keyboard events, a 100ms delay is a good compromise */
-    p_intf->p_sys->i_timeout = gtk_timeout_add( INTF_IDLE_SLEEP / 1000,
-                                                GnomeManage, p_intf );
+    i_timeout = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, GnomeManage, p_intf );
 
     /* Enter gnome mode */
     gtk_main();
 
-    /* launch stored callbacks */
+    /* Remove the timeout */
+    gtk_timeout_remove( i_timeout );
+
+    /* Get rid of stored callbacks so we can unload the plugin */
     if( p_intf->p_sys->pf_gtk_callback != NULL )
     {
-        p_intf->p_sys->pf_gtk_callback();
+        p_intf->p_sys->pf_gtk_callback( );
+        p_intf->p_sys->pf_gtk_callback = NULL;
 
-        if( p_intf->p_sys->pf_gdk_callback != NULL )
-        {
-            p_intf->p_sys->pf_gdk_callback();
-        }
+    }
+
+    if( p_intf->p_sys->pf_gdk_callback != NULL )
+    {
+        p_intf->p_sys->pf_gdk_callback( );
+        p_intf->p_sys->pf_gdk_callback = NULL;
     }
 }
 
@@ -252,9 +282,9 @@ static void intf_Run( intf_thread_t *p_intf )
  *****************************************************************************/
 static gint GnomeManage( gpointer p_data )
 {
-    intf_thread_t *p_intf = (void *)p_data;
+#define p_intf ((intf_thread_t *)p_data)
 
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
+    vlc_mutex_lock( &p_intf->change_lock );
 
     /* If the "display popup" flag has changed */
     if( p_intf->b_menu_change )
@@ -272,26 +302,34 @@ static gint GnomeManage( gpointer p_data )
     }
 
     /* Manage the slider */
-    if( p_intf->p_input != NULL && p_intf->p_sys->p_window != NULL
-         && p_intf->p_sys->b_scale_isfree )
+    if( p_intf->p_input != NULL )
     {
-        GtkWidget *p_scale;
-        GtkAdjustment *p_adj;
-   
-        p_scale = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
-                                  p_intf->p_sys->p_window ), "hscale" ) );
-        p_adj = gtk_range_get_adjustment ( GTK_RANGE( p_scale ) );
-
-        /* Update the value */
-        p_adj->value = ( 100. *
-                         p_intf->p_input->stream.p_selected_area->i_tell ) /
-                         p_intf->p_input->stream.p_selected_area->i_size;
-
-        /* Gtv does it this way. Why not. */
-        gtk_range_set_adjustment ( GTK_RANGE( p_scale ), p_adj );
-        gtk_range_slider_update ( GTK_RANGE( p_scale ) );
-        gtk_range_clear_background ( GTK_RANGE( p_scale ) );
-        gtk_range_draw_background ( GTK_RANGE( p_scale ) );
+        float newvalue = p_intf->p_sys->p_adj->value;
+
+#define p_area p_intf->p_input->stream.p_selected_area
+        /* If the user hasn't touched the slider since the last time,
+         * then the input can safely change it */
+        if( newvalue == p_intf->p_sys->f_adj_oldvalue )
+        {
+            /* Update the value */
+            p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue =
+                ( 100. * p_area->i_tell ) / p_area->i_size;
+
+            gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
+                                     "value_changed" );
+        }
+        /* Otherwise, send message to the input if the user has
+         * finished dragging the slider */
+        else if( p_intf->p_sys->b_slider_free )
+        {
+            off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+
+            input_Seek( p_intf->p_input, i_seek );
+
+            /* Update the old value */
+            p_intf->p_sys->f_adj_oldvalue = newvalue;
+        }
+#undef p_area
     }
 
     /* Manage core vlc functions through the callback */
@@ -299,19 +337,20 @@ static gint GnomeManage( gpointer p_data )
 
     if( p_intf->b_die )
     {
-        /* Make sure we won't be called again */
-        gtk_timeout_remove( p_intf->p_sys->i_timeout );
-
-        vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+        vlc_mutex_unlock( &p_intf->change_lock );
 
         /* Prepare to die, young Skywalker */
         gtk_main_quit();
+
+        /* Just in case */
         return( FALSE );
     }
 
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+    vlc_mutex_unlock( &p_intf->change_lock );
 
     return( TRUE );
+
+#undef p_intf
 }
 
 /*****************************************************************************
@@ -665,3 +704,33 @@ static gint GnomeSetupMenu( intf_thread_t * p_intf )
 
     return TRUE;
 }
+
+/*****************************************************************************
+ * GnomeDisplayDate: display stream date
+ *****************************************************************************
+ * This function displays the current date related to the position in
+ * the stream. It is called whenever the slider changes its value.
+ *****************************************************************************/
+void GnomeDisplayDate( GtkAdjustment *p_adj )
+{
+    intf_thread_t *p_intf;
+   
+    p_intf = gtk_object_get_data( GTK_OBJECT( p_adj ), "p_intf" );
+
+    if( p_intf->p_input != NULL )
+    {
+#define p_area p_intf->p_input->stream.p_selected_area
+        char psz_time[ OFFSETTOTIME_MAX_SIZE ];
+
+        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+
+        gtk_label_set_text( p_intf->p_sys->p_label_date,
+                            input_OffsetToTime( p_intf->p_input, psz_time,
+                                   ( p_area->i_size * p_adj->value ) / 100 ) );
+
+        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+#undef p_area
+     }
+}
+
+
index ddb0aaf27c2e946915a9e16e8e5ef46765853aac..bddf1134b722827217d34e3910f901f0ed224a37 100644 (file)
@@ -12,6 +12,7 @@
   <gettext_support>True</gettext_support>
   <output_main_file>False</output_main_file>
   <output_build_files>False</output_build_files>
+  <backup_source_files>False</backup_source_files>
   <main_source_file>gnome_interface.c</main_source_file>
   <main_header_file>gnome_interface.h</main_header_file>
   <handler_source_file>gnome_callbacks.c</handler_source_file>
              <stock_icon>GNOME_STOCK_MENU_CDROM</stock_icon>
            </widget>
 
+           <widget>
+             <class>GtkPixmapMenuItem</class>
+             <name>menubar_network</name>
+             <tooltip>Select a Network Stream</tooltip>
+             <signal>
+               <name>activate</name>
+               <handler>on_menubar_network_activate</handler>
+               <last_modification_time>Mon, 12 Mar 2001 14:33:42 GMT</last_modification_time>
+             </signal>
+             <label>_Network Stream...</label>
+             <right_justify>False</right_justify>
+             <stock_icon>GNOME_STOCK_MENU_REFRESH</stock_icon>
+           </widget>
+
            <widget>
              <class>GtkMenuItem</class>
              <name>separator1</name>
     <widget>
       <class>GnomeDockItem</class>
       <name>dockitem_toolbar</name>
-      <border_width>1</border_width>
       <placement>GNOME_DOCK_TOP</placement>
       <band>1</band>
       <position>0</position>
       <widget>
        <class>GtkToolbar</class>
        <name>toolbar</name>
-       <border_width>1</border_width>
        <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
        <type>GTK_TOOLBAR_BOTH</type>
        <space_size>16</space_size>
          <stock_pixmap>GNOME_STOCK_PIXMAP_CDROM</stock_pixmap>
        </widget>
 
+       <widget>
+         <class>GtkButton</class>
+         <child_name>Toolbar:button</child_name>
+         <name>toolbar_network</name>
+         <tooltip>Select a Network Stream</tooltip>
+         <signal>
+           <name>clicked</name>
+           <handler>on_toolbar_network_clicked</handler>
+           <last_modification_time>Mon, 12 Mar 2001 14:32:18 GMT</last_modification_time>
+         </signal>
+         <label>Net</label>
+         <stock_pixmap>GNOME_STOCK_PIXMAP_REFRESH</stock_pixmap>
+       </widget>
+
        <widget>
          <class>GtkButton</class>
          <child_name>Toolbar:button</child_name>
       <spacing>0</spacing>
 
       <widget>
-       <class>GtkEntry</class>
-       <name>entry1</name>
-       <can_focus>True</can_focus>
-       <editable>True</editable>
-       <text_visible>True</text_visible>
-       <text_max_length>0</text_max_length>
-       <text>Tired of boring stub messages ? Write your own exciting message here !!</text>
+       <class>GtkHBox</class>
+       <name>hbox4</name>
+       <homogeneous>True</homogeneous>
+       <spacing>0</spacing>
        <child>
          <padding>0</padding>
-         <expand>False</expand>
-         <fill>False</fill>
+         <expand>True</expand>
+         <fill>True</fill>
        </child>
-      </widget>
 
-      <widget>
-       <class>GtkLabel</class>
-       <name>label6</name>
-       <label>This part of the interface doesn't work yet. You can drag the slider below, though:</label>
-       <justify>GTK_JUSTIFY_LEFT</justify>
-       <wrap>False</wrap>
-       <xalign>0</xalign>
-       <yalign>0.5</yalign>
-       <xpad>5</xpad>
-       <ypad>0</ypad>
-       <child>
-         <padding>0</padding>
-         <expand>False</expand>
-         <fill>False</fill>
-       </child>
+       <widget>
+         <class>GtkLabel</class>
+         <name>label_date</name>
+         <label>-:--:--</label>
+         <justify>GTK_JUSTIFY_CENTER</justify>
+         <wrap>False</wrap>
+         <xalign>0.5</xalign>
+         <yalign>0.5</yalign>
+         <xpad>0</xpad>
+         <ypad>0</ypad>
+         <child>
+           <padding>0</padding>
+           <expand>False</expand>
+           <fill>False</fill>
+         </child>
+       </widget>
+
+       <widget>
+         <class>GtkLabel</class>
+         <name>label_status</name>
+         <label>Status: foo</label>
+         <justify>GTK_JUSTIFY_CENTER</justify>
+         <wrap>False</wrap>
+         <xalign>0.5</xalign>
+         <yalign>0.5</yalign>
+         <xpad>0</xpad>
+         <ypad>0</ypad>
+         <child>
+           <padding>0</padding>
+           <expand>False</expand>
+           <fill>False</fill>
+         </child>
+       </widget>
+
+       <widget>
+         <class>GtkLabel</class>
+         <name>label_bar</name>
+         <label>Bar: baz</label>
+         <justify>GTK_JUSTIFY_CENTER</justify>
+         <wrap>False</wrap>
+         <xalign>0.5</xalign>
+         <yalign>0.5</yalign>
+         <xpad>0</xpad>
+         <ypad>0</ypad>
+         <child>
+           <padding>0</padding>
+           <expand>False</expand>
+           <fill>False</fill>
+         </child>
+       </widget>
       </widget>
 
       <widget>
        <class>GtkHScale</class>
-       <name>hscale</name>
+       <name>slider</name>
        <can_focus>True</can_focus>
        <signal>
-         <name>button_release_event</name>
-         <handler>on_hscale_button_release_event</handler>
-         <last_modification_time>Tue, 13 Feb 2001 01:15:41 GMT</last_modification_time>
+         <name>button_press_event</name>
+         <handler>on_slider_button_press_event</handler>
+         <last_modification_time>Wed, 14 Mar 2001 13:46:55 GMT</last_modification_time>
        </signal>
        <signal>
-         <name>button_press_event</name>
-         <handler>on_hscale_button_press_event</handler>
-         <last_modification_time>Tue, 13 Feb 2001 02:55:04 GMT</last_modification_time>
+         <name>button_release_event</name>
+         <handler>on_slider_button_release_event</handler>
+         <last_modification_time>Wed, 14 Mar 2001 13:46:59 GMT</last_modification_time>
        </signal>
-       <draw_value>True</draw_value>
-       <value_pos>GTK_POS_BOTTOM</value_pos>
-       <digits>1</digits>
-       <policy>GTK_UPDATE_DELAYED</policy>
+       <draw_value>False</draw_value>
+       <value_pos>GTK_POS_TOP</value_pos>
+       <digits>0</digits>
+       <policy>GTK_UPDATE_CONTINUOUS</policy>
        <value>0</value>
        <lower>0</lower>
        <upper>100</upper>
-       <step>1</step>
+       <step>0</step>
        <page>6.25</page>
        <page_size>0</page_size>
        <child>
          <padding>0</padding>
-         <expand>False</expand>
-         <fill>False</fill>
-       </child>
-      </widget>
-
-      <widget>
-       <class>GtkLabel</class>
-       <name>label13</name>
-       <label>HEY ! YOU CAN DROP A FILE ON VLC TOO :-)</label>
-       <justify>GTK_JUSTIFY_CENTER</justify>
-       <wrap>False</wrap>
-       <xalign>0.5</xalign>
-       <yalign>0.5</yalign>
-       <xpad>0</xpad>
-       <ypad>5</ypad>
-       <child>
-         <padding>0</padding>
-         <expand>False</expand>
-         <fill>False</fill>
+         <expand>True</expand>
+         <fill>True</fill>
        </child>
       </widget>
     </widget>
     <stock_icon>GNOME_STOCK_MENU_TIMER</stock_icon>
   </widget>
 
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>separator2</name>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkPixmapMenuItem</class>
-    <name>popup_open</name>
-    <tooltip>Open a File</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>on_popup_open_activate</handler>
-      <last_modification_time>Sun, 04 Mar 2001 21:01:58 GMT</last_modification_time>
-    </signal>
-    <label>_Open File...</label>
-    <right_justify>False</right_justify>
-    <stock_icon>GNOME_STOCK_MENU_OPEN</stock_icon>
-  </widget>
-
-  <widget>
-    <class>GtkPixmapMenuItem</class>
-    <name>popup_disc</name>
-    <tooltip>Open a DVD or VCD</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>on_popup_disc_activate</handler>
-      <last_modification_time>Sun, 04 Mar 2001 02:57:11 GMT</last_modification_time>
-    </signal>
-    <label>Open _Disc...</label>
-    <right_justify>False</right_justify>
-    <stock_icon>GNOME_STOCK_MENU_CDROM</stock_icon>
-  </widget>
-
   <widget>
     <class>GtkMenuItem</class>
     <name>separator3</name>
     <right_justify>False</right_justify>
   </widget>
 
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>separator8</name>
-    <right_justify>False</right_justify>
-  </widget>
-
   <widget>
     <class>GtkMenuItem</class>
     <name>popup_audio</name>
     <sensitive>False</sensitive>
     <tooltip>Select audio channel</tooltip>
-    <label>Audio</label>
+    <label>_Audio</label>
     <right_justify>False</right_justify>
   </widget>
 
 
   <widget>
     <class>GtkMenuItem</class>
-    <name>separator4</name>
-    <right_justify>False</right_justify>
+    <name>popup_file</name>
+    <stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item>
+
+    <widget>
+      <class>GtkMenu</class>
+      <name>popup_file_menu</name>
+
+      <widget>
+       <class>GtkPixmapMenuItem</class>
+       <name>popup_open</name>
+       <tooltip>Open a File</tooltip>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_open_activate</handler>
+         <last_modification_time>Sun, 04 Mar 2001 21:01:58 GMT</last_modification_time>
+       </signal>
+       <label>_Open File...</label>
+       <right_justify>False</right_justify>
+       <stock_icon>GNOME_STOCK_MENU_OPEN</stock_icon>
+      </widget>
+
+      <widget>
+       <class>GtkPixmapMenuItem</class>
+       <name>popup_disc</name>
+       <tooltip>Open a DVD or VCD</tooltip>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_disc_activate</handler>
+         <last_modification_time>Sun, 04 Mar 2001 02:57:11 GMT</last_modification_time>
+       </signal>
+       <label>Open _Disc...</label>
+       <right_justify>False</right_justify>
+       <stock_icon>GNOME_STOCK_MENU_CDROM</stock_icon>
+      </widget>
+
+      <widget>
+       <class>GtkPixmapMenuItem</class>
+       <name>popup_network</name>
+       <tooltip>Select a Network Stream</tooltip>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_network_activate</handler>
+         <last_modification_time>Mon, 12 Mar 2001 14:57:25 GMT</last_modification_time>
+       </signal>
+       <label>_Network Stream...</label>
+       <right_justify>False</right_justify>
+       <stock_icon>GNOME_STOCK_MENU_REFRESH</stock_icon>
+      </widget>
+
+      <widget>
+       <class>GtkMenuItem</class>
+       <name>separator4</name>
+       <right_justify>False</right_justify>
+      </widget>
+
+      <widget>
+       <class>GtkPixmapMenuItem</class>
+       <name>popup_about</name>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_about_activate</handler>
+         <last_modification_time>Mon, 12 Feb 2001 00:00:08 GMT</last_modification_time>
+       </signal>
+       <stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
+      </widget>
+    </widget>
   </widget>
 
   <widget>
-    <class>GtkPixmapMenuItem</class>
-    <name>popup_about</name>
-    <signal>
-      <name>activate</name>
-      <handler>on_popup_about_activate</handler>
-      <last_modification_time>Mon, 12 Feb 2001 00:00:08 GMT</last_modification_time>
-    </signal>
-    <stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
+    <class>GtkMenuItem</class>
+    <name>separator2</name>
+    <right_justify>False</right_justify>
   </widget>
 
   <widget>
@@ -754,7 +814,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
   <title>Open File</title>
   <type>GTK_WINDOW_TOPLEVEL</type>
   <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
+  <modal>True</modal>
   <allow_shrink>False</allow_shrink>
   <allow_grow>True</allow_grow>
   <auto_shrink>False</auto_shrink>
@@ -1047,7 +1107,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
   <title>Open Disc</title>
   <type>GTK_WINDOW_TOPLEVEL</type>
   <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
+  <modal>True</modal>
   <allow_shrink>False</allow_shrink>
   <allow_grow>False</allow_grow>
   <auto_shrink>False</auto_shrink>
@@ -1369,4 +1429,286 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
   </widget>
 </widget>
 
+<widget>
+  <class>GnomeDialog</class>
+  <name>intf_network</name>
+  <title>Network Stream</title>
+  <type>GTK_WINDOW_TOPLEVEL</type>
+  <position>GTK_WIN_POS_NONE</position>
+  <modal>True</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>False</allow_grow>
+  <auto_shrink>False</auto_shrink>
+  <auto_close>False</auto_close>
+  <hide_on_close>False</hide_on_close>
+
+  <widget>
+    <class>GtkVBox</class>
+    <child_name>GnomeDialog:vbox</child_name>
+    <name>vbox5</name>
+    <homogeneous>False</homogeneous>
+    <spacing>8</spacing>
+    <child>
+      <padding>4</padding>
+      <expand>True</expand>
+      <fill>True</fill>
+    </child>
+
+    <widget>
+      <class>GtkHButtonBox</class>
+      <child_name>GnomeDialog:action_area</child_name>
+      <name>hbuttonbox1</name>
+      <layout_style>GTK_BUTTONBOX_END</layout_style>
+      <spacing>8</spacing>
+      <child_min_width>85</child_min_width>
+      <child_min_height>27</child_min_height>
+      <child_ipad_x>7</child_ipad_x>
+      <child_ipad_y>0</child_ipad_y>
+      <child>
+       <padding>0</padding>
+       <expand>False</expand>
+       <fill>True</fill>
+       <pack>GTK_PACK_END</pack>
+      </child>
+
+      <widget>
+       <class>GtkButton</class>
+       <name>network_ok</name>
+       <can_default>True</can_default>
+       <can_focus>True</can_focus>
+       <signal>
+         <name>clicked</name>
+         <handler>on_network_ok_clicked</handler>
+         <last_modification_time>Mon, 12 Mar 2001 14:56:40 GMT</last_modification_time>
+       </signal>
+       <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+      </widget>
+
+      <widget>
+       <class>GtkButton</class>
+       <name>network_cancel</name>
+       <can_default>True</can_default>
+       <can_focus>True</can_focus>
+       <signal>
+         <name>clicked</name>
+         <handler>on_network_cancel_clicked</handler>
+         <last_modification_time>Mon, 12 Mar 2001 14:56:51 GMT</last_modification_time>
+       </signal>
+       <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkHBox</class>
+      <name>hbox3</name>
+      <homogeneous>False</homogeneous>
+      <spacing>5</spacing>
+      <child>
+       <padding>0</padding>
+       <expand>True</expand>
+       <fill>True</fill>
+      </child>
+
+      <widget>
+       <class>GtkFrame</class>
+       <name>frame3</name>
+       <label>Protocol</label>
+       <label_xalign>0</label_xalign>
+       <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+       <child>
+         <padding>0</padding>
+         <expand>True</expand>
+         <fill>True</fill>
+       </child>
+
+       <widget>
+         <class>GtkVBox</class>
+         <name>vbox6</name>
+         <homogeneous>False</homogeneous>
+         <spacing>0</spacing>
+
+         <widget>
+           <class>GtkRadioButton</class>
+           <name>network_ts</name>
+           <can_focus>True</can_focus>
+           <label>TS</label>
+           <active>False</active>
+           <draw_indicator>True</draw_indicator>
+           <group>network</group>
+           <child>
+             <padding>0</padding>
+             <expand>False</expand>
+             <fill>False</fill>
+           </child>
+         </widget>
+
+         <widget>
+           <class>GtkRadioButton</class>
+           <name>network_rtp</name>
+           <sensitive>False</sensitive>
+           <can_focus>True</can_focus>
+           <label>RTP</label>
+           <active>False</active>
+           <draw_indicator>True</draw_indicator>
+           <group>network</group>
+           <child>
+             <padding>0</padding>
+             <expand>False</expand>
+             <fill>False</fill>
+           </child>
+         </widget>
+
+         <widget>
+           <class>GtkRadioButton</class>
+           <name>network_http</name>
+           <sensitive>False</sensitive>
+           <can_focus>True</can_focus>
+           <label>HTTP</label>
+           <active>False</active>
+           <draw_indicator>True</draw_indicator>
+           <group>network</group>
+           <child>
+             <padding>0</padding>
+             <expand>False</expand>
+             <fill>False</fill>
+           </child>
+         </widget>
+       </widget>
+      </widget>
+
+      <widget>
+       <class>GtkFrame</class>
+       <name>frame4</name>
+       <label>Server</label>
+       <label_xalign>0</label_xalign>
+       <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+       <child>
+         <padding>0</padding>
+         <expand>True</expand>
+         <fill>True</fill>
+       </child>
+
+       <widget>
+         <class>GtkTable</class>
+         <name>table2</name>
+         <border_width>5</border_width>
+         <rows>2</rows>
+         <columns>2</columns>
+         <homogeneous>False</homogeneous>
+         <row_spacing>5</row_spacing>
+         <column_spacing>5</column_spacing>
+
+         <widget>
+           <class>GtkLabel</class>
+           <name>label17</name>
+           <label>Address</label>
+           <justify>GTK_JUSTIFY_CENTER</justify>
+           <wrap>False</wrap>
+           <xalign>0</xalign>
+           <yalign>0.5</yalign>
+           <xpad>0</xpad>
+           <ypad>0</ypad>
+           <child>
+             <left_attach>0</left_attach>
+             <right_attach>1</right_attach>
+             <top_attach>0</top_attach>
+             <bottom_attach>1</bottom_attach>
+             <xpad>0</xpad>
+             <ypad>0</ypad>
+             <xexpand>False</xexpand>
+             <yexpand>False</yexpand>
+             <xshrink>False</xshrink>
+             <yshrink>False</yshrink>
+             <xfill>True</xfill>
+             <yfill>False</yfill>
+           </child>
+         </widget>
+
+         <widget>
+           <class>GtkLabel</class>
+           <name>label18</name>
+           <label>Port</label>
+           <justify>GTK_JUSTIFY_CENTER</justify>
+           <wrap>False</wrap>
+           <xalign>0</xalign>
+           <yalign>0.5</yalign>
+           <xpad>0</xpad>
+           <ypad>0</ypad>
+           <child>
+             <left_attach>0</left_attach>
+             <right_attach>1</right_attach>
+             <top_attach>1</top_attach>
+             <bottom_attach>2</bottom_attach>
+             <xpad>0</xpad>
+             <ypad>0</ypad>
+             <xexpand>False</xexpand>
+             <yexpand>False</yexpand>
+             <xshrink>False</xshrink>
+             <yshrink>False</yshrink>
+             <xfill>True</xfill>
+             <yfill>False</yfill>
+           </child>
+         </widget>
+
+         <widget>
+           <class>GtkSpinButton</class>
+           <name>network_port</name>
+           <can_focus>True</can_focus>
+           <climb_rate>1</climb_rate>
+           <digits>0</digits>
+           <numeric>False</numeric>
+           <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+           <snap>False</snap>
+           <wrap>False</wrap>
+           <value>1234</value>
+           <lower>0</lower>
+           <upper>65535</upper>
+           <step>1</step>
+           <page>10</page>
+           <page_size>10</page_size>
+           <child>
+             <left_attach>1</left_attach>
+             <right_attach>2</right_attach>
+             <top_attach>1</top_attach>
+             <bottom_attach>2</bottom_attach>
+             <xpad>0</xpad>
+             <ypad>0</ypad>
+             <xexpand>True</xexpand>
+             <yexpand>False</yexpand>
+             <xshrink>False</xshrink>
+             <yshrink>False</yshrink>
+             <xfill>True</xfill>
+             <yfill>False</yfill>
+           </child>
+         </widget>
+
+         <widget>
+           <class>GtkEntry</class>
+           <name>network_server</name>
+           <can_focus>True</can_focus>
+           <editable>True</editable>
+           <text_visible>True</text_visible>
+           <text_max_length>0</text_max_length>
+           <text>vls</text>
+           <child>
+             <left_attach>1</left_attach>
+             <right_attach>2</right_attach>
+             <top_attach>0</top_attach>
+             <bottom_attach>1</bottom_attach>
+             <xpad>0</xpad>
+             <ypad>0</ypad>
+             <xexpand>True</xexpand>
+             <yexpand>False</yexpand>
+             <xshrink>False</xshrink>
+             <yshrink>False</yshrink>
+             <xfill>True</xfill>
+             <yfill>False</yfill>
+           </child>
+         </widget>
+       </widget>
+      </widget>
+    </widget>
+  </widget>
+</widget>
+
 </GTK-Interface>
similarity index 79%
rename from plugins/gnome/gnome_sys.h
rename to plugins/gnome/intf_gnome.h
index dab71dab7c4f710431e7ddcca5fb69e9da7e1262..fadb04197f93589bd6206de27eee3ee4df2c9e3a 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * gnome_sys.h: private Gnome interface description
+ * intf_gnome.h: private Gnome interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: gnome_sys.h,v 1.7 2001/03/07 11:56:33 stef Exp $
+ * $Id: intf_gnome.h,v 1.3 2001/03/15 01:42:19 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 typedef struct intf_sys_s
 {
     /* special actions */
-    vlc_mutex_t         change_lock;                      /* the change lock */
-
     boolean_t           b_popup_changed;                   /* display menu ? */
     boolean_t           b_window_changed;        /* window display toggled ? */
     boolean_t           b_playlist_changed;    /* playlist display toggled ? */
-    boolean_t           b_scale_isfree;       /* user isn't dragging scale ? */
+    boolean_t           b_slider_free;                      /* slider status */
     boolean_t           b_menus_update;
 
-    /* intf_Manage callback timeout */
-    int                 i_timeout;
-
-    /* windows and widgets */
+    /* Windows and widgets */
     GtkWidget *         p_window;                             /* main window */
     GtkWidget *         p_popup;                               /* popup menu */
     GtkWidget *         p_playlist;                              /* playlist */
@@ -52,8 +47,17 @@ typedef struct intf_sys_s
     GtkWidget *         p_about;                             /* about window */
     GtkWidget *         p_fileopen;                      /* file open window */
     GtkWidget *         p_disc;                     /* disc selection window */
+    GtkWidget *         p_network;                  /* network stream window */
+
+    /* The slider */
+    GtkAdjustment *     p_adj;                   /* slider adjustment object */
+    float               f_adj_oldvalue;                    /* previous value */
+
+    /* The window labels */
+    GtkLabel *          p_label_date;
+    GtkLabel *          p_label_status;
 
-    /* XXX: ugly kludge */
+    /* XXX: Ugly kludge, see intf_gnome.c */
     void             ( *pf_gtk_callback ) ( void );
     void             ( *pf_gdk_callback ) ( void );
 
index 78be55062f306265d534204490fbbdda312ce6f5..81db397a2a8c30ac62d7c25affcf8549124b93cb 100644 (file)
 #include "input_ext-intf.h"
 
 #include "interface.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 #include "intf_msg.h"
 
 #include "gtk_callbacks.h"
 #include "gtk_interface.h"
 #include "gtk_support.h"
-#include "gtk_sys.h"
+#include "intf_gtk.h"
 
 #include "main.h"
 
@@ -90,7 +90,9 @@ on_menubar_exit_activate               (GtkMenuItem     *menuitem,
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
 
+    vlc_mutex_lock( &p_intf->change_lock );
     p_intf->b_die = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
 }
 
 void
@@ -187,8 +189,8 @@ on_toolbar_prev_clicked                (GtkButton       *button,
     if( p_intf->p_input != NULL )
     {
         /* FIXME: temporary hack */
-        intf_PlstPrev( p_main->p_playlist );
-        intf_PlstPrev( p_main->p_playlist );
+        intf_PlaylistPrev( p_main->p_playlist );
+        intf_PlaylistPrev( p_main->p_playlist );
         p_intf->p_input->b_eof = 1;
     }
 }
@@ -240,7 +242,9 @@ on_popup_exit_activate                 (GtkMenuItem     *menuitem,
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
 
+    vlc_mutex_lock( &p_intf->change_lock );
     p_intf->b_die = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
 }
 
 void
@@ -254,7 +258,7 @@ on_fileopen_ok_clicked                 (GtkButton       *button,
     gtk_widget_hide (filesel);
     filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel));
 
-    intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, (char*)filename );
+    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (char*)filename );
 }
 
 
@@ -362,48 +366,6 @@ on_toolbar_fast_clicked                (GtkButton       *button,
 }
 
 
-gboolean
-on_hscale_button_release_event         (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data)
-{
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
-
-    GtkAdjustment *p_adj = gtk_range_get_adjustment( GTK_RANGE(widget) );
-    off_t i_seek;
-
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
-
-    if( p_intf->p_input != NULL )
-    {
-        i_seek = (p_adj->value *
-                  p_intf->p_input->stream.p_selected_area->i_size) / 100;
-        input_Seek( p_intf->p_input, i_seek );
-    }
-    p_intf->p_sys->b_scale_isfree = 1;
-
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
-
-    return FALSE;
-}
-
-
-gboolean
-on_hscale_button_press_event           (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data)
-{
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
-
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
-    p_intf->p_sys->b_scale_isfree = 0;
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
-
-    return FALSE;
-}
-
-
-
 void
 on_intf_modules_destroy                (GtkObject       *object,
                                         gpointer         user_data)
@@ -477,7 +439,7 @@ on_intf_window_drag_data_received      (GtkWidget       *widget,
         p_intf->p_input->b_eof = 1;
      }
      
-    intf_PlstJumpto( p_main->p_playlist, end-1 );
+    intf_PlaylistJumpto( p_main->p_playlist, end-1 );
 
 }
 
@@ -572,7 +534,7 @@ on_disc_ok_clicked                     (GtkButton       *button,
 
     /* Build source name and add it to playlist */
     sprintf( psz_source, "%s:%s", psz_method, psz_device );
-    intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
+    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
 
     gtk_widget_hide( p_intf->p_sys->p_disc );
 }
@@ -731,7 +693,11 @@ on_intf_window_destroy                 (GtkWidget       *widget,
                                         gpointer         user_data)
 {
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget),  "intf_window" );
+
+    vlc_mutex_lock( &p_intf->change_lock );
     p_intf->b_die = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
+
     return TRUE;
 }
 
@@ -764,7 +730,6 @@ on_playlist_clist_drag_motion          (GtkWidget       *widget,
     GtkCList * clist;
     gint row,col;
     int dummy;
-    gchar * text[2];
     GdkColor color;
     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget),  "intf_playlist" );
    
@@ -806,3 +771,135 @@ on_playlist_clist_drag_motion          (GtkWidget       *widget,
     return TRUE;
 }
 
+
+void
+on_intf_network_destroy                (GtkObject       *object,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_network" );
+
+    p_intf->p_sys->p_network = NULL;
+}
+
+
+void
+on_network_ok_clicked                  (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_network" );
+    char *psz_source, *psz_server, *psz_protocol;
+    unsigned int i_port;
+
+    psz_server = gtk_entry_get_text( GTK_ENTRY( lookup_widget(
+                                 GTK_WIDGET(button), "network_server" ) ) );
+
+    /* Check which protocol was activated */
+    if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
+                                          "network_ts" ) )->active )
+    {
+        psz_protocol = "ts";
+    }
+    else if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
+                                               "network_rtp" ) )->active )
+    {
+        psz_protocol = "rtp";
+    }
+    else
+    {
+        intf_ErrMsg( "intf error: unknown protocol toggle button position" );
+        return;
+    }
+
+    /* Get the port number and make sure it will not overflow 5 characters */
+    i_port = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(
+                 lookup_widget( GTK_WIDGET(button), "network_port" ) ) );
+    if( i_port > 65535 )
+    {
+        intf_ErrMsg( "intf error: invalid port %i", i_port );
+    }
+
+    /* Allocate room for "protocol://server:port" */
+    psz_source = malloc( strlen( psz_protocol ) + strlen( psz_server ) + 10 );
+    if( psz_source == NULL )
+    {
+        return;
+    }
+   
+    /* Build source name and add it to playlist */
+    sprintf( psz_source, "%s://%s:%i", psz_protocol, psz_server, i_port );
+    intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
+    free( psz_source );
+
+    gtk_widget_hide( p_intf->p_sys->p_network );
+}
+
+
+void
+on_network_cancel_clicked              (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
+}
+
+
+void
+on_menubar_network_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+
+    gtk_widget_show( p_intf->p_sys->p_network );
+    gdk_window_raise( p_intf->p_sys->p_network->window );
+}
+
+
+void
+on_popup_network_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+
+    gtk_widget_show( p_intf->p_sys->p_network );
+    gdk_window_raise( p_intf->p_sys->p_network->window );
+}
+
+void
+on_toolbar_network_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+
+    gtk_widget_show( p_intf->p_sys->p_network );
+    gdk_window_raise( p_intf->p_sys->p_network->window );
+}
+
+
+gboolean
+on_slider_button_release_event         (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
+
+    vlc_mutex_lock( &p_intf->change_lock );
+    p_intf->p_sys->b_slider_free = 1;
+    vlc_mutex_unlock( &p_intf->change_lock );
+
+    return FALSE;
+}
+
+
+gboolean
+on_slider_button_press_event           (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
+
+    vlc_mutex_lock( &p_intf->change_lock );
+    p_intf->p_sys->b_slider_free = 0;
+    vlc_mutex_unlock( &p_intf->change_lock );
+
+    return FALSE;
+}
+
index a55498f4b0ce37cd64faa5275f45c7a83937fde3..461f80ffdcfdb60ae0a0738150df5567b598c403 100644 (file)
@@ -52,14 +52,8 @@ void
 on_toolbar_next_clicked                (GtkButton       *button,
                                         gpointer         user_data);
 
-gboolean
-on_hscale_button_release_event         (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_hscale_button_press_event           (GtkWidget       *widget,
-                                        GdkEventButton  *event,
+void
+on_toolbar_network_clicked             (GtkButton       *button,
                                         gpointer         user_data);
 
 void
@@ -284,3 +278,33 @@ on_playlist_clist_drag_motion          (GtkWidget       *widget,
                                         gint             y,
                                         guint            time,
                                         gpointer         user_data);
+
+void
+on_intf_network_destroy                (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_network_ok_clicked                  (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_network_cancel_clicked              (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_menubar_network_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_popup_network_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+gboolean
+on_slider_button_release_event         (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_slider_button_press_event           (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
index d2deedb24a5e41ca4c1d457590028c4bf149a7a5..1326ad705a37d69993dce58dcdb71cf524755a71 100644 (file)
@@ -31,6 +31,7 @@ create_intf_window (void)
   GtkAccelGroup *menubar_file_menu_accels;
   GtkWidget *menubar_open;
   GtkWidget *menubar_disc;
+  GtkWidget *menubar_network;
   GtkWidget *separator4;
   GtkWidget *menubar_exit;
   GtkWidget *menubar_view;
@@ -57,6 +58,7 @@ create_intf_window (void)
   GtkWidget *toolbar;
   GtkWidget *toolbar_open;
   GtkWidget *toolbar_disc;
+  GtkWidget *toolbar_network;
   GtkWidget *toolbar_back;
   GtkWidget *toolbar_stop;
   GtkWidget *toolbar_play;
@@ -66,11 +68,12 @@ create_intf_window (void)
   GtkWidget *toolbar_playlist;
   GtkWidget *toolbar_prev;
   GtkWidget *toolbar_next;
-  GtkWidget *entry1;
-  GtkWidget *label6;
-  GtkWidget *hscale;
-  GtkWidget *label13;
-  GtkWidget *statusbar1;
+  GtkWidget *hbox7;
+  GtkWidget *label_date;
+  GtkWidget *label_status;
+  GtkWidget *label_bar;
+  GtkWidget *slider;
+  GtkWidget *intf_statusbar;
   GtkAccelGroup *accel_group;
   GtkTooltips *tooltips;
 
@@ -147,6 +150,24 @@ create_intf_window (void)
   gtk_widget_show (menubar_disc);
   gtk_container_add (GTK_CONTAINER (menubar_file_menu), menubar_disc);
   gtk_tooltips_set_tip (tooltips, menubar_disc, _("Open a DVD or VCD"), NULL);
+  gtk_widget_add_accelerator (menubar_disc, "activate", accel_group,
+                              GDK_F4, 0,
+                              GTK_ACCEL_VISIBLE);
+
+  menubar_network = gtk_menu_item_new_with_label ("");
+  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menubar_network)->child),
+                                   _("_Network Stream..."));
+  gtk_widget_add_accelerator (menubar_network, "activate_item", menubar_file_menu_accels,
+                              tmp_key, 0, 0);
+  gtk_widget_ref (menubar_network);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_network", menubar_network,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (menubar_network);
+  gtk_container_add (GTK_CONTAINER (menubar_file_menu), menubar_network);
+  gtk_tooltips_set_tip (tooltips, menubar_network, _("Select a Network Stream"), NULL);
+  gtk_widget_add_accelerator (menubar_network, "activate", accel_group,
+                              GDK_F5, 0,
+                              GTK_ACCEL_VISIBLE);
 
   separator4 = gtk_menu_item_new ();
   gtk_widget_ref (separator4);
@@ -390,6 +411,17 @@ create_intf_window (void)
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (toolbar_disc);
 
+  toolbar_network = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
+                                GTK_TOOLBAR_CHILD_BUTTON,
+                                NULL,
+                                _("Net"),
+                                _("Select a Network Stream"), NULL,
+                                NULL, NULL, NULL);
+  gtk_widget_ref (toolbar_network);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_network", toolbar_network,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (toolbar_network);
+
   gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
 
   toolbar_back = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
@@ -495,47 +527,48 @@ create_intf_window (void)
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (toolbar_next);
 
-  entry1 = gtk_entry_new ();
-  gtk_widget_ref (entry1);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "entry1", entry1,
+  hbox7 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_ref (hbox7);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "hbox7", hbox7,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (entry1);
-  gtk_box_pack_start (GTK_BOX (vbox2), entry1, FALSE, TRUE, 0);
-  gtk_entry_set_text (GTK_ENTRY (entry1), _("Tired of boring stub messages ? Write your own exciting message here !!"));
+  gtk_widget_show (hbox7);
+  gtk_box_pack_start (GTK_BOX (vbox2), hbox7, TRUE, TRUE, 0);
 
-  label6 = gtk_label_new (_("This part of the interface doesn't work yet. You can drag the slider below, though:"));
-  gtk_widget_ref (label6);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label6", label6,
+  label_date = gtk_label_new (_("-:--:--"));
+  gtk_widget_ref (label_date);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_date", label_date,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (label6);
-  gtk_box_pack_start (GTK_BOX (vbox2), label6, FALSE, TRUE, 0);
-  gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_LEFT);
-  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
-  gtk_misc_set_padding (GTK_MISC (label6), 5, 0);
+  gtk_widget_show (label_date);
+  gtk_box_pack_start (GTK_BOX (hbox7), label_date, FALSE, FALSE, 0);
 
-  hscale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 6.25, 0)));
-  gtk_widget_ref (hscale);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "hscale", hscale,
+  label_status = gtk_label_new (_("Status: foo"));
+  gtk_widget_ref (label_status);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_status", label_status,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (hscale);
-  gtk_box_pack_start (GTK_BOX (vbox2), hscale, FALSE, TRUE, 0);
-  gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_BOTTOM);
-  gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_DELAYED);
+  gtk_widget_show (label_status);
+  gtk_box_pack_start (GTK_BOX (hbox7), label_status, FALSE, FALSE, 0);
 
-  label13 = gtk_label_new (_("HEY ! YOU CAN DROP A FILE ON VLC TOO :-)"));
-  gtk_widget_ref (label13);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label13", label13,
+  label_bar = gtk_label_new (_("Bar: baz"));
+  gtk_widget_ref (label_bar);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_bar", label_bar,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (label13);
-  gtk_box_pack_start (GTK_BOX (vbox2), label13, FALSE, TRUE, 0);
-  gtk_misc_set_padding (GTK_MISC (label13), 0, 5);
+  gtk_widget_show (label_bar);
+  gtk_box_pack_start (GTK_BOX (hbox7), label_bar, FALSE, FALSE, 0);
 
-  statusbar1 = gtk_statusbar_new ();
-  gtk_widget_ref (statusbar1);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "statusbar1", statusbar1,
+  slider = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 6.25, 0)));
+  gtk_widget_ref (slider);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "slider", slider,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (statusbar1);
-  gtk_box_pack_end (GTK_BOX (vbox2), statusbar1, FALSE, TRUE, 0);
+  gtk_widget_show (slider);
+  gtk_box_pack_start (GTK_BOX (vbox2), slider, TRUE, TRUE, 0);
+  gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE);
+
+  intf_statusbar = gtk_statusbar_new ();
+  gtk_widget_ref (intf_statusbar);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "intf_statusbar", intf_statusbar,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (intf_statusbar);
+  gtk_box_pack_start (GTK_BOX (vbox2), intf_statusbar, FALSE, FALSE, 0);
 
   gtk_signal_connect (GTK_OBJECT (intf_window), "drag_data_received",
                       GTK_SIGNAL_FUNC (on_intf_window_drag_data_received),
@@ -549,6 +582,9 @@ create_intf_window (void)
   gtk_signal_connect (GTK_OBJECT (menubar_disc), "activate",
                       GTK_SIGNAL_FUNC (on_menubar_disc_activate),
                       NULL);
+  gtk_signal_connect (GTK_OBJECT (menubar_network), "activate",
+                      GTK_SIGNAL_FUNC (on_menubar_network_activate),
+                      NULL);
   gtk_signal_connect (GTK_OBJECT (menubar_exit), "activate",
                       GTK_SIGNAL_FUNC (on_menubar_exit_activate),
                       NULL);
@@ -570,6 +606,9 @@ create_intf_window (void)
   gtk_signal_connect (GTK_OBJECT (toolbar_disc), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_disc_clicked),
                       NULL);
+  gtk_signal_connect (GTK_OBJECT (toolbar_network), "clicked",
+                      GTK_SIGNAL_FUNC (on_toolbar_network_clicked),
+                      NULL);
   gtk_signal_connect (GTK_OBJECT (toolbar_back), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_back_clicked),
                       NULL);
@@ -597,11 +636,11 @@ create_intf_window (void)
   gtk_signal_connect (GTK_OBJECT (toolbar_next), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_next_clicked),
                       NULL);
-  gtk_signal_connect (GTK_OBJECT (hscale), "button_release_event",
-                      GTK_SIGNAL_FUNC (on_hscale_button_release_event),
+  gtk_signal_connect (GTK_OBJECT (slider), "button_release_event",
+                      GTK_SIGNAL_FUNC (on_slider_button_release_event),
                       NULL);
-  gtk_signal_connect (GTK_OBJECT (hscale), "button_press_event",
-                      GTK_SIGNAL_FUNC (on_hscale_button_press_event),
+  gtk_signal_connect (GTK_OBJECT (slider), "button_press_event",
+                      GTK_SIGNAL_FUNC (on_slider_button_press_event),
                       NULL);
 
   gtk_object_set_data (GTK_OBJECT (intf_window), "tooltips", tooltips);
@@ -622,16 +661,20 @@ create_intf_popup (void)
   GtkWidget *popup_slow;
   GtkWidget *popup_fast;
   GtkWidget *separator6;
-  GtkWidget *popup_open;
-  GtkWidget *popup_disc;
+  GtkWidget *main_window_toggle;
   GtkWidget *separator5;
   GtkWidget *popup_navigation;
-  GtkWidget *separator10;
   GtkWidget *popup_audio;
   GtkWidget *popup_subpictures;
-  GtkWidget *separator9;
-  GtkWidget *main_window_toggle;
+  GtkWidget *popup_file;
+  GtkWidget *popup_file_menu;
+  GtkAccelGroup *popup_file_menu_accels;
+  GtkWidget *popup_open;
+  GtkWidget *popup_disc;
+  GtkWidget *popup_network;
+  GtkWidget *separator12;
   GtkWidget *popup_about;
+  GtkWidget *separator9;
   GtkWidget *popup_exit;
   GtkTooltips *tooltips;
 
@@ -681,29 +724,16 @@ create_intf_popup (void)
   gtk_container_add (GTK_CONTAINER (intf_popup), separator6);
   gtk_widget_set_sensitive (separator6, FALSE);
 
-  popup_open = gtk_menu_item_new_with_label ("");
-  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_open)->child),
-                                   _("_Open File..."));
-  gtk_widget_add_accelerator (popup_open, "activate_item", intf_popup_accels,
-                              tmp_key, 0, 0);
-  gtk_widget_ref (popup_open);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open", popup_open,
-                            (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (popup_open);
-  gtk_container_add (GTK_CONTAINER (intf_popup), popup_open);
-  gtk_tooltips_set_tip (tooltips, popup_open, _("Open a File"), NULL);
-
-  popup_disc = gtk_menu_item_new_with_label ("");
-  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_disc)->child),
-                                   _("Open _Disc..."));
-  gtk_widget_add_accelerator (popup_disc, "activate_item", intf_popup_accels,
+  main_window_toggle = gtk_menu_item_new_with_label ("");
+  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (main_window_toggle)->child),
+                                   _("Toggle _Interface"));
+  gtk_widget_add_accelerator (main_window_toggle, "activate_item", intf_popup_accels,
                               tmp_key, 0, 0);
-  gtk_widget_ref (popup_disc);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_disc", popup_disc,
+  gtk_widget_ref (main_window_toggle);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "main_window_toggle", main_window_toggle,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (popup_disc);
-  gtk_container_add (GTK_CONTAINER (intf_popup), popup_disc);
-  gtk_tooltips_set_tip (tooltips, popup_disc, _("Open a DVD or VCD"), NULL);
+  gtk_widget_show (main_window_toggle);
+  gtk_container_add (GTK_CONTAINER (intf_popup), main_window_toggle);
 
   separator5 = gtk_menu_item_new ();
   gtk_widget_ref (separator5);
@@ -713,7 +743,11 @@ create_intf_popup (void)
   gtk_container_add (GTK_CONTAINER (intf_popup), separator5);
   gtk_widget_set_sensitive (separator5, FALSE);
 
-  popup_navigation = gtk_menu_item_new_with_label (_("Navigation"));
+  popup_navigation = gtk_menu_item_new_with_label ("");
+  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_navigation)->child),
+                                   _("_Navigation"));
+  gtk_widget_add_accelerator (popup_navigation, "activate_item", intf_popup_accels,
+                              tmp_key, 0, 0);
   gtk_widget_ref (popup_navigation);
   gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_navigation", popup_navigation,
                             (GtkDestroyNotify) gtk_widget_unref);
@@ -721,17 +755,9 @@ create_intf_popup (void)
   gtk_container_add (GTK_CONTAINER (intf_popup), popup_navigation);
   gtk_widget_set_sensitive (popup_navigation, FALSE);
 
-  separator10 = gtk_menu_item_new ();
-  gtk_widget_ref (separator10);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator10", separator10,
-                            (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (separator10);
-  gtk_container_add (GTK_CONTAINER (intf_popup), separator10);
-  gtk_widget_set_sensitive (separator10, FALSE);
-
   popup_audio = gtk_menu_item_new_with_label ("");
   tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_audio)->child),
-                                   _("A_udio"));
+                                   _("_Audio"));
   gtk_widget_add_accelerator (popup_audio, "activate_item", intf_popup_accels,
                               tmp_key, 0, 0);
   gtk_widget_ref (popup_audio);
@@ -743,7 +769,7 @@ create_intf_popup (void)
 
   popup_subpictures = gtk_menu_item_new_with_label ("");
   tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_subpictures)->child),
-                                   _("Sub _Pictures"));
+                                   _("_Subpictures"));
   gtk_widget_add_accelerator (popup_subpictures, "activate_item", intf_popup_accels,
                               tmp_key, 0, 0);
   gtk_widget_ref (popup_subpictures);
@@ -753,35 +779,86 @@ create_intf_popup (void)
   gtk_container_add (GTK_CONTAINER (intf_popup), popup_subpictures);
   gtk_widget_set_sensitive (popup_subpictures, FALSE);
 
-  separator9 = gtk_menu_item_new ();
-  gtk_widget_ref (separator9);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator9", separator9,
+  popup_file = gtk_menu_item_new_with_label ("");
+  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_file)->child),
+                                   _("_File"));
+  gtk_widget_add_accelerator (popup_file, "activate_item", intf_popup_accels,
+                              tmp_key, 0, 0);
+  gtk_widget_ref (popup_file);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_file", popup_file,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (separator9);
-  gtk_container_add (GTK_CONTAINER (intf_popup), separator9);
-  gtk_widget_set_sensitive (separator9, FALSE);
+  gtk_widget_show (popup_file);
+  gtk_container_add (GTK_CONTAINER (intf_popup), popup_file);
 
-  main_window_toggle = gtk_menu_item_new_with_label ("");
-  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (main_window_toggle)->child),
-                                   _("show/hide main _window"));
-  gtk_widget_add_accelerator (main_window_toggle, "activate_item", intf_popup_accels,
+  popup_file_menu = gtk_menu_new ();
+  gtk_widget_ref (popup_file_menu);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_file_menu", popup_file_menu,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (popup_file), popup_file_menu);
+  popup_file_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (popup_file_menu));
+
+  popup_open = gtk_menu_item_new_with_label ("");
+  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_open)->child),
+                                   _("_Open File..."));
+  gtk_widget_add_accelerator (popup_open, "activate_item", popup_file_menu_accels,
                               tmp_key, 0, 0);
-  gtk_widget_ref (main_window_toggle);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "main_window_toggle", main_window_toggle,
+  gtk_widget_ref (popup_open);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open", popup_open,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (main_window_toggle);
-  gtk_container_add (GTK_CONTAINER (intf_popup), main_window_toggle);
+  gtk_widget_show (popup_open);
+  gtk_container_add (GTK_CONTAINER (popup_file_menu), popup_open);
+  gtk_tooltips_set_tip (tooltips, popup_open, _("Open a File"), NULL);
+
+  popup_disc = gtk_menu_item_new_with_label ("");
+  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_disc)->child),
+                                   _("Open _Disc..."));
+  gtk_widget_add_accelerator (popup_disc, "activate_item", popup_file_menu_accels,
+                              tmp_key, 0, 0);
+  gtk_widget_ref (popup_disc);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_disc", popup_disc,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (popup_disc);
+  gtk_container_add (GTK_CONTAINER (popup_file_menu), popup_disc);
+  gtk_tooltips_set_tip (tooltips, popup_disc, _("Open a DVD or VCD"), NULL);
+
+  popup_network = gtk_menu_item_new_with_label ("");
+  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_network)->child),
+                                   _("_Network Stream..."));
+  gtk_widget_add_accelerator (popup_network, "activate_item", popup_file_menu_accels,
+                              tmp_key, 0, 0);
+  gtk_widget_ref (popup_network);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_network", popup_network,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (popup_network);
+  gtk_container_add (GTK_CONTAINER (popup_file_menu), popup_network);
+  gtk_tooltips_set_tip (tooltips, popup_network, _("Select a Network Stream"), NULL);
+
+  separator12 = gtk_menu_item_new ();
+  gtk_widget_ref (separator12);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator12", separator12,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (separator12);
+  gtk_container_add (GTK_CONTAINER (popup_file_menu), separator12);
+  gtk_widget_set_sensitive (separator12, FALSE);
 
   popup_about = gtk_menu_item_new_with_label ("");
   tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_about)->child),
                                    _("_About..."));
-  gtk_widget_add_accelerator (popup_about, "activate_item", intf_popup_accels,
+  gtk_widget_add_accelerator (popup_about, "activate_item", popup_file_menu_accels,
                               tmp_key, 0, 0);
   gtk_widget_ref (popup_about);
   gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_about", popup_about,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (popup_about);
-  gtk_container_add (GTK_CONTAINER (intf_popup), popup_about);
+  gtk_container_add (GTK_CONTAINER (popup_file_menu), popup_about);
+
+  separator9 = gtk_menu_item_new ();
+  gtk_widget_ref (separator9);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator9", separator9,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (separator9);
+  gtk_container_add (GTK_CONTAINER (intf_popup), separator9);
+  gtk_widget_set_sensitive (separator9, FALSE);
 
   popup_exit = gtk_menu_item_new_with_label ("");
   tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_exit)->child),
@@ -806,14 +883,17 @@ create_intf_popup (void)
   gtk_signal_connect (GTK_OBJECT (popup_fast), "activate",
                       GTK_SIGNAL_FUNC (on_popup_fast_activate),
                       NULL);
+  gtk_signal_connect (GTK_OBJECT (main_window_toggle), "activate",
+                      GTK_SIGNAL_FUNC (on_main_window_toggle),
+                      NULL);
   gtk_signal_connect (GTK_OBJECT (popup_open), "activate",
                       GTK_SIGNAL_FUNC (on_popup_open_activate),
                       NULL);
   gtk_signal_connect (GTK_OBJECT (popup_disc), "activate",
                       GTK_SIGNAL_FUNC (on_popup_disc_activate),
                       NULL);
-  gtk_signal_connect (GTK_OBJECT (main_window_toggle), "activate",
-                      GTK_SIGNAL_FUNC (on_main_window_toggle),
+  gtk_signal_connect (GTK_OBJECT (popup_network), "activate",
+                      GTK_SIGNAL_FUNC (on_popup_network_activate),
                       NULL);
   gtk_signal_connect (GTK_OBJECT (popup_about), "activate",
                       GTK_SIGNAL_FUNC (on_popup_about_activate),
@@ -883,7 +963,7 @@ create_intf_about (void)
   gtk_widget_show (frame1);
   gtk_box_pack_start (GTK_BOX (vbox3), frame1, FALSE, FALSE, 0);
 
-  label16 = gtk_label_new (_("R\351gis Duchesne <regis@via.ecp.fr>\nMichel Lespinasse <walken@zoy.org>\nOlivier Pomel <pomel@via.ecp.fr>\nPierre Baillet <oct@zoy.org>\nJean-Philippe Grimaldi <jeanphi@via.ecp.fr>\nAndres Krapf <dae@via.ecp.fr>\nChristophe Massiot <massiot@via.ecp.fr>\nVincent Seguin <seguin@via.ecp.fr>\nBenoit Steiner <benny@via.ecp.fr>\nArnaud de Bossoreille de Ribou <bozo@via.ecp.fr>\nJean-Marc Dressler <polux@via.ecp.fr>\nGa\353l Hendryckx <jimmy@via.ecp.fr>\nSamuel Hocevar <sam@zoy.org>\nBrieuc Jeunhomme <bbp@via.ecp.fr>\nMichel Kaempf <maxx@via.ecp.fr>\nSt\351phane Borel <stef@via.ecp.fr>\nRenaud Dartus <reno@via.ecp.fr>\nHenri Fallon <henri@via.ecp.fr>"));
+  label16 = gtk_label_new (_("Régis Duchesne <regis@via.ecp.fr>\nMichel Lespinasse <walken@zoy.org>\nOlivier Pomel <pomel@via.ecp.fr>\nPierre Baillet <oct@zoy.org>\nJean-Philippe Grimaldi <jeanphi@via.ecp.fr>\nAndres Krapf <dae@via.ecp.fr>\nChristophe Massiot <massiot@via.ecp.fr>\nVincent Seguin <seguin@via.ecp.fr>\nBenoit Steiner <benny@via.ecp.fr>\nArnaud de Bossoreille de Ribou <bozo@via.ecp.fr>\nJean-Marc Dressler <polux@via.ecp.fr>\nGaël Hendryckx <jimmy@via.ecp.fr>\nSamuel Hocevar <sam@zoy.org>\nBrieuc Jeunhomme <bbp@via.ecp.fr>\nMichel Kaempf <maxx@via.ecp.fr>\nStéphane Borel <stef@via.ecp.fr>\nRenaud Dartus <reno@via.ecp.fr>\nHenri Fallon <henri@via.ecp.fr>"));
   gtk_widget_ref (label16);
   gtk_object_set_data_full (GTK_OBJECT (intf_about), "label16", label16,
                             (GtkDestroyNotify) gtk_widget_unref);
@@ -934,6 +1014,7 @@ create_intf_fileopen (void)
   intf_fileopen = gtk_file_selection_new (_("Select File"));
   gtk_object_set_data (GTK_OBJECT (intf_fileopen), "intf_fileopen", intf_fileopen);
   gtk_container_set_border_width (GTK_CONTAINER (intf_fileopen), 10);
+  gtk_window_set_modal (GTK_WINDOW (intf_fileopen), TRUE);
 
   fileopen_ok = GTK_FILE_SELECTION (intf_fileopen)->ok_button;
   gtk_object_set_data (GTK_OBJECT (intf_fileopen), "fileopen_ok", fileopen_ok);
@@ -989,6 +1070,7 @@ create_intf_disc (void)
   intf_disc = gtk_dialog_new ();
   gtk_object_set_data (GTK_OBJECT (intf_disc), "intf_disc", intf_disc);
   gtk_window_set_title (GTK_WINDOW (intf_disc), _("Open Disc"));
+  gtk_window_set_modal (GTK_WINDOW (intf_disc), TRUE);
   gtk_window_set_policy (GTK_WINDOW (intf_disc), FALSE, FALSE, FALSE);
 
   dialog_vbox2 = GTK_DIALOG (intf_disc)->vbox;
@@ -1323,3 +1405,196 @@ create_intf_playlist (void)
   return intf_playlist;
 }
 
+GtkWidget*
+create_intf_network (void)
+{
+  GtkWidget *intf_network;
+  GtkWidget *vbox7;
+  GtkWidget *vbox8;
+  GtkWidget *hbox6;
+  GtkWidget *frame4;
+  GtkWidget *vbox9;
+  GSList *network_group = NULL;
+  GtkWidget *network_ts;
+  GtkWidget *network_rtp;
+  GtkWidget *network_http;
+  GtkWidget *frame5;
+  GtkWidget *table2;
+  GtkObject *network_port_adj;
+  GtkWidget *network_port;
+  GtkWidget *label24;
+  GtkWidget *label25;
+  GtkWidget *network_server;
+  GtkWidget *hbox4;
+  GtkWidget *hbox5;
+  GtkWidget *network_ok;
+  GtkWidget *network_cancel;
+
+  intf_network = gtk_dialog_new ();
+  gtk_object_set_data (GTK_OBJECT (intf_network), "intf_network", intf_network);
+  gtk_window_set_title (GTK_WINDOW (intf_network), _("Open Disc"));
+  gtk_window_set_modal (GTK_WINDOW (intf_network), TRUE);
+  gtk_window_set_policy (GTK_WINDOW (intf_network), FALSE, FALSE, FALSE);
+
+  vbox7 = GTK_DIALOG (intf_network)->vbox;
+  gtk_object_set_data (GTK_OBJECT (intf_network), "vbox7", vbox7);
+  gtk_widget_show (vbox7);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox7), 5);
+
+  vbox8 = gtk_vbox_new (FALSE, 5);
+  gtk_widget_ref (vbox8);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "vbox8", vbox8,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox8);
+  gtk_box_pack_start (GTK_BOX (vbox7), vbox8, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox8), 5);
+
+  hbox6 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_ref (hbox6);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "hbox6", hbox6,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox6);
+  gtk_box_pack_start (GTK_BOX (vbox8), hbox6, TRUE, TRUE, 0);
+
+  frame4 = gtk_frame_new (_("Protocol"));
+  gtk_widget_ref (frame4);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "frame4", frame4,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame4);
+  gtk_box_pack_start (GTK_BOX (hbox6), frame4, TRUE, TRUE, 0);
+
+  vbox9 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox9);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "vbox9", vbox9,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox9);
+  gtk_container_add (GTK_CONTAINER (frame4), vbox9);
+
+  network_ts = gtk_radio_button_new_with_label (network_group, _("TS"));
+  network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_ts));
+  gtk_widget_ref (network_ts);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_ts", network_ts,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_ts);
+  gtk_box_pack_start (GTK_BOX (vbox9), network_ts, FALSE, FALSE, 0);
+
+  network_rtp = gtk_radio_button_new_with_label (network_group, _("RTP"));
+  network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_rtp));
+  gtk_widget_ref (network_rtp);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_rtp", network_rtp,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_rtp);
+  gtk_box_pack_start (GTK_BOX (vbox9), network_rtp, FALSE, FALSE, 0);
+  gtk_widget_set_sensitive (network_rtp, FALSE);
+
+  network_http = gtk_radio_button_new_with_label (network_group, _("HTTP"));
+  network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http));
+  gtk_widget_ref (network_http);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_http", network_http,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_http);
+  gtk_box_pack_start (GTK_BOX (vbox9), network_http, FALSE, FALSE, 0);
+  gtk_widget_set_sensitive (network_http, FALSE);
+
+  frame5 = gtk_frame_new (_("Server"));
+  gtk_widget_ref (frame5);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "frame5", frame5,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame5);
+  gtk_box_pack_start (GTK_BOX (hbox6), frame5, TRUE, TRUE, 0);
+
+  table2 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_ref (table2);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "table2", table2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table2);
+  gtk_container_add (GTK_CONTAINER (frame5), table2);
+  gtk_container_set_border_width (GTK_CONTAINER (table2), 5);
+  gtk_table_set_row_spacings (GTK_TABLE (table2), 5);
+  gtk_table_set_col_spacings (GTK_TABLE (table2), 5);
+
+  network_port_adj = gtk_adjustment_new (1234, 0, 65535, 1, 10, 10);
+  network_port = gtk_spin_button_new (GTK_ADJUSTMENT (network_port_adj), 1, 0);
+  gtk_widget_ref (network_port);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_port", network_port,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_port);
+  gtk_table_attach (GTK_TABLE (table2), network_port, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label24 = gtk_label_new (_("Port"));
+  gtk_widget_ref (label24);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "label24", label24,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label24);
+  gtk_table_attach (GTK_TABLE (table2), label24, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label24), 0, 0.5);
+
+  label25 = gtk_label_new (_("Address"));
+  gtk_widget_ref (label25);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "label25", label25,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label25);
+  gtk_table_attach (GTK_TABLE (table2), label25, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label25), 0, 0.5);
+
+  network_server = gtk_entry_new ();
+  gtk_widget_ref (network_server);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_server", network_server,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_server);
+  gtk_table_attach (GTK_TABLE (table2), network_server, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_text (GTK_ENTRY (network_server), _("vls"));
+
+  hbox4 = GTK_DIALOG (intf_network)->action_area;
+  gtk_object_set_data (GTK_OBJECT (intf_network), "hbox4", hbox4);
+  gtk_widget_show (hbox4);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox4), 5);
+
+  hbox5 = gtk_hbox_new (TRUE, 5);
+  gtk_widget_ref (hbox5);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "hbox5", hbox5,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox5);
+  gtk_box_pack_end (GTK_BOX (hbox4), hbox5, FALSE, TRUE, 0);
+
+  network_ok = gtk_button_new_with_label (_("OK"));
+  gtk_widget_ref (network_ok);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_ok", network_ok,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_ok);
+  gtk_box_pack_start (GTK_BOX (hbox5), network_ok, FALSE, TRUE, 0);
+
+  network_cancel = gtk_button_new_with_label (_("Cancel"));
+  gtk_widget_ref (network_cancel);
+  gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_cancel", network_cancel,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (network_cancel);
+  gtk_box_pack_start (GTK_BOX (hbox5), network_cancel, FALSE, TRUE, 0);
+
+  gtk_signal_connect (GTK_OBJECT (intf_network), "destroy",
+                      GTK_SIGNAL_FUNC (on_intf_network_destroy),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (network_ts), "toggled",
+                      GTK_SIGNAL_FUNC (on_disc_dvd_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (network_rtp), "toggled",
+                      GTK_SIGNAL_FUNC (on_disc_vcd_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (network_ok), "clicked",
+                      GTK_SIGNAL_FUNC (on_network_ok_clicked),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (network_cancel), "clicked",
+                      GTK_SIGNAL_FUNC (on_network_cancel_clicked),
+                      NULL);
+
+  return intf_network;
+}
+
index a3e05d915c46dcc016d0f506ed5955cd2eeda098..1a13837c8e956d67ace799d08476bb6d457002ba 100644 (file)
@@ -8,3 +8,4 @@ GtkWidget* create_intf_about (void);
 GtkWidget* create_intf_fileopen (void);
 GtkWidget* create_intf_disc (void);
 GtkWidget* create_intf_playlist (void);
+GtkWidget* create_intf_network (void);
index 7bed04ec218b1a5b417063b7eb0ed379bc215c0b..381e2505ed318f5e2ff2b14dea8afce1819bd53b 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * playlist_interface.c : Interface for the playlist dialog
+ * gtk_playlist.c : Interface for the playlist dialog
  *****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN
+ * Copyright (C) 2001 VideoLAN
  *
- * Authors: .Pierre Baillet <oct@zoy.org>
+ * Authors: Pierre Baillet <oct@zoy.org>
  *      
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include "input_ext-intf.h"
 
 #include "interface.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 #include "intf_msg.h"
 #include "intf_urldecode.h"
 
 #include "gtk_callbacks.h"
 #include "gtk_interface.h"
 #include "gtk_support.h"
-#include "gtk_sys.h"
+#include "intf_gtk.h"
 
 #include "main.h"
 
@@ -142,7 +142,7 @@ void  deleteGListItem(gpointer data, gpointer param)
     int curRow = ( int )data;
     intf_thread_t * p_intf = param;    
     
-    intf_PlstDelete( p_main->p_playlist, curRow );
+    intf_PlaylistDelete( p_main->p_playlist, curRow );
 
     /* are we deleting the current played stream */
     if( p_intf->p_sys->i_playing == curRow )
@@ -205,7 +205,7 @@ on_invertselection_clicked (GtkMenuItem *item, gpointer user_data)
     playlist_p = p_main->p_playlist;
     
     /* lock the struct */
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
+    vlc_mutex_lock( &p_intf->change_lock );
     clist = GTK_CLIST( lookup_widget(p_intf->p_sys->p_playlist,"playlist_clist") );
     
     /* have to copy the selection to an int *
@@ -228,7 +228,7 @@ on_invertselection_clicked (GtkMenuItem *item, gpointer user_data)
     }
     free( selected );
     gtk_clist_thaw( clist );
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+    vlc_mutex_unlock( &p_intf->change_lock );
 }    
 
 void
@@ -257,7 +257,7 @@ on_delete_clicked                      (GtkMenuItem       *item,
     playlist_p = p_main->p_playlist;
     
     /* lock the struct */
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
+    vlc_mutex_lock( &p_intf->change_lock );
     clist = GTK_CLIST( lookup_widget(p_intf->p_sys->p_playlist,"playlist_clist") );
     
     /* I use UNDOCUMENTED features to retrieve the selection... */
@@ -276,7 +276,7 @@ on_delete_clicked                      (GtkMenuItem       *item,
         rebuildCList( clist, playlist_p );
     }
     
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+    vlc_mutex_unlock( &p_intf->change_lock );
 }
 
 gboolean
@@ -406,7 +406,7 @@ void on_generic_drop_data_received( intf_thread_t * p_intf,
     if(files != NULL)
     {
         /* lock the interface */
-        vlc_mutex_lock( &p_intf->p_sys->change_lock );
+        vlc_mutex_lock( &p_intf->change_lock );
         intf_WarnMsg( 1, "List has %d elements",g_list_length( files ) ); 
         intf_AppendList( p_playlist, position, files );
 
@@ -417,7 +417,7 @@ void on_generic_drop_data_received( intf_thread_t * p_intf,
         rebuildCList( clist , p_playlist );
         
         /* unlock the interface */
-        vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+        vlc_mutex_unlock( &p_intf->change_lock );
     }
 }
 
@@ -514,7 +514,7 @@ int intf_AppendList( playlist_t * p_playlist, int i_pos, GList * list )
     length = g_list_length( list );
     for( dummy=0; dummy<length; dummy++ )
     {
-        intf_PlstAdd( p_playlist, 
+        intf_PlaylistAdd( p_playlist, 
                 /* ok; this is a really nasty trick to insert
                    the item where they are suppose to go but, hey
                    this works :P (btw, you are really nasty too) */
@@ -553,7 +553,7 @@ on_playlist_clist_event (GtkWidget       *widget,
                 /* FIXME: temporary hack */
                 p_intf->p_input->b_eof = 1;
             }
-            intf_PlstJumpto( p_main->p_playlist, row-1 );
+            intf_PlaylistJumpto( p_main->p_playlist, row-1 );
         }
         return TRUE;
     }
@@ -564,12 +564,13 @@ on_playlist_clist_event (GtkWidget       *widget,
 void GtkPlayListManage( gpointer p_data )
 {
     /* this thing really sucks for now :( */
-    /* TODO speak more with interface/intf_plst.c */
+
+    /* TODO speak more with interface/intf_playlist.c */
 
     intf_thread_t *p_intf = (void *)p_data;
     playlist_t * p_playlist = p_main->p_playlist ;
 
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
+    vlc_mutex_lock( &p_intf->change_lock );
 
     if( p_intf->p_sys->i_playing != p_playlist->i_index )
     {
@@ -597,6 +598,6 @@ void GtkPlayListManage( gpointer p_data )
         }
         p_intf->p_sys->i_playing = p_playlist->i_index;
     }
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+    vlc_mutex_unlock( &p_intf->change_lock );
 }
 
index 619d204feb16046a67d3b0447ddd0430fb6d7fea..04b40ecd673fde5fafa9d9c26c2c12b96887ce31 100644 (file)
@@ -2,7 +2,7 @@
  * intf_gtk.c: Gtk+ interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_gtk.c,v 1.9 2001/03/09 19:38:47 octplane Exp $
+ * $Id: intf_gtk.c,v 1.10 2001/03/15 01:42:20 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -53,7 +53,7 @@
 #include "gtk_callbacks.h"
 #include "gtk_interface.h"
 #include "gtk_support.h"
-#include "gtk_sys.h"
+#include "intf_gtk.h"
 
 #include "main.h"
 
@@ -72,8 +72,9 @@ static gint GtkChapterMenu  ( gpointer, GtkWidget *,
                               void (*pf_activate)(GtkMenuItem *, gpointer) );
 static gint GtkTitleMenu    ( gpointer, GtkWidget *, 
                               void (*pf_activate)(GtkMenuItem *, gpointer) );
-void GtkPlayListManage( gpointer p_data );
+static void GtkDisplayDate  ( GtkAdjustment *p_adj );
 
+void GtkPlayListManage( gpointer p_data );
 
 /*****************************************************************************
  * g_atexit: kludge to avoid the Gtk+ thread to segfault at exit
@@ -146,7 +147,7 @@ static int intf_Open( intf_thread_t *p_intf )
     p_intf->p_sys->b_playlist_changed = 0;
 
     p_intf->p_sys->b_menus_update = 1;
-    p_intf->p_sys->b_scale_isfree = 1;
+    p_intf->p_sys->b_slider_free = 1;
 
 
     p_intf->p_sys->i_playing = -1;
@@ -154,9 +155,6 @@ static int intf_Open( intf_thread_t *p_intf )
     p_intf->p_sys->pf_gtk_callback = NULL;
     p_intf->p_sys->pf_gdk_callback = NULL;
 
-    /* Initialize lock */
-    vlc_mutex_init( &p_intf->p_sys->change_lock );
-
     return( 0 );
 }
 
@@ -165,9 +163,6 @@ static int intf_Open( intf_thread_t *p_intf )
  *****************************************************************************/
 static void intf_Close( intf_thread_t *p_intf )
 {
-    /* Destroy lock */
-    vlc_mutex_destroy( &p_intf->p_sys->change_lock );
-
     /* Destroy structure */
     free( p_intf->p_sys );
 }
@@ -184,10 +179,9 @@ static void intf_Run( intf_thread_t *p_intf )
 {
     /* gtk_init needs to know the command line. We don't care, so we
      * give it an empty one */
-    char *p_args[] = { "" };
-    char **pp_args = p_args;
-    int i_args = 1;
-    GtkWidget * temp;
+    char  *p_args[] = { "" };
+    char **pp_args  = p_args;
+    int    i_args   = 1;
 
     /* The data types we are allowed to receive */
     static GtkTargetEntry target_table[] =
@@ -196,12 +190,17 @@ static void intf_Run( intf_thread_t *p_intf )
         { "text/plain", 0, DROP_ACCEPT_TEXT_PLAIN }
     };
 
+    /* intf_Manage callback timeout */
+    int i_timeout;
+
     /* Initialize Gtk+ */
     gtk_init( &i_args, &pp_args );
 
     /* Create some useful widgets that will certainly be used */
     p_intf->p_sys->p_window = create_intf_window( );
     p_intf->p_sys->p_popup = create_intf_popup( );
+    p_intf->p_sys->p_disc = create_intf_disc( );
+    p_intf->p_sys->p_network = create_intf_network( );
     p_intf->p_sys->p_playlist = create_intf_playlist( );
 
     
@@ -215,18 +214,32 @@ static void intf_Run( intf_thread_t *p_intf )
                        1, GDK_ACTION_COPY );
 
     /* Accept file drops on the playlist window */
-    temp = lookup_widget(p_intf->p_sys->p_playlist, "playlist_clist"); 
-    
-    
-    gtk_drag_dest_set( GTK_WIDGET( temp ),
+    gtk_drag_dest_set( GTK_WIDGET( lookup_widget( p_intf->p_sys->p_playlist,
+                                                  "playlist_clist") ),
                        GTK_DEST_DEFAULT_ALL, target_table,
                        1, GDK_ACTION_COPY );
 
+    /* Get the interface labels */
+    #define P_LABEL( name ) GTK_LABEL( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), name ) )
+    p_intf->p_sys->p_label_date = P_LABEL( "label_date" );
+    p_intf->p_sys->p_label_status = P_LABEL( "label_status" );
+    #undef P_LABEL
+
+    /* Connect the date display to the slider */
+    #define P_SLIDER GTK_RANGE( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
+    p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
+
+    gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
+                         GTK_SIGNAL_FUNC( GtkDisplayDate ), NULL );
+    p_intf->p_sys->f_adj_oldvalue = 0;
+    #undef P_SLIDER
+
     /* We don't create these ones yet because we perhaps won't need them */
     p_intf->p_sys->p_about = NULL;
     p_intf->p_sys->p_modules = NULL;
     p_intf->p_sys->p_fileopen = NULL;
-    p_intf->p_sys->p_disc = NULL;
 
     /* Store p_intf to keep an eye on it */
     gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
@@ -238,22 +251,29 @@ static void intf_Run( intf_thread_t *p_intf )
     gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_playlist),
                          "p_intf", p_intf );
 
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_disc),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_network),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
+                         "p_intf", p_intf );
 
     /* Show the control window */
     gtk_widget_show( p_intf->p_sys->p_window );
 
-
     /* Sleep to avoid using all CPU - since some interfaces needs to access
      * keyboard events, a 100ms delay is a good compromise */
-    p_intf->p_sys->i_timeout = gtk_timeout_add( INTF_IDLE_SLEEP / 1000,
-                                                GtkManage, p_intf );
+    i_timeout = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, GtkManage, p_intf );
 
     /* Enter Gtk mode */
     gtk_main();
 
-    /* launch stored callbacks */
+    /* Remove the timeout */
+    gtk_timeout_remove( i_timeout );
+
+    /* Launch stored callbacks */
     if( p_intf->p_sys->pf_gtk_callback != NULL )
     {
         p_intf->p_sys->pf_gtk_callback();
@@ -276,12 +296,11 @@ static void intf_Run( intf_thread_t *p_intf )
 
 static gint GtkManage( gpointer p_data )
 {
-    intf_thread_t *p_intf = (void *)p_data;
+#define p_intf ((intf_thread_t *)p_data)
 
     GtkPlayListManage( p_data ); 
 
-    vlc_mutex_lock( &p_intf->p_sys->change_lock );
-
+    vlc_mutex_lock( &p_intf->change_lock );
     
     /* If the "display popup" flag has changed */
     if( p_intf->b_menu_change )
@@ -372,47 +391,55 @@ static gint GtkManage( gpointer p_data )
     }
 
     /* Manage the slider */
-    if( p_intf->p_input != NULL && p_intf->p_sys->p_window != NULL
-         && p_intf->p_sys->b_scale_isfree )
+    if( p_intf->p_input != NULL )
     {
-        GtkWidget *p_scale;
-        GtkAdjustment *p_adj;
-   
-        p_scale = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
-                                  p_intf->p_sys->p_window ), "hscale" ) );
-        p_adj = gtk_range_get_adjustment ( GTK_RANGE( p_scale ) );
-
-        /* Update the value */
-        p_adj->value = ( 100. *
-                         p_intf->p_input->stream.p_selected_area->i_tell ) /
-                         p_intf->p_input->stream.p_selected_area->i_size;
-
-        /* Gtv does it this way. Why not. */
-        gtk_range_set_adjustment ( GTK_RANGE( p_scale ), p_adj );
-        gtk_range_slider_update ( GTK_RANGE( p_scale ) );
-        gtk_range_clear_background ( GTK_RANGE( p_scale ) );
-        gtk_range_draw_background ( GTK_RANGE( p_scale ) );
-    }
+        float newvalue = p_intf->p_sys->p_adj->value;
 
+#define p_area p_intf->p_input->stream.p_selected_area
+        /* If the user hasn't touched the slider since the last time,
+         * then the input can safely change it */
+        if( newvalue == p_intf->p_sys->f_adj_oldvalue )
+        {
+            /* Update the value */
+            p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue =
+                ( 100. * p_area->i_tell ) / p_area->i_size;
+
+            gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
+                                     "value_changed" );
+        }
+        /* Otherwise, send message to the input if the user has
+         * finished dragging the slider */
+        else if( p_intf->p_sys->b_slider_free )
+        {
+            off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+
+            input_Seek( p_intf->p_input, i_seek );
+
+            /* Update the old value */
+            p_intf->p_sys->f_adj_oldvalue = newvalue;
+        }
+#undef p_area
+    }
 
     /* Manage core vlc functions through the callback */
     p_intf->pf_manage( p_intf );
 
     if( p_intf->b_die )
     {
-        /* Make sure we won't be called again */
-        gtk_timeout_remove( p_intf->p_sys->i_timeout );
-
-        vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+        vlc_mutex_unlock( &p_intf->change_lock );
 
         /* Prepare to die, young Skywalker */
         gtk_main_quit();
+
+        /* Just in case */
         return( FALSE );
     }
 
-    vlc_mutex_unlock( &p_intf->p_sys->change_lock );
+    vlc_mutex_unlock( &p_intf->change_lock );
 
     return( TRUE );
+
+#undef p_intf
 }
 
 /*****************************************************************************
@@ -701,3 +728,27 @@ static gint GtkTitleMenu( gpointer       p_data,
 
     return TRUE;
 }
+
+void GtkDisplayDate( GtkAdjustment *p_adj )
+{
+    intf_thread_t *p_intf;
+
+    p_intf = gtk_object_get_data( GTK_OBJECT( p_adj ), "p_intf" );
+
+    if( p_intf->p_input != NULL )
+    {
+#define p_area p_intf->p_input->stream.p_selected_area
+        char psz_time[ OFFSETTOTIME_MAX_SIZE ];
+
+        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+
+        gtk_label_set_text( p_intf->p_sys->p_label_date,
+                            input_OffsetToTime( p_intf->p_input, psz_time,
+                                   ( p_area->i_size * p_adj->value ) / 100 ) );
+
+        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+#undef p_area
+     }
+}
+
+
index 4478da0649ad1521300bf5d885f327b260892537..096880317e340eda011e0bd8a30b905a3a3ddec9 100644 (file)
              <class>GtkMenuItem</class>
              <name>menubar_disc</name>
              <tooltip>Open a DVD or VCD</tooltip>
+             <accelerator>
+               <modifiers>0</modifiers>
+               <key>GDK_F4</key>
+               <signal>activate</signal>
+             </accelerator>
              <signal>
                <name>activate</name>
                <handler>on_menubar_disc_activate</handler>
              <right_justify>False</right_justify>
            </widget>
 
+           <widget>
+             <class>GtkMenuItem</class>
+             <name>menubar_network</name>
+             <tooltip>Select a Network Stream</tooltip>
+             <accelerator>
+               <modifiers>0</modifiers>
+               <key>GDK_F5</key>
+               <signal>activate</signal>
+             </accelerator>
+             <signal>
+               <name>activate</name>
+               <handler>on_menubar_network_activate</handler>
+               <last_modification_time>Mon, 12 Mar 2001 21:55:15 GMT</last_modification_time>
+             </signal>
+             <label>_Network Stream...</label>
+             <right_justify>False</right_justify>
+           </widget>
+
            <widget>
              <class>GtkMenuItem</class>
              <name>separator4</name>
          <label>Disc</label>
        </widget>
 
+       <widget>
+         <class>GtkButton</class>
+         <child_name>Toolbar:button</child_name>
+         <name>toolbar_network</name>
+         <tooltip>Select a Network Stream</tooltip>
+         <signal>
+           <name>clicked</name>
+           <handler>on_toolbar_network_clicked</handler>
+           <last_modification_time>Sun, 04 Mar 2001 02:55:35 GMT</last_modification_time>
+         </signal>
+         <label>Net</label>
+       </widget>
+
        <widget>
          <class>GtkButton</class>
          <child_name>Toolbar:button</child_name>
     </widget>
 
     <widget>
-      <class>GtkEntry</class>
-      <name>entry1</name>
-      <can_focus>True</can_focus>
-      <editable>True</editable>
-      <text_visible>True</text_visible>
-      <text_max_length>0</text_max_length>
-      <text>Tired of boring stub messages ? Write your own exciting message here !!</text>
+      <class>GtkHBox</class>
+      <name>hbox7</name>
+      <homogeneous>True</homogeneous>
+      <spacing>0</spacing>
       <child>
        <padding>0</padding>
-       <expand>False</expand>
+       <expand>True</expand>
        <fill>True</fill>
       </child>
-    </widget>
 
-    <widget>
-      <class>GtkLabel</class>
-      <name>label6</name>
-      <label>This part of the interface doesn't work yet. You can drag the slider below, though:</label>
-      <justify>GTK_JUSTIFY_LEFT</justify>
-      <wrap>False</wrap>
-      <xalign>0</xalign>
-      <yalign>0.5</yalign>
-      <xpad>5</xpad>
-      <ypad>0</ypad>
-      <child>
-       <padding>0</padding>
-       <expand>False</expand>
-       <fill>True</fill>
-      </child>
+      <widget>
+       <class>GtkLabel</class>
+       <name>label_date</name>
+       <label>-:--:--</label>
+       <justify>GTK_JUSTIFY_CENTER</justify>
+       <wrap>False</wrap>
+       <xalign>0.5</xalign>
+       <yalign>0.5</yalign>
+       <xpad>0</xpad>
+       <ypad>0</ypad>
+       <child>
+         <padding>0</padding>
+         <expand>False</expand>
+         <fill>False</fill>
+       </child>
+      </widget>
+
+      <widget>
+       <class>GtkLabel</class>
+       <name>label_status</name>
+       <label>Status: foo</label>
+       <justify>GTK_JUSTIFY_CENTER</justify>
+       <wrap>False</wrap>
+       <xalign>0.5</xalign>
+       <yalign>0.5</yalign>
+       <xpad>0</xpad>
+       <ypad>0</ypad>
+       <child>
+         <padding>0</padding>
+         <expand>False</expand>
+         <fill>False</fill>
+       </child>
+      </widget>
+
+      <widget>
+       <class>GtkLabel</class>
+       <name>label_bar</name>
+       <label>Bar: baz</label>
+       <justify>GTK_JUSTIFY_CENTER</justify>
+       <wrap>False</wrap>
+       <xalign>0.5</xalign>
+       <yalign>0.5</yalign>
+       <xpad>0</xpad>
+       <ypad>0</ypad>
+       <child>
+         <padding>0</padding>
+         <expand>False</expand>
+         <fill>False</fill>
+       </child>
+      </widget>
     </widget>
 
     <widget>
       <class>GtkHScale</class>
-      <name>hscale</name>
+      <name>slider</name>
       <can_focus>True</can_focus>
       <signal>
        <name>button_release_event</name>
-       <handler>on_hscale_button_release_event</handler>
-       <last_modification_time>Tue, 13 Feb 2001 01:15:41 GMT</last_modification_time>
+       <handler>on_slider_button_release_event</handler>
+       <last_modification_time>Wed, 14 Mar 2001 15:58:36 GMT</last_modification_time>
       </signal>
       <signal>
        <name>button_press_event</name>
-       <handler>on_hscale_button_press_event</handler>
-       <last_modification_time>Tue, 13 Feb 2001 02:55:04 GMT</last_modification_time>
+       <handler>on_slider_button_press_event</handler>
+       <last_modification_time>Wed, 14 Mar 2001 15:58:42 GMT</last_modification_time>
       </signal>
-      <draw_value>True</draw_value>
-      <value_pos>GTK_POS_BOTTOM</value_pos>
+      <draw_value>False</draw_value>
+      <value_pos>GTK_POS_TOP</value_pos>
       <digits>1</digits>
-      <policy>GTK_UPDATE_DELAYED</policy>
+      <policy>GTK_UPDATE_CONTINUOUS</policy>
       <value>0</value>
       <lower>0</lower>
       <upper>100</upper>
       <page_size>0</page_size>
       <child>
        <padding>0</padding>
-       <expand>False</expand>
-       <fill>True</fill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>label13</name>
-      <label>HEY ! YOU CAN DROP A FILE ON VLC TOO :-)</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>5</ypad>
-      <child>
-       <padding>0</padding>
-       <expand>False</expand>
+       <expand>True</expand>
        <fill>True</fill>
       </child>
     </widget>
 
     <widget>
       <class>GtkStatusbar</class>
-      <name>statusbar1</name>
+      <name>intf_statusbar</name>
       <child>
        <padding>0</padding>
        <expand>False</expand>
-       <fill>True</fill>
-       <pack>GTK_PACK_END</pack>
+       <fill>False</fill>
       </child>
     </widget>
   </widget>
 
   <widget>
     <class>GtkMenuItem</class>
-    <name>popup_open</name>
-    <tooltip>Open a File</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>on_popup_open_activate</handler>
-      <last_modification_time>Sun, 04 Mar 2001 21:00:48 GMT</last_modification_time>
-    </signal>
-    <label>_Open File...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_disc</name>
-    <tooltip>Open a DVD or VCD</tooltip>
+    <name>main_window_toggle</name>
     <signal>
       <name>activate</name>
-      <handler>on_popup_disc_activate</handler>
-      <last_modification_time>Sun, 04 Mar 2001 03:04:11 GMT</last_modification_time>
+      <handler>on_main_window_toggle</handler>
+      <last_modification_time>Thu, 08 Mar 2001 10:37:08 GMT</last_modification_time>
     </signal>
-    <label>Open _Disc...</label>
+    <label>Toggle _Interface</label>
     <right_justify>False</right_justify>
   </widget>
 
     <class>GtkMenuItem</class>
     <name>popup_navigation</name>
     <sensitive>False</sensitive>
-    <label>Navigation</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>separator10</name>
+    <label>_Navigation</label>
     <right_justify>False</right_justify>
   </widget>
 
     <class>GtkMenuItem</class>
     <name>popup_audio</name>
     <sensitive>False</sensitive>
-    <label>A_udio</label>
+    <label>_Audio</label>
     <right_justify>False</right_justify>
   </widget>
 
     <class>GtkMenuItem</class>
     <name>popup_subpictures</name>
     <sensitive>False</sensitive>
-    <label>Sub _Pictures</label>
+    <label>_Subpictures</label>
     <right_justify>False</right_justify>
   </widget>
 
   <widget>
     <class>GtkMenuItem</class>
-    <name>separator9</name>
+    <name>popup_file</name>
+    <label>_File</label>
     <right_justify>False</right_justify>
-  </widget>
 
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>main_window_toggle</name>
-    <signal>
-      <name>activate</name>
-      <handler>on_main_window_toggle</handler>
-      <last_modification_time>Thu, 08 Mar 2001 10:37:08 GMT</last_modification_time>
-    </signal>
-    <label>show/hide main _window</label>
-    <right_justify>False</right_justify>
+    <widget>
+      <class>GtkMenu</class>
+      <name>popup_file_menu</name>
+
+      <widget>
+       <class>GtkMenuItem</class>
+       <name>popup_open</name>
+       <tooltip>Open a File</tooltip>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_open_activate</handler>
+         <last_modification_time>Sun, 04 Mar 2001 21:00:48 GMT</last_modification_time>
+       </signal>
+       <label>_Open File...</label>
+       <right_justify>False</right_justify>
+      </widget>
+
+      <widget>
+       <class>GtkMenuItem</class>
+       <name>popup_disc</name>
+       <tooltip>Open a DVD or VCD</tooltip>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_disc_activate</handler>
+         <last_modification_time>Sun, 04 Mar 2001 03:04:11 GMT</last_modification_time>
+       </signal>
+       <label>Open _Disc...</label>
+       <right_justify>False</right_justify>
+      </widget>
+
+      <widget>
+       <class>GtkMenuItem</class>
+       <name>popup_network</name>
+       <tooltip>Select a Network Stream</tooltip>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_network_activate</handler>
+         <last_modification_time>Mon, 12 Mar 2001 21:57:31 GMT</last_modification_time>
+       </signal>
+       <label>_Network Stream...</label>
+       <right_justify>False</right_justify>
+      </widget>
+
+      <widget>
+       <class>GtkMenuItem</class>
+       <name>separator12</name>
+       <right_justify>False</right_justify>
+      </widget>
+
+      <widget>
+       <class>GtkMenuItem</class>
+       <name>popup_about</name>
+       <signal>
+         <name>activate</name>
+         <handler>on_popup_about_activate</handler>
+         <last_modification_time>Wed, 21 Feb 2001 08:41:04 GMT</last_modification_time>
+       </signal>
+       <label>_About...</label>
+       <right_justify>False</right_justify>
+      </widget>
+    </widget>
   </widget>
 
   <widget>
     <class>GtkMenuItem</class>
-    <name>popup_about</name>
-    <signal>
-      <name>activate</name>
-      <handler>on_popup_about_activate</handler>
-      <last_modification_time>Wed, 21 Feb 2001 08:41:04 GMT</last_modification_time>
-    </signal>
-    <label>_About...</label>
+    <name>separator9</name>
     <right_justify>False</right_justify>
   </widget>
 
@@ -882,7 +956,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
   <title>Select File</title>
   <type>GTK_WINDOW_TOPLEVEL</type>
   <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
+  <modal>True</modal>
   <allow_shrink>False</allow_shrink>
   <allow_grow>True</allow_grow>
   <auto_shrink>False</auto_shrink>
@@ -925,7 +999,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
   <title>Open Disc</title>
   <type>GTK_WINDOW_TOPLEVEL</type>
   <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
+  <modal>True</modal>
   <allow_shrink>False</allow_shrink>
   <allow_grow>False</allow_grow>
   <auto_shrink>False</auto_shrink>
@@ -1440,4 +1514,328 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
   </widget>
 </widget>
 
+<widget>
+  <class>GtkDialog</class>
+  <name>intf_network</name>
+  <signal>
+    <name>destroy</name>
+    <handler>on_intf_network_destroy</handler>
+    <last_modification_time>Mon, 12 Mar 2001 21:45:22 GMT</last_modification_time>
+  </signal>
+  <title>Open Disc</title>
+  <type>GTK_WINDOW_TOPLEVEL</type>
+  <position>GTK_WIN_POS_NONE</position>
+  <modal>True</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>False</allow_grow>
+  <auto_shrink>False</auto_shrink>
+
+  <widget>
+    <class>GtkVBox</class>
+    <child_name>Dialog:vbox</child_name>
+    <name>vbox7</name>
+    <border_width>5</border_width>
+    <homogeneous>False</homogeneous>
+    <spacing>0</spacing>
+
+    <widget>
+      <class>GtkHBox</class>
+      <child_name>Dialog:action_area</child_name>
+      <name>hbox4</name>
+      <border_width>5</border_width>
+      <homogeneous>True</homogeneous>
+      <spacing>5</spacing>
+      <child>
+       <padding>0</padding>
+       <expand>False</expand>
+       <fill>True</fill>
+       <pack>GTK_PACK_END</pack>
+      </child>
+
+      <widget>
+       <class>GtkHBox</class>
+       <name>hbox5</name>
+       <homogeneous>True</homogeneous>
+       <spacing>5</spacing>
+       <child>
+         <padding>0</padding>
+         <expand>False</expand>
+         <fill>True</fill>
+         <pack>GTK_PACK_END</pack>
+       </child>
+
+       <widget>
+         <class>GtkButton</class>
+         <name>network_ok</name>
+         <can_focus>True</can_focus>
+         <signal>
+           <name>clicked</name>
+           <handler>on_network_ok_clicked</handler>
+           <last_modification_time>Mon, 12 Mar 2001 21:45:01 GMT</last_modification_time>
+         </signal>
+         <label>OK</label>
+         <relief>GTK_RELIEF_NORMAL</relief>
+         <child>
+           <padding>0</padding>
+           <expand>False</expand>
+           <fill>True</fill>
+         </child>
+       </widget>
+
+       <widget>
+         <class>GtkButton</class>
+         <name>network_cancel</name>
+         <can_focus>True</can_focus>
+         <signal>
+           <name>clicked</name>
+           <handler>on_network_cancel_clicked</handler>
+           <last_modification_time>Mon, 12 Mar 2001 21:44:52 GMT</last_modification_time>
+         </signal>
+         <label>Cancel</label>
+         <relief>GTK_RELIEF_NORMAL</relief>
+         <child>
+           <padding>0</padding>
+           <expand>False</expand>
+           <fill>True</fill>
+         </child>
+       </widget>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkVBox</class>
+      <name>vbox8</name>
+      <border_width>5</border_width>
+      <homogeneous>False</homogeneous>
+      <spacing>5</spacing>
+      <child>
+       <padding>0</padding>
+       <expand>True</expand>
+       <fill>True</fill>
+      </child>
+
+      <widget>
+       <class>GtkHBox</class>
+       <name>hbox6</name>
+       <homogeneous>False</homogeneous>
+       <spacing>5</spacing>
+       <child>
+         <padding>0</padding>
+         <expand>True</expand>
+         <fill>True</fill>
+       </child>
+
+       <widget>
+         <class>GtkFrame</class>
+         <name>frame4</name>
+         <label>Protocol</label>
+         <label_xalign>0</label_xalign>
+         <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+         <child>
+           <padding>0</padding>
+           <expand>True</expand>
+           <fill>True</fill>
+         </child>
+
+         <widget>
+           <class>GtkVBox</class>
+           <name>vbox9</name>
+           <homogeneous>False</homogeneous>
+           <spacing>0</spacing>
+
+           <widget>
+             <class>GtkRadioButton</class>
+             <name>network_ts</name>
+             <can_focus>True</can_focus>
+             <signal>
+               <name>toggled</name>
+               <handler>on_disc_dvd_toggled</handler>
+               <last_modification_time>Sun, 04 Mar 2001 02:50:56 GMT</last_modification_time>
+             </signal>
+             <label>TS</label>
+             <active>False</active>
+             <draw_indicator>True</draw_indicator>
+             <group>network</group>
+             <child>
+               <padding>0</padding>
+               <expand>False</expand>
+               <fill>False</fill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkRadioButton</class>
+             <name>network_rtp</name>
+             <sensitive>False</sensitive>
+             <can_focus>True</can_focus>
+             <signal>
+               <name>toggled</name>
+               <handler>on_disc_vcd_toggled</handler>
+               <last_modification_time>Sun, 04 Mar 2001 02:51:00 GMT</last_modification_time>
+             </signal>
+             <label>RTP</label>
+             <active>False</active>
+             <draw_indicator>True</draw_indicator>
+             <group>network</group>
+             <child>
+               <padding>0</padding>
+               <expand>False</expand>
+               <fill>False</fill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkRadioButton</class>
+             <name>network_http</name>
+             <sensitive>False</sensitive>
+             <can_focus>True</can_focus>
+             <label>HTTP</label>
+             <active>False</active>
+             <draw_indicator>True</draw_indicator>
+             <group>network</group>
+             <child>
+               <padding>0</padding>
+               <expand>False</expand>
+               <fill>False</fill>
+             </child>
+           </widget>
+         </widget>
+       </widget>
+
+       <widget>
+         <class>GtkFrame</class>
+         <name>frame5</name>
+         <label>Server</label>
+         <label_xalign>0</label_xalign>
+         <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+         <child>
+           <padding>0</padding>
+           <expand>True</expand>
+           <fill>True</fill>
+         </child>
+
+         <widget>
+           <class>GtkTable</class>
+           <name>table2</name>
+           <border_width>5</border_width>
+           <rows>2</rows>
+           <columns>2</columns>
+           <homogeneous>False</homogeneous>
+           <row_spacing>5</row_spacing>
+           <column_spacing>5</column_spacing>
+
+           <widget>
+             <class>GtkSpinButton</class>
+             <name>network_port</name>
+             <can_focus>True</can_focus>
+             <climb_rate>1</climb_rate>
+             <digits>0</digits>
+             <numeric>False</numeric>
+             <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+             <snap>False</snap>
+             <wrap>False</wrap>
+             <value>1234</value>
+             <lower>0</lower>
+             <upper>65535</upper>
+             <step>1</step>
+             <page>10</page>
+             <page_size>10</page_size>
+             <child>
+               <left_attach>1</left_attach>
+               <right_attach>2</right_attach>
+               <top_attach>1</top_attach>
+               <bottom_attach>2</bottom_attach>
+               <xpad>0</xpad>
+               <ypad>0</ypad>
+               <xexpand>True</xexpand>
+               <yexpand>False</yexpand>
+               <xshrink>False</xshrink>
+               <yshrink>False</yshrink>
+               <xfill>True</xfill>
+               <yfill>False</yfill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkLabel</class>
+             <name>label24</name>
+             <label>Port</label>
+             <justify>GTK_JUSTIFY_CENTER</justify>
+             <wrap>False</wrap>
+             <xalign>0</xalign>
+             <yalign>0.5</yalign>
+             <xpad>0</xpad>
+             <ypad>0</ypad>
+             <child>
+               <left_attach>0</left_attach>
+               <right_attach>1</right_attach>
+               <top_attach>1</top_attach>
+               <bottom_attach>2</bottom_attach>
+               <xpad>0</xpad>
+               <ypad>0</ypad>
+               <xexpand>False</xexpand>
+               <yexpand>False</yexpand>
+               <xshrink>False</xshrink>
+               <yshrink>False</yshrink>
+               <xfill>True</xfill>
+               <yfill>False</yfill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkLabel</class>
+             <name>label25</name>
+             <label>Address</label>
+             <justify>GTK_JUSTIFY_CENTER</justify>
+             <wrap>False</wrap>
+             <xalign>0</xalign>
+             <yalign>0.5</yalign>
+             <xpad>0</xpad>
+             <ypad>0</ypad>
+             <child>
+               <left_attach>0</left_attach>
+               <right_attach>1</right_attach>
+               <top_attach>0</top_attach>
+               <bottom_attach>1</bottom_attach>
+               <xpad>0</xpad>
+               <ypad>0</ypad>
+               <xexpand>False</xexpand>
+               <yexpand>False</yexpand>
+               <xshrink>False</xshrink>
+               <yshrink>False</yshrink>
+               <xfill>True</xfill>
+               <yfill>False</yfill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkEntry</class>
+             <name>network_server</name>
+             <can_focus>True</can_focus>
+             <editable>True</editable>
+             <text_visible>True</text_visible>
+             <text_max_length>0</text_max_length>
+             <text>vls</text>
+             <child>
+               <left_attach>1</left_attach>
+               <right_attach>2</right_attach>
+               <top_attach>0</top_attach>
+               <bottom_attach>1</bottom_attach>
+               <xpad>0</xpad>
+               <ypad>0</ypad>
+               <xexpand>True</xexpand>
+               <yexpand>False</yexpand>
+               <xshrink>False</xshrink>
+               <yshrink>False</yshrink>
+               <xfill>True</xfill>
+               <yfill>False</yfill>
+             </child>
+           </widget>
+         </widget>
+       </widget>
+      </widget>
+    </widget>
+  </widget>
+</widget>
+
 </GTK-Interface>
similarity index 83%
rename from plugins/gtk/gtk_sys.h
rename to plugins/gtk/intf_gtk.h
index e358f14003bd23585a43ef9f5913a96c4bdc251f..30f9f9ae5ed129e075ffe1934510939f08e45a56 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * gtk_sys.h: private Gtk+ interface description
+ * intf_gtk.h: private Gtk+ interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: gtk_sys.h,v 1.5 2001/03/09 19:38:47 octplane Exp $
+ * $Id: intf_gtk.h,v 1.1 2001/03/15 01:42:20 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -36,25 +36,18 @@ static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent )
                                                      "p_intf" ) );
 }
 
-
-
-
 /*****************************************************************************
  * intf_sys_t: description and status of Gtk+ interface
  *****************************************************************************/
 typedef struct intf_sys_s
 {
     /* special actions */
-    vlc_mutex_t         change_lock;                      /* the change lock */
-
     boolean_t           b_popup_changed;                   /* display menu ? */
     boolean_t           b_window_changed;        /* window display toggled ? */
     boolean_t           b_playlist_changed;    /* playlist display toggled ? */
     boolean_t           b_menus_update;              /* menus have changed ? */
-    boolean_t           b_scale_isfree;       /* user isn't dragging scale ? */
+    boolean_t           b_slider_free;                      /* slider status */
 
-    /* intf_Manage callback timeout */
-    int                 i_timeout;
     int                 i_list_timeout;
 
     /* Playlist selected item */
@@ -68,8 +61,17 @@ typedef struct intf_sys_s
     GtkWidget *         p_about;                             /* about window */
     GtkWidget *         p_fileopen;                      /* file open window */
     GtkWidget *         p_disc;                     /* disc selection window */
+    GtkWidget *         p_network;                  /* network stream window */
+
+    /* The slider */
+    GtkAdjustment *     p_adj;                   /* slider adjustment object */
+    float               f_adj_oldvalue;                    /* previous value */
+
+    /* The window labels */
+    GtkLabel *          p_label_date;
+    GtkLabel *          p_label_status;
 
-    /* XXX: ugly kludge */
+    /* XXX: Ugly kludge, see intf_gnome.c */
     void             ( *pf_gtk_callback ) ( void );
     void             ( *pf_gdk_callback ) ( void );
 
index 8da1618fd38f747ce4b4011e2ae5d5740b5ec821..b9190e360daba5e7656f804063057e76bd618467 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.10 2001/03/02 15:51:22 massiot Exp $
+ * $Id: input_ps.c,v 1.11 2001/03/15 01:42:20 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -371,7 +371,7 @@ static int PSRead( input_thread_t * p_input,
                 /* It is common for MPEG-1 streams to pad with zeros
                  * (although it is forbidden by the recommendation), so
                  * don't bother everybody in this case. */
-                intf_WarnMsg( 1, "Garbage at input (%x)", i_startcode );
+                intf_WarnMsg( 1, "Garbage at input (%.8x)", i_startcode );
             }
 
             while( (i_startcode & 0xFFFFFF00) != 0x100L )
diff --git a/plugins/qt/.cvsignore b/plugins/qt/.cvsignore
new file mode 100644 (file)
index 0000000..e978b10
--- /dev/null
@@ -0,0 +1 @@
+*.moc
diff --git a/plugins/qt/intf_qt.cpp b/plugins/qt/intf_qt.cpp
new file mode 100644 (file)
index 0000000..5aeff86
--- /dev/null
@@ -0,0 +1,618 @@
+/*****************************************************************************
+ * intf_qt.cpp: Qt interface
+ *****************************************************************************
+ * Copyright (C) 1999, 2000 VideoLAN
+ * $Id: intf_qt.cpp,v 1.1 2001/03/15 01:42:20 sam Exp $
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+extern "C"
+{
+
+#define MODULE_NAME qt
+#include "modules_inner.h"
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include "defs.h"
+
+#include <errno.h>                                                 /* ENOMEM */
+#include <stdlib.h>                                                /* free() */
+#include <string.h>                                            /* strerror() */
+#include <stdio.h>
+
+#include "config.h"
+#include "common.h"
+#include "threads.h"
+#include "mtime.h"
+#include "tests.h"
+#include "modules.h"
+
+#include "stream_control.h"
+#include "input_ext-intf.h"
+
+#include "intf_msg.h"
+#include "intf_playlist.h"
+#include "interface.h"
+
+#include "main.h"
+
+} /* extern "C" */
+
+#include <qapplication.h>
+#include <qmainwindow.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qwhatsthis.h>
+#include <qpushbutton.h>
+#include <qfiledialog.h>
+#include <qslider.h>
+#include <qlcdnumber.h>
+#include <qmenubar.h>
+#include <qstatusbar.h>
+#include <qmessagebox.h>
+#include <qlabel.h> 
+#include <qtimer.h> 
+
+#include <qvbox.h>
+#include <qhbox.h>
+
+/*****************************************************************************
+ * Local Qt slider class
+ *****************************************************************************/
+class IntfSlider : public QSlider
+{
+    Q_OBJECT
+
+public:
+    IntfSlider( intf_thread_t *, QWidget * );  /* Constructor and destructor */
+    ~IntfSlider();
+
+    bool b_free;                                     /* Is the slider free ? */
+
+    int  oldvalue   ( void ) { return i_oldvalue; };
+    void setOldValue( int i_value ) { i_oldvalue = i_value; };
+
+private slots:
+    void SlideStart ( void ) { b_free = FALSE; };
+    void SlideStop  ( void ) { b_free = TRUE; };
+
+private:
+    intf_thread_t *p_intf;
+    int  i_oldvalue;
+};
+
+/*****************************************************************************
+ * Local Qt interface window class
+ *****************************************************************************/
+class IntfWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    IntfWindow( intf_thread_t * );
+    ~IntfWindow();
+
+private slots:
+    void Manage( void );
+
+    void FileOpen  ( void );
+    void FileQuit  ( void ) { p_intf->b_die = 1; };
+
+    void PlaybackPlay  ( void );
+    void PlaybackPause ( void );
+    void PlaybackSlow  ( void );
+    void PlaybackFast  ( void );
+
+    void PlaylistPrev  ( void );
+    void PlaylistNext  ( void );
+
+    void DateDisplay  ( int );
+    void About ( void );
+
+    void Unimplemented( void ) { intf_WarnMsg( 3, "intf warning: "
+                                 "unimplemented function" ); };
+
+private:
+    intf_thread_t *p_intf;
+
+    IntfSlider *p_slider;
+
+    QToolBar   *p_toolbar;
+    QPopupMenu *p_popup;
+    QLabel     *p_date;
+};
+
+#include "intf_qt.moc"
+
+#define SLIDER_MIN    0x00000
+#define SLIDER_MAX    0x10000
+#define SLIDER_STEP   (SLIDER_MAX >> 4)
+
+/*****************************************************************************
+ * intf_sys_t: description and status of Qt interface
+ *****************************************************************************/
+typedef struct intf_sys_s
+{
+    QApplication *p_app;
+    IntfWindow   *p_window;
+
+} intf_sys_t;
+
+/*****************************************************************************
+ * Local prototypes.
+ *****************************************************************************/
+static int  intf_Probe     ( probedata_t *p_data );
+static int  intf_Open      ( intf_thread_t *p_intf );
+static void intf_Close     ( intf_thread_t *p_intf );
+static void intf_Run       ( intf_thread_t *p_intf );
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+extern "C"
+{
+
+void _M( intf_getfunctions )( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = intf_Probe;
+    p_function_list->functions.intf.pf_open  = intf_Open;
+    p_function_list->functions.intf.pf_close = intf_Close;
+    p_function_list->functions.intf.pf_run   = intf_Run;
+}
+
+}
+
+/*****************************************************************************
+ * intf_Probe: probe the interface and return a score
+ *****************************************************************************
+ * This function tries to initialize Qt and returns a score to the
+ * plugin manager so that it can select the best plugin.
+ *****************************************************************************/
+static int intf_Probe( probedata_t *p_data )
+{
+    if( TestMethod( INTF_METHOD_VAR, "qt" ) )
+    {
+        return( 999 );
+    }
+
+    if( TestProgram( "qvlc" ) )
+    {
+        return( 180 );
+    }
+
+    return( 80 );
+}
+
+/*****************************************************************************
+ * intf_Open: initialize and create window
+ *****************************************************************************/
+static int intf_Open( intf_thread_t *p_intf )
+{
+    char *pp_argv[] = { "" };
+    int   i_argc    = 1;
+
+    /* Allocate instance and initialize some members */
+    p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
+    if( p_intf->p_sys == NULL )
+    {
+        intf_ErrMsg( "intf error: %s", strerror(ENOMEM) );
+        return( 1 );
+    }
+
+    /* Create the C++ objects */
+    p_intf->p_sys->p_app = new QApplication( i_argc, pp_argv );
+    p_intf->p_sys->p_window = new IntfWindow( p_intf );
+
+    /* Tell the world we are here */
+    p_intf->p_sys->p_window->setCaption( VOUT_TITLE " (Qt interface)" );
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * intf_Close: destroy interface window
+ *****************************************************************************/
+static void intf_Close( intf_thread_t *p_intf )
+{
+    /* Get rid of the C++ objects */
+    delete p_intf->p_sys->p_window;
+    delete p_intf->p_sys->p_app;
+
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * intf_Run: Qt thread
+ *****************************************************************************
+ * This part of the interface is in a separate thread so that we can call
+ * exec() from within it without annoying the rest of the program.
+ *****************************************************************************/
+static void intf_Run( intf_thread_t *p_intf )
+{
+    p_intf->p_sys->p_window->show();
+
+    p_intf->p_sys->p_app->exec();
+}
+
+/* following functions are local */
+
+/*****************************************************************************
+ * IntfWindow: interface window creator
+ *****************************************************************************
+ * This function creates the interface window, and populates it with a
+ * menu bar, a toolbar and a slider.
+ *****************************************************************************/
+IntfWindow::IntfWindow( intf_thread_t *p_intf )
+           :QMainWindow( 0 )
+{
+    setUsesTextLabel( TRUE );
+
+    this->p_intf = p_intf;
+
+    /*
+     * Create the toolbar
+     */
+
+    p_toolbar = new QToolBar( this, "toolbar" );
+    p_toolbar->setHorizontalStretchable( TRUE );
+
+    QPixmap pixmap = QPixmap( 0, 0 );
+
+#define addbut( l, t, s ) new QToolButton( pixmap, l, t, this, s, p_toolbar );
+    addbut( "Open", "Open a File", SLOT(FileOpen()) );
+    addbut( "Disc", "Open a DVD or VCD", SLOT(Unimplemented()) );
+    addbut( "Net", "Select a Network Stream", SLOT(Unimplemented()) );
+    p_toolbar->addSeparator();
+    addbut( "Back", "Rewind Stream", SLOT(Unimplemented()) );
+    addbut( "Stop", "Stop Stream", SLOT(Unimplemented()) );
+    addbut( "Play", "Play Stream", SLOT(PlaybackPlay()) );
+    addbut( "Pause", "Pause Stream", SLOT(PlaybackPause()) );
+    addbut( "Slow", "Play Slower", SLOT(PlaybackSlow()) );
+    addbut( "Fast", "Play Faster", SLOT(PlaybackFast()) );
+    p_toolbar->addSeparator();
+    addbut( "Playlist", "Open Playlist", SLOT(Unimplemented()) );
+    addbut( "Prev", "Previous File", SLOT(PlaylistPrev()) );
+    addbut( "Next", "Next File", SLOT(PlaylistNext()) );
+#undef addbut
+
+    /* 
+     * Create the menubar
+     */
+
+    QPopupMenu * p_tmpmenu = new QPopupMenu( this );
+
+#define instmp( x, y... ) p_tmpmenu->insertItem( x, this, ## y )
+    menuBar()->insertItem( "&File", p_tmpmenu );
+    instmp( "&Open File...", SLOT(FileOpen()), Key_F3 );
+    instmp( "Open &Disc...", SLOT(Unimplemented()), Key_F4 );
+    instmp( "&Network Stream...", SLOT(Unimplemented()), Key_F5 );
+    p_tmpmenu->insertSeparator();
+    instmp( "&Exit", SLOT(FileQuit()), CTRL+Key_Q );
+
+    p_tmpmenu = new QPopupMenu( this );
+    menuBar()->insertItem( "&View", p_tmpmenu );
+    instmp( "&Playlist...", SLOT(Unimplemented()) );
+    instmp( "&Modules...", SLOT(Unimplemented()) );
+
+    p_tmpmenu = new QPopupMenu( this );
+    menuBar()->insertItem( "&Settings", p_tmpmenu );
+    instmp( "&Preferences...", SLOT(Unimplemented()) );
+
+    p_tmpmenu = new QPopupMenu( this );
+    menuBar()->insertItem( "&Help", p_tmpmenu );
+    instmp( "&About...", SLOT(About()) );
+#undef instmp
+
+    /*
+     * Create the popup menu
+     */
+
+    p_popup = new QPopupMenu( /* floating menu */ );
+
+#define inspop( x, y... ) p_popup->insertItem( x, this, ## y )
+    inspop( "&Play", SLOT(PlaybackPlay()) );
+    inspop( "Pause", SLOT(PlaybackPause()) );
+    inspop( "&Slow", SLOT(PlaybackSlow()) );
+    inspop( "&Fast", SLOT(PlaybackFast()) );
+    p_popup->insertSeparator();
+    inspop( "&Open File...", SLOT(FileOpen()), Key_F3 );
+    inspop( "Open &Disc...", SLOT(Unimplemented()), Key_F4 );
+    inspop( "&Network Stream...", SLOT(Unimplemented()), Key_F5 );
+    p_popup->insertSeparator();
+    inspop( "&About...", SLOT(About()) );
+    inspop( "&Exit", SLOT(FileQuit()) );
+#undef inspop
+
+    /* Activate the statusbar */
+    statusBar();
+
+    /* Add the vertical box */
+    QVBox * p_vbox = new QVBox( this );
+    setCentralWidget( p_vbox );
+
+        /* The horizontal box */
+        QHBox * p_hbox = new QHBox( p_vbox );
+
+            /* The date label */
+            p_date  = new QLabel( p_hbox );
+            p_date->setAlignment( AlignHCenter | AlignVCenter );
+            p_date->setText( "-:--:--" );
+
+            /* The status label */
+            QLabel *p_label  = new QLabel( p_hbox );
+            p_label->setAlignment( AlignHCenter | AlignVCenter );
+            p_label->setText( "Status: foo" );
+
+            /* The bar label */
+            p_label  = new QLabel( p_hbox );
+            p_label->setAlignment( AlignHCenter | AlignVCenter );
+            p_label->setText( "Bar: baz quux" );
+
+        /* Create the slider and connect it to the date label */
+        p_slider = new IntfSlider( p_intf, p_vbox );
+
+        connect( p_slider, SIGNAL(valueChanged(int)),
+                 this, SLOT(DateDisplay(int)) );
+
+    /* The timer */
+    QTimer *p_timer = new QTimer( this );
+    connect( p_timer, SIGNAL(timeout()), this, SLOT(Manage()) );
+    p_timer->start( INTF_IDLE_SLEEP / 1000 );
+
+    /* Everything worked fine */
+    resize( 620, 30 );
+}
+
+/*****************************************************************************
+ * ~IntfWindow: interface window destructor
+ *****************************************************************************
+ * This function is called when the interface window is destroyed.
+ *****************************************************************************/
+IntfWindow::~IntfWindow( void )
+{
+    /* FIXME: remove everything cleanly */
+}
+
+/*****************************************************************************
+ * DateDisplay: display date
+ *****************************************************************************
+ * This function displays the current date in the date label.
+ *****************************************************************************/
+void IntfWindow::DateDisplay( int i_range )
+{
+    if( p_intf->p_input != NULL )
+    {
+        char psz_time[ OFFSETTOTIME_MAX_SIZE ];
+
+        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+        p_date->setText( input_OffsetToTime( p_intf->p_input, psz_time,
+               ( p_intf->p_input->stream.p_selected_area->i_size * i_range )
+                   / SLIDER_MAX ) );
+        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+    }
+}
+
+/*****************************************************************************
+ * FileOpen: open a file
+ *****************************************************************************
+ * This function opens a file requester and adds the selected file to
+ * the playlist.
+ *****************************************************************************/
+void IntfWindow::FileOpen( void )
+{
+    QString file = QFileDialog::getOpenFileName( QString::null,
+                                                 QString::null, this );
+
+    if( file.isEmpty() )
+    {
+        statusBar()->message( "No file loaded", 2000 );
+    }
+    else
+    {
+        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, file.latin1() );
+    }
+}
+
+/*****************************************************************************
+ * About: display the "about" box
+ *****************************************************************************
+ * This function displays a simple "about" box with copyright information.
+ *****************************************************************************/
+void IntfWindow::About( void )
+{
+    QMessageBox::about( this, "About",
+        "VideoLAN Client\n"
+        "(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team\n"
+        "\n"
+        "This is the VideoLAN client, a DVD and MPEG player.\n"
+        "It can play MPEG and MPEG 2 files from a file "
+            "or from a network source.\n"
+        "\n"
+        "More information: http://www.videolan.org/" );
+}
+
+/*****************************************************************************
+ * Manage: manage main thread messages
+ *****************************************************************************
+ * In this function, called approx. 10 times a second, we check what the
+ * main program wanted to tell us.
+ *****************************************************************************/
+void IntfWindow::Manage( void )
+{
+    /* Manage the slider */
+    if( p_intf->p_input != NULL )
+    {
+        int i_value = p_slider->value();
+
+#define p_area p_intf->p_input->stream.p_selected_area
+        /* If the user hasn't touched the slider since the last time,
+         * then the input can safely change it */
+        if( i_value == p_slider->oldvalue() )
+        {
+            i_value = ( SLIDER_MAX * p_area->i_tell ) / p_area->i_size;
+
+            p_slider->setValue( i_value );
+            p_slider->setOldValue( i_value );
+        }
+        /* Otherwise, send message to the input if the user has
+         * finished dragging the slider */
+        else if( p_slider->b_free )
+        {
+            off_t i_seek = ( i_value * p_area->i_size ) / SLIDER_MAX;
+
+            input_Seek( p_intf->p_input, i_seek );
+
+            /* Update the old value */
+            p_slider->setOldValue( i_value );
+        }
+#undef p_area
+    }
+
+    /* If the "display popup" flag has changed */
+    if( p_intf->b_menu_change )
+    {
+        /* FIXME: find a way to display this menu right under the mouse */
+        p_popup->popup( QPoint(
+                p_intf->p_sys->p_app->desktop()->width() / 2,
+                p_intf->p_sys->p_app->desktop()->height() / 2 ), 0 );
+        p_intf->b_menu_change = 0;
+    }
+
+    /* Manage core vlc functions through the callback */
+    p_intf->pf_manage( p_intf );
+
+    if( p_intf->b_die )
+    {
+        /* Prepare to die, young Skywalker */
+        qApp->quit();
+
+        /* Just in case */
+        return;
+    }
+}
+
+/*****************************************************************************
+ * PlaybackPlay: play
+ *****************************************************************************/
+void IntfWindow::PlaybackPlay( void )
+{
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
+    }
+}
+
+/*****************************************************************************
+ * PlaybackPause: pause
+ *****************************************************************************/
+void IntfWindow::PlaybackPause( void )
+{
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE );
+    }
+}
+
+/*****************************************************************************
+ * PlaybackSlow: slow
+ *****************************************************************************/
+void IntfWindow::PlaybackSlow( void )
+{
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
+    }
+}
+
+/*****************************************************************************
+ * PlaybackFast: fast
+ *****************************************************************************/
+void IntfWindow::PlaybackFast( void )
+{
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
+    }
+}
+
+/*****************************************************************************
+ * PlaylistPrev: previous playlist entry
+ *****************************************************************************/
+void IntfWindow::PlaylistPrev( void )
+{
+    if( p_intf->p_input != NULL )
+    {
+        /* FIXME: temporary hack */
+        intf_PlaylistPrev( p_main->p_playlist );
+        intf_PlaylistPrev( p_main->p_playlist );
+        p_intf->p_input->b_eof = 1;
+    }
+}
+
+/*****************************************************************************
+ * PlaylistNext: next playlist entry
+ *****************************************************************************/
+void IntfWindow::PlaylistNext( void )
+{
+    if( p_intf->p_input != NULL )
+    {
+        /* FIXME: temporary hack */
+        p_intf->p_input->b_eof = 1;
+    }
+}
+
+/*****************************************************************************
+ * IntfSlider: slider creator
+ *****************************************************************************
+ * This function creates the slider, sets its default values, and connects
+ * the interesting signals.
+ *****************************************************************************/
+IntfSlider::IntfSlider( intf_thread_t *p_intf, QWidget *p_parent )
+           :QSlider( Horizontal, p_parent )
+{
+    this->p_intf = p_intf;
+
+    setRange( SLIDER_MIN, SLIDER_MAX );
+    setPageStep( SLIDER_STEP );
+
+    setValue( SLIDER_MIN );
+    setOldValue( SLIDER_MIN );
+
+    setTracking( TRUE );
+    b_free = TRUE;
+
+    connect( this, SIGNAL(sliderMoved(int)), this, SLOT(SlideStart()) );
+    connect( this, SIGNAL(sliderPressed()), this, SLOT(SlideStart()) );
+    connect( this, SIGNAL(sliderReleased()), this, SLOT(SlideStop()) );
+}
+
+/*****************************************************************************
+ * ~IntfSlider: slider destructor
+ *****************************************************************************
+ * This function is called when the interface slider is destroyed.
+ *****************************************************************************/
+IntfSlider::~IntfSlider( void )
+{
+    /* We don't need to remove anything */
+}
+
+
diff --git a/plugins/qt/qt.cpp b/plugins/qt/qt.cpp
new file mode 100644 (file)
index 0000000..1542059
--- /dev/null
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * qt.cpp : Qt plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+#define MODULE_NAME qt
+#include "modules_inner.h"
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include "defs.h"
+
+#include <stdlib.h>                                      /* malloc(), free() */
+
+extern "C"
+{
+#include "config.h"
+#include "common.h"                                     /* boolean_t, byte_t */
+#include "threads.h"
+#include "mtime.h"
+
+#include "modules.h"
+
+/*****************************************************************************
+ * Build configuration tree.
+ *****************************************************************************/
+MODULE_CONFIG_START
+ADD_WINDOW( "Configuration for Qt module" )
+    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
+MODULE_CONFIG_END
+
+/*****************************************************************************
+ * Capabilities defined in the other files.
+ *****************************************************************************/
+void _M( intf_getfunctions )( function_list_t * p_function_list );
+
+/*****************************************************************************
+ * InitModule: get the module structure and configuration.
+ *****************************************************************************
+ * We have to fill psz_name, psz_longname and psz_version. These variables
+ * will be strdup()ed later by the main application because the module can
+ * be unloaded later to save memory, and we want to be able to access this
+ * data even after the module has been unloaded.
+ *****************************************************************************/
+MODULE_INIT
+{
+    p_module->psz_name = MODULE_STRING;
+    p_module->psz_longname = "Qt interface module";
+    p_module->psz_version = VERSION;
+
+    p_module->i_capabilities = MODULE_CAPABILITY_NULL
+                                | MODULE_CAPABILITY_INTF;
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * ActivateModule: set the module to an usable state.
+ *****************************************************************************
+ * This function fills the capability functions and the configuration
+ * structure. Once ActivateModule() has been called, the i_usage can
+ * be set to 0 and calls to NeedModule() be made to increment it. To unload
+ * the module, one has to wait until i_usage == 0 and call DeactivateModule().
+ *****************************************************************************/
+MODULE_ACTIVATE
+{
+    p_module->p_functions =
+                ( module_functions_t * )malloc( sizeof( module_functions_t ) );
+    if( p_module->p_functions == NULL )
+    {
+        return( -1 );
+    }
+
+    _M( intf_getfunctions )( &p_module->p_functions->intf );
+
+    p_module->p_config = p_config;
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * DeactivateModule: make sure the module can be unloaded.
+ *****************************************************************************
+ * This function must only be called when i_usage == 0. If it successfully
+ * returns, i_usage can be set to -1 and the module unloaded. Be careful to
+ * lock usage_lock during the whole process.
+ *****************************************************************************/
+MODULE_DEACTIVATE
+{
+    free( p_module->p_functions );
+
+    return( 0 );
+}
+
+} /* extern "C" */
index c01615b679dcc57cb98ff5d850c0bf8974b6a946..802b19c2454b0da759e0bd68aa212eba1aa2bcd8 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.92 2001/03/11 19:00:18 henri Exp $
+ * $Id: input.c,v 1.93 2001/03/15 01:42:20 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 #include "common.h"
 #include "threads.h"
 #include "mtime.h"
+#include "netutils.h"
 #include "modules.h"
 
 #include "intf_msg.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
@@ -312,7 +313,8 @@ static int InitThread( input_thread_t * p_input )
 
     if( p_input->p_input_module == NULL )
     {
-        intf_ErrMsg( "input error: no suitable input module" );
+        intf_ErrMsg( "input error: no suitable input module for `%s'",
+                     p_input->p_source );
         return( -1 );
     }
 
@@ -574,7 +576,7 @@ void input_NetworkOpen( input_thread_t * p_input )
     /* TODO : here deal with channel stufs */
     
     /* Build the local socket */
-    if ( input_BuildLocalAddr( &s_socket, i_port, b_broadcast ) 
+    if ( network_BuildLocalAddr( &s_socket, i_port, b_broadcast ) 
          == -1 )
     {
         close( p_input->i_handle );
@@ -593,7 +595,7 @@ void input_NetworkOpen( input_thread_t * p_input )
     }
 
     /* Build socket for remote connection */
-    if ( input_BuildRemoteAddr( &s_socket, p_input->p_source ) 
+    if ( network_BuildRemoteAddr( &s_socket, p_input->p_source ) 
          == -1 )
     {
         close( p_input->i_handle );
index b4921ae6d02a1a1d5c3c0c8902a6ff3e52de4f23..061fe273173a5b52c2a007c0a57891543ae20176 100644 (file)
@@ -177,7 +177,7 @@ char * input_OffsetToTime( input_thread_t * p_input, char * psz_buffer,
     else
     {
         /* Divide by zero is not my friend. */
-        sprintf( psz_buffer, "NA" );
+        sprintf( psz_buffer, "-:--:--" );
         return( psz_buffer );
     }
 }
index e9e84471c34be22326d90d072bcc32183edab6bc..2f405584271aa486f013439a70094d50d24762d4 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.40 2001/03/07 10:31:10 stef Exp $
+ * $Id: input_programs.c,v 1.41 2001/03/15 01:42:20 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -597,7 +597,7 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
 
     if( p_es->p_decoder_fifo != NULL )
     {
-        intf_ErrMsg( "ES %d is already selected", p_es->i_id );
+        intf_ErrMsg( "ES 0x%x is already selected", p_es->i_id );
         return( -1 );
     }
 
@@ -662,7 +662,7 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
         break;
 
     default:
-        intf_ErrMsg( "Unknown stream type %d", p_es->i_type );
+        intf_ErrMsg( "Unknown stream type 0x%x", p_es->i_type );
         return( -1 );
         break;
     }
@@ -689,7 +689,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
 
     if( p_es->p_decoder_fifo == NULL )
     {
-        intf_ErrMsg( "ES %d is not selected", p_es->i_id );
+        intf_ErrMsg( "ES 0x%x is not selected", p_es->i_id );
         return( -1 );
     }
 
index 6e41ec2a4ecab1cc1aafcc31594d275a60e6fb73..73b463e10cdcde2d111401b9de0990bec860d953 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_system.c: TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.44 2001/03/15 00:37:04 stef Exp $
+ * $Id: mpeg_system.c,v 1.45 2001/03/15 01:42:20 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -877,7 +877,7 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
         default:
             /* This should not happen */
             b_trash = 1;
-            intf_WarnMsg( 1, "Unwanted packet received with start code %x",
+            intf_WarnMsg( 1, "Unwanted packet received with start code 0x%.8x",
                           i_code );
         }
     }
index 233ca5fbb89dbb652952a59780f73ca6a5f16e87..31ef1d5a16626834647e47534a4d9edfa33a9ac8 100644 (file)
@@ -46,7 +46,7 @@
 #include "intf_msg.h"
 #include "interface.h"
 #include "intf_cmd.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 #include "intf_channels.h"
 #include "keystrokes.h"
 
@@ -155,7 +155,7 @@ static void intf_Manage( intf_thread_t *p_intf )
     if( p_intf->p_input == NULL && !p_intf->b_die )
     {
         /* Select the next playlist item */
-        intf_PlstNext( p_main->p_playlist );
+        intf_PlaylistNext( p_main->p_playlist );
 
         if( p_main->p_playlist->i_index == -1 )
         {
similarity index 90%
rename from src/interface/intf_plst.c
rename to src/interface/intf_playlist.c
index ce7b9a68829c03b9cbbca93fbc6e08a627f82bb7..baf999b4144c13802d2146b33dd3bf3f9784d8db 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * intf_plst.c : Playlist management functions
+ * intf_playlist.c : Playlist management functions
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
  *
@@ -32,7 +32,7 @@
 #include "threads.h"
 
 #include "intf_msg.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 
 #include "main.h"
 
 static void NextItem( playlist_t * p_playlist );
 
 /*****************************************************************************
- * intf_PlstCreate: create playlist
+ * intf_PlaylistCreate: create playlist
  *****************************************************************************
  * Create a playlist structure.
  *****************************************************************************/
-playlist_t * intf_PlstCreate ( void )
+playlist_t * intf_PlaylistCreate ( void )
 {
     playlist_t *p_playlist;
 
@@ -63,11 +63,11 @@ playlist_t * intf_PlstCreate ( void )
 }
 
 /*****************************************************************************
- * intf_PlstInit: initialize playlist
+ * intf_PlaylistInit: initialize playlist
  *****************************************************************************
  * Initialize a playlist structure.
  *****************************************************************************/
-void intf_PlstInit ( playlist_t * p_playlist )
+void intf_PlaylistInit ( playlist_t * p_playlist )
 {
     vlc_mutex_init( &p_playlist->change_lock );
 
@@ -89,12 +89,13 @@ void intf_PlstInit ( playlist_t * p_playlist )
 }
 
 /*****************************************************************************
- * intf_PlstAdd: add an item to the playlist
+ * intf_PlaylistAdd: add an item to the playlist
  *****************************************************************************
  * Add an item to the playlist at position i_pos. If i_pos is PLAYLIST_END,
  * add it at the end regardless of the playlist current size.
  *****************************************************************************/
-int intf_PlstAdd( playlist_t * p_playlist, int i_pos, char * psz_item )
+int intf_PlaylistAdd( playlist_t * p_playlist, int i_pos,
+                      const char * psz_item )
 {
     int i_index;
     playlist_item_t * p_item;
@@ -130,7 +131,7 @@ int intf_PlstAdd( playlist_t * p_playlist, int i_pos, char * psz_item )
     p_item->i_status = 0;
     p_item->psz_name = strdup( psz_item );
 
-    intf_WarnMsg( 1, "intf: added %s to playlist", psz_item );
+    intf_WarnMsg( 1, "intf: added `%s' to playlist", psz_item );
 
     vlc_mutex_unlock( &p_playlist->change_lock );
 
@@ -138,12 +139,12 @@ int intf_PlstAdd( playlist_t * p_playlist, int i_pos, char * psz_item )
 }
 
 /*****************************************************************************
- * intf_PlstNext: switch to next playlist item
+ * intf_PlaylistNext: switch to next playlist item
  *****************************************************************************
  * Switch to the next item of the playlist. If there is no next item, the
  * position of the resulting item is set to -1.
  *****************************************************************************/
-void intf_PlstNext( playlist_t * p_playlist )
+void intf_PlaylistNext( playlist_t * p_playlist )
 {
     vlc_mutex_lock( &p_playlist->change_lock );
 
@@ -153,12 +154,12 @@ void intf_PlstNext( playlist_t * p_playlist )
 }
 
 /*****************************************************************************
- * intf_PlstPrev: switch to previous playlist item
+ * intf_PlaylistPrev: switch to previous playlist item
  *****************************************************************************
  * Switch to the previous item of the playlist. If there is no previous
  * item, the position of the resulting item is set to -1.
  *****************************************************************************/
-void intf_PlstPrev( playlist_t * p_playlist )
+void intf_PlaylistPrev( playlist_t * p_playlist )
 {
     vlc_mutex_lock( &p_playlist->change_lock );
     p_playlist->i_mode = -p_playlist->i_mode;
@@ -170,11 +171,11 @@ void intf_PlstPrev( playlist_t * p_playlist )
 }
 
 /*****************************************************************************
- * intf_PlstDelete: delete an item from the playlist
+ * intf_PlaylistDelete: delete an item from the playlist
  *****************************************************************************
  * Delete the item in the playlist with position i_pos.
  *****************************************************************************/
-int intf_PlstDelete( playlist_t * p_playlist, int i_pos )
+int intf_PlaylistDelete( playlist_t * p_playlist, int i_pos )
 {
     int i_index;
     char * psz_name;
@@ -206,7 +207,7 @@ int intf_PlstDelete( playlist_t * p_playlist, int i_pos )
     p_playlist->p_item = realloc( p_playlist->p_item,
                     p_playlist->i_size * sizeof( playlist_item_t ) );
 
-    intf_WarnMsg( 1, "intf: removed %s from playlist", psz_name );
+    intf_WarnMsg( 1, "intf: removed `%s' from playlist", psz_name );
     
 
     /* Delete the item */
@@ -218,17 +219,17 @@ int intf_PlstDelete( playlist_t * p_playlist, int i_pos )
 }
 
 /*****************************************************************************
- * intf_PlstDestroy: destroy the playlist
+ * intf_PlaylistDestroy: destroy the playlist
  *****************************************************************************
  * Delete all items in the playlist and free the playlist structure.
  *****************************************************************************/
-void intf_PlstDestroy( playlist_t * p_playlist )
+void intf_PlaylistDestroy( playlist_t * p_playlist )
 {
     int i_index;
 
     for( i_index = p_playlist->i_size - 1; p_playlist->i_size; i_index-- )
     {
-        intf_PlstDelete( p_playlist, i_index );
+        intf_PlaylistDelete( p_playlist, i_index );
     }
 
     vlc_mutex_destroy( &p_playlist->change_lock );
@@ -242,7 +243,7 @@ void intf_PlstDestroy( playlist_t * p_playlist )
 
     intf_WarnMsg( 1, "intf: playlist destroyed" );
 }
-void intf_PlstJumpto( playlist_t * p_playlist , int i_pos)
+void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
 {
     vlc_mutex_lock( &p_playlist->change_lock );
  
index 8621c4c5b16957a340499cf14c82961258fc402a..6636831b40b805fb3df69b583cb7245107d6a6e0 100644 (file)
@@ -50,7 +50,7 @@
 #include "input_ext-intf.h"
 
 #include "intf_msg.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
 #include "interface.h"
 
 #include "audio_output.h"
 #define OPT_PORT                172
 #define OPT_BROADCAST           173
 
-#define OPT_AOUT                180
-#define OPT_VOUT                181
-#define OPT_INTF                182
-#define OPT_MOTION              183
-#define OPT_IDCT                184
-#define OPT_YUV                 185
-#define OPT_INPUT               186
+#define OPT_INPUT               180
+#define OPT_MOTION              181
+#define OPT_IDCT                182
+#define OPT_YUV                 183
 
 #define OPT_SYNCHRO             190
 #define OPT_WARNING             191
@@ -116,18 +113,18 @@ static const struct option longopts[] =
     {   "version",          0,          0,      'v' },
 
     /* Interface options */
-    {   "intf",             1,          0,      OPT_INTF },
+    {   "intf",             1,          0,      'I' },
     {   "warning",          1,          0,      OPT_WARNING },
 
     /* Audio options */
     {   "noaudio",          0,          0,      OPT_NOAUDIO },
-    {   "aout",             1,          0,      OPT_AOUT },
+    {   "aout",             1,          0,      'A' },
     {   "stereo",           0,          0,      OPT_STEREO },
     {   "mono",             0,          0,      OPT_MONO },
 
     /* Video options */
     {   "novideo",          0,          0,      OPT_NOVIDEO },
-    {   "vout",             1,          0,      OPT_VOUT },
+    {   "vout",             1,          0,      'V' },
     {   "display",          1,          0,      OPT_DISPLAY },
     {   "width",            1,          0,      OPT_WIDTH },
     {   "height",           1,          0,      OPT_HEIGHT },
@@ -159,7 +156,7 @@ static const struct option longopts[] =
 };
 
 /* Short options */
-static const char *psz_shortopts = "hHvgt:T:a:s:c:";
+static const char *psz_shortopts = "hHvgt:T:a:s:c:I:A:V:";
 #endif
 
 
@@ -256,14 +253,14 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * Initialize playlist and get commandline files
      */
-    p_main->p_playlist = intf_PlstCreate( );
+    p_main->p_playlist = intf_PlaylistCreate( );
     if( !p_main->p_playlist )
     {
         intf_ErrMsg( "playlist error: playlist initialization failed" );
         intf_MsgDestroy();
         return( errno );
     }
-    intf_PlstInit( p_main->p_playlist );
+    intf_PlaylistInit( p_main->p_playlist );
 
     /*
      * Get input filenames given as commandline arguments
@@ -277,7 +274,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     if( !p_main->p_bank )
     {
         intf_ErrMsg( "module error: module bank initialization failed" );
-        intf_PlstDestroy( p_main->p_playlist );
+        intf_PlaylistDestroy( p_main->p_playlist );
         intf_MsgDestroy();
         return( errno );
     }
@@ -305,7 +302,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     {
         intf_ErrMsg( "intf error: interface initialization failed" );
         module_DestroyBank( p_main->p_bank );
-        intf_PlstDestroy( p_main->p_playlist );
+        intf_PlaylistDestroy( p_main->p_playlist );
         intf_MsgDestroy();
         return( errno );
     }
@@ -390,7 +387,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * Free playlist
      */
-    intf_PlstDestroy( p_main->p_playlist );
+    intf_PlaylistDestroy( p_main->p_playlist );
 
 #ifdef SYS_BEOS
     /*
@@ -566,7 +563,7 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
             break;
 
         /* Interface warning messages level */
-        case OPT_INTF:                                             /* --intf */
+       case 'I':                                              /* -I, --intf */
             main_PutPszVariable( INTF_METHOD_VAR, optarg );
             break;
         case OPT_WARNING:                                       /* --warning */
@@ -577,7 +574,7 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
         case OPT_NOAUDIO:                                       /* --noaudio */
             p_main->b_audio = 0;
             break;
-        case OPT_AOUT:                                             /* --aout */
+        case 'A':                                              /* -A, --aout */
             main_PutPszVariable( AOUT_METHOD_VAR, optarg );
             break;
         case OPT_STEREO:                                         /* --stereo */
@@ -591,7 +588,7 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
         case OPT_NOVIDEO:                                       /* --novideo */
             p_main->b_video = 0;
             break;
-        case OPT_VOUT:                                             /* --vout */
+        case 'V':                                              /* -V, --vout */
             main_PutPszVariable( VOUT_METHOD_VAR, optarg );
             break;
         case OPT_DISPLAY:                                       /* --display */
@@ -696,7 +693,8 @@ static int GetFilenames( int i_argc, char *ppsz_argv[] )
     /* We assume that the remaining parameters are filenames */
     for( i_opt = optind; i_opt < i_argc; i_opt++ )
     {
-        intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, ppsz_argv[ i_opt ] );
+        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
+                          ppsz_argv[ i_opt ] );
     }
 
     return( 0 );
@@ -722,15 +720,15 @@ static void Usage( int i_fashion )
 
     /* Options */
     intf_MsgImm( "\nOptions:"
-          "\n      --intf <module>            \tinterface method"
+          "\n  -I, --intf <module>            \tinterface method"
           "\n      --warning <level>          \tdisplay warning messages"
           "\n"
           "\n      --noaudio                  \tdisable audio"
-          "\n      --aout <module>            \taudio output method"
+          "\n  -A, --aout <module>            \taudio output method"
           "\n      --stereo, --mono           \tstereo/mono audio"
           "\n"
           "\n      --novideo                  \tdisable video"
-          "\n      --vout <module>            \tvideo output method"
+          "\n  -V, --vout <module>            \tvideo output method"
           "\n      --display <display>        \tdisplay string"
           "\n      --width <w>, --height <h>  \tdisplay dimensions"
           "\n  -g, --grayscale                \tgrayscale output"
index f352ff80f9335a353119383e80929cb0b959cea6..4889bdbdfbdc2253d537ce644ddf9bf0a94e13e0 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * netutils.c: various network functions
  *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
+ * Copyright (C) 1999, 2000, 2001 VideoLAN
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Benoit Steiner <benny@via.ecp.fr>
@@ -31,6 +31,7 @@
 #include <stdlib.h>                             /* free(), realloc(), atoi() */
 #include <errno.h>                                                /* errno() */
 #include <string.h>                                      /* bzero(), bcopy() */
+#include <unistd.h>                                         /* gethostname() */
 
 #include <netinet/in.h>                               /* BSD: struct in_addr */
 #include <sys/socket.h>                              /* BSD: struct sockaddr */
 
 #include "intf_msg.h"
 
-#include "netutils.h"
+#ifndef SYS_BEOS /* I need help for the BeOS portage */
 
+#include "netutils.h"
 
-#ifndef SYS_BEOS /* I need help for the BeOS portage */
 /*****************************************************************************
  * input_BuildLocalAddr : fill a sockaddr_in structure for local binding
  *****************************************************************************/
-int input_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port, 
-                          boolean_t b_broadcast )
+int network_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port, 
+                            boolean_t b_broadcast )
 {
     char                psz_hostname[INPUT_MAX_SOURCE_LENGTH];
     struct hostent    * p_hostent;
@@ -113,10 +114,10 @@ int input_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port,
 /*****************************************************************************
  * input_BuildRemoteAddr : fill a sockaddr_in structure for remote host
  *****************************************************************************/
-int input_BuildRemoteAddr( struct sockaddr_in * p_socket, char * psz_server )
+int network_BuildRemoteAddr( struct sockaddr_in * p_socket, char * psz_server )
 {
     struct hostent            * p_hostent;
-printf("BuildRemoteAddr : psz_server = %s\n",psz_server );    
+
     /* Reset structure */
     memset( p_socket, 0, sizeof( struct sockaddr_in ) );
     p_socket->sin_family = AF_INET;                                 /* family */
@@ -146,3 +147,4 @@ printf("BuildRemoteAddr : psz_server = %s\n",psz_server );
     return( 0 );
 }
 #endif
+