]> git.sesse.net Git - vlc/commitdiff
* configure.ac.in, mms.c, sap.c, ipv4.c: added network support for BeOS 5
authorEric Petit <titer@videolan.org>
Wed, 4 Dec 2002 06:23:08 +0000 (06:23 +0000)
committerEric Petit <titer@videolan.org>
Wed, 4 Dec 2002 06:23:08 +0000 (06:23 +0000)
   (Dano is no more needed); multicast still doesn't work.
   UDP (unicast) and HTTP have been successfully tested, mms is untested.
 * sap.c: BeOS doesn't have memccpy
 * VideoOutput.cpp: forgot to remove a printf

configure.ac.in
modules/access/mms/mms.c
modules/gui/beos/VideoOutput.cpp
modules/misc/network/ipv4.c
modules/misc/sap.c

index 5b52bcfafac02e5c7ad1919a3ea09fbcbf6ae6ff..293182c56639461081dfc22899f6d0b4b6bdac47 100644 (file)
@@ -154,7 +154,11 @@ case "x${target_os}" in
     LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
     LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
     LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation"
-    LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"
+    dnl BONE or not BONE ?
+    AC_CHECK_LIB( bind, inet_ntoa,
+        [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lbind"
+          LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"],
+        [])
     ;;
   x*)
     SYS="${target_os}"
@@ -621,11 +625,7 @@ PLUGINS="${PLUGINS} aout_file"
 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
 PLUGINS="${PLUGINS} id3 m3u"
 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm"
-
-dnl
-dnl  Network modules
-dnl
-NETWORK_MODULES="access_udp access_http access_rtp ipv4 access_mms sap"
+PLUGINS="${PLUGINS} access_udp access_http access_rtp ipv4 access_mms sap"
 
 dnl
 dnl  Accelerated modules
@@ -636,11 +636,6 @@ THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
 SSE_MODULES="imdctsse downmixsse"
 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
 
-if test x${SYS} != xbeos
-then
-  PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
-fi
-
 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
     [ac_cv_mmx_inline],
     [CFLAGS="${CFLAGS_save}"
index 9c2f7e0246a135d6565515b9ba4fbb9f1fec783f..6441b49044c43d38b7acfa3c701c8b2afda190f3 100644 (file)
@@ -2,7 +2,7 @@
  * mms.c: MMS access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: mms.c,v 1.10 2002/12/02 21:13:25 jlj Exp $
+ * $Id: mms.c,v 1.11 2002/12/04 06:23:08 titer Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
 #else
 #   include <sys/socket.h>
 #   include <netinet/in.h>
-#   include <arpa/inet.h>
+#   if HAVE_ARPA_INET_H
+#      include <arpa/inet.h>
+#   elif defined( SYS_BEOS )
+#      include <net/netdb.h>
+#   endif
 #endif
 
 #include "network.h"
index 1add85a3a4151933b8a58a21b957f537b443f5c4..384c732632f775fbca2b8f6bd20f1d3a86224761 100644 (file)
@@ -2,7 +2,7 @@
  * vout_beos.cpp: beos video output display method
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: VideoOutput.cpp,v 1.7 2002/12/03 02:00:37 titer Exp $
+ * $Id: VideoOutput.cpp,v 1.8 2002/12/04 06:23:08 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -900,7 +900,6 @@ VLCView::MouseDown(BPoint where)
 {
        VideoWindow* videoWindow = dynamic_cast<VideoWindow*>(Window());
        BMessage* msg = Window()->CurrentMessage();
-       msg->PrintToStream();
        int32 clicks;
        uint32 buttons;
        msg->FindInt32("clicks", &clicks);
index b5a473fd79141648eb4fe4ed330e487d74686cc9..d1e290f89f772aaa3efdbcd4ea1e0fbf45879764 100644 (file)
@@ -2,7 +2,7 @@
  * ipv4.c: IPv4 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ipv4.c,v 1.7 2002/11/28 23:24:15 massiot Exp $
+ * $Id: ipv4.c,v 1.8 2002/12/04 06:23:08 titer Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Mathias Kretschmer <mathias@research.att.com>
@@ -187,7 +187,11 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
     /* Increase the receive buffer size to 1/2MB (8Mb/s during 1/2s) to avoid
      * packet loss caused by scheduling problems */
     i_opt = 0x80000;
+#if defined( SYS_BEOS )
+    if( setsockopt( i_handle, SOL_SOCKET, SO_NONBLOCK,
+#else
     if( setsockopt( i_handle, SOL_SOCKET, SO_RCVBUF,
+#endif
                     (void *) &i_opt, sizeof( i_opt ) ) == -1 )
     {
 #ifdef HAVE_ERRNO_H
@@ -203,7 +207,11 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
      * is typically only 65535 bytes */
     i_opt = 0;
     i_opt_size = sizeof( i_opt );
+#if defined( SYS_BEOS )
+    if( getsockopt( i_handle, SOL_SOCKET, SO_NONBLOCK,
+#else
     if( getsockopt( i_handle, SOL_SOCKET, SO_RCVBUF,
+#endif
                     (void*) &i_opt, &i_opt_size ) == -1 )
     {
 #ifdef HAVE_ERRNO_H
@@ -266,7 +274,11 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
     if( !*psz_bind_addr )
     {
         i_opt = 1;
+#if defined( SYS_BEOS )
+        if( setsockopt( i_handle, SOL_SOCKET, SO_NONBLOCK,
+#else
         if( setsockopt( i_handle, SOL_SOCKET, SO_BROADCAST,
+#endif
                         (void*) &i_opt, sizeof( i_opt ) ) == -1 )
         {
 #ifdef HAVE_ERRNO_H
@@ -278,7 +290,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
         }
     }
  
-#ifndef UNDER_CE
+#if !defined( UNDER_CE ) && !defined( SYS_BEOS )
     /* Join the multicast group if the socket is a multicast address */
 #ifndef IN_MULTICAST
 #   define IN_MULTICAST(a)         IN_CLASSD(a)
index 70edbfe481114257467e4dc9f8f390c2e9fbff98..db3236d7ceec9b427927c2924906cc49b670ed5a 100644 (file)
@@ -2,7 +2,7 @@
  * sap.c :  SAP interface module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: sap.c,v 1.2 2002/12/03 23:36:41 gitan Exp $
+ * $Id: sap.c,v 1.3 2002/12/04 06:23:08 titer Exp $
  *
  * Authors: Arnaud Schauly <gitan@via.ecp.fr>
  *
 #else
 #   include <sys/socket.h>
 #   include <netinet/in.h>
-#   include <arpa/inet.h>
+#   if HAVE_ARPA_INET_H
+#      include <arpa/inet.h>
+#   elif defined( SYS_BEOS )
+#      include <net/netdb.h>
+#   endif
 #endif
 
 #include "network.h"
@@ -364,7 +368,13 @@ static sess_descr_t *  parse_sdp( char *  psz_pct, intf_thread_t * p_intf )
       if( ppsz_fill != NULL )
       {
          *ppsz_fill= malloc( sizeof(char) * (k+1) );
-         memccpy(*ppsz_fill, &(psz_pct[j-k+1]),'\n',  k ); 
+#if defined( SYS_BEOS )
+         /* BeOS doesn't have memccpy. This line probably won't work
+            properly, but BeOS has no multicast support anyway */
+         memcpy(*ppsz_fill, &(psz_pct[j-k+1]), k );
+#else
+         memccpy(*ppsz_fill, &(psz_pct[j-k+1]),'\n',  k );
+#endif
          (*ppsz_fill)[k]='\0';
       }
       ppsz_fill = NULL;