| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Interface to libgsm for gsm encoding/decoding | 2 * Interface to libgsm for gsm encoding/decoding |
| 3 * Copyright (c) 2005 Alban Bedel <albeu@free.fr> | 3 * Copyright (c) 2005 Alban Bedel <albeu@free.fr> |
| 4 * Copyright (c) 2006, 2007 Michel Bardiaux <mbardiaux@mediaxim.be> | 4 * Copyright (c) 2006, 2007 Michel Bardiaux <mbardiaux@mediaxim.be> |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * @file libavcodec/libgsm.c | 24 * @file libavcodec/libgsm.c |
| 25 * Interface to libgsm for gsm encoding/decoding | 25 * Interface to libgsm for gsm encoding/decoding |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 // The idiosyncrasies of GSM-in-WAV are explained at http://kbs.cs.tu-berlin.de/
~jutta/toast.html | 28 // The idiosyncrasies of GSM-in-WAV are explained at http://kbs.cs.tu-berlin.de/
~jutta/toast.html |
| 29 | 29 |
| 30 #include "avcodec.h" | 30 #include "avcodec.h" |
| 31 #include <gsm.h> | 31 #include <gsm/gsm.h> |
| 32 | 32 |
| 33 // gsm.h misses some essential constants | 33 // gsm.h misses some essential constants |
| 34 #define GSM_BLOCK_SIZE 33 | 34 #define GSM_BLOCK_SIZE 33 |
| 35 #define GSM_MS_BLOCK_SIZE 65 | 35 #define GSM_MS_BLOCK_SIZE 65 |
| 36 #define GSM_FRAME_SIZE 160 | 36 #define GSM_FRAME_SIZE 160 |
| 37 | 37 |
| 38 static av_cold int libgsm_init(AVCodecContext *avctx) { | 38 static av_cold int libgsm_init(AVCodecContext *avctx) { |
| 39 if (avctx->channels > 1) { | 39 if (avctx->channels > 1) { |
| 40 av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", | 40 av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", |
| 41 avctx->channels); | 41 avctx->channels); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 "libgsm_ms", | 172 "libgsm_ms", |
| 173 CODEC_TYPE_AUDIO, | 173 CODEC_TYPE_AUDIO, |
| 174 CODEC_ID_GSM_MS, | 174 CODEC_ID_GSM_MS, |
| 175 0, | 175 0, |
| 176 libgsm_init, | 176 libgsm_init, |
| 177 NULL, | 177 NULL, |
| 178 libgsm_close, | 178 libgsm_close, |
| 179 libgsm_decode_frame, | 179 libgsm_decode_frame, |
| 180 .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), | 180 .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), |
| 181 }; | 181 }; |
| OLD | NEW |