Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Need Help regarding UDP streaming

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Waiting for the reply
 
author
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic