AudioPacket *AudioPacket::copy( ) { AudioPacket *ret = new AudioPacket(_rate, _channels, _sample_size, n_frames( )); memcpy(ret->_data, _data, _size); return ret; }
//_________________________ uint8_t ADM_aviUISetMuxer( void ) { // return DIA_setUserMuxParam ((int *) &muxMode, (int *) &muxParam, (int *) &muxSize); uint32_t mux_n_frame=muxParam; uint32_t mux_size_block=muxParam; uint32_t mux_mode=(uint32_t)muxMode; diaMenuEntry muxingType[]= { {MUX_REGULAR,QT_TR_NOOP("Normal")}, {MUX_N_FRAMES,QT_TR_NOOP("Mux every N video frames")}, {MUX_N_BYTES,QT_TR_NOOP("Mux by packet size")} }; diaElemMenu mux(&(mux_mode),QT_TR_NOOP("Muxing _type:"),3,muxingType); diaElemUInteger blockSize(&(muxSize),QT_TR_NOOP("_Split every MB:"),1,9000); diaElemUInteger n_frames(&(mux_n_frame),QT_TR_NOOP("Mux _every x video frames:"),1,100); diaElemUInteger n_block(&(mux_size_block),QT_TR_NOOP("Mux in _blocks of x bytes:"),1,50000); mux.link(&(muxingType[1]),1,&n_frames); mux.link(&(muxingType[2]),1,&n_block); diaElem *elems[4]= {&mux,&n_frames,&n_block,&blockSize}; if( diaFactoryRun(QT_TR_NOOP("AVI Muxer Options"),4,elems)) { muxMode=(PARAM_MUX)mux_mode; switch(muxMode) { case MUX_REGULAR: muxParam=1; break; case MUX_N_FRAMES: muxParam=mux_n_frame; break; case MUX_N_BYTES: muxParam=mux_size_block; break; default: ADM_assert(0); } return 1; } return 0; };