File size: 1,117 Bytes
06555b5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
from libc.stdint cimport int64_t, uint8_t
cdef extern from "libswresample/swresample.h" nogil:
cdef int swresample_version()
cdef char* swresample_configuration()
cdef char* swresample_license()
cdef struct SwrContext:
pass
cdef SwrContext* swr_alloc_set_opts(
SwrContext *ctx,
int64_t out_ch_layout,
AVSampleFormat out_sample_fmt,
int out_sample_rate,
int64_t in_ch_layout,
AVSampleFormat in_sample_fmt,
int in_sample_rate,
int log_offset,
void *log_ctx # logging context, can be NULL
)
cdef int swr_convert(
SwrContext *ctx,
uint8_t ** out_buffer,
int out_count,
uint8_t **in_buffer,
int in_count
)
# Gets the delay the next input sample will
# experience relative to the next output sample.
cdef int64_t swr_get_delay(SwrContext *s, int64_t base)
cdef SwrContext* swr_alloc()
cdef int swr_init(SwrContext* ctx)
cdef void swr_free(SwrContext **ctx)
cdef void swr_close(SwrContext *ctx)
|