Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with libshout programming

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients
View previous topic :: View next topic  
Author Message
mase



Joined: 31 May 2009
Posts: 16

PostPosted: Fri Jun 05, 2009 9:58 pm    Post subject: Problem with libshout programming Reply with quote

Hi!
I am writing a source client using libshout.
I have created a separate thread that fills the buffer (4096bytes),
and sends it to the server in a loop.
Now I have built in the possibility to pause this thread.
If I pause the thread for 5 seconds, everything runs ok. If I pause for
about 10 seconds, the program exits without any error, when the thread
continues.
I debugged it with gdb. After continue one bufferblock is filled and sent to
the icecast server. Then the buffer gets refilled. If it reaches now the
function to send the buffer again , gdb gives this message:
Signal SIGPIPE (Broken pipe)
What does that mean, and what can be the cause for this?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jun 05, 2009 10:52 pm    Post subject: Reply with quote

I would suspect that icecast drops the connection because no data has come down the socket for many seconds. If you really want it to stay open for long periods of inactivity then increase the timeout in icecast

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mase



Joined: 31 May 2009
Posts: 16

PostPosted: Fri Jun 05, 2009 11:19 pm    Post subject: Reply with quote

Thanks!
Yes, you're right. It seems to be a timeout. But how can I detect this?
int shout_get_connected(shout_t *self); does not give a lost connection.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber