[Live-devel] Setting MAX_NUM_EVENT_TRIGGERS lower than 32

Hansen Jan Rørgård jan.r.hansen at dk.saabgroup.com
Mon Jul 24 03:05:06 PDT 2023


I am not sure if the purpose of MAX_NUM_EVENT_TRIGGERS is to be able to configure live555 for what is needed in a specific application, but with the latest changes to the event trigger code, I think it makes sense. If for example only a few event triggers are used, we can avoid checking up to 32 entries in the fTriggersAwaitingHandling array in BasicTaskScheduler::SingleStep(...)

However, if MAX_NUM_EVENT_TRIGGERS is set to something else than 32, the trigger events do not work as expected. I suggest the following changes:

BasicUsageEnvironment0.hh line 76 (allow redefining MAX_NUM_EVENT_TRIGGERS)
=============================
#ifndef MAX_NUM_EVENT_TRIGGERS
#define MAX_NUM_EVENT_TRIGGERS 32
#endif

BasicTaskScheduler.cpp line 188
==========================
Replace
if (mask == 0) mask = 0x80000000;
with
if (mask == 0) mask =  (1 << (MAX_NUM_EVENT_TRIGGERS-1));

BasicTaskScheduler0.cpp line 98
==========================
Replace
if (mask == 0) mask = 0x80000000;
with
if (mask == 0) mask =  (1 << (MAX_NUM_EVENT_TRIGGERS-1));

BasicTaskScheduler0.cpp line 120 and 143
==================================
Replace
EventTriggerId mask = 0x80000000;
with
EventTriggerId mask =  (1 << (MAX_NUM_EVENT_TRIGGERS-1));

Best Regards

Jan Rørgaard Hansen
Lead Software Developer
Communication Solutions
Business Area Surveillance

Tel.:  + 45 3638 3000
Call me on: Skype<skype:jan.r.hansen at dk.saabgroup.com?call>
E-mail: jan.r.hansen at dk.saabgroup.com<mailto:jan.r.hansen at dk.saabgroup.com>


[Saab_rgb_150px]


Saab Danmark A/S
Porten 6
DK - 6400 Sonderborg
www.saabgroup.com<http://www.saabgroup.com/>

This e-mail is private and confidential between the sender and the addressee.
In the event of misdirection, the recipient is prohibited from using, copying or
disseminating it or information in it. Please notify the above if any misdirection.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20230724/8ab8bdf6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1998 bytes
Desc: image001.jpg
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20230724/8ab8bdf6/attachment.jpg>


More information about the live-devel mailing list