• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * GStreamer
3  * Copyright (C) 2016 Matthew Waters <matthew@centricular.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23 
24 #include <gst/gl/egl/gstegl.h>
25 
26 /**
27  * gst_egl_get_error_string:
28  * @err: an EGL error code
29  *
30  * Returns: the short string representation of @err
31  */
32 const gchar *
gst_egl_get_error_string(EGLint err)33 gst_egl_get_error_string (EGLint err)
34 {
35   switch (err) {
36     case EGL_SUCCESS:
37       return "EGL_SUCCESS";
38     case EGL_BAD_DISPLAY:
39       return "EGL_BAD_DISPLAY";
40     case EGL_NOT_INITIALIZED:
41       return "EGL_NOT_INITIALIZED";
42     case EGL_BAD_ACCESS:
43       return "EGL_BAD_ACCESS";
44     case EGL_BAD_ALLOC:
45       return "EGL_BAD_ALLOC";
46     case EGL_BAD_ATTRIBUTE:
47       return "EGL_BAD_ATTRIBUTE";
48     case EGL_BAD_CONFIG:
49       return "EGL_BAD_CONFIG";
50     case EGL_BAD_CONTEXT:
51       return "EGL_BAD_CONTEXT";
52     case EGL_BAD_CURRENT_SURFACE:
53       return "EGL_BAD_CURRENT_SURFACE";
54     case EGL_BAD_MATCH:
55       return "EGL_BAD_MATCH";
56     case EGL_BAD_NATIVE_PIXMAP:
57       return "EGL_BAD_NATIVE_PIXMAP";
58     case EGL_BAD_NATIVE_WINDOW:
59       return "EGL_BAD_NATIVE_WINDOW";
60     case EGL_BAD_PARAMETER:
61       return "EGL_BAD_PARAMETER";
62     case EGL_BAD_SURFACE:
63       return "EGL_BAD_SURFACE";
64     default:
65       return "unknown";
66   }
67 }
68