Changeset 3c5c04601e89885ce961a766d85cffe9ab5b375a

Show
Ignore:
Timestamp:
05/06/08 00:02:49 (4 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1212616969 +0200
git-parent:

[6d004778d445e1666c33b6ea4515a32428218e05]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1212616962 +0200
Message:

This should fix audio transcoding. (unfortunately I have some issues
a bit later ... but at least it gives a starting point for people
wanting to have fun with transcode / audio / filter chains)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/stream_out/transcode.c

    r2306ec6 r3c5c046  
    12161216 
    12171217    /* Init filter chain */ 
    1218     id->p_f_chain = filter_chain_New( p_stream, "audio filter2", false, 
     1218    id->p_f_chain = filter_chain_New( p_stream, "audio filter2", true, 
    12191219                    transcode_audio_filter_allocation_init, NULL, NULL ); 
    12201220    filter_chain_Reset( id->p_f_chain, &fmt_last, &id->p_encoder->fmt_in ); 
     
    12291229        filter_chain_AppendFilter( id->p_f_chain, NULL, NULL, &fmt_last, &fmt_out ); 
    12301230        fmt_last = fmt_out; 
     1231    } 
     1232 
     1233    /* FIXME: same comment as in "#if 0"ed code */ 
     1234    int i; 
     1235    for( i = 0; i < 4; i++ ) 
     1236    { 
     1237        if( (fmt_last.audio.i_channels != 
     1238            id->p_encoder->fmt_in.audio.i_channels) || 
     1239            (fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate) || 
     1240            (fmt_last.i_codec != id->p_encoder->fmt_in.i_codec) ) 
     1241        { 
     1242            filter_chain_AppendFilter( id->p_f_chain, NULL, NULL, &fmt_last, &id->p_encoder->fmt_in ); 
     1243            fmt_last = *filter_chain_GetFmtOut( id->p_f_chain ); 
     1244        } 
    12311245    } 
    12321246