| | |
| | | } |
| | | m_mapStep.clear(); |
| | | |
| | | for (auto item : m_inputPins) { |
| | | delete item; |
| | | } |
| | | m_inputPins.clear(); |
| | | |
| | | for (auto item : m_outputPins) { |
| | | delete item; |
| | | } |
| | | m_outputPins.clear(); |
| | | |
| | | DeleteCriticalSection(&m_criticalSection); |
| | | } |
| | | |
| | |
| | | return m_bVCREnable[index]; |
| | | } |
| | | |
| | | CPin* CEquipment::addPin(PinType type, char* pszName) |
| | | { |
| | | // 不允许名字添加重复的pin |
| | | CPin* pPin = getPin(pszName); |
| | | if (pPin != nullptr) return nullptr; |
| | | |
| | | |
| | | // 添加到Pin列表,看是输入pin或输出pin |
| | | if (type == PinType::INPUT) { |
| | | pPin = new CPin(this, type, pszName); |
| | | m_inputPins.push_back(pPin); |
| | | return pPin; |
| | | } |
| | | else if (type == PinType::OUTPUT) { |
| | | pPin = new CPin(this, type, pszName); |
| | | m_outputPins.push_back(pPin); |
| | | return pPin; |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | CPin* CEquipment::getPin(char* pszName) |
| | | { |
| | | for (auto item : m_inputPins) { |
| | | if (item->getName().compare(pszName) == 0) { |
| | | return item; |
| | | } |
| | | } |
| | | |
| | | for (auto item : m_outputPins) { |
| | | if (item->getName().compare(pszName) == 0) { |
| | | return item; |
| | | } |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | std::vector<CPin*>& CEquipment::getInputPins() |
| | | { |
| | | return m_inputPins; |
| | | } |
| | | |
| | | std::vector<CPin*>& CEquipment::getOutputPins() |
| | | { |
| | | return m_outputPins; |
| | | } |
| | | |
| | | int CEquipment::recvSample(CPin* pPin, CSample* pSample) |
| | | { |
| | | LOGI("<CEquipment>recvSample, pin:%s", pPin->getName().c_str()); |