• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* VP8
2  * Copyright (C) 2006 David Schleef <ds@schleef.org>
3  * Copyright (C) 2010 Entropy Wave Inc
4  * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifdef HAVE_CONFIG_H
24 #include "config.h"
25 #endif
26 
27 #include <gst/gst.h>
28 
29 /* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it,
30  * which causes compilation failures */
31 #ifdef HAVE_CONFIG_H
32 #undef HAVE_CONFIG_H
33 #endif
34 
35 #include <vpx/vpx_codec.h>
36 
37 #include "gstvp8utils.h"
38 
39 const char *
gst_vpx_error_name(vpx_codec_err_t status)40 gst_vpx_error_name (vpx_codec_err_t status)
41 {
42   switch (status) {
43     case VPX_CODEC_OK:
44       return "OK";
45     case VPX_CODEC_ERROR:
46       return "error";
47     case VPX_CODEC_MEM_ERROR:
48       return "mem error";
49     case VPX_CODEC_ABI_MISMATCH:
50       return "abi mismatch";
51     case VPX_CODEC_INCAPABLE:
52       return "incapable";
53     case VPX_CODEC_UNSUP_BITSTREAM:
54       return "unsupported bitstream";
55     case VPX_CODEC_UNSUP_FEATURE:
56       return "unsupported feature";
57     case VPX_CODEC_CORRUPT_FRAME:
58       return "corrupt frame";
59     case VPX_CODEC_INVALID_PARAM:
60       return "invalid parameter";
61     default:
62       return "unknown";
63   }
64 }
65