diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-12-21 16:26:51 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2013-01-07 21:49:05 -0500 |
commit | 4d68269d58ca4f6f71b4baa30e0cf9fbde52bbc3 (patch) | |
tree | 2f6fc38fd3199db653d4c953d23121df58b61bc5 /libavresample | |
parent | 6042a12174e58f7cfca47de56c372b4164d270ba (diff) | |
download | ffmpeg-4d68269d58ca4f6f71b4baa30e0cf9fbde52bbc3.tar.gz |
lavr: typedef internal structs in internal.h
Simplifies header dependencies by not including all other internal headers
in internal.h.
Diffstat (limited to 'libavresample')
-rw-r--r-- | libavresample/audio_convert.c | 1 | ||||
-rw-r--r-- | libavresample/audio_convert.h | 3 | ||||
-rw-r--r-- | libavresample/audio_data.h | 5 | ||||
-rw-r--r-- | libavresample/audio_mix.h | 3 | ||||
-rw-r--r-- | libavresample/internal.h | 9 | ||||
-rw-r--r-- | libavresample/resample.c | 1 | ||||
-rw-r--r-- | libavresample/resample.h | 3 | ||||
-rw-r--r-- | libavresample/utils.c | 5 |
8 files changed, 16 insertions, 14 deletions
diff --git a/libavresample/audio_convert.c b/libavresample/audio_convert.c index eb3bc1f1de..288f0f41f1 100644 --- a/libavresample/audio_convert.c +++ b/libavresample/audio_convert.c @@ -30,7 +30,6 @@ #include "audio_convert.h" #include "audio_data.h" #include "dither.h" -#include "internal.h" enum ConvFuncType { CONV_FUNC_TYPE_FLAT, diff --git a/libavresample/audio_convert.h b/libavresample/audio_convert.h index b8808f176d..7d47b15bf3 100644 --- a/libavresample/audio_convert.h +++ b/libavresample/audio_convert.h @@ -23,10 +23,9 @@ #include "libavutil/samplefmt.h" #include "avresample.h" +#include "internal.h" #include "audio_data.h" -typedef struct AudioConvert AudioConvert; - /** * Set conversion function if the parameters match. * diff --git a/libavresample/audio_data.h b/libavresample/audio_data.h index 558e7e67ec..4e53e31c55 100644 --- a/libavresample/audio_data.h +++ b/libavresample/audio_data.h @@ -27,11 +27,12 @@ #include "libavutil/log.h" #include "libavutil/samplefmt.h" #include "avresample.h" +#include "internal.h" /** * Audio buffer used for intermediate storage between conversion phases. */ -typedef struct AudioData { +struct AudioData { const AVClass *class; /**< AVClass for logging */ uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; /**< data plane pointers */ uint8_t *buffer; /**< data buffer */ @@ -50,7 +51,7 @@ typedef struct AudioData { int ptr_align; /**< minimum data pointer alignment */ int samples_align; /**< allocated samples alignment */ const char *name; /**< name for debug logging */ -} AudioData; +}; int ff_audio_data_set_channels(AudioData *a, int channels); diff --git a/libavresample/audio_mix.h b/libavresample/audio_mix.h index 4ccfc1fd28..5bae5ab6da 100644 --- a/libavresample/audio_mix.h +++ b/libavresample/audio_mix.h @@ -25,13 +25,12 @@ #include "libavutil/samplefmt.h" #include "avresample.h" +#include "internal.h" #include "audio_data.h" typedef void (mix_func)(uint8_t **src, void **matrix, int len, int out_ch, int in_ch); -typedef struct AudioMix AudioMix; - /** * Set mixing function if the parameters match. * diff --git a/libavresample/internal.h b/libavresample/internal.h index 2e139abf2b..c094f08f49 100644 --- a/libavresample/internal.h +++ b/libavresample/internal.h @@ -26,10 +26,11 @@ #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; struct AVAudioResampleContext { const AVClass *av_class; /**< AVClass for logging and AVOptions */ diff --git a/libavresample/resample.c b/libavresample/resample.c index dc121fe56d..69c9bab893 100644 --- a/libavresample/resample.c +++ b/libavresample/resample.c @@ -23,6 +23,7 @@ #include "libavutil/libm.h" #include "libavutil/log.h" #include "internal.h" +#include "resample.h" #include "audio_data.h" struct ResampleContext { diff --git a/libavresample/resample.h b/libavresample/resample.h index 7534e26ad4..4544dab92f 100644 --- a/libavresample/resample.h +++ b/libavresample/resample.h @@ -22,10 +22,9 @@ #define AVRESAMPLE_RESAMPLE_H #include "avresample.h" +#include "internal.h" #include "audio_data.h" -typedef struct ResampleContext ResampleContext; - /** * Allocate and initialize a ResampleContext. * diff --git a/libavresample/utils.c b/libavresample/utils.c index ed7f470483..a30388092e 100644 --- a/libavresample/utils.c +++ b/libavresample/utils.c @@ -26,8 +26,11 @@ #include "libavutil/opt.h" #include "avresample.h" -#include "audio_data.h" #include "internal.h" +#include "audio_data.h" +#include "audio_convert.h" +#include "audio_mix.h" +#include "resample.h" int avresample_open(AVAudioResampleContext *avr) { |