Changeset 6bbeeca1bd223c748bef4bbd5ff37807c8512c21

Show
Ignore:
Timestamp:
27/02/07 21:37:07 (2 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1172608627 +0000
git-parent:

[f2fb8b7f590f154788354a49d9cb652b1afb5cb9]

git-author:
Laurent Aimar <fenrir@videolan.org> 1172608627 +0000
Message:

Removed dead code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/input/clock.c

    r3fada58 r6bbeeca  
    143143    cl->b_master = b_master; 
    144144} 
    145  
    146 #if 0 
    147 /***************************************************************************** 
    148  * input_ClockManageControl: handles the messages from the interface 
    149  ***************************************************************************** 
    150  * Returns UNDEF_S if nothing happened, PAUSE_S if the stream was paused 
    151  *****************************************************************************/ 
    152 int input_ClockManageControl( input_thread_t * p_input, 
    153                                input_clock_t *cl, mtime_t i_clock ) 
    154 { 
    155 #if 0 
    156     vlc_value_t val; 
    157     int i_return_value = UNDEF_S; 
    158  
    159     vlc_mutex_lock( &p_input->p->stream.stream_lock ); 
    160  
    161     if( p_input->p->stream.i_new_status == PAUSE_S ) 
    162     { 
    163         int i_old_status; 
    164  
    165         vlc_mutex_lock( &p_input->p->stream.control.control_lock ); 
    166         i_old_status = p_input->p->stream.control.i_status; 
    167         p_input->p->stream.control.i_status = PAUSE_S; 
    168         vlc_mutex_unlock( &p_input->p->stream.control.control_lock ); 
    169  
    170         vlc_cond_wait( &p_input->p->stream.stream_wait, 
    171                        &p_input->p->stream.stream_lock ); 
    172         ClockNewRef( p_pgrm, i_clock, p_pgrm->last_pts > mdate() ? 
    173                                       p_pgrm->last_pts : mdate() ); 
    174  
    175         if( p_input->p->stream.i_new_status == PAUSE_S ) 
    176         { 
    177             /* PAUSE_S undoes the pause state: Return to old state. */ 
    178             vlc_mutex_lock( &p_input->p->stream.control.control_lock ); 
    179             p_input->p->stream.control.i_status = i_old_status; 
    180             vlc_mutex_unlock( &p_input->p->stream.control.control_lock ); 
    181  
    182             p_input->p->stream.i_new_status = UNDEF_S; 
    183             p_input->p->stream.i_new_rate = UNDEF_S; 
    184         } 
    185  
    186         /* We handle i_new_status != PAUSE_S below... */ 
    187  
    188         i_return_value = PAUSE_S; 
    189     } 
    190  
    191     if( p_input->p->stream.i_new_status != UNDEF_S ) 
    192     { 
    193         vlc_mutex_lock( &p_input->p->stream.control.control_lock ); 
    194  
    195         p_input->p->stream.control.i_status = p_input->stream.i_new_status; 
    196  
    197         ClockNewRef( p_pgrm, i_clock, 
    198                      ClockToSysdate( p_input, p_pgrm, i_clock ) ); 
    199  
    200         if( p_input->p->stream.control.i_status == PLAYING_S ) 
    201         { 
    202             p_input->p->stream.control.i_rate = DEFAULT_RATE; 
    203             p_input->p->stream.control.b_mute = 0; 
    204         } 
    205         else 
    206         { 
    207             p_input->p->stream.control.i_rate = p_input->stream.i_new_rate; 
    208             p_input->p->stream.control.b_mute = 1; 
    209  
    210             /* Feed the audio decoders with a NULL packet to avoid 
    211              * discontinuities. */ 
    212             input_EscapeAudioDiscontinuity( p_input ); 
    213         } 
    214  
    215         val.i_int = p_input->p->stream.control.i_rate; 
    216         var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val, NULL ); 
    217  
    218         val.i_int = p_input->p->stream.control.i_status; 
    219         var_Change( p_input, "state", VLC_VAR_SETVALUE, &val, NULL ); 
    220  
    221         p_input->p->stream.i_new_status = UNDEF_S; 
    222         p_input->p->stream.i_new_rate = UNDEF_S; 
    223  
    224         vlc_mutex_unlock( &p_input->p->stream.control.control_lock ); 
    225     } 
    226  
    227     vlc_mutex_unlock( &p_input->p->stream.stream_lock ); 
    228  
    229     return( i_return_value ); 
    230 #endif 
    231     return UNDEF_S; 
    232 } 
    233 #endif 
    234145 
    235146/***************************************************************************** 
     
    281192            msg_Warn( p_input, "clock gap, unexpected stream discontinuity" ); 
    282193            input_ClockInit( cl, cl->b_master, cl->i_cr_average ); 
    283             /* FIXME needed ? */ 
    284 #if 0 
    285             input_EscapeDiscontinuity( p_input ); 
    286 #endif 
    287194        } 
    288195 
     
    304211                mwait( i_wakeup ); 
    305212            } 
    306             /* FIXME Not needed anymore ? */ 
    307 #if 0 
    308             /* Now take into account interface changes. */ 
    309             input_ClockManageControl( p_input, cl, i_clock ); 
    310 #endif 
    311213        } 
    312214        else if ( mdate() - cl->last_sysdate > 200000 ) 
  • src/input/decoder.c

    r5abc942 r6bbeeca  
    296296    p_dec->p_owner->i_preroll_end = i_preroll_end; 
    297297} 
    298  
    299 #if 0 
    300 /** 
    301  * Create a NULL packet for padding in case of a data loss 
    302  * 
    303  * \param p_input the input thread 
    304  * \param p_es es descriptor 
    305  * \return nothing 
    306  */ 
    307 static void input_NullPacket( input_thread_t * p_input, 
    308                               es_descriptor_t * p_es ) 
    309 { 
    310 #if 0 
    311     block_t *p_block = block_New( p_input, PADDING_PACKET_SIZE ); 
    312     if( p_block ) 
    313     { 
    314         memset( p_block->p_buffer, 0, PADDING_PACKET_SIZE ); 
    315         p_block->i_flags |= BLOCK_FLAG_DISCONTINUITY; 
    316  
    317         block_FifoPut( p_es->p_dec->p_owner->p_fifo, p_block ); 
    318     } 
    319 #endif 
    320 } 
    321  
    322 /** 
    323  * Send a NULL packet to the decoders 
    324  * 
    325  * \param p_input the input thread 
    326  * \return nothing 
    327  */ 
    328 void input_EscapeDiscontinuity( input_thread_t * p_input ) 
    329 { 
    330 #if 0 
    331     unsigned int i_es, i; 
    332  
    333     for( i_es = 0; i_es < p_input->p->stream.i_selected_es_number; i_es++ ) 
    334     { 
    335         es_descriptor_t * p_es = p_input->p->stream.pp_selected_es[i_es]; 
    336  
    337         if( p_es->p_dec != NULL ) 
    338         { 
    339             for( i = 0; i < PADDING_PACKET_NUMBER; i++ ) 
    340             { 
    341                 input_NullPacket( p_input, p_es ); 
    342             } 
    343         } 
    344     } 
    345 #endif 
    346 } 
    347  
    348 /** 
    349  * Send a NULL packet to the audio decoders 
    350  * 
    351  * \param p_input the input thread 
    352  * \return nothing 
    353  */ 
    354 void input_EscapeAudioDiscontinuity( input_thread_t * p_input ) 
    355 { 
    356 #if 0 
    357     unsigned int i_es, i; 
    358  
    359     for( i_es = 0; i_es < p_input->p->stream.i_selected_es_number; i_es++ ) 
    360     { 
    361         es_descriptor_t * p_es = p_input->p->stream.pp_selected_es[i_es]; 
    362  
    363         if( p_es->p_dec != NULL && p_es->i_cat == AUDIO_ES ) 
    364         { 
    365             for( i = 0; i < PADDING_PACKET_NUMBER; i++ ) 
    366             { 
    367                 input_NullPacket( p_input, p_es ); 
    368             } 
    369         } 
    370     } 
    371 #endif 
    372 } 
    373 #endif 
    374  
    375298/** 
    376299 * Create a decoder object