2 messages in net.java.dev.jna.usersRe: [jna-users] threads and JNA
FromSent OnAttachments
Timothy WallOct 17, 2007 7:21 am 
Glick, Gene (GE Indust, Security)Oct 17, 2007 7:43 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] threads and JNAActions...
From:Timothy Wall (twal@dev.java.net)
Date:Oct 17, 2007 7:21:16 am
List:net.java.dev.jna.users

UDP doesn't guarantee packet delivery. If your CPU can't process the incoming packets, they will likely get dropped.

As an experiment, you can always spawn a CPU-intensive Java-only thread and see if that has the same effect as the thread doing ffmpeg stuff.

On Oct 17, 2007, at 10:17 AM, Glick, Gene (GE Indust, Security) wrote:

I'm just wondering about threads and JNA. My application uses java to receive streaming data over UDP, then pass the data to ffmpeg video decoder. There are 2 threads running in a producer/consumer model and they run at the same priority level. One thread simply gets the packets in, and buffers them up (producer). The other thread does a bunch of stuff, including calling ffmpeg decoder (the consumer thread). FFMPEG is setup and called with JNA. All this is working so far. But, the producer thread seems to be missing some packets periodically. If the ffmpeg stuff is turned off, temporarily, far fewer packets get missed. Oh, the FFMEG decode software consumes a lot of CPU time.

Any idea if this is a jna issue? Maybe it's just java? Or maybe my threading model is wrong?

regards,

gene