rpicamsrc: sync autotools with glib-mkenum usage in meson build

This commit is contained in:
Tim-Philipp Müller 2020-05-02 19:27:20 +00:00
parent 1c25fe131d
commit e5593a4c9c
2 changed files with 20 additions and 22 deletions

View file

@ -4,36 +4,36 @@
/*** END file-header ***/
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
/* enumerations from "@basename@" */
#include "@filename@"
#define C_ENUM(v) ((gint) v)
#define C_FLAGS(v) ((guint) v)
/*** END file-production ***/
/*** BEGIN value-header ***/
GType
@enum_name@_get_type (void)
{
static GType the_type = 0;
if (the_type == 0)
{
static const G@Type@Value values[] = {
static volatile gsize gtype_id = 0;
if (g_once_init_enter (&gtype_id)) {
static const G@Type@Value values[] = {
/*** END value-header ***/
/*** BEGIN value-production ***/
{ @VALUENAME@,
"@VALUENAME@",
"@valuenick@" },
{ C_@TYPE@(@VALUENAME@), "@VALUENAME@", "@valuenick@" },
/*** END value-production ***/
/*** BEGIN value-tail ***/
{ 0, NULL, NULL }
};
the_type = g_@type@_register_static (
g_intern_static_string ("@EnumName@"),
values);
}
return the_type;
{ 0, NULL, NULL }
};
GType new_type = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
g_once_init_leave (&gtype_id, new_type);
}
return (GType) gtype_id;
}
/*** END value-tail ***/

View file

@ -1,6 +1,5 @@
/*** BEGIN file-header ***/
#ifndef __GSTRPICAM_ENUM_TYPES_H__
#define __GSTRPICAM_ENUM_TYPES_H__
#pragma once
#include <glib-object.h>
@ -9,18 +8,17 @@ G_BEGIN_DECLS
/*** END file-header ***/
/*** BEGIN file-production ***/
/* Enumerations from "@filename@" */
/* Enumerations from "@basename@" */
/*** END file-production ***/
/*** BEGIN enumeration-production ***/
#define GST_RPI_CAM_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
GType @enum_name@_get_type (void) G_GNUC_CONST;
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
GType @enum_name@_get_type (void);
/*** END enumeration-production ***/
/*** BEGIN file-tail ***/
G_END_DECLS
#endif /* __GSTRPICAM_ENUM_TYPES_H__ */
/*** END file-tail ***/