X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libswresample%2Fswresample_internal.h;h=dc7304ce11db2d095e1f32680f81fea059ebe3a0;hb=6999f8bcf56bb167124bf85bdaa89090acdd5d9c;hp=0fc1c6b6a679aa97e11a678e914b3494186964a1;hpb=18d0a16fc9d189b1d5593f9a42bb2316e9a66ca9;p=ffmpeg diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h index 0fc1c6b6a67..dc7304ce11d 100644 --- a/libswresample/swresample_internal.h +++ b/libswresample/swresample_internal.h @@ -32,7 +32,7 @@ typedef struct AudioData{ int planar; ///< 1 if planar audio, 0 otherwise } AudioData; -typedef struct SwrContext { +struct SwrContext { const AVClass *av_class; ///< AVClass used for AVOption and av_log() int log_level_offset; ///< logging level offset void *log_ctx; ///< parent logging context @@ -53,6 +53,7 @@ typedef struct SwrContext { int int_bps; ///< internal bytes per sample int resample_first; ///< 1 if resampling must come first, 0 if rematrixing int rematrix; ///< flag to indicate if rematrixing is needed (basically if input and output layouts mismatch) + int rematrix_custom; ///< flag to indicate that a custom matrix has been defined AudioData in; ///< input audio data AudioData postin; ///< post-input audio data: used for rematrix/resample @@ -63,6 +64,7 @@ typedef struct SwrContext { int in_buffer_index; ///< cached buffer position int in_buffer_count; ///< cached buffer length int resample_in_constraint; ///< 1 if the input end was reach before the output end, 0 otherwise + int flushed; ///< 1 if data is to be flushed and no further input is expected struct AudioConvert *in_convert; ///< input conversion context struct AudioConvert *out_convert; ///< output conversion context @@ -74,7 +76,7 @@ typedef struct SwrContext { uint8_t matrix_ch[SWR_CH_MAX][SWR_CH_MAX+1]; ///< Lists of input channels per output channel that have non zero rematrixing coefficients /* TODO: callbacks for ASM optimizations */ -}SwrContext; +}; struct ResampleContext *swri_resample_init(struct ResampleContext *, int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff); void swri_resample_free(struct ResampleContext **c);