From 8e4582946ce9a2542a716e0e1ee6d5a9eb976b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 2 Dec 2016 15:30:59 +0000 Subject: [PATCH] meta: remove unnecessary padding for GstMetaInfo struct This structure is always allocated by GStreamer, can't be subclassed or extended, and is never allocated or used on the stack, so we don't need any padding and can extend it as we please. --- gst/gstmeta.h | 5 +++-- tests/check/gst/struct_arm.h | 1 - tests/check/gst/struct_hppa.h | 1 - tests/check/gst/struct_i386.h | 1 - tests/check/gst/struct_i386w.h | 1 - tests/check/gst/struct_ppc32.h | 1 - tests/check/gst/struct_ppc64.h | 1 - tests/check/gst/struct_sparc.h | 1 - tests/check/gst/struct_x86_64.h | 1 - 9 files changed, 3 insertions(+), 10 deletions(-) diff --git a/gst/gstmeta.h b/gst/gstmeta.h index b5db1d5870..d6aaa67e93 100644 --- a/gst/gstmeta.h +++ b/gst/gstmeta.h @@ -197,8 +197,9 @@ struct _GstMetaInfo { GstMetaFreeFunction free_func; GstMetaTransformFunction transform_func; - /*< private >*/ - gpointer _gst_reserved[GST_PADDING]; + /* No padding needed, GstMetaInfo is always allocated by GStreamer and is + * not subclassable or stack-allocatable, so we can extend it as we please + * just like interfaces */ }; GType gst_meta_api_type_register (const gchar *api, diff --git a/tests/check/gst/struct_arm.h b/tests/check/gst/struct_arm.h index 7660266795..3f7be8afae 100644 --- a/tests/check/gst/struct_arm.h +++ b/tests/check/gst/struct_arm.h @@ -32,7 +32,6 @@ GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 80}, {"GstMeta", sizeof (GstMeta), 8}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 12}, - {"GstMetaInfo", sizeof (GstMetaInfo), 40}, {"GstMiniObject", sizeof (GstMiniObject), 36}, {"GstObjectClass", sizeof (GstObjectClass), 92}, {"GstObject", sizeof (GstObject), 64}, diff --git a/tests/check/gst/struct_hppa.h b/tests/check/gst/struct_hppa.h index 5794580e61..2708df01cc 100644 --- a/tests/check/gst/struct_hppa.h +++ b/tests/check/gst/struct_hppa.h @@ -31,7 +31,6 @@ static GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 120}, {"GstMeta", sizeof (GstMeta), 16}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 24}, - {"GstMetaInfo", sizeof (GstMetaInfo), 80}, {"GstMiniObject", sizeof (GstMiniObject), 64}, {"GstObjectClass", sizeof (GstObjectClass), 184}, {"GstObject", sizeof (GstObject), 88}, diff --git a/tests/check/gst/struct_i386.h b/tests/check/gst/struct_i386.h index 33363e6845..015ee64a78 100644 --- a/tests/check/gst/struct_i386.h +++ b/tests/check/gst/struct_i386.h @@ -31,7 +31,6 @@ static GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 76}, {"GstMeta", sizeof (GstMeta), 8}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 12}, - {"GstMetaInfo", sizeof (GstMetaInfo), 40}, {"GstMiniObject", sizeof (GstMiniObject), 36}, {"GstObjectClass", sizeof (GstObjectClass), 92}, {"GstObject", sizeof (GstObject), 56}, diff --git a/tests/check/gst/struct_i386w.h b/tests/check/gst/struct_i386w.h index 91c0386b08..5d985acfb9 100644 --- a/tests/check/gst/struct_i386w.h +++ b/tests/check/gst/struct_i386w.h @@ -31,7 +31,6 @@ static GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 80}, {"GstMeta", sizeof (GstMeta), 8}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 12}, - {"GstMetaInfo", sizeof (GstMetaInfo), 40}, {"GstMiniObject", sizeof (GstMiniObject), 36}, {"GstObjectClass", sizeof (GstObjectClass), 92}, {"GstObject", sizeof (GstObject), 64}, diff --git a/tests/check/gst/struct_ppc32.h b/tests/check/gst/struct_ppc32.h index 91c0386b08..5d985acfb9 100644 --- a/tests/check/gst/struct_ppc32.h +++ b/tests/check/gst/struct_ppc32.h @@ -31,7 +31,6 @@ static GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 80}, {"GstMeta", sizeof (GstMeta), 8}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 12}, - {"GstMetaInfo", sizeof (GstMetaInfo), 40}, {"GstMiniObject", sizeof (GstMiniObject), 36}, {"GstObjectClass", sizeof (GstObjectClass), 92}, {"GstObject", sizeof (GstObject), 64}, diff --git a/tests/check/gst/struct_ppc64.h b/tests/check/gst/struct_ppc64.h index 5794580e61..2708df01cc 100644 --- a/tests/check/gst/struct_ppc64.h +++ b/tests/check/gst/struct_ppc64.h @@ -31,7 +31,6 @@ static GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 120}, {"GstMeta", sizeof (GstMeta), 16}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 24}, - {"GstMetaInfo", sizeof (GstMetaInfo), 80}, {"GstMiniObject", sizeof (GstMiniObject), 64}, {"GstObjectClass", sizeof (GstObjectClass), 184}, {"GstObject", sizeof (GstObject), 88}, diff --git a/tests/check/gst/struct_sparc.h b/tests/check/gst/struct_sparc.h index 5794580e61..2708df01cc 100644 --- a/tests/check/gst/struct_sparc.h +++ b/tests/check/gst/struct_sparc.h @@ -31,7 +31,6 @@ static GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 120}, {"GstMeta", sizeof (GstMeta), 16}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 24}, - {"GstMetaInfo", sizeof (GstMetaInfo), 80}, {"GstMiniObject", sizeof (GstMiniObject), 64}, {"GstObjectClass", sizeof (GstObjectClass), 184}, {"GstObject", sizeof (GstObject), 88}, diff --git a/tests/check/gst/struct_x86_64.h b/tests/check/gst/struct_x86_64.h index 5794580e61..2708df01cc 100644 --- a/tests/check/gst/struct_x86_64.h +++ b/tests/check/gst/struct_x86_64.h @@ -31,7 +31,6 @@ static GstCheckABIStruct list[] = { {"GstMessage", sizeof (GstMessage), 120}, {"GstMeta", sizeof (GstMeta), 16}, {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 24}, - {"GstMetaInfo", sizeof (GstMetaInfo), 80}, {"GstMiniObject", sizeof (GstMiniObject), 64}, {"GstObjectClass", sizeof (GstObjectClass), 184}, {"GstObject", sizeof (GstObject), 88},