Re: Using V4L as sub process (thread/fork, ANYTHING!!!!)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hey David,

On Tue, 2003-02-11 at 07:04, David J. Topper wrote:
> pthread() -> when joined, my while(1) (used to read video bytes) read 
> loop hangs the app as well ... eg., I just wait forever for a return.

Are you exiting the thread normally?

> pthread() -> when thread is not joined, I get an Xlib error about some 
> kind of async.  I guess the v4l drivers are not thread safe?

X is not threadsafe. Read the Gtk+ FAQ, Qt FAQ, whatever. You'll need to
make only one thread use X (Gtk+/Qt) calls, or use semaphores to protect
against using X from two threads at the same moment.

> I'm open to suggestions here ... as I'm fresh out.

I'm using threads, works fine. If you want to use signal()/read(), go
for gdk_input_add()/g_source_add() without threads.

In any case, show us some code that we can comment on.

Ronald

-- 
Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
Linux Video/Multimedia developer





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux