Changeset 2f1be4f3e563c2bcfe8b51bda25ce804546f8748
- Timestamp:
- 14/08/02 02:43:52
(6 years ago)
- Author:
- Christophe Massiot <massiot@videolan.org>
- git-committer:
- Christophe Massiot <massiot@videolan.org> 1029285832 +0000
- git-parent:
[eb93d56d8d76be74193a77ee163462c14af92959]
- git-author:
- Christophe Massiot <massiot@videolan.org> 1029285832 +0000
- Message:
* Added a third argument to aout_OutputNextBuffer. In case the buffer
received does not start exactly at the given date, it indicates if the
output plug-in is able to compensate for the drift (for instance on
startup, or with S/PDIF packets), or if we need the aout core to
resample the coming buffers. It is currently unimplemented.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| reb93d56 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2002 VideoLAN |
|---|
| 5 | | * $Id: aout_internal.h,v 1.4 2002/08/14 00:23:59 massiot Exp $ |
|---|
| | 5 | * $Id: aout_internal.h,v 1.5 2002/08/14 00:43:51 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 268 | 268 | void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer ); |
|---|
| 269 | 269 | void aout_OutputDelete( aout_instance_t * p_aout ); |
|---|
| 270 | | |
|---|
| | 270 | VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) ); |
|---|
| | 271 | |
|---|
| reb93d56 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2002 VideoLAN |
|---|
| 5 | | * $Id: audio_output.h,v 1.58 2002/08/14 00:23:59 massiot Exp $ |
|---|
| | 5 | * $Id: audio_output.h,v 1.59 2002/08/14 00:43:51 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 133 | 133 | VLC_EXPORT( void, aout_InputDelete, ( aout_instance_t *, aout_input_t * ) ); |
|---|
| 134 | 134 | |
|---|
| 135 | | /* From output.c : */ |
|---|
| 136 | | VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t ) ); |
|---|
| 137 | | |
|---|
| reb93d56 |
r2f1be4f |
|
| 4 | 4 | { |
|---|
| 5 | 5 | aout_buffer_t * (* aout_BufferNew_inner) ( aout_instance_t *, aout_input_t *, size_t ) ; |
|---|
| 6 | | aout_buffer_t * (* aout_OutputNextBuffer_inner) ( aout_instance_t *, mtime_t ) ; |
|---|
| | 6 | aout_buffer_t * (* aout_OutputNextBuffer_inner) ( aout_instance_t *, mtime_t, vlc_bool_t ) ; |
|---|
| 7 | 7 | aout_input_t * (* __aout_InputNew_inner) ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) ; |
|---|
| 8 | 8 | aout_instance_t * (* __aout_NewInstance_inner) ( vlc_object_t * ) ; |
|---|
| reb93d56 |
r2f1be4f |
|
| 206 | 206 | /* Get the presentation date of the next write() operation. It |
|---|
| 207 | 207 | * is equal to the current date + latency */ |
|---|
| 208 | | p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency ); |
|---|
| | 208 | p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency, 0 ); |
|---|
| 209 | 209 | |
|---|
| 210 | 210 | if ( p_buffer != NULL ) |
|---|
| reb93d56 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2000, 2001 VideoLAN |
|---|
| 5 | | * $Id: esd.c,v 1.4 2002/08/14 00:23:59 massiot Exp $ |
|---|
| | 5 | * $Id: esd.c,v 1.5 2002/08/14 00:43:52 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 202 | 202 | /* Get the presentation date of the next write() operation. It |
|---|
| 203 | 203 | * is equal to the current date + buffered samples + esd latency */ |
|---|
| 204 | | p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency ); |
|---|
| | 204 | p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency, 0 ); |
|---|
| 205 | 205 | |
|---|
| 206 | 206 | if ( p_buffer != NULL ) |
|---|
| reb93d56 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2000-2002 VideoLAN |
|---|
| 5 | | * $Id: oss.c,v 1.9 2002/08/14 00:23:59 massiot Exp $ |
|---|
| | 5 | * $Id: oss.c,v 1.10 2002/08/14 00:43:52 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Michel Kaempf <maxx@via.ecp.fr> |
|---|
| … | … | |
| 294 | 294 | { |
|---|
| 295 | 295 | aout_buffer_t * p_buffer; |
|---|
| 296 | | mtime_t next_date = 0; |
|---|
| 297 | 296 | int i_tmp, i_size; |
|---|
| 298 | 297 | byte_t * p_bytes; |
|---|
| … | … | |
| 306 | 305 | if ( p_aout->output.output.i_format != AOUT_FMT_SPDIF ) |
|---|
| 307 | 306 | { |
|---|
| | 307 | mtime_t next_date = 0; |
|---|
| 308 | 308 | /* Get the presentation date of the next write() operation. It |
|---|
| 309 | 309 | * is equal to the current date + duration of buffered samples. |
|---|
| … | … | |
| 313 | 313 | / aout_FormatToByterate( &p_aout->output.output ); |
|---|
| 314 | 314 | next_date += mdate(); |
|---|
| 315 | | } |
|---|
| 316 | | |
|---|
| 317 | | p_buffer = aout_OutputNextBuffer( p_aout, next_date ); |
|---|
| | 315 | |
|---|
| | 316 | p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0 ); |
|---|
| | 317 | } |
|---|
| | 318 | else |
|---|
| | 319 | { |
|---|
| | 320 | p_buffer = aout_OutputNextBuffer( p_aout, 0, 1 ); |
|---|
| | 321 | } |
|---|
| 318 | 322 | |
|---|
| 319 | 323 | if ( p_buffer != NULL ) |
|---|
| r5a64fbd |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2000-2002 VideoLAN |
|---|
| 5 | | * $Id: sdl.c,v 1.1 2002/08/13 11:59:36 sam Exp $ |
|---|
| | 5 | * $Id: sdl.c,v 1.2 2002/08/14 00:43:52 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Michel Kaempf <maxx@via.ecp.fr> |
|---|
| … | … | |
| 156 | 156 | aout_instance_t * p_aout = (aout_instance_t *)_p_aout; |
|---|
| 157 | 157 | /* FIXME : take into account SDL latency instead of mdate() */ |
|---|
| 158 | | aout_buffer_t * p_buffer = aout_OutputNextBuffer( p_aout, mdate() ); |
|---|
| | 158 | aout_buffer_t * p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 0 ); |
|---|
| 159 | 159 | |
|---|
| 160 | 160 | if ( i_len != FRAME_SIZE * sizeof(s16) |
|---|
| r5bbe040 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001 VideoLAN |
|---|
| 5 | | * $Id: waveout.c,v 1.2 2002/08/10 18:17:06 gbazin Exp $ |
|---|
| | 5 | * $Id: waveout.c,v 1.3 2002/08/14 00:43:52 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Gildas Bazin <gbazin@netcourrier.com> |
|---|
| … | … | |
| 312 | 312 | |
|---|
| 313 | 313 | /* FIXME : take into account WaveOut latency instead of mdate() */ |
|---|
| 314 | | p_buffer = aout_OutputNextBuffer( p_aout, mdate() ); |
|---|
| | 314 | p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 0 ); |
|---|
| 315 | 315 | |
|---|
| 316 | 316 | PlayWaveOut( p_aout, h_waveout, p_waveheader, p_buffer ); |
|---|
| rf1d40d7 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2002 VideoLAN |
|---|
| 5 | | * $Id: aout.m,v 1.3 2002/08/12 22:48:18 massiot Exp $ |
|---|
| | 5 | * $Id: aout.m,v 1.4 2002/08/14 00:43:52 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Colin Delacroix <colin@zoy.org> |
|---|
| … | … | |
| 242 | 242 | + AudioConvertHostTimeToNanos(host_time.mHostTime) / 1000; |
|---|
| 243 | 243 | |
|---|
| 244 | | p_buffer = aout_OutputNextBuffer( p_aout, current_date ); |
|---|
| | 244 | p_buffer = aout_OutputNextBuffer( p_aout, current_date, 0 ); |
|---|
| 245 | 245 | |
|---|
| 246 | 246 | /* move data into output data buffer */ |
|---|
| r6e8f950 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001 VideoLAN |
|---|
| 5 | | * $Id: aout.c,v 1.3 2002/08/12 09:34:15 sam Exp $ |
|---|
| | 5 | * $Id: aout.c,v 1.4 2002/08/14 00:43:52 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Gildas Bazin <gbazin@netcourrier.com> |
|---|
| … | … | |
| 561 | 561 | |
|---|
| 562 | 562 | /* FIXME : take into account DirectSound latency instead of mdate() */ |
|---|
| 563 | | p_buffer = aout_OutputNextBuffer( p_aout, mdate() ); |
|---|
| | 563 | p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 0 ); |
|---|
| 564 | 564 | |
|---|
| 565 | 565 | /* Now do the actual memcpy into the circular buffer */ |
|---|
| reb93d56 |
r2f1be4f |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2002 VideoLAN |
|---|
| 5 | | * $Id: output.c,v 1.5 2002/08/14 00:23:59 massiot Exp $ |
|---|
| | 5 | * $Id: output.c,v 1.6 2002/08/14 00:43:52 massiot Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 169 | 169 | *****************************************************************************/ |
|---|
| 170 | 170 | aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout, |
|---|
| 171 | | mtime_t start_date /*, |
|---|
| 172 | | vlc_bool_t b_can_sleek */ ) |
|---|
| | 171 | mtime_t start_date , |
|---|
| | 172 | vlc_bool_t b_can_sleek ) |
|---|
| 173 | 173 | { |
|---|
| 174 | 174 | aout_buffer_t * p_buffer; |
|---|
| reb93d56 |
r2f1be4f |
|
| 180 | 180 | *****************************************************************************/ |
|---|
| 181 | 181 | #define STORE_SYMBOLS( p_symbols ) \ |
|---|
| | 182 | (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \ |
|---|
| 182 | 183 | (p_symbols)->__aout_NewInstance_inner = __aout_NewInstance; \ |
|---|
| 183 | 184 | (p_symbols)->aout_DeleteInstance_inner = aout_DeleteInstance; \ |
|---|
| … | … | |
| 188 | 189 | (p_symbols)->__aout_InputNew_inner = __aout_InputNew; \ |
|---|
| 189 | 190 | (p_symbols)->aout_InputDelete_inner = aout_InputDelete; \ |
|---|
| 190 | | (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \ |
|---|
| 191 | 191 | (p_symbols)->__config_GetInt_inner = __config_GetInt; \ |
|---|
| 192 | 192 | (p_symbols)->__config_PutInt_inner = __config_PutInt; \ |
|---|