You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.
I use function addPixelBufferSource to add a watermark image, but sometimes I have to update this watermark image. It means that I have to remove the old one and add a new one. To remove the old watermark image, I have added a new function in at VCSimpleSession.mm
It does work.
However, sometimes it crash at GLESVideoMixer.h
Is it means that the "texture" is a wild pointer? I can not fix this problem even thought I have spent half of month, and I hope someone warm-hearted to help me.
The text was updated successfully, but these errors were encountered:
I have solved this problem by myself.The reason why it crashed is I removed PixelBufferSource when the GLESVideoMixer was mixing. So I modified function 'GLESVideoMixer:unregisterSource' .
GLESVideoMixer::unregisterSource(std::shared_ptr<ISource> source)
{
while(1){
if(m_mixing){
//continue;
}else {
DLog("\n GLESVideoMixer::unregisterSource \n");
releaseBuffer(source);
auto it = m_sources.begin();
constauto h = std::hash<std::shared_ptr<ISource> >()(source);
for ( ; it != m_sources.end() ; ++it ) {
constauto shash = hash(*it);
if(h == shash) {
m_sources.erase(it);
break;
}
}
{
auto iit = m_sourceBuffers.find(h);
if(iit != m_sourceBuffers.end()) {
m_sourceBuffers.erase(iit);
}
}
for ( int i = m_zRange.first ; i <= m_zRange.second ; ++i )
{
for ( auto iit = m_layerMap[i].begin() ; iit!= m_layerMap[i].end() ; ++iit) {
if((*iit) == h) {
m_layerMap[i].erase(iit);
break;
}
}
}
break;
}
}
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I use function
addPixelBufferSource
to add a watermark image, but sometimes I have to update this watermark image. It means that I have to remove the old one and add a new one. To remove the old watermark image, I have added a new function in atVCSimpleSession.mm
It does work.
However, sometimes it crash at
GLESVideoMixer.h
Is it means that the "texture" is a wild pointer? I can not fix this problem even thought I have spent half of month, and I hope someone warm-hearted to help me.
The text was updated successfully, but these errors were encountered: