| 1 | /* |
| 2 | * This file is part of FFmpeg. |
| 3 | * |
| 4 | * FFmpeg is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * FFmpeg is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with FFmpeg; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | */ |
| 18 | |
| 19 | #ifndef AVFILTER_ASRC_ABUFFER_H |
| 20 | #define AVFILTER_ASRC_ABUFFER_H |
| 21 | |
| 22 | #include "avfilter.h" |
| 23 | |
| 24 | /** |
| 25 | * @file |
| 26 | * memory buffer source for audio |
| 27 | * |
| 28 | * @deprecated use buffersrc.h instead. |
| 29 | */ |
| 30 | |
| 31 | /** |
| 32 | * Queue an audio buffer to the audio buffer source. |
| 33 | * |
| 34 | * @param abuffersrc audio source buffer context |
| 35 | * @param data pointers to the samples planes |
| 36 | * @param linesize linesizes of each audio buffer plane |
| 37 | * @param nb_samples number of samples per channel |
| 38 | * @param sample_fmt sample format of the audio data |
| 39 | * @param ch_layout channel layout of the audio data |
| 40 | * @param planar flag to indicate if audio data is planar or packed |
| 41 | * @param pts presentation timestamp of the audio buffer |
| 42 | * @param flags unused |
| 43 | * |
| 44 | * @deprecated use av_buffersrc_add_ref() instead. |
| 45 | */ |
| 46 | attribute_deprecated |
| 47 | int av_asrc_buffer_add_samples(AVFilterContext *abuffersrc, |
| 48 | uint8_t *data[8], int linesize[8], |
| 49 | int nb_samples, int sample_rate, |
| 50 | int sample_fmt, int64_t ch_layout, int planar, |
| 51 | int64_t pts, int av_unused flags); |
| 52 | |
| 53 | /** |
| 54 | * Queue an audio buffer to the audio buffer source. |
| 55 | * |
| 56 | * This is similar to av_asrc_buffer_add_samples(), but the samples |
| 57 | * are stored in a buffer with known size. |
| 58 | * |
| 59 | * @param abuffersrc audio source buffer context |
| 60 | * @param buf pointer to the samples data, packed is assumed |
| 61 | * @param size the size in bytes of the buffer, it must contain an |
| 62 | * integer number of samples |
| 63 | * @param sample_fmt sample format of the audio data |
| 64 | * @param ch_layout channel layout of the audio data |
| 65 | * @param pts presentation timestamp of the audio buffer |
| 66 | * @param flags unused |
| 67 | * |
| 68 | * @deprecated use av_buffersrc_add_ref() instead. |
| 69 | */ |
| 70 | attribute_deprecated |
| 71 | int av_asrc_buffer_add_buffer(AVFilterContext *abuffersrc, |
| 72 | uint8_t *buf, int buf_size, |
| 73 | int sample_rate, |
| 74 | int sample_fmt, int64_t ch_layout, int planar, |
| 75 | int64_t pts, int av_unused flags); |
| 76 | |
| 77 | /** |
| 78 | * Queue an audio buffer to the audio buffer source. |
| 79 | * |
| 80 | * @param abuffersrc audio source buffer context |
| 81 | * @param samplesref buffer ref to queue |
| 82 | * @param flags unused |
| 83 | * |
| 84 | * @deprecated use av_buffersrc_add_ref() instead. |
| 85 | */ |
| 86 | attribute_deprecated |
| 87 | int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *abuffersrc, |
| 88 | AVFilterBufferRef *samplesref, |
| 89 | int av_unused flags); |
| 90 | |
| 91 | #endif /* AVFILTER_ASRC_ABUFFER_H */ |