- initial work to move decoding from audio callback

This commit is contained in:
2021-09-06 14:21:44 +03:00
parent ead9979db7
commit 23b4283b89
8 changed files with 199 additions and 131 deletions

View File

@@ -77,13 +77,13 @@ StreamList::~StreamList()
clear();
}
void StreamList::add(PStream s)
void StreamList::add(const PStream& s)
{
Lock l(mMutex);
mStreamVector.push_back(s);
}
void StreamList::remove(PStream s)
void StreamList::remove(const PStream& s)
{
Lock l(mMutex);
@@ -98,7 +98,7 @@ void StreamList::clear()
mStreamVector.clear();
}
bool StreamList::has(PStream s)
bool StreamList::has(const PStream& s)
{
Lock l(mMutex);
return std::find(mStreamVector.begin(), mStreamVector.end(), s) != mStreamVector.end();
@@ -127,4 +127,4 @@ void StreamList::copyTo(StreamList* sl)
Mutex& StreamList::getMutex()
{
return mMutex;
}
}