Fix locking and threadsafety

Emit all notify in the context thread.
Handle error cases better.
Make sure we hold the lock when running the mainloop, this will cause
all of the signals to be emited with the lock. Make sure we call all
methods with the lock.
This commit is contained in:
Wim Taymans 2015-06-12 12:10:27 +02:00
parent 83223f0a83
commit b68b62740c
7 changed files with 153 additions and 63 deletions

View file

@ -65,6 +65,7 @@ struct _GstPulsevideoSrc {
PvStream *stream;
GstAllocator *fd_allocator;
GPollFunc poll_func;
GMutex lock;
GCond cond;
};