luis4god / darkice

Automatically exported from code.google.com/p/darkice
0 stars 0 forks source link

r559 not working with shoutcast #106

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to Shoutcast v2 with trunk r559
2. Watch server log
3. Don't profit

What is the expected output? What do you see instead?

On server:
2014-04-17 08:41:55   ERROR   [SRC 172.16.219.241] Protocol header line is too 
large - exceeds 4096 bytes

On darkice -v 10....
17-Apr-2014 09:03:48 TcpSocket :: write, send error 32
17-Apr-2014 09:03:48 Exception caught in BufferedSink :: write3
17-Apr-2014 09:03:48 BufferedSink, new peak: 418  /  882000
17-Apr-2014 09:03:48 BufferedSink, healed: 0  /  882000

In a packet capture, it appears to never even try to send any headers at all.  
First PSH packet normally sends the password. With 559, it sends garbage and 
tries to stream right away, first readable part of the packet is...
LAME3.99.5UUUUUUUUUUUUUUUUUUUUUUUUUUUU(so forth).
So it appears to skip putting in the password or any icy headers at all and to 
straight to sending the stream.

What version of the product are you using? On what operating system?

r559 of darkice(linux), hitting shoutcast SHOUTcast DNAS/posix(linux x64) 
v2.2.1.109 (Nov 29 2013)

Please provide any additional information below.

I'll be playing with it today, can't see where it was broken obviously from the 
Diffs at a quick glance.

Original issue reported on code.google.com by alt.p...@gmail.com on 17 Apr 2014 at 2:10

GoogleCodeExporter commented 9 years ago
So if I just revert the "DarkIce :: configShoutCast()" section changes of 
DarkIce.cpp, it works fine.

I really haven't had a bunch of time to dig into it yet, but maybe because 
LameLibEncoder and BufferedSink are reversed?  Dunno yet.

Original comment by alt.p...@gmail.com on 17 Apr 2014 at 5:28

GoogleCodeExporter commented 9 years ago
So anyway, yeah, at first glance it appears to be because of the order of 
LameLibEncoder and BufferedSink calls.  r558 works fine. CastSync::Open() never 
gets called and that means sendLogin() isn't getting called.  Just goes right 
to sending the stream for whatever reason instead of even attempting to send 
the password and any icy-headers.

Original comment by alt.p...@gmail.com on 17 Apr 2014 at 7:07

GoogleCodeExporter commented 9 years ago
I wouldn't recommend reverting to the r558, because there is an architechtural 
flaw which was fixed in the r559. R558 doesn't utilize BufferedSink in any 
meaningful way.

Instead, I recommend to fix the real issue, which is a lapse in DarkIce :: 
configShoutCast(), line 910:
audioOut = new BufferedSink(audioOuts[u].socket.get(), bufferSize, 1);
should be
audioOut = new BufferedSink(audioOuts[u].server.get(), bufferSize, 1);

Original comment by kulon...@gmail.com on 19 Apr 2014 at 10:09

GoogleCodeExporter commented 9 years ago
Ug. I must have looked at that line 20 times and didn't catch that. 

Original comment by alt.p...@gmail.com on 20 Apr 2014 at 8:33