| 1 | /* GStreamer |
| 2 | * |
| 3 | * SPDX-License-Identifier: LGPL-2.1 |
| 4 | * |
| 5 | * Copyright (C) 2022, 2023 Collabora Ltd. |
| 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Library General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This library is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * Library General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Library General Public |
| 18 | * License along with this library; if not, write to the |
| 19 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 20 | * Boston, MA 02110-1301, USA. |
| 21 | */ |
| 22 | |
| 23 | #ifdef HAVE_CONFIG_H |
| 24 | #include "config.h" |
| 25 | #endif |
| 26 | |
| 27 | #include "gstmselogging-private.h" |
| 28 | |
| 29 | GST_DEBUG_CATEGORY (gst_mse_debug); |
| 30 | |
| 31 | void |
| 32 | gst_mse_init_logging (void) |
| 33 | { |
| 34 | GST_DEBUG_CATEGORY_INIT (gst_mse_debug, "gst-mse", 0, "GstMse"); |
| 35 | } |
| 36 | |
| 37 | const gchar * |
| 38 | gst_mse_enum_value_nick (GType enum_type, gint mse_enum_value) |
| 39 | { |
| 40 | GEnumClass *enum_class = (GEnumClass *) g_type_class_ref (enum_type); |
| 41 | GEnumValue *enum_value = g_enum_get_value (enum_class, mse_enum_value); |
| 42 | const gchar *nick = enum_value->value_nick; |
| 43 | g_type_class_unref (enum_class); |
| 44 | return nick; |
| 45 | } |