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_config_frame(swresample.SwrContext swr,
avutil.AVFrame out,
avutil.AVFrame in)
Configure or reconfigure the SwrContext using the information
provided by the AVFrames.
|
static int |
swr_convert_frame(swresample.SwrContext swr,
avutil.AVFrame output,
avutil.AVFrame input)
Convert the samples in the input AVFrame and write them to the output AVFrame.
|
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_get_out_samples(swresample.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.
|
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
@Const 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)
av_opt_set_int(),
av_opt_set_dict()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, @Cast(value="AVSampleFormat") int out_sample_fmt, int out_sample_rate, long in_ch_layout, @Cast(value="AVSampleFormat") 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(@Cast(value="SwrContext**") PointerPointer s)
public static void swr_free(@ByPtrPtr swresample.SwrContext s)
public static void swr_close(swresample.SwrContext s)
public static int swr_convert(swresample.SwrContext s, @Cast(value="uint8_t**") PointerPointer out, int out_count, @Cast(value="const uint8_t**") 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, @Cast(value="uint8_t**") @ByPtrPtr BytePointer out, int out_count, @Cast(value="const uint8_t**") @ByPtrPtr BytePointer in, int in_count)
public static int swr_convert(swresample.SwrContext s, @Cast(value="uint8_t**") @ByPtrPtr ByteBuffer out, int out_count, @Cast(value="const uint8_t**") @ByPtrPtr ByteBuffer in, int in_count)
public static int swr_convert(swresample.SwrContext s, @Cast(value="uint8_t**") @ByPtrPtr byte[] out, int out_count, @Cast(value="const uint8_t**") @ByPtrPtr 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, @Const IntPointer channel_map)
public static int swr_set_channel_mapping(swresample.SwrContext s, @Const IntBuffer channel_map)
public static int swr_set_channel_mapping(swresample.SwrContext s, @Const int[] channel_map)
public static int swr_set_matrix(swresample.SwrContext s, @Const 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, @Const DoubleBuffer matrix, int stride)
public static int swr_set_matrix(swresample.SwrContext s, @Const 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 swr_get_out_samples(swresample.SwrContext s, int in_samples)
in_samples - number of input samples.@Cast(value="unsigned") public static int swresample_version()
@Cast(value="const char*") public static BytePointer swresample_configuration()
@Cast(value="const char*") public static BytePointer swresample_license()
public static int swr_convert_frame(swresample.SwrContext swr, avutil.AVFrame output, @Const avutil.AVFrame input)
swr - audio resample contextoutput - output AVFrameinput - input AVFrameswr_delay(),
swr_convert(),
swr_get_delay()public static int swr_config_frame(swresample.SwrContext swr, @Const avutil.AVFrame out, @Const avutil.AVFrame in)
swr - audio resample contextoutput - output AVFrameinput - input AVFrameswr_close();Copyright © 2015. All Rights Reserved.