1 /* iSAC plugin utils 2 * 3 * Copyright (C) 2020 Collabora Ltd. 4 * Author: Guillaume Desmottes <guillaume.desmottes@collabora.com>, Collabora Ltd. 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 Free 18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301 USA. 20 */ 21 22 #include "gstisacutils.h" 23 24 #include <modules/audio_coding/codecs/isac/main/source/settings.h> 25 26 const gchar * isac_error_code_to_str(gint code)27isac_error_code_to_str (gint code) 28 { 29 switch (code) { 30 case ISAC_MEMORY_ALLOCATION_FAILED: 31 return "allocation failed"; 32 case ISAC_MODE_MISMATCH: 33 return "mode mismatch"; 34 case ISAC_DISALLOWED_BOTTLENECK: 35 return "disallowed bottleneck"; 36 case ISAC_DISALLOWED_FRAME_LENGTH: 37 return "disallowed frame length"; 38 case ISAC_UNSUPPORTED_SAMPLING_FREQUENCY: 39 return "unsupported sampling frequency"; 40 case ISAC_RANGE_ERROR_BW_ESTIMATOR: 41 return "range error bandwitch estimator"; 42 case ISAC_ENCODER_NOT_INITIATED: 43 return "encoder not initiated"; 44 case ISAC_DISALLOWED_CODING_MODE: 45 return "disallowed coding mode"; 46 case ISAC_DISALLOWED_FRAME_MODE_ENCODER: 47 return "disallowed frame mode encoder"; 48 case ISAC_DISALLOWED_BITSTREAM_LENGTH: 49 return "disallowed bitstream length"; 50 case ISAC_PAYLOAD_LARGER_THAN_LIMIT: 51 return "payload larger than limit"; 52 case ISAC_DISALLOWED_ENCODER_BANDWIDTH: 53 return "disallowed encoder bandwith"; 54 case ISAC_DECODER_NOT_INITIATED: 55 return "decoder not initiated"; 56 case ISAC_EMPTY_PACKET: 57 return "empty packet"; 58 case ISAC_DISALLOWED_FRAME_MODE_DECODER: 59 return "disallowed frame mode decoder"; 60 case ISAC_RANGE_ERROR_DECODE_FRAME_LENGTH: 61 return "range error decode frame length"; 62 case ISAC_RANGE_ERROR_DECODE_BANDWIDTH: 63 return "range error decode bandwith"; 64 case ISAC_RANGE_ERROR_DECODE_PITCH_GAIN: 65 return "range error decode pitch gain"; 66 case ISAC_RANGE_ERROR_DECODE_PITCH_LAG: 67 return "range error decode pitch lag"; 68 case ISAC_RANGE_ERROR_DECODE_LPC: 69 return "range error decode lpc"; 70 case ISAC_RANGE_ERROR_DECODE_SPECTRUM: 71 return "range error decode spectrum"; 72 case ISAC_LENGTH_MISMATCH: 73 return "length mismatch"; 74 case ISAC_RANGE_ERROR_DECODE_BANDWITH: 75 return "range error decode bandwith"; 76 case ISAC_DISALLOWED_BANDWIDTH_MODE_DECODER: 77 return "disallowed bandwitch mode decoder"; 78 case ISAC_DISALLOWED_LPC_MODEL: 79 return "disallowed lpc model"; 80 case ISAC_INCOMPATIBLE_FORMATS: 81 return "incompatible formats"; 82 } 83 84 return "<unknown>"; 85 } 86