In the RTMP Audio Video preview transmission, the video to the Crtmpserver server, and then play with the Flashbuilder, playback failure, and then use the FMS server for transmission, on the flashbuilder can play normally, So suspect that the problem is on the Crtmpserver server side, open the log of the Crtmpserver server, found this line of warning: Default implementation of Processinvokegeneric:request: _ CHECKBW, immediately found in the source of the method to throw the log:
BOOL Basertmpappprotocolhandler::P rocessinvokegeneric (Basertmpprotocol *pfrom,
Variant & Request) {
WARN ("Default implementation of Processinvokegeneric:request:%s",
STR (m_invoke_function (Request)));
Variant response = genericmessagefactory::getinvokecallfailederror (request);
Return Sendrtmpmessage (pfrom, response);
}
Where to find the references:
BOOL Basertmpappprotocolhandler::P rocessinvoke (Basertmpprotocol *pfrom,
Variant &request) {
Prod_access (Createlogeventinvoke (pfrom, request));
string functionname = Request[rm_invoke][rm_invoke_function]; Gets the command name, such as Connect
uint32_t Currentinvokeid = m_invoke_id (request);
if (Currentinvokeid! = 0) {
if (_nextinvokeid[pfrom->getid ()] <= Currentinvokeid) {
_nextinvokeid[pfrom->getid ()] = Currentinvokeid + 1;
}
}
if (functionname = = Rm_invoke_function_connect) {//Connect to connect
Return Processinvokeconnect (pfrom, request);
} else if (functionname = = Rm_invoke_function_createstream) {//create stream created by
Return Processinvokecreatestream (pfrom, request);
} else if (functionname = = rm_invoke_function_publish) {//PUBLISH operation
Return Processinvokepublish (pfrom, request);
} else if (functionname = = Rm_invoke_function_play) {//Client PLAY operation
Return Processinvokeplay (pfrom, request);
} else if (functionname = = Rm_invoke_function_pauseraw) {
Return Processinvokepauseraw (pfrom, request);
} else if (functionname = = Rm_invoke_function_pause) {//client tentative
Return Processinvokepause (pfrom, request);
} else if (functionname = = Rm_invoke_function_seek) {
Return Processinvokeseek (pfrom, request);
} else if (functionname = = Rm_invoke_function_closestream) {
Return Processinvokeclosestream (pfrom, request);
} else if (functionname = = Rm_invoke_function_releasestream) {
Return Processinvokereleasestream (pfrom, request);
} else if (functionname = = Rm_invoke_function_deletestream) {
Return Processinvokedeletestream (pfrom, request);
} else if (functionname = = Rm_invoke_function_result) {
Return Processinvokeresult (pfrom, request);
} else if (functionname = = Rm_invoke_function_error) {
Return Processinvokeresult (pfrom, request);
} else if (functionname = = Rm_invoke_function_onstatus) {
Return Processinvokeonstatus (pfrom, request);
} else if (functionname = = rm_invoke_function_fcpublish) {
Return Processinvokefcpublish (pfrom, request);
} else if (functionname = = rm_invoke_function_getstreamlength) {
Return Processinvokegetstreamlength (pfrom, request);
} else if (functionname = = Rm_invoke_function_onbwdone) {
Return Processinvokeonbwdone (pfrom, request);
} else if (functionname = = rm_invoke_function_checkbandwidth) {
Return Processinvokecheckbandwidth (pfrom, request);
}
else if (functionname = = "_CHECKBW")
{
Return Processinvokecheckbandwidth (pfrom, request); Add by me
}
else {
Return Processinvokegeneric (pfrom, request);
}
}
That is, when the client sends a "_CHECKBW" response message, the server side does not respond to the functionname== "_CHECKBW", and this message is generated from the server and the client
Connection, when the client does not receive the corresponding response message of the server, directly determine the entire connection failure, so that the rtmp video transmission is not possible.
Therefore, as long as the bool Basertmpappprotocolhandler::P rocessinvoke (Basertmpprotocol *pfrom, Variant &request) function, Add the corresponding response processing to it.
Specific reference: http://blog.csdn.net/fengyily/article/details/34422913.