mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
tag: add GType for GstTagLicenseFlags
API: gst_tag_license_flags_get_type()
This commit is contained in:
parent
1c0fbbce10
commit
3e34c2da1c
3 changed files with 55 additions and 0 deletions
|
@ -1751,6 +1751,7 @@ GstTagImageType
|
|||
<SUBSECTION Standard>
|
||||
GST_TYPE_TAG_IMAGE_TYPE
|
||||
gst_tag_image_type_get_type
|
||||
gst_tag_license_flags_get_type
|
||||
<SUBSECTION Private>
|
||||
GstTagEntryMatch
|
||||
</SECTION>
|
||||
|
|
|
@ -524,3 +524,55 @@ gst_tag_get_license_version (const gchar * license_ref)
|
|||
GST_ERROR ("Could not determine version for ref '%s'", license_ref);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GType
|
||||
gst_tag_license_flags_get_type (void)
|
||||
{
|
||||
/* FIXME: we should really be using glib-mkenums for this.. */
|
||||
#define C_FLAGS(v) ((guint) v)
|
||||
static gsize id = 0;
|
||||
static const GFlagsValue values[] = {
|
||||
{C_FLAGS (GST_TAG_LICENSE_PERMITS_REPRODUCTION),
|
||||
"GST_TAG_LICENSE_PERMITS_REPRODUCTION", "permits-reproduction"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_PERMITS_DISTRIBUTION),
|
||||
"GST_TAG_LICENSE_PERMITS_DISTRIBUTION", "permits-distribution"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS),
|
||||
"GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS",
|
||||
"permits-derivative-works"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_PERMITS_SHARING),
|
||||
"GST_TAG_LICENSE_PERMITS_SHARING", "permits-sharing"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_REQUIRES_NOTICE),
|
||||
"GST_TAG_LICENSE_REQUIRES_NOTICE", "requires-notice"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_REQUIRES_ATTRIBUTION),
|
||||
"GST_TAG_LICENSE_REQUIRES_ATTRIBUTION", "requires-attributions"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE),
|
||||
"GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE", "requires-share-alike"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_REQUIRES_SOURCE_CODE),
|
||||
"GST_TAG_LICENSE_REQUIRES_SOURCE_CODE", "requires-source-code"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_REQUIRES_COPYLEFT),
|
||||
"GST_TAG_LICENSE_REQUIRES_COPYLEFT", "requires-copyleft"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT),
|
||||
"GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT",
|
||||
"requires-lesser-copyleft"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE),
|
||||
"GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE",
|
||||
"prohibits-commercial-use"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE),
|
||||
"GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE",
|
||||
"prohibits-high-income-nation-use"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE),
|
||||
"GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE",
|
||||
"creative-commons-license"},
|
||||
{C_FLAGS (GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE),
|
||||
"GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE",
|
||||
"free-software-foundation-license"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
if (g_once_init_enter (&id)) {
|
||||
GType tmp = g_flags_register_static ("GstTagLicenseFlags", values);
|
||||
g_once_init_leave (&id, tmp);
|
||||
}
|
||||
|
||||
return (GType) id;
|
||||
}
|
||||
|
|
|
@ -621,6 +621,8 @@ const gchar * gst_tag_get_license_description (const gchar * license_ref)
|
|||
|
||||
const gchar * gst_tag_get_license_jurisdiction (const gchar * license_ref);
|
||||
|
||||
GType gst_tag_license_flags_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TAG_TAG_H__ */
|
||||
|
|
Loading…
Reference in a new issue