Miam-Player  0.8.0
A nice music player
samplefmt.h
Go to the documentation of this file.
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 AVUTIL_SAMPLEFMT_H
20 #define AVUTIL_SAMPLEFMT_H
21 
22 #include <stdint.h>
23 
24 #include "avutil.h"
25 #include "attributes.h"
26 
65 
73 
75 };
76 
81 const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
82 
87 enum AVSampleFormat av_get_sample_fmt(const char *name);
88 
95 enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);
96 
107 
118 
131 char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
132 
140 int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);
141 
148 int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt);
149 
160 int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
161  enum AVSampleFormat sample_fmt, int align);
162 
202 int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
203  const uint8_t *buf,
204  int nb_channels, int nb_samples,
205  enum AVSampleFormat sample_fmt, int align);
206 
226 int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
227  int nb_samples, enum AVSampleFormat sample_fmt, int align);
228 
238 int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
239  int nb_samples, enum AVSampleFormat sample_fmt, int align);
240 
252 int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
253  int src_offset, int nb_samples, int nb_channels,
254  enum AVSampleFormat sample_fmt);
255 
265 int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,
266  int nb_channels, enum AVSampleFormat sample_fmt);
267 
272 #endif /* AVUTIL_SAMPLEFMT_H */
float, planar
Definition: samplefmt.h:69
Number of sample formats. DO NOT USE if linking dynamically.
Definition: samplefmt.h:74
char * av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt)
Definition: samplefmt.h:59
double, planar
Definition: samplefmt.h:70
float
Definition: samplefmt.h:63
int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt)
signed 32 bits
Definition: samplefmt.h:62
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
unsigned 8 bits
Definition: samplefmt.h:60
signed 32 bits, planar
Definition: samplefmt.h:68
signed 64 bits
Definition: samplefmt.h:71
double
Definition: samplefmt.h:64
unsigned 8 bits, planar
Definition: samplefmt.h:66
int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
AVSampleFormat
Definition: samplefmt.h:58
int av_samples_copy(uint8_t **dst, uint8_t *const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
enum AVSampleFormat av_get_sample_fmt(const char *name)
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar)
enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt)
signed 16 bits
Definition: samplefmt.h:61
int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, const uint8_t *buf, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
signed 64 bits, planar
Definition: samplefmt.h:72
signed 16 bits, planar
Definition: samplefmt.h:67