gstreamer/ext
Sebastian Rasmussen c7e4217121 curlsmtpsink: Lock and don't send final boundary upon error
Previously GstCurlSmtpSink could cause the pipeline thread to end up
waiting for a stopped thread to perform work.

The scenario was that the sink could be rendering a buffer and waiting
for the curl transfer thread to have sent the data. As soon as the
transfer thread has copied all data to curl's data buffer in
gst_curl_base_sink_transfer_read_cb() then the render call would stop
waiting and return GST_FLOW_OK. While this takes place the transfer
thread may suffer from an error e.g. due gst_poll_wait() timing out.
This causes the transfer thread to record the error, claim (it is not
really true since there was an error) that the data has been sent and
that a response has been received by trying to signal the pipeline
thread (but this has already stopped waiting). Finally the transfer
thread stops itself. A short while later the pipeline thread may attempt
to push an EOS event into GstCurlSmtpSink. Since there is no check in
gst_curl_smtp_sink_event() to check if the sink has suffered from any
error it may attempt to add a final boundary and ask the, now deceased,
transfer thread to transfer the new data. Next the sink element would
have waited for the transfer to complete (using a different mechanism
than normal transfers through GstCurlBaseSink). In this case there was
an error check to avoid waiting if an error had already been seen.
Finally GstCurlSmtpSink would chain up to GstCurlBaseSink which would
then block waiting for a response (normally this would be prevented by
the transfer thread suffering the error claiming that it had been
received, but GstCurlSmtpSink clobbered this flag after the fact).

Now GstCurlSmtpSink avoids this by locking over the entire event handing
(preventing simultaneous changes to flags by the two threads) and also
by avoiding to initiate transfer of final boundary if an error has
already been seen.

Also add GST_FIXME() for remaining similar issue where the pipeline
thread may block indefinitely waiting for transfer thread to transfer
data but the transfer thread errors out and fails to notify the pipeline
thread that the transfer failed.

https://bugzilla.gnome.org/show_bug.cgi?id=767501
2016-06-11 11:25:13 +01:00
..
apexsink bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
assrender bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
bs2b Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
bz2 bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
chromaprint chromaprint: emit notify::fingerprint signal when fingerprint is ready 2016-04-07 20:44:09 +01:00
curl curlsmtpsink: Lock and don't send final boundary upon error 2016-06-11 11:25:13 +01:00
daala bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
dash dash: strip lead/trailing whitespace from descriptortype attributes 2016-04-22 17:33:15 -03:00
dc1394 dc1394src: minor clean-up 2016-06-09 22:01:45 +01:00
directfb meta: Initialize all remaining metas in their init function 2016-04-13 10:25:32 +03:00
dtls dtsl: add some documentation 2016-04-18 12:35:40 +01:00
dts bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
faac bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
faad bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
flite bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
fluidsynth bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
gl gltestsrc: gltestsrc.h already defines GstGLTestSrc 2016-05-28 22:20:51 +01:00
gme bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
gsm bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
gtk gtk: Fix logging in base widget and fix desc of GL sink 2016-03-27 12:04:16 +03:00
hls bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
kate bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
ladspa ladspa: use _OBJECT log variants for plugin_init 2016-05-15 14:47:22 -07:00
libde265 bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
libmms bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
libvisual bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
lv2 lv2: support CVPorts 2016-05-18 21:33:43 -07:00
mimic bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
modplug bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
mpeg2enc bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
mplex bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
musepack bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
nas bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
neon bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
ofa ofa: port to 1.0 2013-05-12 23:42:06 +01:00
openal bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
opencv facedetect: Fix compiler warning with clang 3.8 2016-06-10 11:33:52 +03:00
openexr bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
openh264 openh264dec: minor clean-ups 2016-04-11 20:23:45 +01:00
openjpeg openjpeg: fix builddir != srcdir build, and distcheck 2016-06-07 14:15:41 +01:00
openni2 bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
opus bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
qt bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
resindvd bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
rsvg bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
rtmp rtmpsrc: Remove dead assignments 2016-05-15 14:18:23 +02:00
sbc bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
schroedinger bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
sdl bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
smoothstreaming smoothstreaming: update fps calculation for h264 codec parser API changes 2016-05-28 10:29:20 +01:00
sndfile bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
sndio bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
soundtouch bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
spandsp bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
spc bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
srtp srtpdec: also check for "roc" in caps 2016-04-15 15:37:32 +02:00
teletextdec teletexdec: Simplify negotiation code 2016-03-29 10:57:32 +02:00
timidity bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
voaacenc bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
voamrwbenc bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
vulkan vkswapper: check the error of the presentation for out of date 2016-05-13 15:24:35 +03:00
wayland bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
webp webpdec: Wait for segment event before checking it 2016-06-07 21:10:04 -04:00
x265 bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
xvid bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
zbar bad: use new gst_element_class_add_static_pad_template() 2016-03-24 14:56:51 +02:00
Makefile.am new vulkan based video sink 2016-02-17 01:13:43 +11:00