public class swresample extends swresample
| Modifier and Type | Class and Description |
|---|---|
static class |
swresample.SwrContext
The libswresample context.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
SWR_CH_MAX
Maximum number of channels
|
static int |
SWR_DITHER_NB
enum SwrDitherType
|
static int |
SWR_DITHER_NONE
enum SwrDitherType
|
static int |
SWR_DITHER_NS
enum SwrDitherType
|
static int |
SWR_DITHER_NS_F_WEIGHTED
enum SwrDitherType
|
static int |
SWR_DITHER_NS_HIGH_SHIBATA
enum SwrDitherType
|
static int |
SWR_DITHER_NS_IMPROVED_E_WEIGHTED
enum SwrDitherType
|
static int |
SWR_DITHER_NS_LIPSHITZ
enum SwrDitherType
|
static int |
SWR_DITHER_NS_LOW_SHIBATA
enum SwrDitherType
|
static int |
SWR_DITHER_NS_MODIFIED_E_WEIGHTED
enum SwrDitherType
|
static int |
SWR_DITHER_NS_SHIBATA
enum SwrDitherType
|
static int |
SWR_DITHER_RECTANGULAR
enum SwrDitherType
|
static int |
SWR_DITHER_TRIANGULAR
enum SwrDitherType
|
static int |
SWR_DITHER_TRIANGULAR_HIGHPASS
enum SwrDitherType
|
static int |
SWR_ENGINE_NB
enum SwrEngine
|
static int |
SWR_ENGINE_SOXR
enum SwrEngine
|
static int |
SWR_ENGINE_SWR
enum SwrEngine
|
static int |
SWR_FILTER_TYPE_BLACKMAN_NUTTALL
enum SwrFilterType
|
static int |
SWR_FILTER_TYPE_CUBIC
enum SwrFilterType
|
static int |
SWR_FILTER_TYPE_KAISER
enum SwrFilterType
|
static int |
SWR_FLAG_RESAMPLE
Force resampling even if equal sample rate
|
| Constructor and Description |
|---|
swresample() |
| Modifier and Type | Method and Description |
|---|---|
static swresample.SwrContext |
swr_alloc_set_opts(swresample.SwrContext s,
long out_ch_layout,
int out_sample_fmt,
int out_sample_rate,
long in_ch_layout,
int in_sample_fmt,
int in_sample_rate,
int log_offset,
Pointer log_ctx)
Allocate SwrContext if needed and set/reset common parameters.
|
static swresample.SwrContext |
swr_alloc()
Allocate SwrContext.
|
static void |
swr_close(swresample.SwrContext s)
Closes the context so that swr_is_initialized() returns 0.
|
static int |
swr_convert(swresample.SwrContext s,
byte[] out,
int out_count,
byte[] in,
int in_count) |
static int |
swr_convert(swresample.SwrContext s,
ByteBuffer out,
int out_count,
ByteBuffer in,
int in_count) |
static int |
swr_convert(swresample.SwrContext s,
BytePointer out,
int out_count,
BytePointer in,
int in_count) |
static int |
swr_convert(swresample.SwrContext s,
PointerPointer out,
int out_count,
PointerPointer in,
int in_count)
Convert audio.
|
static int |
swr_drop_output(swresample.SwrContext s,
int count)
Drops the specified number of output samples.
|
static void |
swr_free(PointerPointer s)
Free the given SwrContext and set the pointer to NULL.
|
static void |
swr_free(swresample.SwrContext s) |
static avutil.AVClass |
swr_get_class()
Get the AVClass for SwrContext.
|
static long |
swr_get_delay(swresample.SwrContext s,
long base)
Gets the delay the next input sample will experience relative to the next output sample.
|
static int |
swr_init(swresample.SwrContext s)
Initialize context after user parameters have been set.
|
static int |
swr_inject_silence(swresample.SwrContext s,
int count)
Injects the specified number of silence samples.
|
static int |
swr_is_initialized(swresample.SwrContext s)
Check whether an swr context has been initialized or not.
|
static long |
swr_next_pts(swresample.SwrContext s,
long pts)
Convert the next timestamp from input to output
timestamps are in 1/(in_sample_rate * out_sample_rate) units.
|
static int |
swr_set_channel_mapping(swresample.SwrContext s,
int[] channel_map) |
static int |
swr_set_channel_mapping(swresample.SwrContext s,
IntBuffer channel_map) |
static int |
swr_set_channel_mapping(swresample.SwrContext s,
IntPointer channel_map)
Set a customized input channel mapping.
|
static int |
swr_set_compensation(swresample.SwrContext s,
int sample_delta,
int compensation_distance)
Activate resampling compensation ("soft" compensation).
|
static int |
swr_set_matrix(swresample.SwrContext s,
double[] matrix,
int stride) |
static int |
swr_set_matrix(swresample.SwrContext s,
DoubleBuffer matrix,
int stride) |
static int |
swr_set_matrix(swresample.SwrContext s,
DoublePointer matrix,
int stride)
Set a customized remix matrix.
|
static BytePointer |
swresample_configuration()
Return the swr build-time configuration.
|
static BytePointer |
swresample_license()
Return the swr license.
|
static int |
swresample_version()
Return the @ref LIBSWRESAMPLE_VERSION_INT constant.
|
mappublic static final int SWR_CH_MAX
public static final int SWR_FLAG_RESAMPLE
public static final int SWR_DITHER_NONE
public static final int SWR_DITHER_RECTANGULAR
public static final int SWR_DITHER_TRIANGULAR
public static final int SWR_DITHER_TRIANGULAR_HIGHPASS
public static final int SWR_DITHER_NS
public static final int SWR_DITHER_NS_LIPSHITZ
public static final int SWR_DITHER_NS_F_WEIGHTED
public static final int SWR_DITHER_NS_MODIFIED_E_WEIGHTED
public static final int SWR_DITHER_NS_IMPROVED_E_WEIGHTED
public static final int SWR_DITHER_NS_SHIBATA
public static final int SWR_DITHER_NS_LOW_SHIBATA
public static final int SWR_DITHER_NS_HIGH_SHIBATA
public static final int SWR_DITHER_NB
public static final int SWR_ENGINE_SWR
public static final int SWR_ENGINE_SOXR
public static final int SWR_ENGINE_NB
public static final int SWR_FILTER_TYPE_CUBIC
public static final int SWR_FILTER_TYPE_BLACKMAN_NUTTALL
public static final int SWR_FILTER_TYPE_KAISER
public static avutil.AVClass swr_get_class()
av_opt_find().public static swresample.SwrContext swr_alloc()
swr_alloc_set_opts(), swr_init(), swr_free()public static int swr_init(swresample.SwrContext s)
public static int swr_is_initialized(swresample.SwrContext s)
swr_init()public static swresample.SwrContext swr_alloc_set_opts(swresample.SwrContext s, long out_ch_layout, int out_sample_fmt, int out_sample_rate, long in_ch_layout, int in_sample_fmt, int in_sample_rate, int log_offset, Pointer log_ctx)
s - existing Swr context if available, or NULL if notout_ch_layout - output channel layout (AV_CH_LAYOUT_*)out_sample_fmt - output sample format (AV_SAMPLE_FMT_*).out_sample_rate - output sample rate (frequency in Hz)in_ch_layout - input channel layout (AV_CH_LAYOUT_*)in_sample_fmt - input sample format (AV_SAMPLE_FMT_*).in_sample_rate - input sample rate (frequency in Hz)log_offset - logging level offsetlog_ctx - parent logging context, can be NULLswr_init(), swr_free()public static void swr_free(PointerPointer s)
public static void swr_free(swresample.SwrContext s)
public static void swr_close(swresample.SwrContext s)
public static int swr_convert(swresample.SwrContext s, PointerPointer out, int out_count, PointerPointer in, int in_count)
s - allocated Swr context, with parameters setout - output buffers, only the first one need be set in case of packed audioout_count - amount of space available for output in samples per channelin - input buffers, only the first one need to be set in case of packed audioin_count - number of input samples available in one channelpublic static int swr_convert(swresample.SwrContext s, BytePointer out, int out_count, BytePointer in, int in_count)
public static int swr_convert(swresample.SwrContext s, ByteBuffer out, int out_count, ByteBuffer in, int in_count)
public static int swr_convert(swresample.SwrContext s, byte[] out, int out_count, byte[] in, int in_count)
public static long swr_next_pts(swresample.SwrContext s, long pts)
s[in] - initialized Swr contextpts[in] - timestamp for the next input sample, INT64_MIN if unknownswr_set_compensation(), swr_drop_output(), and swr_inject_silence() are
function used internally for timestamp compensation.public static int swr_set_compensation(swresample.SwrContext s, int sample_delta, int compensation_distance)
public static int swr_set_channel_mapping(swresample.SwrContext s, IntPointer channel_map)
public static int swr_set_channel_mapping(swresample.SwrContext s, IntBuffer channel_map)
public static int swr_set_channel_mapping(swresample.SwrContext s, int[] channel_map)
public static int swr_set_matrix(swresample.SwrContext s, DoublePointer matrix, int stride)
s - allocated Swr context, not yet initializedmatrix - remix coefficients; matrix[i + stride * o] is
the weight of input channel i in output channel ostride - offset between lines of the matrixpublic static int swr_set_matrix(swresample.SwrContext s, DoubleBuffer matrix, int stride)
public static int swr_set_matrix(swresample.SwrContext s, double[] matrix, int stride)
public static int swr_drop_output(swresample.SwrContext s, int count)
s - allocated Swr contextcount - number of samples to be droppedpublic static int swr_inject_silence(swresample.SwrContext s, int count)
s - allocated Swr contextcount - number of samples to be droppedpublic static long swr_get_delay(swresample.SwrContext s, long base)
s - swr contextbase - timebase in which the returned delay will be:public static int swresample_version()
public static BytePointer swresample_configuration()
public static BytePointer swresample_license()
Copyright © 2014. All Rights Reserved.