Changeset 1112:d75e3a6f3947 in mediastreamer2


Ignore:
Timestamp:
Jul 9, 2010 12:04:54 PM (3 years ago)
Author:
Simon Morlat <simon.morlat@…>
Branch:
default
Message:

allow to disable plc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/msspeex.c

    r1111 r1112  
    397397        uint64_t sample_time; 
    398398        void *state; 
     399        bool_t plc; 
    399400} DecState; 
    400401 
     
    406407        s->penh=1; 
    407408        s->sample_time=0; 
     409        s->plc=1; 
    408410        f->data=s; 
    409411} 
     
    458460} 
    459461 
     462int dec_add_fmtp(MSFilter *f, void *arg){ 
     463        DecState *s=(DecState*)f->data; 
     464        const char *fmtp=(const char *)arg; 
     465        char buf[32]; 
     466        if (fmtp_get_value(fmtp, "plc", buf, sizeof(buf))){ 
     467                s->plc=atoi(buf); 
     468        } 
     469        return 0; 
     470} 
     471 
    460472static void dec_process(MSFilter *f){ 
    461473        DecState *s=(DecState*)f->data; 
     
    500512                freemsg(im); 
    501513        } 
    502         if (s->sample_time!=0 && f->ticker->time>s->sample_time){ 
     514        if (s->plc && s->sample_time!=0 && f->ticker->time>s->sample_time){ 
    503515                /* we should output a frame but no packet were decoded 
    504516                 thus do packet loss concealment*/ 
     
    515527static MSFilterMethod dec_methods[]={ 
    516528        {       MS_FILTER_SET_SAMPLE_RATE       ,       dec_set_sr      }, 
     529        {       MS_FILTER_ADD_FMTP      , dec_add_fmtp  }, 
    517530        {       0                               ,       NULL            } 
    518531}; 
Note: See TracChangeset for help on using the changeset viewer.