From a2d2fa1a25326a96eec792ad1cefe2321f1c490e Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 20 Oct 2013 08:55:42 +0800 Subject: [PATCH] log the req. --- trunk/src/core/srs_core_client.cpp | 9 +++++++-- trunk/src/core/srs_core_rtmp.cpp | 8 ++++++++ trunk/src/core/srs_core_rtmp.hpp | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/trunk/src/core/srs_core_client.cpp b/trunk/src/core/srs_core_client.cpp index 450632574..792e96d3b 100755 --- a/trunk/src/core/srs_core_client.cpp +++ b/trunk/src/core/srs_core_client.cpp @@ -75,8 +75,13 @@ int SrsClient::do_cycle() srs_warn("rtmp connect vhost/app failed. ret=%d", ret); return ret; } - srs_info("rtmp connect success. tcUrl=%s, schema=%s, vhost=%s, port=%s, app=%s", - req->tcUrl.c_str(), req->schema.c_str(), req->vhost.c_str(), req->port.c_str(), + srs_info("rtmp connect success. tcUrl=%s, pageUrl=%s, swfUrl=%s", + req->tcUrl.c_str(), req->pageUrl.c_str(), req->swfUrl.c_str()); + + srs_trace("rtmp connect success. " + "tcUrl=%s, pageUrl=%s, swfUrl=%s, schema=%s, vhost=%s, port=%s, app=%s", + req->tcUrl.c_str(), req->pageUrl.c_str(), req->swfUrl.c_str(), + req->schema.c_str(), req->vhost.c_str(), req->port.c_str(), req->app.c_str()); return ret; diff --git a/trunk/src/core/srs_core_rtmp.cpp b/trunk/src/core/srs_core_rtmp.cpp index b06efb896..87b8959fa 100755 --- a/trunk/src/core/srs_core_rtmp.cpp +++ b/trunk/src/core/srs_core_rtmp.cpp @@ -112,6 +112,14 @@ int SrsRtmp::connect_app(SrsRequest* req) } req->tcUrl = srs_amf0_convert(prop)->value; + if ((prop = pkt->command_object->ensure_property_string("pageUrl")) != NULL) { + req->pageUrl = srs_amf0_convert(prop)->value; + } + + if ((prop = pkt->command_object->ensure_property_string("swfUrl")) != NULL) { + req->swfUrl = srs_amf0_convert(prop)->value; + } + return ret; } diff --git a/trunk/src/core/srs_core_rtmp.hpp b/trunk/src/core/srs_core_rtmp.hpp index 62ee71c55..e12b14281 100755 --- a/trunk/src/core/srs_core_rtmp.hpp +++ b/trunk/src/core/srs_core_rtmp.hpp @@ -42,6 +42,8 @@ class SrsProtocol; struct SrsRequest { std::string tcUrl; + std::string pageUrl; + std::string swfUrl; std::string schema; std::string vhost;