diff --git a/tsMuxer/bufferedReader.cpp b/tsMuxer/bufferedReader.cpp index ddd1c871..123aff64 100644 --- a/tsMuxer/bufferedReader.cpp +++ b/tsMuxer/bufferedReader.cpp @@ -30,14 +30,14 @@ BufferedReader::BufferedReader(const uint32_t blockSize, const uint32_t allocSiz ReaderData* BufferedReader::getReader(const uint32_t readerID) { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); const auto itr = m_readers.find(readerID); return itr != m_readers.end() ? itr->second : nullptr; } bool BufferedReader::incSeek(const uint32_t readerID, const int64_t offset) { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); const auto itr = m_readers.find(readerID); if (itr != m_readers.end()) { @@ -87,7 +87,7 @@ uint32_t BufferedReader::createReader(const int readBuffOffset) data->m_lastBlock = false; size_t rSize; { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); newReaderID = createNewReaderID(); m_readers[newReaderID] = data; rSize = m_readers.size(); @@ -105,7 +105,7 @@ uint32_t BufferedReader::createReader(const int readBuffOffset) void BufferedReader::deleteReader(const uint32_t readerID) { { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); const auto iterator = m_readers.find(readerID); if (iterator == m_readers.end()) return; @@ -126,7 +126,7 @@ uint8_t* BufferedReader::readBlock(const uint32_t readerID, uint32_t& readCnt, i { ReaderData* data = nullptr; { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); const auto itr = m_readers.find(readerID); if (itr != m_readers.end()) { @@ -148,7 +148,7 @@ uint8_t* BufferedReader::readBlock(const uint32_t readerID, uint32_t& readCnt, i if (!data->m_nextBlockSize) { - std::unique_lock lk(m_readMtx); + std::unique_lock lk(m_readMtx); while (data->m_nextBlockSize == 0 && !data->m_eof) m_readCond.wait(lk); } readCnt = data->m_nextBlockSize >= 0 ? data->m_nextBlockSize : 0; @@ -175,7 +175,7 @@ void BufferedReader::notify(const uint32_t readerID, const uint32_t dataReaded) return; if (dataReaded >= m_prereadThreshold && !data->m_notified) { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); data->m_notified = true; data->m_atQueue++; m_readQueue.push(readerID); @@ -184,7 +184,7 @@ void BufferedReader::notify(const uint32_t readerID, const uint32_t dataReaded) uint32_t BufferedReader::getReaderCount() { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); return static_cast(m_readers.size()); } @@ -260,14 +260,14 @@ void BufferedReader::thread_main() } { - std::lock_guard lk(m_readMtx); + std::lock_guard lk(m_readMtx); data->m_nextBlockSize = bytesReaded; m_readCond.notify_one(); } } { - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); data->m_atQueue--; if (data->m_deleted && data->m_atQueue == 0) { @@ -291,7 +291,7 @@ void BufferedReader::thread_main() void BufferedReader::setFileIterator(FileNameIterator* itr, const int readerID) { assert(readerID != -1); - std::lock_guard lock(m_readersMtx); + std::lock_guard lock(m_readersMtx); const auto reader = m_readers.find(readerID); if (reader != m_readers.end()) reader->second->itr = itr; diff --git a/tsMuxer/tsMuxer.cpp b/tsMuxer/tsMuxer.cpp index 34087f19..03dc3c8e 100644 --- a/tsMuxer/tsMuxer.cpp +++ b/tsMuxer/tsMuxer.cpp @@ -646,7 +646,7 @@ void TSMuxer::buildPesHeader(const int pesStreamID, AVPacket& avPacket, int pid) m_pesData.resize(bufLen); memcpy(m_pesData.data(), tmpBuffer, bufLen); for (auto& i : tmpPriorityData) - m_priorityData.push_back(std::pair(i.first + pesPacket->getHeaderLength(), i.second)); + m_priorityData.push_back(std::pair(i.first + pesPacket->getHeaderLength(), i.second)); } void TSMuxer::addData(const int pesStreamID, const int pid, AVPacket& avPacket) @@ -672,7 +672,7 @@ void TSMuxer::addData(const int pesStreamID, const int pid, AVPacket& avPacket) if (!m_priorityData.empty() && m_priorityData.rbegin()->first + m_priorityData.rbegin()->second == beforePesLen) m_priorityData.rbegin()->second += avPacket.size + pesHeaderLen; else - m_priorityData.push_back(pair(beforePesLen, avPacket.size + pesHeaderLen)); + m_priorityData.push_back(pair(beforePesLen, avPacket.size + pesHeaderLen)); } } diff --git a/tsMuxer/vvc.cpp b/tsMuxer/vvc.cpp index 336c05c6..d36ad9da 100644 --- a/tsMuxer/vvc.cpp +++ b/tsMuxer/vvc.cpp @@ -222,7 +222,7 @@ int VvcVpsUnit::deserialize() { vps_id = m_reader.getBits(4); vps_max_layers = m_reader.getBits(6) + 1; - vector> vps_direct_ref_layer_flag(vps_max_layers, vector(vps_max_layers)); + vector vps_direct_ref_layer_flag(vps_max_layers, vector(vps_max_layers)); vps_max_sublayers = m_reader.getBits(3) + 1; bool vps_default_ptl_dpb_hrd_max_tid_flag = @@ -277,8 +277,8 @@ int VvcVpsUnit::deserialize() vps_num_ptls = m_reader.getBits(8) + 1; } - vector vps_pt_present_flag(vps_num_ptls, true); - vector vps_ptl_max_tid(vps_num_ptls, vps_max_sublayers - 1); + vector vps_pt_present_flag(vps_num_ptls, true); + vector vps_ptl_max_tid(vps_num_ptls, vps_max_sublayers - 1); if (!vps_default_ptl_dpb_hrd_max_tid_flag) vps_ptl_max_tid[0] = m_reader.getBits(3); @@ -307,10 +307,10 @@ int VvcVpsUnit::deserialize() if (vps_ols_mode_idc == 2) { layerIncludedInOlsFlag.resize(TotalNumOlss, vector(vps_max_layers)); - vector> dependencyFlag(vps_max_layers, vector(vps_max_layers)); - vector> ReferenceLayerIdx(vps_max_layers, vector(vps_max_layers)); - vector> OutputLayerIdx(TotalNumOlss, vector(vps_max_layers)); - vector NumRefLayers(vps_max_layers, 0); + vector dependencyFlag(vps_max_layers, vector(vps_max_layers)); + vector ReferenceLayerIdx(vps_max_layers, vector(vps_max_layers)); + vector OutputLayerIdx(TotalNumOlss, vector(vps_max_layers)); + vector NumRefLayers(vps_max_layers, 0); for (int i = 0; i < vps_max_layers; i++) {