One more IP Multicast related modification

Mathias Kretschmer mathias at research.att.com
Tue Oct 2 18:19:32 CEST 2001


Hi guys,

I'm using 'vlc' in a environment where it is sometimes helpful if I do
not have to specify the server's IP for a multicast session. 

There's a very simple solution that doesn't break the current way of
doing things.
Assume 'vlc' gets started as follow:

vlc --broadcast <some multicast group> ts://0.0.0.0:<port>

Then, in input.c:NetworkOpen() we just skip the connect() call if the
server's address is equal to INADDR_ANY (0.0.0.0). If an IP is
specified, connect() gets called, as usual.

I've attached a patch for input.c and would appreciate if it would make
it into the CVS tree.

Also, I'd like to find out what people's interests are regarding the
streaming capabilities of 'vlc'.

Issues I'm interested in include:

  - Loss Resilience 
  - RTP compliance (or a sequence number at the beginning of each UDP
packet)
  - Encryption support for video conferences, etc.


Cheers,

Mathias

-- Attached file included as plaintext by Listar --
-- File: input.c.patch

--- input.c.old	Tue Oct  2 12:16:45 2001
+++ input.c	Sun Sep 23 23:38:38 2001
@@ -862,15 +862,18 @@
         return;
     }
 
-    /* And connect it ... should we really connect ? */
-    if( connect( p_input->i_handle, (struct sockaddr *) &sock,
-                 sizeof( sock ) ) == (-1) )
-    {
-        intf_ErrMsg( "input error: can't connect socket (%s)", 
-                     strerror(errno) );
-        close( p_input->i_handle );
-        p_input->b_error = 1;
-        return;
+    /* only connect() if a server address has been specified */
+    if( sock.sin_addr.s_addr != INADDR_ANY){
+      /* And connect it ... should we really connect ? */
+      if( connect( p_input->i_handle, (struct sockaddr *) &sock,
+		   sizeof( sock ) ) == (-1) )
+	{
+	  intf_ErrMsg( "input error: can't connect socket (%s)", 
+		       strerror(errno) );
+	  close( p_input->i_handle );
+	  p_input->b_error = 1;
+	  return;
+	}
     }
 
     /* We can't pace control, but FIXME : bug in meuuh's code to sync PCR





More information about the vlc-devel mailing list