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

update PRIMARY, AUTHORS, CONTRIBUTORS rule

This commit is contained in:
winlin 2014-11-25 10:50:25 +08:00
parent d672fae255
commit db7af6259a
9 changed files with 80 additions and 44 deletions

View file

@ -264,12 +264,14 @@ int srs_connect_app(srs_rtmp_t rtmp)
}
int srs_connect_app2(srs_rtmp_t rtmp,
char srs_server_ip[128],char srs_server[128], char srs_primary_authors[128],
char srs_server_ip[128],char srs_server[128],
char srs_primary[128], char srs_authors[128],
char srs_version[32], int* srs_id, int* srs_pid
) {
srs_server_ip[0] = 0;
srs_server[0] = 0;
srs_primary_authors[0] = 0;
srs_primary[0] = 0;
srs_authors[0] = 0;
srs_version[0] = 0;
*srs_id = 0;
*srs_pid = 0;
@ -284,16 +286,17 @@ int srs_connect_app2(srs_rtmp_t rtmp,
context->param
);
std::string sip, sserver, sauthors, sversion;
std::string sip, sserver, sprimary, sauthors, sversion;
if ((ret = context->rtmp->connect_app2(context->app, tcUrl, NULL, true,
sip, sserver, sauthors, sversion, *srs_id, *srs_pid)) != ERROR_SUCCESS) {
sip, sserver, sprimary, sauthors, sversion, *srs_id, *srs_pid)) != ERROR_SUCCESS) {
return ret;
}
snprintf(srs_server_ip, 128, "%s", sip.c_str());
snprintf(srs_server, 128, "%s", sserver.c_str());
snprintf(srs_primary_authors, 128, "%s", sauthors.c_str());
snprintf(srs_primary, 128, "%s", sprimary.c_str());
snprintf(srs_authors, 128, "%s", sauthors.c_str());
snprintf(srs_version, 32, "%s", sversion.c_str());
return ret;

View file

@ -107,13 +107,15 @@ int srs_connect_app(srs_rtmp_t rtmp);
* SRS debug info:
* @param srs_server_ip, 128bytes, debug info, server ip client connected at.
* @param srs_server, 128bytes, server info.
* @param srs_primary_authors, 128bytes, primary authors.
* @param srs_primary, 128bytes, primary authors.
* @param srs_authors, 128bytes, authors.
* @param srs_version, 32bytes, server version.
* @param srs_id, int, debug info, client id in server log.
* @param srs_pid, int, debug info, server pid in log.
*/
int srs_connect_app2(srs_rtmp_t rtmp,
char srs_server_ip[128], char srs_server[128], char srs_primary_authors[128],
char srs_server_ip[128], char srs_server[128],
char srs_primary[128], char srs_authors[128],
char srs_version[32], int* srs_id, int* srs_pid
);

View file

@ -447,8 +447,9 @@ int SrsRtmpClient::connect_app(string app, string tc_url,
int SrsRtmpClient::connect_app2(
string app, string tc_url, SrsRequest* req, bool debug_srs_upnode,
string& srs_server_ip, string& srs_server, string& srs_primary_authors,
string& srs_version, int& srs_id, int& srs_pid
string& srs_server_ip, string& srs_server, string& srs_primary,
string& srs_authors, string& srs_version, int& srs_id,
int& srs_pid
){
int ret = ERROR_SUCCESS;
@ -513,8 +514,11 @@ int SrsRtmpClient::connect_app2(
SrsAmf0EcmaArray* arr = data->to_ecma_array();
SrsAmf0Any* prop = NULL;
if ((prop = arr->ensure_property_string("srs_primary_authors")) != NULL) {
srs_primary_authors = prop->to_str();
if ((prop = arr->ensure_property_string("srs_primary")) != NULL) {
srs_primary = prop->to_str();
}
if ((prop = arr->ensure_property_string("srs_authors")) != NULL) {
srs_authors = prop->to_str();
}
if ((prop = arr->ensure_property_string("srs_version")) != NULL) {
srs_version = prop->to_str();

View file

@ -259,14 +259,16 @@ public:
* SRS debug info:
* @param srs_server_ip, debug info, server ip client connected at.
* @param srs_server, server info.
* @param srs_primary_authors, primary authors.
* @param srs_primary, primary authors.
* @param srs_authors, authors.
* @param srs_id, int, debug info, client id in server log.
* @param srs_pid, int, debug info, server pid in log.
*/
virtual int connect_app2(
std::string app, std::string tc_url, SrsRequest* req, bool debug_srs_upnode,
std::string& srs_server_ip, std::string& srs_server, std::string& srs_primary_authors,
std::string& srs_version, int& srs_id, int& srs_pid
std::string& srs_server_ip, std::string& srs_server, std::string& srs_primary,
std::string& srs_authors, std::string& srs_version, int& srs_id,
int& srs_pid
);
/**
* create a stream, then play/publish data over this stream.