v4l2codecs: build error with Ubuntu Bionic: unknown type 'grefcount'
Catch build error on subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec:
00:39:16,677 INFO - ../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c:92:3: error: unknown type name 'grefcount'
00:39:16,677 INFO - grefcount ref_count;
00:39:16,677 INFO - ^~~~~~~~~
00:39:16,677 INFO - ../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c: In function 'gst_v4l2_codec_vp9_dec_picture_data_new':
00:39:16,677 INFO - ../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c:106:3: warning: implicit declaration of function 'g_ref_count_init'; did you mean 'g_cond_init'? [-Wimplicit-function-declaration]
00:39:16,677 INFO - g_ref_count_init (&pic_data->ref_count);
00:39:16,677 INFO - ^~~~~~~~~~~~~~~~
00:39:16,677 INFO - g_cond_init
00:39:16,677 INFO - ../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c: In function 'gst_v4l2_codec_vp9_dec_picture_data_ref':
00:39:16,677 INFO - ../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c:118:3: warning: implicit declaration of function 'g_ref_count_inc'; did you mean 'g_strv_contains'? [-Wimplicit-function-declaration]
00:39:16,677 INFO - g_ref_count_inc (&data->ref_count);
00:39:16,677 INFO - ^~~~~~~~~~~~~~~
00:39:16,677 INFO - g_strv_contains
00:39:16,677 INFO - ../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c: In function 'gst_v4l2_codec_vp9_dec_picture_data_unref':
00:39:16,677 INFO - ../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c:125:7: warning: implicit declaration of function 'g_ref_count_dec' [-Wimplicit-function-declaration]
00:39:16,677 INFO - if (g_ref_count_dec (&data->ref_count)) {
00:39:16,677 INFO - ^~~~~~~~~~~~~~~
Build success commit id: 9aaef931 Build failed catch: 285695ee Catch this build error on : Ubuntu Bionic
Root cause: g_ref_count support from 2.58 https://gitlab.gnome.org/GNOME/glib/blob/2.66.2/glib/grefcount.c#L39
But ubuntu bionic support last glib version is 2.56.4 https://launchpad.net/ubuntu/+source/glib2.0