Simplifies header dependencies by not including all other internal headers in internal.h.
Unified · Split
| @@ -30,7 +30,6 @@ · 29 unmodified lines | ||
| 30 | 30 | #include "audio_convert.h" |
| 31 | 31 | #include "audio_data.h" |
| 32 | 32 | #include "dither.h" |
| 33 | −#include "internal.h" | |
| 34 | 33 | |
| 35 | 34 | enum ConvFuncType { |
| 36 | 35 | CONV_FUNC_TYPE_FLAT, |
| @@ -23,10 +23,9 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | #include "libavutil/samplefmt.h" |
| 25 | 25 | #include "avresample.h" |
| 26 | +#include "internal.h" | |
| 26 | 27 | #include "audio_data.h" |
| 27 | 28 | |
| 28 | −typedef struct AudioConvert AudioConvert; | |
| 29 | − | |
| 30 | 29 | /** |
| 31 | 30 | * Set conversion function if the parameters match. |
| 32 | 31 | * |
| @@ -27,11 +27,12 @@ · 26 unmodified lines | ||
| 27 | 27 | #include "libavutil/log.h" |
| 28 | 28 | #include "libavutil/samplefmt.h" |
| 29 | 29 | #include "avresample.h" |
| 30 | +#include "internal.h" | |
| 30 | 31 | |
| 31 | 32 | /** |
| 32 | 33 | * Audio buffer used for intermediate storage between conversion phases. |
| 33 | 34 | */ |
| 34 | −typedef struct AudioData { | |
| 35 | +struct AudioData { | |
| 35 | 36 | const AVClass *class; /**< AVClass for logging */ |
| 36 | 37 | uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; /**< data plane pointers */ |
| 37 | 38 | uint8_t *buffer; /**< data buffer */ |
| @@ -50,7 +51,7 @@ typedef struct AudioData { · 12 unmodified lines | ||
| 50 | 51 | int ptr_align; /**< minimum data pointer alignment */ |
| 51 | 52 | int samples_align; /**< allocated samples alignment */ |
| 52 | 53 | const char *name; /**< name for debug logging */ |
| 53 | −} AudioData; | |
| 54 | +}; | |
| 54 | 55 | |
| 55 | 56 | int ff_audio_data_set_channels(AudioData *a, int channels); |
| 56 | 57 | |
| @@ -25,13 +25,12 @@ · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | #include "libavutil/samplefmt.h" |
| 27 | 27 | #include "avresample.h" |
| 28 | +#include "internal.h" | |
| 28 | 29 | #include "audio_data.h" |
| 29 | 30 | |
| 30 | 31 | typedef void (mix_func)(uint8_t **src, void **matrix, int len, int out_ch, |
| 31 | 32 | int in_ch); |
| 32 | 33 | |
| 33 | −typedef struct AudioMix AudioMix; | |
| 34 | − | |
| 35 | 34 | /** |
| 36 | 35 | * Set mixing function if the parameters match. |
| 37 | 36 | * |
| @@ -26,10 +26,11 @@ · 25 unmodified lines | ||
| 26 | 26 | #include "libavutil/opt.h" |
| 27 | 27 | #include "libavutil/samplefmt.h" |
| 28 | 28 | #include "avresample.h" |
| 29 | −#include "audio_convert.h" | |
| 30 | −#include "audio_data.h" | |
| 31 | −#include "audio_mix.h" | |
| 32 | −#include "resample.h" | |
| 29 | + | |
| 30 | +typedef struct AudioData AudioData; | |
| 31 | +typedef struct AudioConvert AudioConvert; | |
| 32 | +typedef struct AudioMix AudioMix; | |
| 33 | +typedef struct ResampleContext ResampleContext; | |
| 33 | 34 | |
| 34 | 35 | struct AVAudioResampleContext { |
| 35 | 36 | const AVClass *av_class; /**< AVClass for logging and AVOptions */ |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | #include "libavutil/libm.h" |
| 24 | 24 | #include "libavutil/log.h" |
| 25 | 25 | #include "internal.h" |
| 26 | +#include "resample.h" | |
| 26 | 27 | #include "audio_data.h" |
| 27 | 28 | |
| 28 | 29 | struct ResampleContext { |
| @@ -22,10 +22,9 @@ · 21 unmodified lines | ||
| 22 | 22 | #define AVRESAMPLE_RESAMPLE_H |
| 23 | 23 | |
| 24 | 24 | #include "avresample.h" |
| 25 | +#include "internal.h" | |
| 25 | 26 | #include "audio_data.h" |
| 26 | 27 | |
| 27 | −typedef struct ResampleContext ResampleContext; | |
| 28 | − | |
| 29 | 28 | /** |
| 30 | 29 | * Allocate and initialize a ResampleContext. |
| 31 | 30 | * |
| @@ -26,8 +26,11 @@ · 25 unmodified lines | ||
| 26 | 26 | #include "libavutil/opt.h" |
| 27 | 27 | |
| 28 | 28 | #include "avresample.h" |
| 29 | −#include "audio_data.h" | |
| 30 | 29 | #include "internal.h" |
| 30 | +#include "audio_data.h" | |
| 31 | +#include "audio_convert.h" | |
| 32 | +#include "audio_mix.h" | |
| 33 | +#include "resample.h" | |
| 31 | 34 | |
| 32 | 35 | int avresample_open(AVAudioResampleContext *avr) |
| 33 | 36 | { |