aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Need Help regarding UDP streaming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Need Help regarding UDP streaming" Watch "Need Help regarding UDP streaming" New topic
Author

Need Help regarding UDP streaming

zainu Mehmood
Ranch Hand

Joined: May 09, 2007
Posts: 45
Hi Guys,
Hope everyone of you doing great.I really need your help.My scenario is given below.

1-I am getting a continuous data (byte array[]) from my camera .
2-Now sending those byte[] through UDP but i have to halve that array because i can't send that big array. (P.S i can't use JMF as its not supported at my device(server side) so have to send byte[] manually through UDP)
3-I am receiving those byte [] chunks at client side.

Now i have following requirement.

-I want a player at the client side which plays my these byte [] chunks but in continuous way.(At client side i can use JMF)

Now i don't know how should i combine all these byte[] chunks at client side so that my video gets play continuously.

Please help as you guys always do.

Best regards
ZB


zainu Mehmood
Ranch Hand

Joined: May 09, 2007
Posts: 45
Waiting for the reply
Sergey Babkin
author
Ranch Hand

Joined: Apr 05, 2010
Posts: 50
The easiest thing is to use TCP instead. In practice, manually messing with UDP makes sense only if you're doing someting unusual. If you use UDP directly, you'll need to do the same things as TCP does: assign the sequence numbers to bytes of packets, negotiate the initial sequence numbers between transmitter and receiver, assemble the received packets in order of the sequences, and request retransmission of the lost packets. The retransmission can be skipped, in this case you would just get a playback hiccup when something gets lost. If you transmit at a fixed rate, you can also skip the flow control, otherwise you need it too.
 
 
subject: Need Help regarding UDP streaming