mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
21d3f9a0e4
Saves us a custom script. Template files are nicer than passing multiline templating stuff through to glib-mkenums. And we can get rid of our custom python script.
41 lines
842 B
Text
41 lines
842 B
Text
/*** BEGIN file-header ***/
|
|
#include "gst/gst_private.h"
|
|
#include <gst/gst.h>
|
|
#define C_ENUM(v) ((gint) v)
|
|
#define C_FLAGS(v) ((guint) v)
|
|
|
|
/*** END file-header ***/
|
|
|
|
/*** BEGIN file-production ***/
|
|
/* enumerations from "@basename@" */
|
|
/*** END file-production ***/
|
|
|
|
/*** BEGIN value-header ***/
|
|
GType
|
|
@enum_name@_get_type (void)
|
|
{
|
|
static gsize id = 0;
|
|
static const G@Type@Value values[] = {
|
|
/*** END value-header ***/
|
|
|
|
/*** BEGIN value-production ***/
|
|
{ C_@TYPE@(@VALUENAME@), "@VALUENAME@", "@valuenick@" },
|
|
/*** END value-production ***/
|
|
|
|
/*** BEGIN value-tail ***/
|
|
{ 0, NULL, NULL }
|
|
};
|
|
|
|
if (g_once_init_enter (&id)) {
|
|
GType tmp = g_@type@_register_static ("@EnumName@", values);
|
|
g_once_init_leave (&id, tmp);
|
|
}
|
|
|
|
return (GType) id;
|
|
}
|
|
|
|
/*** END value-tail ***/
|
|
|
|
/*** BEGIN file-tail ***/
|
|
|
|
/*** END file-tail ***/
|