    fxn = env.SharedLibrary
  else:
    fxn = env.Library
  
  common_libs = ['params.cc', 'swaglog.cc', 'cqueue.c', 'util.cc', 'gpio.cc', 'i2c.cc']
  
  _common = fxn('common', common_libs, LIBS="json11")
  
  files = [
    'clutil.cc',
 
</s> remove   queue_init(&this->free_in);
  queue_init(&this->done_out);

 </s> add  </s> remove       OMX_BUFFERHEADERTYPE* in_buf = (OMX_BUFFERHEADERTYPE *)queue_pop(&this->free_in);
 </s> add       OMX_BUFFERHEADERTYPE* in_buf = this->free_in.pop(); </s> remove         int out_id = encoders[0]->encode_frame(buf->y, buf->u, buf->v,
 </s> add         int out_id = encoders[i]->encode_frame(buf->y, buf->u, buf->v, </s> remove       {
 </s> add       for (int i = 0; i < encoders.size(); ++i) { </s> remove         OMX_BUFFERHEADERTYPE *out_buf = (OMX_BUFFERHEADERTYPE *)queue_pop(&this->done_out);
 </s> add         OMX_BUFFERHEADERTYPE *out_buf = this->done_out.pop();
common_libs = ['params.cc', 'swaglog.cc', 'util.cc', 'gpio.cc', 'i2c.cc']
    fxn = env.SharedLibrary
  else:
    fxn = env.Library
  
common_libs = ['params.cc', 'swaglog.cc', 'util.cc', 'gpio.cc', 'i2c.cc']
  
  _common = fxn('common', common_libs, LIBS="json11")
  
  files = [
    'clutil.cc',
keep keep keep keep replace keep keep keep keep keep
 remove cqueue, use class SafeQueue (#19774)

* class SafeQueue

* cleanup includes

* space

* add timeout

use try_poll

* add function empty() & size()

* class SafeQueue

* add timeout

use try_poll

* add function empty() & size()

* rebase master

* rebase master

* for loop

* fix bug 
selfdrive/common/SConscript