Reworked synchronous video recording stop
authorMohammed Sameer <msameer@foolab.org>
Sun, 6 Jan 2013 20:31:54 +0000 (22:31 +0200)
committerMohammed Sameer <msameer@foolab.org>
Sun, 6 Jan 2013 20:31:54 +0000 (22:31 +0200)
commit38c29328262ebcb0dd40f4fd4d83f779707455c3
tree8f5be61e2b1bd0025e556869c256a2e2a290d404
parent4c333eef1bdbac3667f00324aa7cb7da47204bc0
Reworked synchronous video recording stop

The issue with QtCamGStreamerMessageListener::waitForMessage() is that
gst_bus_timed_pop_filtered() will drop the messages not matching our type. This
means our handlers might not process such messages.

What we do now is pass a custom DoneHandler subclass in QtCamVideoMode which will
wait on a QWaitCondition for video-done to be received.

Since video-done is sent from the streaming thread and DoneHandler is installed
as a sync handler, we are sure to block the UI thread until video gets saved.
lib/qtcamgstreamermessagelistener.cpp
lib/qtcamgstreamermessagelistener.h
lib/qtcamimagemode.cpp
lib/qtcammode.cpp
lib/qtcammode.h
lib/qtcammode_p.h
lib/qtcamvideomode.cpp