swresample_internal.h: Move struct declaration before first use.
It seems more logical and works with more restricted C compilers like tinycc. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
		
							parent
							
								
									d96090e7b6
								
							
						
					
					
						commit
						6efd0ba977
					
				@ -68,6 +68,27 @@ struct DitherContext {
 | 
				
			|||||||
    int output_sample_bits;                         ///< the number of used output bits, needed to scale dither correctly
 | 
					    int output_sample_bits;                         ///< the number of used output bits, needed to scale dither correctly
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct ResampleContext * (* resample_init_func)(struct ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
 | 
				
			||||||
 | 
					                                    double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta, double precision, int cheby);
 | 
				
			||||||
 | 
					typedef void    (* resample_free_func)(struct ResampleContext **c);
 | 
				
			||||||
 | 
					typedef int     (* multiple_resample_func)(struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed);
 | 
				
			||||||
 | 
					typedef int     (* resample_flush_func)(struct SwrContext *c);
 | 
				
			||||||
 | 
					typedef int     (* set_compensation_func)(struct ResampleContext *c, int sample_delta, int compensation_distance);
 | 
				
			||||||
 | 
					typedef int64_t (* get_delay_func)(struct SwrContext *s, int64_t base);
 | 
				
			||||||
 | 
					typedef int     (* invert_initial_buffer_func)(struct ResampleContext *c, AudioData *dst, const AudioData *src, int src_size, int *dst_idx, int *dst_count);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct Resampler {
 | 
				
			||||||
 | 
					  resample_init_func            init;
 | 
				
			||||||
 | 
					  resample_free_func            free;
 | 
				
			||||||
 | 
					  multiple_resample_func        multiple_resample;
 | 
				
			||||||
 | 
					  resample_flush_func           flush;
 | 
				
			||||||
 | 
					  set_compensation_func         set_compensation;
 | 
				
			||||||
 | 
					  get_delay_func                get_delay;
 | 
				
			||||||
 | 
					  invert_initial_buffer_func    invert_initial_buffer;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern struct Resampler const swri_resampler;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct SwrContext {
 | 
					struct SwrContext {
 | 
				
			||||||
    const AVClass *av_class;                        ///< AVClass used for AVOption and av_log()
 | 
					    const AVClass *av_class;                        ///< AVClass used for AVOption and av_log()
 | 
				
			||||||
    int log_level_offset;                           ///< logging level offset
 | 
					    int log_level_offset;                           ///< logging level offset
 | 
				
			||||||
@ -152,27 +173,6 @@ struct SwrContext {
 | 
				
			|||||||
    /* TODO: callbacks for ASM optimizations */
 | 
					    /* TODO: callbacks for ASM optimizations */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct ResampleContext * (* resample_init_func)(struct ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
 | 
					 | 
				
			||||||
                                    double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta, double precision, int cheby);
 | 
					 | 
				
			||||||
typedef void    (* resample_free_func)(struct ResampleContext **c);
 | 
					 | 
				
			||||||
typedef int     (* multiple_resample_func)(struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed);
 | 
					 | 
				
			||||||
typedef int     (* resample_flush_func)(struct SwrContext *c);
 | 
					 | 
				
			||||||
typedef int     (* set_compensation_func)(struct ResampleContext *c, int sample_delta, int compensation_distance);
 | 
					 | 
				
			||||||
typedef int64_t (* get_delay_func)(struct SwrContext *s, int64_t base);
 | 
					 | 
				
			||||||
typedef int     (* invert_initial_buffer_func)(struct ResampleContext *c, AudioData *dst, const AudioData *src, int src_size, int *dst_idx, int *dst_count);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct Resampler {
 | 
					 | 
				
			||||||
  resample_init_func            init;
 | 
					 | 
				
			||||||
  resample_free_func            free;
 | 
					 | 
				
			||||||
  multiple_resample_func        multiple_resample;
 | 
					 | 
				
			||||||
  resample_flush_func           flush;
 | 
					 | 
				
			||||||
  set_compensation_func         set_compensation;
 | 
					 | 
				
			||||||
  get_delay_func                get_delay;
 | 
					 | 
				
			||||||
  invert_initial_buffer_func    invert_initial_buffer;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern struct Resampler const swri_resampler;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int swri_realloc_audio(AudioData *a, int count);
 | 
					int swri_realloc_audio(AudioData *a, int count);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void swri_noise_shaping_int16 (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count);
 | 
					void swri_noise_shaping_int16 (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user