summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-03-18 13:28:00 +0100
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-03-27 10:40:20 +0000
commitecbf070fa4c38c4fefeedca2224bdc7208f299a0 (patch)
tree298542b9ea9ebf2ce2d539adabda8f2f2ad3b2a9 /gst-libs
parentb1f859116d91e3b0882c1effe70d0a16f7d34377 (diff)
libs: extend g_autoptr support
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h265.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_jpeg.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vc1.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vp8.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vp9.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_drm.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_egl.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_glx.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_wayland.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_x11.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h265.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_jpeg.h3
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_vp8.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_vp9.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapifilter.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapitexturemap.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_drm.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_egl.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_glx.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_wayland.h2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_x11.h2
30 files changed, 45 insertions, 16 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.h b/gst-libs/gst/vaapi/gstvaapidecoder.h
index fb4b196d..2c5e967e 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder.h
@@ -142,9 +142,7 @@ gst_vaapi_decoder_check_status (GstVaapiDecoder * decoder);
gboolean
gst_vaapi_decoder_update_caps (GstVaapiDecoder * decoder, GstCaps * caps);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoder, gst_object_unref)
-#endif
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.h b/gst-libs/gst/vaapi/gstvaapidecoder_h264.h
index 04386068..08ce6faa 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.h
@@ -77,6 +77,8 @@ void
gst_vaapi_decoder_h264_set_baseline_as_constrained(GstVaapiDecoderH264 * decoder,
gboolean baseline_as_constrained);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderH264, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_H264_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.h b/gst-libs/gst/vaapi/gstvaapidecoder_h265.h
index 619d3008..0b5d0922 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.h
@@ -63,6 +63,8 @@ void
gst_vaapi_decoder_h265_set_alignment (GstVaapiDecoderH265 *decoder,
GstVaapiStreamAlignH265 alignment);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderH265, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_H265_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.h b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.h
index 876055ea..5c1b4afc 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.h
@@ -43,6 +43,8 @@ gst_vaapi_decoder_jpeg_get_type (void) G_GNUC_CONST;
GstVaapiDecoder *
gst_vaapi_decoder_jpeg_new (GstVaapiDisplay *display, GstCaps *caps);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderJpeg, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_JPEG_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.h b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.h
index a996c594..765a80ca 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.h
@@ -43,6 +43,8 @@ gst_vaapi_decoder_mpeg2_get_type (void) G_GNUC_CONST;
GstVaapiDecoder *
gst_vaapi_decoder_mpeg2_new (GstVaapiDisplay *display, GstCaps *caps);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderMpeg2, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_MPEG2_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.h b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.h
index 99d918d0..2efd164e 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.h
@@ -42,6 +42,8 @@ gst_vaapi_decoder_mpeg4_get_type (void) G_GNUC_CONST;
GstVaapiDecoder *
gst_vaapi_decoder_mpeg4_new (GstVaapiDisplay *display, GstCaps *caps);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderMpeg4, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_MPEG4_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.h b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.h
index 6f9474f9..034681f6 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.h
@@ -42,6 +42,8 @@ gst_vaapi_decoder_vc1_get_type (void) G_GNUC_CONST;
GstVaapiDecoder *
gst_vaapi_decoder_vc1_new (GstVaapiDisplay *display, GstCaps *caps);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderVC1, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_VC1_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vp8.h b/gst-libs/gst/vaapi/gstvaapidecoder_vp8.h
index 816f6f02..9ba26470 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vp8.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vp8.h
@@ -43,6 +43,8 @@ gst_vaapi_decoder_vp8_get_type (void) G_GNUC_CONST;
GstVaapiDecoder *
gst_vaapi_decoder_vp8_new (GstVaapiDisplay * display, GstCaps * caps);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderVp8, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_VP8_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.h b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.h
index de975345..f00ce739 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.h
@@ -42,6 +42,8 @@ gst_vaapi_decoder_vp9_get_type (void) G_GNUC_CONST;
GstVaapiDecoder *
gst_vaapi_decoder_vp9_new (GstVaapiDisplay * display, GstCaps * caps);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoderVp9, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_VP9_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.h b/gst-libs/gst/vaapi/gstvaapidisplay.h
index ef94f741..e8f644bc 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay.h
@@ -284,9 +284,7 @@ gst_vaapi_display_reset_texture_map (GstVaapiDisplay * display);
gboolean
gst_vaapi_display_has_driver_quirks (GstVaapiDisplay * display, guint quirks);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplay, gst_object_unref)
-#endif
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_drm.h b/gst-libs/gst/vaapi/gstvaapidisplay_drm.h
index 2af4d9f5..5424b324 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_drm.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_drm.h
@@ -49,6 +49,8 @@ gst_vaapi_display_drm_get_device_path (GstVaapiDisplayDRM *
GType
gst_vaapi_display_drm_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplayDRM, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_DRM_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_egl.h b/gst-libs/gst/vaapi/gstvaapidisplay_egl.h
index ccabf0f8..07fbf83f 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_egl.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_egl.h
@@ -57,6 +57,8 @@ gst_vaapi_display_egl_set_current_display (GstVaapiDisplayEGL * display);
GType
gst_vaapi_display_egl_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplayEGL, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_EGL_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_glx.h b/gst-libs/gst/vaapi/gstvaapidisplay_glx.h
index d19a046b..c4bdcc9a 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_glx.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_glx.h
@@ -44,6 +44,8 @@ gst_vaapi_display_glx_new_with_display (Display * x11_display);
GType
gst_vaapi_display_glx_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplayGLX, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_GLX_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_wayland.h b/gst-libs/gst/vaapi/gstvaapidisplay_wayland.h
index 7af728f7..1f9ec30a 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_wayland.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_wayland.h
@@ -51,6 +51,8 @@ gst_vaapi_display_wayland_get_display (GstVaapiDisplayWayland * display);
GType
gst_vaapi_display_wayland_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplayWayland, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_WAYLAND_H */
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_x11.h b/gst-libs/gst/vaapi/gstvaapidisplay_x11.h
index 1458ea7a..78b6103b 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_x11.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_x11.h
@@ -58,6 +58,8 @@ gst_vaapi_display_x11_set_synchronous (GstVaapiDisplayX11 * display,
GType
gst_vaapi_display_x11_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplayX11, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_X11_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.h b/gst-libs/gst/vaapi/gstvaapiencoder.h
index bf89df27..6bc98872 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.h
@@ -195,6 +195,8 @@ gst_vaapi_encoder_get_entrypoint (GstVaapiEncoder * encoder,
GArray *
gst_vaapi_encoder_get_available_profiles (GstVaapiEncoder * encoder);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiEncoder, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_ENCODER_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.h b/gst-libs/gst/vaapi/gstvaapiencoder_h264.h
index 8a0705b4..fc5539f8 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.h
@@ -56,6 +56,8 @@ gst_vaapi_encoder_h264_get_profile_and_level (GstVaapiEncoderH264 * encoder,
gboolean
gst_vaapi_encoder_h264_supports_avc (GstVaapiEncoderH264 * encoder);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiEncoderH264, gst_object_unref)
+
G_END_DECLS
#endif /*GST_VAAPI_ENCODER_H264_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.h b/gst-libs/gst/vaapi/gstvaapiencoder_h265.h
index e9ea5e22..09449058 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.h
@@ -52,6 +52,8 @@ gboolean
gst_vaapi_encoder_h265_get_profile_tier_level (GstVaapiEncoderH265 * encoder,
GstVaapiProfile * out_profile_ptr, GstVaapiTierH265 *out_tier_ptr, GstVaapiLevelH265 * out_level_ptr);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiEncoderH265, gst_object_unref)
+
G_END_DECLS
#endif /*GST_VAAPI_ENCODER_H265_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.h b/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.h
index 37565821..b3b24749 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.h
@@ -43,5 +43,8 @@ gst_vaapi_encoder_jpeg_get_type (void) G_GNUC_CONST;
GstVaapiEncoder *
gst_vaapi_encoder_jpeg_new (GstVaapiDisplay * display);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiEncoderJpeg, gst_object_unref)
+
G_END_DECLS
+
#endif /*GST_VAAPI_ENCODER_JPEG_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.h b/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.h
index 6306bfd4..a4384ef6 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.h
@@ -44,6 +44,8 @@ gst_vaapi_encoder_mpeg2_get_type (void) G_GNUC_CONST;
GstVaapiEncoder *
gst_vaapi_encoder_mpeg2_new (GstVaapiDisplay * display);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiEncoderMpeg2, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_ENCODER_MPEG2_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_vp8.h b/gst-libs/gst/vaapi/gstvaapiencoder_vp8.h
index b798edb4..e17c616d 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_vp8.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_vp8.h
@@ -43,5 +43,7 @@ gst_vaapi_encoder_vp8_get_type (void) G_GNUC_CONST;
GstVaapiEncoder *
gst_vaapi_encoder_vp8_new (GstVaapiDisplay * display);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiEncoderVP8, gst_object_unref)
+
G_END_DECLS
#endif /*GST_VAAPI_ENCODER_VP8_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_vp9.h b/gst-libs/gst/vaapi/gstvaapiencoder_vp9.h
index ece52dac..b66290b7 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_vp9.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_vp9.h
@@ -43,5 +43,7 @@ gst_vaapi_encoder_vp9_get_type (void) G_GNUC_CONST;
GstVaapiEncoder *
gst_vaapi_encoder_vp9_new (GstVaapiDisplay * display);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiEncoderVP9, gst_object_unref)
+
G_END_DECLS
#endif /*GST_VAAPI_ENCODER_VP9_H */
diff --git a/gst-libs/gst/vaapi/gstvaapifilter.h b/gst-libs/gst/vaapi/gstvaapifilter.h
index 02c465b1..aacddaf8 100644
--- a/gst-libs/gst/vaapi/gstvaapifilter.h
+++ b/gst-libs/gst/vaapi/gstvaapifilter.h
@@ -308,8 +308,6 @@ gboolean
gst_vaapi_filter_set_colorimetry (GstVaapiFilter * filter,
GstVideoColorimetry * input, GstVideoColorimetry * output);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiFilter, gst_object_unref)
-#endif
#endif /* GST_VAAPI_FILTER_H */
diff --git a/gst-libs/gst/vaapi/gstvaapitexturemap.h b/gst-libs/gst/vaapi/gstvaapitexturemap.h
index e74fedf8..0e869bb4 100644
--- a/gst-libs/gst/vaapi/gstvaapitexturemap.h
+++ b/gst-libs/gst/vaapi/gstvaapitexturemap.h
@@ -53,6 +53,8 @@ gst_vaapi_texture_map_reset (GstVaapiTextureMap * map);
GType
gst_vaapi_texture_map_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiTextureMap, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_TEXTURE_MAP_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow.h b/gst-libs/gst/vaapi/gstvaapiwindow.h
index a5385010..56344396 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow.h
@@ -99,9 +99,7 @@ gst_vaapi_window_unblock (GstVaapiWindow * window);
gboolean
gst_vaapi_window_unblock_cancel (GstVaapiWindow * window);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindow, gst_object_unref)
-#endif
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_drm.h b/gst-libs/gst/vaapi/gstvaapiwindow_drm.h
index 7fe0c4ed..48accb86 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_drm.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_drm.h
@@ -43,9 +43,7 @@ gst_vaapi_window_drm_get_type (void) G_GNUC_CONST;
GstVaapiWindow *
gst_vaapi_window_drm_new (GstVaapiDisplay * display, guint width, guint height);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowDRM, gst_object_unref)
-#endif
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_egl.h b/gst-libs/gst/vaapi/gstvaapiwindow_egl.h
index 820a1057..ac6db515 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_egl.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_egl.h
@@ -43,9 +43,7 @@ gst_vaapi_window_egl_get_type (void) G_GNUC_CONST;
GstVaapiWindow *
gst_vaapi_window_egl_new (GstVaapiDisplay * display, guint width, guint height);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowEGL, gst_object_unref)
-#endif
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_glx.h b/gst-libs/gst/vaapi/gstvaapiwindow_glx.h
index d7c4252d..d3ff9a47 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_glx.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_glx.h
@@ -68,9 +68,7 @@ gst_vaapi_window_glx_put_texture (GstVaapiWindowGLX * window,
GstVaapiTexture * texture, const GstVaapiRectangle * src_rect,
const GstVaapiRectangle * dst_rect);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowGLX, gst_object_unref)
-#endif
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.h b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.h
index 3e13052a..d4eb427a 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.h
@@ -45,9 +45,7 @@ GstVaapiWindow *
gst_vaapi_window_wayland_new (GstVaapiDisplay * display, guint width,
guint height);
-#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowWayland, gst_object_unref)
-#endif
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_x11.h b/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
index 8626cb98..672e1ff9 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
@@ -64,6 +64,8 @@ gst_vaapi_window_x11_get_xid (GstVaapiWindowX11 * window);
gboolean
gst_vaapi_window_x11_is_foreign_xid (GstVaapiWindowX11 * window);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowX11, gst_object_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_X11_H */