[Live-devel] live555 event trigger behaviour

Döring Dr. Matthias matthias.doering at geutebrueck.com
Tue Jun 19 06:45:22 PDT 2012


Hello Ross,


thank you for your answer and the modification of the triggerEvent
function. Unfortunately I am not completely convinced whether this
will cure all race conditions which are imaginable for the application
of the trigger method in a multithreading environment. I will have to
run some long term tests with the new eventTrigger method with 32 live
sources and send you my findings.


One additional point which I would recommend you to change is the
implementation of the DeviceSource sample. Currently it uses a static
member variable for the eventTriggerId. The intention was of course that
all media sources which will be implemented by using that sample share ONE
eventTriggerId for all instances of the same class. If that is done one
will again have a racing condition similar to that of my first mail – even
if your modification of triggerEvent would work for sources with individual
eventTriggerIds. If multiple instances of source threads write to the same
fTriggeredEventClientDatas array element then they can overwrite each other
before the live555 message loop thread had a chance to handle the triggers.
Probably one will miss triggers and henceforth images what can produce quite ugly
artifacts especially with H264 or MPEG2 sources. But even access violations
are imaginable if the exchange of the instance pointers in the
fTriggeredEventClientDatas array is not an atomic operation (what depends
on the CPU which is used) and the callback function of the trigger
gets corrupted source instance pointers when the live555 thread reads
the values back from the array.


Best regards
Matthias

GEUTEBRÜCK GmbH         Tel:    +49 2645 137-680
Im Nassen 7-9   Mobil:
53578 Windhagen Fax:    +49 2645 137-999
http://www.geutebrueck.de       E-Mail:         matthias.doering at geutebrueck.com<mailto:matthias.doering at geutebrueck.com>
Geschäftsführer: Katharina Geutebrück, Christoph Hoffmann; UST-Ident-Nr.: DE813443473; Handelsregister: HRB 14475 Montabaur
[cid:topline_geu_logo.jpg]<http://www.geutebrueck.com/>


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail contains confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Weder die GEUTEBRÜCK GmbH noch der Absender (Matthias Döring) übernehmen die Haftung für Viren; es obliegt Ihrer Verantwortung, die E-Mail und deren Anhänge auf Viren zu prüfen.
Anhänge:

Versand am 19.06.2012 15:45 von Döring Matthias


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120619/2f5ec16e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: topline_geu_logo.jpg
Type: application/octet-stream
Size: 6449 bytes
Desc: topline_geu_logo.jpg
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120619/2f5ec16e/attachment-0001.obj>


More information about the live-devel mailing list