Changeset 2f1be4f3e563c2bcfe8b51bda25ce804546f8748

Show
Ignore:
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
  • include/aout_internal.h

    reb93d56 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    268268void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer ); 
    269269void aout_OutputDelete( aout_instance_t * p_aout ); 
    270  
     270VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) ); 
     271 
  • include/audio_output.h

    reb93d56 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    133133VLC_EXPORT( void, aout_InputDelete, ( aout_instance_t *, aout_input_t * ) ); 
    134134 
    135 /* From output.c : */ 
    136 VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t ) ); 
    137  
  • include/vlc_symbols.h

    reb93d56 r2f1be4f  
    44{ 
    55    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 ) ; 
    77    aout_input_t * (* __aout_InputNew_inner) ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) ; 
    88    aout_instance_t * (* __aout_NewInstance_inner) ( vlc_object_t * ) ; 
  • modules/audio_output/arts.c

    reb93d56 r2f1be4f  
    206206        /* Get the presentation date of the next write() operation. It 
    207207         * 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 ); 
    209209 
    210210        if ( p_buffer != NULL ) 
  • modules/audio_output/esd.c

    reb93d56 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    202202        /* Get the presentation date of the next write() operation. It 
    203203         * 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 ); 
    205205 
    206206        if ( p_buffer != NULL ) 
  • modules/audio_output/oss.c

    reb93d56 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Michel Kaempf <maxx@via.ecp.fr> 
     
    294294    { 
    295295        aout_buffer_t * p_buffer; 
    296         mtime_t next_date = 0; 
    297296        int i_tmp, i_size; 
    298297        byte_t * p_bytes; 
     
    306305        if ( p_aout->output.output.i_format != AOUT_FMT_SPDIF ) 
    307306        { 
     307            mtime_t next_date = 0; 
    308308            /* Get the presentation date of the next write() operation. It 
    309309             * is equal to the current date + duration of buffered samples. 
     
    313313                      / aout_FormatToByterate( &p_aout->output.output ); 
    314314            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        } 
    318322 
    319323        if ( p_buffer != NULL ) 
  • modules/audio_output/sdl.c

    r5a64fbd r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Michel Kaempf <maxx@via.ecp.fr> 
     
    156156    aout_instance_t * p_aout = (aout_instance_t *)_p_aout; 
    157157    /* 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 ); 
    159159 
    160160    if ( i_len != FRAME_SIZE * sizeof(s16) 
  • modules/audio_output/waveout.c

    r5bbe040 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    312312 
    313313    /* 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 ); 
    315315 
    316316    PlayWaveOut( p_aout, h_waveout, p_waveheader, p_buffer ); 
  • modules/gui/macosx/aout.m

    rf1d40d7 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Colin Delacroix <colin@zoy.org> 
     
    242242                 + AudioConvertHostTimeToNanos(host_time.mHostTime) / 1000; 
    243243 
    244     p_buffer = aout_OutputNextBuffer( p_aout, current_date ); 
     244    p_buffer = aout_OutputNextBuffer( p_aout, current_date, 0 ); 
    245245 
    246246    /* move data into output data buffer */ 
  • modules/video_output/directx/aout.c

    r6e8f950 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    561561 
    562562        /* 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 ); 
    564564 
    565565        /* Now do the actual memcpy into the circular buffer */ 
  • src/audio_output/output.c

    reb93d56 r2f1be4f  
    33 ***************************************************************************** 
    44 * 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 $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    169169 *****************************************************************************/ 
    170170aout_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
    173173{ 
    174174    aout_buffer_t * p_buffer; 
  • src/misc/modules_plugin.h

    reb93d56 r2f1be4f  
    180180 *****************************************************************************/ 
    181181#define STORE_SYMBOLS( p_symbols ) \ 
     182    (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \ 
    182183    (p_symbols)->__aout_NewInstance_inner = __aout_NewInstance; \ 
    183184    (p_symbols)->aout_DeleteInstance_inner = aout_DeleteInstance; \ 
     
    188189    (p_symbols)->__aout_InputNew_inner = __aout_InputNew; \ 
    189190    (p_symbols)->aout_InputDelete_inner = aout_InputDelete; \ 
    190     (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \ 
    191191    (p_symbols)->__config_GetInt_inner = __config_GetInt; \ 
    192192    (p_symbols)->__config_PutInt_inner = __config_PutInt; \