gstmselogging: Added helper function to get nicknames of enum values
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
This commit is contained in:
parent
2cf19176dc
commit
4e958fa45a
@ -31,3 +31,6 @@ GST_DEBUG_CATEGORY_EXTERN (gst_mse_debug);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
void gst_mse_init_logging (void);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
const gchar * gst_mse_enum_value_nick (GType enum_type, gint mse_enum_value);
|
||||
|
@ -33,3 +33,13 @@ gst_mse_init_logging (void)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_mse_debug, "gst-mse", 0, "GstMse");
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gst_mse_enum_value_nick (GType enum_type, gint mse_enum_value)
|
||||
{
|
||||
GEnumClass *enum_class = (GEnumClass *) g_type_class_ref (enum_type);
|
||||
GEnumValue *enum_value = g_enum_get_value (enum_class, mse_enum_value);
|
||||
const gchar *nick = enum_value->value_nick;
|
||||
g_type_class_unref (enum_class);
|
||||
return nick;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user