Create a gist now

Instantly share code, notes, and snippets.

@roxlu /rtmp.cpp Secret
Created Sep 25, 2013

What would you like to do?
Connecting to an Flash Media Server which needs authentication. All the Link-> fields need to be set, else FMS will disconnect you!
std::string username = "USERNAME";
std::string password = "PASSWORD";
rtmp->Link.pubUser.av_val = (char*)username.c_str();
rtmp->Link.pubUser.av_len = username.size();
rtmp->Link.pubPasswd.av_val = (char*)password.c_str();
rtmp->Link.pubPasswd.av_len = password.size();
rtmp->Link.flashVer.av_val = "FMLE/3.0 (compatible; FMSc/1.0)";
rtmp->Link.flashVer.av_len = (int)strlen(rtmp->Link.flashVer.av_val);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment