[vlc-commits] [Git][videolan/vlc][master] 3 commits: audiobargraph: rename alarm boolean

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Oct 30 07:18:59 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3eac8cdb by Steve Lhomme at 2024-10-30T06:36:56+00:00
audiobargraph: rename alarm boolean

So we can define alarm to nothing on Windows.

- - - - -
29080e27 by Steve Lhomme at 2024-10-30T06:36:56+00:00
package/win32: disable alarm() in meson builds

Hopefully it's only used in tests.
This will disable this call that doesn't exist in Windows. The test timeout will be handled by meson.

It is not done for autotools builds because it doesn't have a built-in system to time out on tests.

- - - - -
a187304c by Steve Lhomme at 2024-10-30T06:36:56+00:00
meson: enable building tests on Windows

Now that alarm() is disabled.

- - - - -


3 changed files:

- extras/package/win32/build.sh
- meson.build
- modules/spu/audiobargraph_v.c


Changes:

=====================================
extras/package/win32/build.sh
=====================================
@@ -483,6 +483,10 @@ if [ ! -z "$INSTALL_PATH" ]; then
 fi
 
 if [ -n "$BUILD_MESON" ]; then
+    # disable alarm() calls in tests. The timeout is handled by meson
+    VLC_CFLAGS="$VLC_CFLAGS -Dalarm="
+    VLC_CXXFLAGS="$VLC_CXXFLAGS -Dalarm="
+
     mkdir -p $SHORTARCH-meson
     rm -rf $SHORTARCH-meson/meson-private
 


=====================================
meson.build
=====================================
@@ -1064,9 +1064,7 @@ subdir('bin')
 # VLC plugins
 subdir('modules')
 
-if (get_option('tests')
-    .disable_auto_if(host_system in ['windows'])
-    .allowed())
+if (get_option('tests').allowed())
     # Integration and non-regression tests, some unittest are there too but the
     # modules/, src/ and lib/ folders should be favoured for those.
     subdir('test')


=====================================
modules/spu/audiobargraph_v.c
=====================================
@@ -97,7 +97,7 @@ typedef struct
     picture_t *p_pic;
     vlc_tick_t date;
     int scale;
-    bool alarm;
+    bool use_alarm_indicator;
     int barWidth;
 
 } BarGraph_t;
@@ -269,7 +269,7 @@ static void Draw(BarGraph_t *b)
     int minus8  = iec_scale(- 8) * scale + 20;
     int minus18 = iec_scale(-18) * scale + 20;
     int *i_values  = b->i_values;
-    const uint8_t *indicator_color = b->alarm ? bright_red : black;
+    const uint8_t *indicator_color = b->use_alarm_indicator ? bright_red : black;
 
     for (int i = 0; i < nbChannels; i++) {
         int pi = 30 + i * (5 + barWidth);
@@ -320,7 +320,7 @@ static int BarGraphCallback(vlc_object_t *p_this, char const *psz_var,
             parse_i_values(p_BarGraph, newval.psz_string);
         Draw(p_BarGraph);
     } else if (!strcmp(psz_var, CFG_PREFIX "alarm")) {
-        p_BarGraph->alarm = newval.b_bool;
+        p_BarGraph->use_alarm_indicator = newval.b_bool;
         Draw(p_BarGraph);
     } else if (!strcmp(psz_var, CFG_PREFIX "barWidth")) {
         p_BarGraph->barWidth = newval.i_int;
@@ -529,7 +529,7 @@ static int OpenCommon(filter_t *p_filter, bool b_sub)
     p_BarGraph->i_alpha = VLC_CLIP(p_BarGraph->i_alpha, 0, 255);
     p_BarGraph->i_values = NULL;
     parse_i_values(p_BarGraph, &(char){ 0 });
-    p_BarGraph->alarm = false;
+    p_BarGraph->use_alarm_indicator = false;
 
     p_BarGraph->barWidth = var_CreateGetInteger(p_filter, CFG_PREFIX "barWidth");
     p_BarGraph->scale = var_CreateGetInteger( p_filter, CFG_PREFIX "barHeight");



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9a0d9c98ebdc16450eb3a525df4f896359733d4f...a187304c75176bd5c76427d3360378111f49abf7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9a0d9c98ebdc16450eb3a525df4f896359733d4f...a187304c75176bd5c76427d3360378111f49abf7
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list