[gst-devel] Class stuff for networking.

Thomas Vander Stichele thomas at apestaart.org
Wed Dec 7 16:16:03 CET 2005


On Wed, 2005-12-07 at 14:54 -0800, Savage, ShaunX V wrote:
> I have created a socket to listen on,  received a connection,  now I
> have fd. 
> 
>  
> 
> How do I “add” a fd to tcpserversink?
> 
> The way I am doing it segfaults.

I'd be interested in seeing the segfault, we could at least make it try
not to segfault.

However, you're supposed to emit the signal on it instead to do it
correctly.

>         fd = accept(sd, &addr, &rslt);
> 
>         if (fd < 0)
> 
>                 return fd;
> 
>         close(sd);  //for now
> 
>  
> 
>  
> 
> //      gst_multi_fd_sink_add((GstMultiFdSink*)sink,fd);
> 
>         ((GstMultiFdSinkClass*)sink)->add(sink,fd);

should be g_signal_emit (G_OBJECT (sink), "add", fd, NULL);

Hope that helps,
Thomas

> 
> //      sink->element.add(sink,fd);
> 
> “””””””””
> 
>  
> 
> shaun
> 
> 

Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
Careful stays and careless dies
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/







More information about the gstreamer-devel mailing list