Blame ext/vpx/gstvp8utils.c

Packit 1f69a5
/* VP8
Packit 1f69a5
 * Copyright (C) 2006 David Schleef <ds@schleef.org>
Packit 1f69a5
 * Copyright (C) 2010 Entropy Wave Inc
Packit 1f69a5
 * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Packit 1f69a5
 *
Packit 1f69a5
 * This library is free software; you can redistribute it and/or
Packit 1f69a5
 * modify it under the terms of the GNU Library General Public
Packit 1f69a5
 * License as published by the Free Software Foundation; either
Packit 1f69a5
 * version 2 of the License, or (at your option) any later version.
Packit 1f69a5
 *
Packit 1f69a5
 * This library is distributed in the hope that it will be useful,
Packit 1f69a5
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1f69a5
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 1f69a5
 * Library General Public License for more details.
Packit 1f69a5
 *
Packit 1f69a5
 * You should have received a copy of the GNU Library General Public
Packit 1f69a5
 * License along with this library; if not, write to the
Packit 1f69a5
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 1f69a5
 * Boston, MA 02110-1301, USA.
Packit 1f69a5
 *
Packit 1f69a5
 */
Packit 1f69a5
Packit 1f69a5
#ifdef HAVE_CONFIG_H
Packit 1f69a5
#include "config.h"
Packit 1f69a5
#endif
Packit 1f69a5
Packit 1f69a5
#include <gst/gst.h>
Packit 1f69a5
Packit 1f69a5
/* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it,
Packit 1f69a5
 * which causes compilation failures */
Packit 1f69a5
#ifdef HAVE_CONFIG_H
Packit 1f69a5
#undef HAVE_CONFIG_H
Packit 1f69a5
#endif
Packit 1f69a5
Packit 1f69a5
#include <vpx/vpx_codec.h>
Packit 1f69a5
Packit 1f69a5
#include "gstvp8utils.h"
Packit 1f69a5
Packit 1f69a5
const char *
Packit 1f69a5
gst_vpx_error_name (vpx_codec_err_t status)
Packit 1f69a5
{
Packit 1f69a5
  switch (status) {
Packit 1f69a5
    case VPX_CODEC_OK:
Packit 1f69a5
      return "OK";
Packit 1f69a5
    case VPX_CODEC_ERROR:
Packit 1f69a5
      return "error";
Packit 1f69a5
    case VPX_CODEC_MEM_ERROR:
Packit 1f69a5
      return "mem error";
Packit 1f69a5
    case VPX_CODEC_ABI_MISMATCH:
Packit 1f69a5
      return "abi mismatch";
Packit 1f69a5
    case VPX_CODEC_INCAPABLE:
Packit 1f69a5
      return "incapable";
Packit 1f69a5
    case VPX_CODEC_UNSUP_BITSTREAM:
Packit 1f69a5
      return "unsupported bitstream";
Packit 1f69a5
    case VPX_CODEC_UNSUP_FEATURE:
Packit 1f69a5
      return "unsupported feature";
Packit 1f69a5
    case VPX_CODEC_CORRUPT_FRAME:
Packit 1f69a5
      return "corrupt frame";
Packit 1f69a5
    case VPX_CODEC_INVALID_PARAM:
Packit 1f69a5
      return "invalid parameter";
Packit 1f69a5
    default:
Packit 1f69a5
      return "unknown";
Packit 1f69a5
  }
Packit 1f69a5
}