FFmpeg
|
#include "libavutil/opt.h"
#include "swresample_internal.h"
#include "audioconvert.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include <float.h>
#include "libavutil/ffversion.h"
Go to the source code of this file.
Macros | |
#define | ALIGN 32 |
#define | LICENSE_PREFIX "libswresample license: " |
#define | RSC 1 |
#define | MAX_DROP_STEP 16384 |
#define | MAX_SILENCE_STEP 16384 |
Functions | |
unsigned | swresample_version (void) |
Return the LIBSWRESAMPLE_VERSION_INT constant. More... | |
const char * | swresample_configuration (void) |
Return the swr build-time configuration. More... | |
const char * | swresample_license (void) |
Return the swr license. More... | |
int | swr_set_channel_mapping (struct SwrContext *s, const int *channel_map) |
Set a customized input channel mapping. More... | |
struct SwrContext * | swr_alloc_set_opts (struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx) |
Allocate SwrContext if needed and set/reset common parameters. More... | |
static void | set_audiodata_fmt (AudioData *a, enum AVSampleFormat fmt) |
static void | free_temp (AudioData *a) |
static void | clear_context (SwrContext *s) |
av_cold void | swr_free (SwrContext **ss) |
Free the given SwrContext and set the pointer to NULL. More... | |
av_cold void | swr_close (SwrContext *s) |
Closes the context so that swr_is_initialized() returns 0. More... | |
av_cold int | swr_init (struct SwrContext *s) |
Initialize context after user parameters have been set. More... | |
int | swri_realloc_audio (AudioData *a, int count) |
static void | copy (AudioData *out, AudioData *in, int count) |
static void | fill_audiodata (AudioData *out, uint8_t *in_arg[SWR_CH_MAX]) |
static void | reversefill_audiodata (AudioData *out, uint8_t *in_arg[SWR_CH_MAX]) |
static void | buf_set (AudioData *out, AudioData *in, int count) |
out may be equal in. More... | |
static int | resample (SwrContext *s, AudioData *out_param, int out_count, const AudioData *in_param, int in_count) |
static int | swr_convert_internal (struct SwrContext *s, AudioData *out, int out_count, AudioData *in, int in_count) |
int | swr_is_initialized (struct SwrContext *s) |
Check whether an swr context has been initialized or not. More... | |
int attribute_align_arg | swr_convert (struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, const uint8_t *in_arg[SWR_CH_MAX], int in_count) |
int | swr_drop_output (struct SwrContext *s, int count) |
Drops the specified number of output samples. More... | |
int | swr_inject_silence (struct SwrContext *s, int count) |
Injects the specified number of silence samples. More... | |
int64_t | swr_get_delay (struct SwrContext *s, int64_t base) |
Gets the delay the next input sample will experience relative to the next output sample. More... | |
int | swr_get_out_samples (struct SwrContext *s, int in_samples) |
Find an upper bound on the number of samples that the next swr_convert call will output, if called with in_samples of input samples. More... | |
int | swr_set_compensation (struct SwrContext *s, int sample_delta, int compensation_distance) |
Activate resampling compensation ("soft" compensation). More... | |
int64_t | swr_next_pts (struct SwrContext *s, int64_t pts) |
Convert the next timestamp from input to output timestamps are in 1/(in_sample_rate * out_sample_rate) units. More... | |
Variables | |
const char | swr_ffversion [] = "FFmpeg version " FFMPEG_VERSION |
#define ALIGN 32 |
Definition at line 30 of file swresample.c.
Referenced by swri_realloc_audio().
#define LICENSE_PREFIX "libswresample license: " |
Referenced by swresample_license().
#define RSC 1 |
Referenced by swr_init().
#define MAX_DROP_STEP 16384 |
Referenced by swr_convert().
#define MAX_SILENCE_STEP 16384 |
Referenced by swr_inject_silence().
|
static |
Definition at line 104 of file swresample.c.
Referenced by swr_init().
Definition at line 112 of file swresample.c.
Referenced by clear_context().
|
static |
Definition at line 117 of file swresample.c.
Referenced by swr_close(), swr_free(), and swr_init().
int swri_realloc_audio | ( | AudioData * | a, |
int | count | ||
) |
Definition at line 372 of file swresample.c.
Referenced by invert_initial_buffer(), resample(), resample_flush(), swr_convert(), swr_convert_internal(), and swr_inject_silence().
Definition at line 404 of file swresample.c.
Referenced by resample(), swr_convert(), and swr_convert_internal().
Definition at line 417 of file swresample.c.
Referenced by swr_convert().
Definition at line 430 of file swresample.c.
Referenced by swr_convert(), and swr_inject_silence().
out may be equal in.
Definition at line 444 of file swresample.c.
Referenced by resample(), and swr_convert().
|
static |
Definition at line 459 of file swresample.c.
Referenced by swr_convert_internal().
|
static |
Definition at line 554 of file swresample.c.
Referenced by swr_convert().
int attribute_align_arg swr_convert | ( | struct SwrContext * | s, |
uint8_t * | out_arg[SWR_CH_MAX], | ||
int | out_count, | ||
const uint8_t * | in_arg[SWR_CH_MAX], | ||
int | in_count | ||
) |
Definition at line 686 of file swresample.c.
Referenced by audio_decode_frame(), convert_frame(), convert_samples(), filter_frame(), flush_frame(), main(), opus_decode_frame(), opus_flush_resample(), opus_init_resample(), swr_drop_output(), swr_inject_silence(), wrap(), and write_audio_frame().
const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION |
Definition at line 33 of file swresample.c.