[vlc-commits] Remove write-only aout_alloc.i_bytes_per_sec
Rémi Denis-Courmont
git at videolan.org
Mon May 30 17:25:29 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 30 18:25:16 2011 +0300| [a2fc92564e03f86cf65ea18f6218506fc8af5cb2] | committer: Rémi Denis-Courmont
Remove write-only aout_alloc.i_bytes_per_sec
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2fc92564e03f86cf65ea18f6218506fc8af5cb2
---
include/vlc_aout.h | 1 -
src/audio_output/aout_internal.h | 1 -
src/audio_output/filters.c | 30 ------------------------------
src/audio_output/output.c | 8 --------
4 files changed, 0 insertions(+), 40 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index c740311..694fc67 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -138,7 +138,6 @@ typedef int32_t vlc_fixed_t;
typedef struct aout_alloc_t
{
bool b_alloc;
- int i_bytes_per_sec;
} aout_alloc_t;
/** audio output buffer FIFO */
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 60c45e8..7f82745 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -106,7 +106,6 @@ bool aout_InputIsEmpty( aout_instance_t * p_aout, aout_input_t * p_input );
int aout_FiltersCreatePipeline ( aout_instance_t * p_aout, filter_t ** pp_filters, int * pi_nb_filters, const audio_sample_format_t * p_input_format, const audio_sample_format_t * p_output_format );
void aout_FiltersDestroyPipeline ( aout_instance_t * p_aout, filter_t ** pp_filters, int i_nb_filters );
void aout_FiltersPlay ( filter_t ** pp_filters, unsigned i_nb_filters, aout_buffer_t ** pp_input_buffer );
-void aout_FiltersHintBuffers( aout_instance_t * p_aout, filter_t ** pp_filters, int i_nb_filters, aout_alloc_t * p_first_alloc );
/* From mixer.c : */
int aout_MixerNew( aout_instance_t * p_aout );
diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index dff500f..4067d89 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -294,36 +294,6 @@ void aout_FiltersDestroyPipeline( aout_instance_t * p_aout,
}
/*****************************************************************************
- * aout_FiltersHintBuffers: fill in aout_alloc_t structures to optimize
- * buffer allocations
- *****************************************************************************/
-void aout_FiltersHintBuffers( aout_instance_t * p_aout,
- filter_t ** pp_filters,
- int i_nb_filters, aout_alloc_t * p_first_alloc )
-{
- int i;
-
- (void)p_aout; /* unused */
-
- for ( i = i_nb_filters - 1; i >= 0; i-- )
- {
- filter_t * p_filter = pp_filters[i];
-
- int i_output_size = p_filter->fmt_out.audio.i_bytes_per_frame
- * p_filter->fmt_out.audio.i_rate * AOUT_MAX_INPUT_RATE
- / p_filter->fmt_out.audio.i_frame_length;
- int i_input_size = p_filter->fmt_in.audio.i_bytes_per_frame
- * p_filter->fmt_in.audio.i_rate * AOUT_MAX_INPUT_RATE
- / p_filter->fmt_in.audio.i_frame_length;
-
- if( i_output_size > p_first_alloc->i_bytes_per_sec )
- p_first_alloc->i_bytes_per_sec = i_output_size;
- if( i_input_size > p_first_alloc->i_bytes_per_sec )
- p_first_alloc->i_bytes_per_sec = i_input_size;
- }
-}
-
-/*****************************************************************************
* aout_FiltersPlay: play a buffer
*****************************************************************************/
void aout_FiltersPlay( filter_t ** pp_filters,
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 6b69739..6b14f07 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -199,14 +199,6 @@ int aout_OutputNew( aout_instance_t * p_aout,
/* Prepare hints for the buffer allocator. */
p_aout->mixer_allocation.b_alloc = true;
- p_aout->mixer_allocation.i_bytes_per_sec
- = p_aout->mixer_format.i_bytes_per_frame
- * p_aout->mixer_format.i_rate
- / p_aout->mixer_format.i_frame_length;
-
- aout_FiltersHintBuffers( p_aout, p_aout->output.pp_filters,
- p_aout->output.i_nb_filters,
- &p_aout->mixer_allocation );
return 0;
}
More information about the vlc-commits
mailing list