BOOL CDShowCtrl::AddTS(BYTE* data, DWORD size) { if( this->mediaCtrl == NULL ){ return FALSE; } if( this->runFlag == FALSE ){ return FALSE; } DWORD ret = tsSrc->AddTS(data, size); if( this->preCreateFlag == TRUE ){ //Pinフォーマット決めてもらうために少しだけ流す if( ret > 0 ){ this->preCount+=ret; } if( this->preCount > 15 ){ this->preCreateFlag = FALSE; this->preCount = 0; Sleep(1000); StopGraph(); tsSrc->ClearData(); ReConnectScale(); RunGraph(); for( size_t i=0; i<this->buffData.size(); i++ ){ tsSrc->AddTS(this->buffData[i]->data, this->buffData[i]->size); delete this->buffData[i]; } this->buffData.clear(); tsSrc->AddTS(data, size); }else{ BUFF_DATA* item = new BUFF_DATA; item->size = size; item->data = new BYTE[item->size]; buffData.push_back(item); } } return TRUE; }
void MasterProcess(const cpu_task& task, int cpu_id) { RunGraph(task.context->optimized_graph,task.context->graph_cb); }