Hi,<br> I am trying to build a streaming client for myself using vlc and I tried to enable unicast reception by doing the following:<br>/*<br> fd = socket(AF_INET, SOCK_DGRAM, 0);<br> memset(&addr, 0, sizeof(addr));
<br> addr.sin_addr.s_addr = htonl(INADDR_ANY);<br> addr.sin_port = htons(1234);<br> bind( fd , (struct sockaddr *)&addr, sizeof( addr ) );<br> i_opt = 1;<br> setsockopt( fd, SOL_SOCKET, SO_REUSEADDR, (void *) &i_opt,
<br> sizeof( i_opt ) ); <br><br> setsockopt( fd, SOL_SOCKET, SO_BROADCAST, (void*) &i_opt,<br> sizeof( i_opt ) );<br><br> shutdown( fd, SHUT_WR );<br>*/<br><br>i then tried to receive packets by doing the following:
<br>/*<br>p_block->i_buffer = recv(fd, p_block->p_buffer, i_mtu, 0 ) ;<br>*/<br><br>but a segfault occurs at the recv call..<br><br>I ran the vlc server using the command using: vlc -vvv /home/Desktop/anand_media_player/HWKD.mp3 --sout rtp:
<a href="http://127.0.0.1">127.0.0.1</a><br><br>because i ran both the client on server on the same local machine..<br><br>Can someone point out to me what the problem is please?<br><br>Thanks,<br>Anand<br><br> <br>