Norman Maurer wrote:
I just noticed that I only sent Stefano the answer...
-------- Original Message --------
Subject: Re: Writing a Server to stream mp3 via UDP
Date: Tue, 10 Jul 2007 11:55:44 +0000
From: Norman Maurer <[EMAIL PROTECTED]>
To: Stefano Bagnara <[EMAIL PROTECTED]>
Hi Stefano,
I figured out today that i can use tcp too. So i wrote some code to stream it
via raw tcp. At the first it works better then with udp. But I still seem to
have problems when writing to the device. I see that the LED of the ethernet
device is lighting all the time when writing to it till some point is reached
and it pause for a small time. Till the time the stream stuck. After it start
again all works again.
I attached the LoggingFilter and see that MINA really stops sending data in
this time. I only not understand why... I used a StreamWriteFilter to stream
write the InputStream directly. I used a writeBufferSize of 4 ( I had bad
results with a bigger one).
Anything I miss ? Any idea why mina stops the write ? Maybe the buffer of the
device is just full ?
bye
Norman
maybe a solution :
you can disable Nagle's algorithm by a call to
SocketSessionConfig.*setTcpNoDelay*, e.g.:
((SocketSessionConfig) connector.getSessionConfig()).*setTcpNoDelay*(true)
http://en.wikipedia.org/wiki/Nagle_algorithm
Pierre-Louis
On Tue, 10 Jul 2007 13:32:52 +0200, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
Hi Norman,
As someone else already replied in udp you have to manually check for
ordering and retransmissions. The is no "raw" protocol for mp3
streaming, so you should read the manual for the appliance you bought
and maybe it does explain how to manage the protocol.
Stefano
Norman Maurer ha scritto:
Hi all,
we bought some device which recieve mp3 streams via udp (raw) as a
prototype. Now we want to build an app which streams some raw udp data to
this device.
I wrote some quick code with mina. The good news is that it play some
sound, the bad is that the sound seems to stuck and is not in the right
order.
I tried to use StreamWriteFilter to write directly the given
InputStream. I think I need to suspend the write when the buffer of the
device is full. But how can i detect this ?
Any idea ?
The second problem which is that I have no idea howto calculate the
paket sizes which i need to use for the various mp3 bitrates.
Any help is welcome :-)
bye
Norman
!DSPAM:1,46937034240375416816585!