Skip to content

Instantly share code, notes, and snippets.

@antimodular
Created October 17, 2019 20:35
Show Gist options
  • Save antimodular/a503803114caafa1d9ba37d95b9e908d to your computer and use it in GitHub Desktop.
Save antimodular/a503803114caafa1d9ba37d95b9e908d to your computer and use it in GitHub Desktop.
bool ofxNDIReceiverSoundObject::findSourceByUrl(ofxNDIReceiverSettings& settings, const std::vector<std::string>& extra_ips){
if(settings.sourceUrl != "") {
return findSource([&settings](const ofxNDI::Source &s) {
std::vector<std::string> split_url = ofSplitString(s.p_url_address, ":");
// return settings.sourceUrl == s.p_url_address;
return settings.sourceUrl == split_url[0];
},settings, extra_ips, "at URL: " + settings.sourceUrl );
}
ofLogWarning("ofxNDIReceiverSoundObject::findSourceByUrl") << "can not find a source by URL if URL is empty";
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment