diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-08 12:56:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-08 12:56:41 +0100 |
commit | 249fca3df9f9790369d38aaa63c828c3e2a30936 (patch) | |
tree | fe8f3784cc3160505617bf76b32534c4b5367658 /libavresample/internal.h | |
parent | 3a0bac27b3c851924a5fbde5301a3ad6bf951aba (diff) | |
parent | 074a00d192c0e749d677b008b337da42597e780f (diff) |
Merge commit '074a00d192c0e749d677b008b337da42597e780f'
* commit '074a00d192c0e749d677b008b337da42597e780f':
lavr: add a public function for setting a custom channel map
lavr: typedef internal structs in internal.h
doc: Extend commit message section
Conflicts:
doc/APIchanges
doc/developer.texi
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavresample/internal.h')
-rw-r--r-- | libavresample/internal.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/libavresample/internal.h b/libavresample/internal.h index 2e139abf2b..057f89a49c 100644 --- a/libavresample/internal.h +++ b/libavresample/internal.h @@ -26,10 +26,29 @@ #include "libavutil/opt.h" #include "libavutil/samplefmt.h" #include "avresample.h" -#include "audio_convert.h" -#include "audio_data.h" -#include "audio_mix.h" -#include "resample.h" + +typedef struct AudioData AudioData; +typedef struct AudioConvert AudioConvert; +typedef struct AudioMix AudioMix; +typedef struct ResampleContext ResampleContext; + +enum RemapPoint { + REMAP_NONE, + REMAP_IN_COPY, + REMAP_IN_CONVERT, + REMAP_OUT_COPY, + REMAP_OUT_CONVERT, +}; + +typedef struct ChannelMapInfo { + int channel_map[AVRESAMPLE_MAX_CHANNELS]; /**< source index of each output channel, -1 if not remapped */ + int do_remap; /**< remap needed */ + int channel_copy[AVRESAMPLE_MAX_CHANNELS]; /**< dest index to copy from */ + int do_copy; /**< copy needed */ + int channel_zero[AVRESAMPLE_MAX_CHANNELS]; /**< dest index to zero */ + int do_zero; /**< zeroing needed */ + int input_map[AVRESAMPLE_MAX_CHANNELS]; /**< dest index of each input channel */ +} ChannelMapInfo; struct AVAudioResampleContext { const AVClass *av_class; /**< AVClass for logging and AVOptions */ @@ -64,6 +83,7 @@ struct AVAudioResampleContext { int resample_needed; /**< resampling is needed */ int in_convert_needed; /**< input sample format conversion is needed */ int out_convert_needed; /**< output sample format conversion is needed */ + int in_copy_needed; /**< input data copy is needed */ AudioData *in_buffer; /**< buffer for converted input */ AudioData *resample_out_buffer; /**< buffer for output from resampler */ @@ -81,6 +101,10 @@ struct AVAudioResampleContext { * only used if avresample_set_matrix() is called before avresample_open() */ double *mix_matrix; + + int use_channel_map; + enum RemapPoint remap_point; + ChannelMapInfo ch_map_info; }; #endif /* AVRESAMPLE_INTERNAL_H */ |