Changeset 924:570ec8455bb3 in mediastreamer2


Ignore:
Timestamp:
Mar 25, 2010 1:51:22 PM (3 years ago)
Author:
Simon Morlat <simon.morlat@…>
Branch:
default
Message:

allow dynamic change of nowebcam images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/nowebcam.c

    r912 r924  
    17521752        /*output a frame every second*/ 
    17531753        if ((f->ticker->time - d->lasttime>1000) || d->lasttime==0){ 
    1754                 ms_mutex_lock(&f->lock); 
     1754                ms_filter_lock(f); 
    17551755                if (d->pic) { 
    17561756                        mblk_t *o=dupb(d->pic); 
     
    17591759                        ms_queue_put(f->outputs[0],o); 
    17601760                } 
    1761                 ms_mutex_unlock(&f->lock); 
     1761                ms_filter_unlock(f); 
    17621762                d->lasttime=f->ticker->time; 
    17631763        } 
     
    18001800 
    18011801        if (d->pic!=NULL){ 
     1802                /* Get rid of the old image and force a new preprocess so that the 
     1803                         new image is properly read. */ 
    18021804                freemsg(d->pic); 
    18031805                d->pic=NULL; 
     1806                static_image_preprocess(f); 
    18041807        } 
    18051808 
Note: See TracChangeset for help on using the changeset viewer.