1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine code, use simple rtmp client.

This commit is contained in:
winlin 2015-10-14 14:37:24 +08:00
parent e4c852945f
commit bc27481886
6 changed files with 145 additions and 184 deletions

View file

@ -179,15 +179,20 @@ int SrsDynamicHttpConn::do_proxy(ISrsHttpResponseReader* rr, SrsFlvDecoder* dec)
{
int ret = ERROR_SUCCESS;
if ((ret = sdk->connect(output, SRS_CONSTS_RTMP_RECV_TIMEOUT_US)) != ERROR_SUCCESS) {
srs_error("flv: connect %s failed. ret=%d", output.c_str(), ret);
return ret;
}
if ((ret = sdk->publish()) != ERROR_SUCCESS) {
srs_error("flv: publish failed. ret=%d", ret);
return ret;
}
char pps[4];
while (!rr->eof()) {
pprint->elapse();
if ((ret = sdk->connect(output, SRS_CONSTS_RTMP_RECV_TIMEOUT_US)) != ERROR_SUCCESS) {
srs_error("flv: connect %s failed. ret=%d", output.c_str(), ret);
return ret;
}
char type;
int32_t size;
u_int32_t time;