正在显示
22 个修改的文件
包含
119 行增加
和
63 行删除
| 1 | +There are three types of people that have contributed to the SRS project: | ||
| 2 | +1. PRIMARY: Contribute important features and >10% code. Names of all PRIMARY response in NetConnection.connect and metadata. | ||
| 3 | +2. AUTHORS: Contribute features and 1%~10% code. Names of all PRIMARY response in NetConnection.connect and metadata. | ||
| 4 | +3. CONTRIBUTORS: Submit patches, report bugs, add translations, help answer newbie questions, and generally make SRS that much better. | ||
| 5 | + | ||
| 1 | PRIMARY ordered by first contribution. | 6 | PRIMARY ordered by first contribution. |
| 2 | * winlin<winlin@vip.126.com> "Plan, arch, implement SRS1.0 and SRS2.0" | 7 | * winlin<winlin@vip.126.com> "Plan, arch, implement SRS1.0 and SRS2.0" |
| 3 | 8 |
| @@ -485,6 +485,7 @@ Supported operating systems and hardware: | @@ -485,6 +485,7 @@ Supported operating systems and hardware: | ||
| 485 | * 2013-10-17, Created.<br/> | 485 | * 2013-10-17, Created.<br/> |
| 486 | 486 | ||
| 487 | ## History | 487 | ## History |
| 488 | +* v2.0, 2014-11-25, update PRIMARY, AUTHORS, CONTRIBUTORS rule. 2.0.32. | ||
| 488 | * v2.0, 2014-11-24, fix [#212](https://github.com/winlinvip/simple-rtmp-server/issues/212), support publish aac adts raw stream. 2.0.31. | 489 | * v2.0, 2014-11-24, fix [#212](https://github.com/winlinvip/simple-rtmp-server/issues/212), support publish aac adts raw stream. 2.0.31. |
| 489 | * v2.0, 2014-11-22, fix [#217](https://github.com/winlinvip/simple-rtmp-server/issues/217), remove timeout recv, support 7.5k+ 250kbps clients. 2.0.30. | 490 | * v2.0, 2014-11-22, fix [#217](https://github.com/winlinvip/simple-rtmp-server/issues/217), remove timeout recv, support 7.5k+ 250kbps clients. 2.0.30. |
| 490 | * v2.0, 2014-11-21, srs-librtmp add rtmp prefix for rtmp/utils/human apis. 2.0.29. | 491 | * v2.0, 2014-11-21, srs-librtmp add rtmp prefix for rtmp/utils/human apis. 2.0.29. |
| @@ -43,7 +43,8 @@ int main(int argc, char** argv) | @@ -43,7 +43,8 @@ int main(int argc, char** argv) | ||
| 43 | // srs debug info. | 43 | // srs debug info. |
| 44 | char srs_server_ip[128]; | 44 | char srs_server_ip[128]; |
| 45 | char srs_server[128]; | 45 | char srs_server[128]; |
| 46 | - char srs_primary_authors[128]; | 46 | + char srs_primary[128]; |
| 47 | + char srs_authors[128]; | ||
| 47 | char srs_version[32]; | 48 | char srs_version[32]; |
| 48 | int srs_id = 0; | 49 | int srs_id = 0; |
| 49 | int srs_pid = 0; | 50 | int srs_pid = 0; |
| @@ -60,7 +61,8 @@ int main(int argc, char** argv) | @@ -60,7 +61,8 @@ int main(int argc, char** argv) | ||
| 60 | // set to zero. | 61 | // set to zero. |
| 61 | srs_server_ip[0] = 0; | 62 | srs_server_ip[0] = 0; |
| 62 | srs_server[0] = 0; | 63 | srs_server[0] = 0; |
| 63 | - srs_primary_authors[0] = 0; | 64 | + srs_primary[0] = 0; |
| 65 | + srs_authors[0] = 0; | ||
| 64 | srs_version[0] = 0; | 66 | srs_version[0] = 0; |
| 65 | 67 | ||
| 66 | printf("RTMP bandwidth check/test with server.\n"); | 68 | printf("RTMP bandwidth check/test with server.\n"); |
| @@ -90,7 +92,8 @@ int main(int argc, char** argv) | @@ -90,7 +92,8 @@ int main(int argc, char** argv) | ||
| 90 | srs_human_trace("simple handshake success"); | 92 | srs_human_trace("simple handshake success"); |
| 91 | 93 | ||
| 92 | if ((ret = srs_rtmp_connect_app2(rtmp, | 94 | if ((ret = srs_rtmp_connect_app2(rtmp, |
| 93 | - srs_server_ip, srs_server, srs_primary_authors, srs_version, &srs_id, &srs_pid)) != 0) { | 95 | + srs_server_ip, srs_server, srs_primary, srs_authors, srs_version, |
| 96 | + &srs_id, &srs_pid)) != 0) { | ||
| 94 | srs_human_trace("connect vhost/app failed."); | 97 | srs_human_trace("connect vhost/app failed."); |
| 95 | goto rtmp_destroy; | 98 | goto rtmp_destroy; |
| 96 | } | 99 | } |
| @@ -105,12 +108,12 @@ int main(int argc, char** argv) | @@ -105,12 +108,12 @@ int main(int argc, char** argv) | ||
| 105 | } | 108 | } |
| 106 | srs_human_trace("bandwidth check/test success"); | 109 | srs_human_trace("bandwidth check/test success"); |
| 107 | 110 | ||
| 108 | - srs_human_trace("\n%s, %s\n" | 111 | + srs_human_trace("\n%s, %s, %s\n" |
| 109 | "%s, %s, srs_pid=%d, srs_id=%d\n" | 112 | "%s, %s, srs_pid=%d, srs_id=%d\n" |
| 110 | "duration: %dms(%d+%d)\n" | 113 | "duration: %dms(%d+%d)\n" |
| 111 | "play: %dkbps\n" | 114 | "play: %dkbps\n" |
| 112 | "publish: %dkbps", | 115 | "publish: %dkbps", |
| 113 | - (char*)srs_server, (char*)srs_primary_authors, | 116 | + (char*)srs_server, (char*)srs_primary, (char*)srs_authors, |
| 114 | (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id, | 117 | (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id, |
| 115 | (int)(end_time - start_time), play_duration, publish_duration, | 118 | (int)(end_time - start_time), play_duration, publish_duration, |
| 116 | play_kbps, | 119 | play_kbps, |
| @@ -121,7 +124,8 @@ rtmp_destroy: | @@ -121,7 +124,8 @@ rtmp_destroy: | ||
| 121 | 124 | ||
| 122 | fprintf(stderr, "{\"code\":%d," | 125 | fprintf(stderr, "{\"code\":%d," |
| 123 | "\"srs_server\":\"%s\", " | 126 | "\"srs_server\":\"%s\", " |
| 124 | - "\"srs_primary_authors\":\"%s\", " | 127 | + "\"srs_primary\":\"%s\", " |
| 128 | + "\"srs_authors\":\"%s\", " | ||
| 125 | "\"srs_server_ip\":\"%s\", " | 129 | "\"srs_server_ip\":\"%s\", " |
| 126 | "\"srs_version\":\"%s\", " | 130 | "\"srs_version\":\"%s\", " |
| 127 | "\"srs_pid\":%d, " | 131 | "\"srs_pid\":%d, " |
| @@ -132,7 +136,7 @@ rtmp_destroy: | @@ -132,7 +136,7 @@ rtmp_destroy: | ||
| 132 | "\"publish_kbps\":%d" | 136 | "\"publish_kbps\":%d" |
| 133 | "}", | 137 | "}", |
| 134 | ret, | 138 | ret, |
| 135 | - (char*)srs_server, (char*)srs_primary_authors, | 139 | + (char*)srs_server, (char*)srs_primary, (char*)srs_authors, |
| 136 | (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id, | 140 | (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id, |
| 137 | (int)(end_time - start_time), play_duration, publish_duration, | 141 | (int)(end_time - start_time), play_duration, publish_duration, |
| 138 | play_kbps, publish_kbps); | 142 | play_kbps, publish_kbps); |
| @@ -88,9 +88,10 @@ package | @@ -88,9 +88,10 @@ package | ||
| 88 | * "", otherwise empty string. | 88 | * "", otherwise empty string. |
| 89 | * @param as_on_progress_change, function(percent:Number):void, where: | 89 | * @param as_on_progress_change, function(percent:Number):void, where: |
| 90 | * percent, the progress percent, 0 means 0%, 100 means 100%. | 90 | * percent, the progress percent, 0 means 0%, 100 means 100%. |
| 91 | - * @param as_on_srs_info, function(srs_server:String, srs_primary_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void, where: | 91 | + * @param as_on_srs_info, function(srs_server:String, srs_primary:String, srs_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void, where: |
| 92 | * srs_server: the srs server info. | 92 | * srs_server: the srs server info. |
| 93 | - * srs_primary_authors: the srs version info. | 93 | + * srs_primary: the srs primary authors info. |
| 94 | + * srs_authors: the srs authors info. | ||
| 94 | * srs_id: the tracable log id, to direclty grep the log.. | 95 | * srs_id: the tracable log id, to direclty grep the log.. |
| 95 | * srs_pid: the srs process id, to direclty grep the log. | 96 | * srs_pid: the srs process id, to direclty grep the log. |
| 96 | * srs_server_ip: the srs server ip, where client connected at. | 97 | * srs_server_ip: the srs server ip, where client connected at. |
| @@ -112,7 +113,7 @@ package | @@ -112,7 +113,7 @@ package | ||
| 112 | * @param js_on_ready, function(js_id:String):void, callback when bandwidth tool is ready to run. | 113 | * @param js_on_ready, function(js_id:String):void, callback when bandwidth tool is ready to run. |
| 113 | * @param js_on_status_change, function(js_id:String, code:String, data:String):void | 114 | * @param js_on_status_change, function(js_id:String, code:String, data:String):void |
| 114 | * @param as_on_progress_change, function(js_id:String, percent:Number):void | 115 | * @param as_on_progress_change, function(js_id:String, percent:Number):void |
| 115 | - * @param as_on_srs_info, function(js_id:String, srs_server:String, srs_primary_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void | 116 | + * @param as_on_srs_info, function(js_id:String, srs_server:String, srs_primary:String, srs_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void |
| 116 | * @param as_on_complete, function(js_id:String, start_time:Number, end_time:Number, play_kbps:Number, publish_kbps:Number, play_bytes:Number, publish_bytes:Number, play_time:Number, publish_time:Number):void | 117 | * @param as_on_complete, function(js_id:String, start_time:Number, end_time:Number, play_kbps:Number, publish_kbps:Number, play_bytes:Number, publish_bytes:Number, play_time:Number, publish_time:Number):void |
| 117 | * | 118 | * |
| 118 | * the js export functions. | 119 | * the js export functions. |
| @@ -268,7 +269,8 @@ package | @@ -268,7 +269,8 @@ package | ||
| 268 | * srs debug infos | 269 | * srs debug infos |
| 269 | */ | 270 | */ |
| 270 | private var srs_server:String = null; | 271 | private var srs_server:String = null; |
| 271 | - private var srs_primary_authors:String = null; | 272 | + private var srs_primary:String = null; |
| 273 | + private var srs_authors:String = null; | ||
| 272 | private var srs_id:String = null; | 274 | private var srs_id:String = null; |
| 273 | private var srs_pid:String = null; | 275 | private var srs_pid:String = null; |
| 274 | private var srs_server_ip:String = null; | 276 | private var srs_server_ip:String = null; |
| @@ -486,8 +488,11 @@ package | @@ -486,8 +488,11 @@ package | ||
| 486 | if (evt.info.data.hasOwnProperty("srs_server")) { | 488 | if (evt.info.data.hasOwnProperty("srs_server")) { |
| 487 | srs_server = evt.info.data.srs_server; | 489 | srs_server = evt.info.data.srs_server; |
| 488 | } | 490 | } |
| 489 | - if (evt.info.data.hasOwnProperty("srs_primary_authors")) { | ||
| 490 | - srs_primary_authors = evt.info.data.srs_primary_authors; | 491 | + if (evt.info.data.hasOwnProperty("srs_primary")) { |
| 492 | + srs_primary = evt.info.data.srs_primary; | ||
| 493 | + } | ||
| 494 | + if (evt.info.data.hasOwnProperty("srs_authors")) { | ||
| 495 | + srs_authors = evt.info.data.srs_authors; | ||
| 491 | } | 496 | } |
| 492 | if (evt.info.data.hasOwnProperty("srs_id")) { | 497 | if (evt.info.data.hasOwnProperty("srs_id")) { |
| 493 | srs_id = evt.info.data.srs_id; | 498 | srs_id = evt.info.data.srs_id; |
| @@ -500,11 +505,11 @@ package | @@ -500,11 +505,11 @@ package | ||
| 500 | } | 505 | } |
| 501 | 506 | ||
| 502 | if (this.as_on_srs_info != null) { | 507 | if (this.as_on_srs_info != null) { |
| 503 | - this.as_on_srs_info(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip); | 508 | + this.as_on_srs_info(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip); |
| 504 | } | 509 | } |
| 505 | if (this.js_on_srs_info != null) { | 510 | if (this.js_on_srs_info != null) { |
| 506 | flash.external.ExternalInterface.call(this.js_on_srs_info, this.js_id, | 511 | flash.external.ExternalInterface.call(this.js_on_srs_info, this.js_id, |
| 507 | - srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip); | 512 | + srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip); |
| 508 | } | 513 | } |
| 509 | } | 514 | } |
| 510 | if (evt.info.code) { | 515 | if (evt.info.code) { |
| @@ -39,9 +39,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -39,9 +39,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 39 | bandwidth.on_update_status = function(status) { | 39 | bandwidth.on_update_status = function(status) { |
| 40 | // console.log(status); | 40 | // console.log(status); |
| 41 | } | 41 | } |
| 42 | - bandwidth.on_srs_info = function(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) { | 42 | + bandwidth.on_srs_info = function(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip) { |
| 43 | // console.log( | 43 | // console.log( |
| 44 | - // "server:" + srs_server + ", authors:" + srs_primary_authors + | 44 | + // "server:" + srs_server + ", primary:" + srs_primary + ", authors:" + srs_authors + |
| 45 | // ", srs_id:" + srs_id + ", srs_pid:" + srs_pid + ", ip:" + srs_server_ip | 45 | // ", srs_id:" + srs_id + ", srs_pid:" + srs_pid + ", ip:" + srs_server_ip |
| 46 | //); | 46 | //); |
| 47 | } | 47 | } |
| @@ -160,7 +160,7 @@ SrsBandwidth.prototype.on_update_progress = function(percent) { | @@ -160,7 +160,7 @@ SrsBandwidth.prototype.on_update_progress = function(percent) { | ||
| 160 | } | 160 | } |
| 161 | SrsBandwidth.prototype.on_update_status = function(status) { | 161 | SrsBandwidth.prototype.on_update_status = function(status) { |
| 162 | } | 162 | } |
| 163 | -SrsBandwidth.prototype.on_srs_info = function(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) { | 163 | +SrsBandwidth.prototype.on_srs_info = function(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip) { |
| 164 | } | 164 | } |
| 165 | SrsBandwidth.prototype.on_complete = function(start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time) { | 165 | SrsBandwidth.prototype.on_complete = function(start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time) { |
| 166 | } | 166 | } |
| @@ -233,11 +233,11 @@ function __srs_on_update_status(id, code, data) { | @@ -233,11 +233,11 @@ function __srs_on_update_status(id, code, data) { | ||
| 233 | bandwidth.status = status; | 233 | bandwidth.status = status; |
| 234 | bandwidth.on_update_status(status); | 234 | bandwidth.on_update_status(status); |
| 235 | } | 235 | } |
| 236 | -function __srs_on_srs_info(id, srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) { | 236 | +function __srs_on_srs_info(id, srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip) { |
| 237 | var bandwidth = __srs_find_bandwidth(id); | 237 | var bandwidth = __srs_find_bandwidth(id); |
| 238 | bandwidth.status = status; | 238 | bandwidth.status = status; |
| 239 | bandwidth.server = srs_server_ip; | 239 | bandwidth.server = srs_server_ip; |
| 240 | - bandwidth.on_srs_info(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip); | 240 | + bandwidth.on_srs_info(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip); |
| 241 | } | 241 | } |
| 242 | function __srs_on_complete(id, start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time) { | 242 | function __srs_on_complete(id, start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time) { |
| 243 | var bandwidth = __srs_find_bandwidth(id); | 243 | var bandwidth = __srs_find_bandwidth(id); |
| @@ -101,8 +101,8 @@ package | @@ -101,8 +101,8 @@ package | ||
| 101 | var as_on_progress_change:Function = function(percent:Number):void { | 101 | var as_on_progress_change:Function = function(percent:Number):void { |
| 102 | self.on_progress(percent); | 102 | self.on_progress(percent); |
| 103 | }; | 103 | }; |
| 104 | - var as_on_srs_info:Function = function(srs_server:String, srs_primary_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void { | ||
| 105 | - self.update_context_items(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip); | 104 | + var as_on_srs_info:Function = function(srs_server:String, srs_primary, srs_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void { |
| 105 | + self.update_context_items(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip); | ||
| 106 | }; | 106 | }; |
| 107 | var as_on_complete:Function = function(start_time:Number, end_time:Number, play_kbps:Number, publish_kbps:Number, play_bytes:Number, publish_bytes:Number, play_time:Number, publish_time:Number):void { | 107 | var as_on_complete:Function = function(start_time:Number, end_time:Number, play_kbps:Number, publish_kbps:Number, play_bytes:Number, publish_bytes:Number, play_time:Number, publish_time:Number):void { |
| 108 | self.on_complete(start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time); | 108 | self.on_complete(start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time); |
| @@ -130,7 +130,7 @@ package | @@ -130,7 +130,7 @@ package | ||
| 130 | trace("progress:" + percent + "%"); | 130 | trace("progress:" + percent + "%"); |
| 131 | } | 131 | } |
| 132 | private function update_context_items( | 132 | private function update_context_items( |
| 133 | - srs_server:String, srs_primary_authors:String, | 133 | + srs_server:String, srs_primary:String, srs_authors:String, |
| 134 | srs_id:String, srs_pid:String, srs_server_ip:String | 134 | srs_id:String, srs_pid:String, srs_server_ip:String |
| 135 | ):void { | 135 | ):void { |
| 136 | // for context menu | 136 | // for context menu |
| @@ -138,8 +138,11 @@ package | @@ -138,8 +138,11 @@ package | ||
| 138 | if (srs_server != null) { | 138 | if (srs_server != null) { |
| 139 | customItems.push(new ContextMenuItem("Server: " + srs_server)); | 139 | customItems.push(new ContextMenuItem("Server: " + srs_server)); |
| 140 | } | 140 | } |
| 141 | - if (srs_primary_authors != null) { | ||
| 142 | - customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary_authors)); | 141 | + if (srs_primary != null) { |
| 142 | + customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary)); | ||
| 143 | + } | ||
| 144 | + if (srs_authors != null) { | ||
| 145 | + customItems.push(new ContextMenuItem("Authors: " + srs_authors)); | ||
| 143 | } | 146 | } |
| 144 | if (srs_server_ip != null) { | 147 | if (srs_server_ip != null) { |
| 145 | customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip)); | 148 | customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip)); |
| @@ -152,8 +152,11 @@ package | @@ -152,8 +152,11 @@ package | ||
| 152 | if (srs_server != null) { | 152 | if (srs_server != null) { |
| 153 | obj.server = srs_server; | 153 | obj.server = srs_server; |
| 154 | } | 154 | } |
| 155 | - if (srs_primary_authors != null) { | ||
| 156 | - obj.contributor = srs_primary_authors; | 155 | + if (srs_primary != null) { |
| 156 | + obj.contributor = srs_primary; | ||
| 157 | + } | ||
| 158 | + if (srs_authors != null) { | ||
| 159 | + obj.contributor = srs_authors; | ||
| 157 | } | 160 | } |
| 158 | 161 | ||
| 159 | var code:int = flash.external.ExternalInterface.call(js_on_player_metadata, js_id, obj); | 162 | var code:int = flash.external.ExternalInterface.call(js_on_player_metadata, js_id, obj); |
| @@ -267,7 +270,8 @@ package | @@ -267,7 +270,8 @@ package | ||
| 267 | 270 | ||
| 268 | // srs infos | 271 | // srs infos |
| 269 | private var srs_server:String = null; | 272 | private var srs_server:String = null; |
| 270 | - private var srs_primary_authors:String = null; | 273 | + private var srs_primary:String = null; |
| 274 | + private var srs_authors:String = null; | ||
| 271 | private var srs_id:String = null; | 275 | private var srs_id:String = null; |
| 272 | private var srs_pid:String = null; | 276 | private var srs_pid:String = null; |
| 273 | private var srs_server_ip:String = null; | 277 | private var srs_server_ip:String = null; |
| @@ -277,8 +281,11 @@ package | @@ -277,8 +281,11 @@ package | ||
| 277 | if (srs_server != null) { | 281 | if (srs_server != null) { |
| 278 | customItems.push(new ContextMenuItem("Server: " + srs_server)); | 282 | customItems.push(new ContextMenuItem("Server: " + srs_server)); |
| 279 | } | 283 | } |
| 280 | - if (srs_primary_authors != null) { | ||
| 281 | - customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary_authors)); | 284 | + if (srs_primary != null) { |
| 285 | + customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary)); | ||
| 286 | + } | ||
| 287 | + if (srs_authors != null) { | ||
| 288 | + customItems.push(new ContextMenuItem("Authors: " + srs_authors)); | ||
| 282 | } | 289 | } |
| 283 | if (srs_server_ip != null) { | 290 | if (srs_server_ip != null) { |
| 284 | customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip)); | 291 | customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip)); |
| @@ -318,8 +325,11 @@ package | @@ -318,8 +325,11 @@ package | ||
| 318 | if (evt.info.data.hasOwnProperty("srs_server")) { | 325 | if (evt.info.data.hasOwnProperty("srs_server")) { |
| 319 | srs_server = evt.info.data.srs_server; | 326 | srs_server = evt.info.data.srs_server; |
| 320 | } | 327 | } |
| 321 | - if (evt.info.data.hasOwnProperty("srs_primary_authors")) { | ||
| 322 | - srs_primary_authors = evt.info.data.srs_primary_authors; | 328 | + if (evt.info.data.hasOwnProperty("srs_primary")) { |
| 329 | + srs_primary = evt.info.data.srs_primary; | ||
| 330 | + } | ||
| 331 | + if (evt.info.data.hasOwnProperty("srs_authors")) { | ||
| 332 | + srs_authors = evt.info.data.srs_authors; | ||
| 323 | } | 333 | } |
| 324 | if (evt.info.data.hasOwnProperty("srs_id")) { | 334 | if (evt.info.data.hasOwnProperty("srs_id")) { |
| 325 | srs_id = evt.info.data.srs_id; | 335 | srs_id = evt.info.data.srs_id; |
| @@ -136,7 +136,8 @@ package | @@ -136,7 +136,8 @@ package | ||
| 136 | 136 | ||
| 137 | // srs infos | 137 | // srs infos |
| 138 | private var srs_server:String = null; | 138 | private var srs_server:String = null; |
| 139 | - private var srs_primary_authors:String = null; | 139 | + private var srs_primary:String = null; |
| 140 | + private var srs_authors:String = null; | ||
| 140 | private var srs_id:String = null; | 141 | private var srs_id:String = null; |
| 141 | private var srs_pid:String = null; | 142 | private var srs_pid:String = null; |
| 142 | private var srs_server_ip:String = null; | 143 | private var srs_server_ip:String = null; |
| @@ -146,8 +147,11 @@ package | @@ -146,8 +147,11 @@ package | ||
| 146 | if (srs_server != null) { | 147 | if (srs_server != null) { |
| 147 | customItems.push(new ContextMenuItem("Server: " + srs_server)); | 148 | customItems.push(new ContextMenuItem("Server: " + srs_server)); |
| 148 | } | 149 | } |
| 149 | - if (srs_primary_authors != null) { | ||
| 150 | - customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary_authors)); | 150 | + if (srs_primary != null) { |
| 151 | + customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary)); | ||
| 152 | + } | ||
| 153 | + if (srs_authors != null) { | ||
| 154 | + customItems.push(new ContextMenuItem("Authors: " + srs_authors)); | ||
| 151 | } | 155 | } |
| 152 | if (srs_server_ip != null) { | 156 | if (srs_server_ip != null) { |
| 153 | customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip)); | 157 | customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip)); |
| @@ -217,8 +221,11 @@ package | @@ -217,8 +221,11 @@ package | ||
| 217 | if (evt.info.data.hasOwnProperty("srs_server")) { | 221 | if (evt.info.data.hasOwnProperty("srs_server")) { |
| 218 | srs_server = evt.info.data.srs_server; | 222 | srs_server = evt.info.data.srs_server; |
| 219 | } | 223 | } |
| 220 | - if (evt.info.data.hasOwnProperty("srs_primary_authors")) { | ||
| 221 | - srs_primary_authors = evt.info.data.srs_primary_authors; | 224 | + if (evt.info.data.hasOwnProperty("srs_primary")) { |
| 225 | + srs_primary = evt.info.data.srs_primary; | ||
| 226 | + } | ||
| 227 | + if (evt.info.data.hasOwnProperty("srs_authors")) { | ||
| 228 | + srs_authors = evt.info.data.srs_authors; | ||
| 222 | } | 229 | } |
| 223 | if (evt.info.data.hasOwnProperty("srs_id")) { | 230 | if (evt.info.data.hasOwnProperty("srs_id")) { |
| 224 | srs_id = evt.info.data.srs_id; | 231 | srs_id = evt.info.data.srs_id; |
| @@ -1167,7 +1167,8 @@ void SrsConfig::print_help(char** argv) | @@ -1167,7 +1167,8 @@ void SrsConfig::print_help(char** argv) | ||
| 1167 | printf( | 1167 | printf( |
| 1168 | RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n" | 1168 | RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n" |
| 1169 | "License: "RTMP_SIG_SRS_LICENSE"\n" | 1169 | "License: "RTMP_SIG_SRS_LICENSE"\n" |
| 1170 | - "Primary Authors: "RTMP_SIG_SRS_PRIMARY_AUTHROS"\n" | 1170 | + "Primary: "RTMP_SIG_SRS_PRIMARY"\n" |
| 1171 | + "Authors: "RTMP_SIG_SRS_AUTHROS"\n" | ||
| 1171 | "Build: "SRS_AUTO_BUILD_DATE" Configuration:"SRS_AUTO_USER_CONFIGURE"\n" | 1172 | "Build: "SRS_AUTO_BUILD_DATE" Configuration:"SRS_AUTO_USER_CONFIGURE"\n" |
| 1172 | "Features:"SRS_AUTO_CONFIGURE"\n""\n" | 1173 | "Features:"SRS_AUTO_CONFIGURE"\n""\n" |
| 1173 | "Usage: %s [-h?vV] [[-t] -c <filename>]\n" | 1174 | "Usage: %s [-h?vV] [[-t] -c <filename>]\n" |
| @@ -227,7 +227,8 @@ int SrsEdgeIngester::connect_app(string ep_server, string ep_port) | @@ -227,7 +227,8 @@ int SrsEdgeIngester::connect_app(string ep_server, string ep_port) | ||
| 227 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); | 227 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); |
| 228 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); | 228 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); |
| 229 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); | 229 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); |
| 230 | - data->set("srs_primary_authors", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY_AUTHROS)); | 230 | + data->set("srs_primary", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY)); |
| 231 | + data->set("srs_authors", SrsAmf0Any::str(RTMP_SIG_SRS_AUTHROS)); | ||
| 231 | // for edge to directly get the id of client. | 232 | // for edge to directly get the id of client. |
| 232 | data->set("srs_pid", SrsAmf0Any::number(getpid())); | 233 | data->set("srs_pid", SrsAmf0Any::number(getpid())); |
| 233 | data->set("srs_id", SrsAmf0Any::number(_srs_context->get_id())); | 234 | data->set("srs_id", SrsAmf0Any::number(_srs_context->get_id())); |
| @@ -647,7 +648,8 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port) | @@ -647,7 +648,8 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port) | ||
| 647 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); | 648 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); |
| 648 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); | 649 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); |
| 649 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); | 650 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); |
| 650 | - data->set("srs_primary_authors", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY_AUTHROS)); | 651 | + data->set("srs_primary", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY)); |
| 652 | + data->set("srs_authors", SrsAmf0Any::str(RTMP_SIG_SRS_AUTHROS)); | ||
| 651 | // for edge to directly get the id of client. | 653 | // for edge to directly get the id of client. |
| 652 | data->set("srs_pid", SrsAmf0Any::number(getpid())); | 654 | data->set("srs_pid", SrsAmf0Any::number(getpid())); |
| 653 | data->set("srs_id", SrsAmf0Any::number(_srs_context->get_id())); | 655 | data->set("srs_id", SrsAmf0Any::number(_srs_context->get_id())); |
| @@ -344,7 +344,8 @@ int SrsForwarder::connect_app(string ep_server, string ep_port) | @@ -344,7 +344,8 @@ int SrsForwarder::connect_app(string ep_server, string ep_port) | ||
| 344 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); | 344 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); |
| 345 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); | 345 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); |
| 346 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); | 346 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); |
| 347 | - data->set("srs_primary_authors", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY_AUTHROS)); | 347 | + data->set("srs_primary", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY)); |
| 348 | + data->set("srs_authors", SrsAmf0Any::str(RTMP_SIG_SRS_AUTHROS)); | ||
| 348 | // for edge to directly get the id of client. | 349 | // for edge to directly get the id of client. |
| 349 | data->set("srs_pid", SrsAmf0Any::number(getpid())); | 350 | data->set("srs_pid", SrsAmf0Any::number(getpid())); |
| 350 | data->set("srs_id", SrsAmf0Any::number(_srs_context->get_id())); | 351 | data->set("srs_id", SrsAmf0Any::number(_srs_context->get_id())); |
| @@ -490,7 +490,8 @@ int SrsApiAuthors::do_process_request(SrsStSocket* skt, SrsHttpMessage* req) | @@ -490,7 +490,8 @@ int SrsApiAuthors::do_process_request(SrsStSocket* skt, SrsHttpMessage* req) | ||
| 490 | ss << __SRS_JOBJECT_START | 490 | ss << __SRS_JOBJECT_START |
| 491 | << __SRS_JFIELD_ERROR(ERROR_SUCCESS) << __SRS_JFIELD_CONT | 491 | << __SRS_JFIELD_ERROR(ERROR_SUCCESS) << __SRS_JFIELD_CONT |
| 492 | << __SRS_JFIELD_ORG("data", __SRS_JOBJECT_START) | 492 | << __SRS_JFIELD_ORG("data", __SRS_JOBJECT_START) |
| 493 | - << __SRS_JFIELD_STR("primary_authors", RTMP_SIG_SRS_PRIMARY_AUTHROS) << __SRS_JFIELD_CONT | 493 | + << __SRS_JFIELD_STR("primary", RTMP_SIG_SRS_PRIMARY) << __SRS_JFIELD_CONT |
| 494 | + << __SRS_JFIELD_STR("authors", RTMP_SIG_SRS_AUTHROS) << __SRS_JFIELD_CONT | ||
| 494 | << __SRS_JFIELD_STR("contributors_link", RTMP_SIG_SRS_CONTRIBUTORS_URL) << __SRS_JFIELD_CONT | 495 | << __SRS_JFIELD_STR("contributors_link", RTMP_SIG_SRS_CONTRIBUTORS_URL) << __SRS_JFIELD_CONT |
| 495 | << __SRS_JFIELD_STR("contributors", SRS_AUTO_CONSTRIBUTORS) | 496 | << __SRS_JFIELD_STR("contributors", SRS_AUTO_CONSTRIBUTORS) |
| 496 | << __SRS_JOBJECT_END | 497 | << __SRS_JOBJECT_END |
| @@ -957,7 +957,8 @@ int SrsSource::on_meta_data(SrsMessage* msg, SrsOnMetaDataPacket* metadata) | @@ -957,7 +957,8 @@ int SrsSource::on_meta_data(SrsMessage* msg, SrsOnMetaDataPacket* metadata) | ||
| 957 | 957 | ||
| 958 | // add server info to metadata | 958 | // add server info to metadata |
| 959 | metadata->metadata->set("server", SrsAmf0Any::str(RTMP_SIG_SRS_KEY" "RTMP_SIG_SRS_VERSION" ("RTMP_SIG_SRS_URL_SHORT")")); | 959 | metadata->metadata->set("server", SrsAmf0Any::str(RTMP_SIG_SRS_KEY" "RTMP_SIG_SRS_VERSION" ("RTMP_SIG_SRS_URL_SHORT")")); |
| 960 | - metadata->metadata->set("authors", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY_AUTHROS)); | 960 | + metadata->metadata->set("srs_primary", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY)); |
| 961 | + metadata->metadata->set("srs_authors", SrsAmf0Any::str(RTMP_SIG_SRS_AUTHROS)); | ||
| 961 | 962 | ||
| 962 | // version, for example, 1.0.0 | 963 | // version, for example, 1.0.0 |
| 963 | // add version to metadata, please donot remove it, for debug. | 964 | // add version to metadata, please donot remove it, for debug. |
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR 2 | 32 | #define VERSION_MAJOR 2 |
| 33 | #define VERSION_MINOR 0 | 33 | #define VERSION_MINOR 0 |
| 34 | -#define VERSION_REVISION 31 | 34 | +#define VERSION_REVISION 32 |
| 35 | // server info. | 35 | // server info. |
| 36 | #define RTMP_SIG_SRS_KEY "SRS" | 36 | #define RTMP_SIG_SRS_KEY "SRS" |
| 37 | #define RTMP_SIG_SRS_ROLE "origin/edge server" | 37 | #define RTMP_SIG_SRS_ROLE "origin/edge server" |
| @@ -42,7 +42,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -42,7 +42,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 42 | #define RTMP_SIG_SRS_EMAIL "winlin@vip.126.com" | 42 | #define RTMP_SIG_SRS_EMAIL "winlin@vip.126.com" |
| 43 | #define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)" | 43 | #define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)" |
| 44 | #define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013-2014 winlin" | 44 | #define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013-2014 winlin" |
| 45 | -#define RTMP_SIG_SRS_PRIMARY_AUTHROS "winlin,wenjie.zhao" | 45 | +#define RTMP_SIG_SRS_PRIMARY "winlin" |
| 46 | +#define RTMP_SIG_SRS_AUTHROS "wenjie.zhao" | ||
| 46 | #define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt" | 47 | #define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt" |
| 47 | #define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")" | 48 | #define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")" |
| 48 | #define RTMP_SIG_SRS_RELEASE "https://github.com/winlinvip/simple-rtmp-server/tree/1.0release" | 49 | #define RTMP_SIG_SRS_RELEASE "https://github.com/winlinvip/simple-rtmp-server/tree/1.0release" |
| @@ -655,12 +655,14 @@ int srs_rtmp_connect_app(srs_rtmp_t rtmp) | @@ -655,12 +655,14 @@ int srs_rtmp_connect_app(srs_rtmp_t rtmp) | ||
| 655 | } | 655 | } |
| 656 | 656 | ||
| 657 | int srs_rtmp_connect_app2(srs_rtmp_t rtmp, | 657 | int srs_rtmp_connect_app2(srs_rtmp_t rtmp, |
| 658 | - char srs_server_ip[128],char srs_server[128], char srs_primary_authors[128], | 658 | + char srs_server_ip[128],char srs_server[128], |
| 659 | + char srs_primary[128], char srs_authors[128], | ||
| 659 | char srs_version[32], int* srs_id, int* srs_pid | 660 | char srs_version[32], int* srs_id, int* srs_pid |
| 660 | ) { | 661 | ) { |
| 661 | srs_server_ip[0] = 0; | 662 | srs_server_ip[0] = 0; |
| 662 | srs_server[0] = 0; | 663 | srs_server[0] = 0; |
| 663 | - srs_primary_authors[0] = 0; | 664 | + srs_primary[0] = 0; |
| 665 | + srs_authors[0] = 0; | ||
| 664 | srs_version[0] = 0; | 666 | srs_version[0] = 0; |
| 665 | *srs_id = 0; | 667 | *srs_id = 0; |
| 666 | *srs_pid = 0; | 668 | *srs_pid = 0; |
| @@ -675,16 +677,17 @@ int srs_rtmp_connect_app2(srs_rtmp_t rtmp, | @@ -675,16 +677,17 @@ int srs_rtmp_connect_app2(srs_rtmp_t rtmp, | ||
| 675 | context->param | 677 | context->param |
| 676 | ); | 678 | ); |
| 677 | 679 | ||
| 678 | - std::string sip, sserver, sauthors, sversion; | 680 | + std::string sip, sserver, sprimary, sauthors, sversion; |
| 679 | 681 | ||
| 680 | if ((ret = context->rtmp->connect_app2(context->app, tcUrl, NULL, true, | 682 | if ((ret = context->rtmp->connect_app2(context->app, tcUrl, NULL, true, |
| 681 | - sip, sserver, sauthors, sversion, *srs_id, *srs_pid)) != ERROR_SUCCESS) { | 683 | + sip, sserver, sprimary, sauthors, sversion, *srs_id, *srs_pid)) != ERROR_SUCCESS) { |
| 682 | return ret; | 684 | return ret; |
| 683 | } | 685 | } |
| 684 | 686 | ||
| 685 | snprintf(srs_server_ip, 128, "%s", sip.c_str()); | 687 | snprintf(srs_server_ip, 128, "%s", sip.c_str()); |
| 686 | snprintf(srs_server, 128, "%s", sserver.c_str()); | 688 | snprintf(srs_server, 128, "%s", sserver.c_str()); |
| 687 | - snprintf(srs_primary_authors, 128, "%s", sauthors.c_str()); | 689 | + snprintf(srs_primary, 128, "%s", sprimary.c_str()); |
| 690 | + snprintf(srs_authors, 128, "%s", sauthors.c_str()); | ||
| 688 | snprintf(srs_version, 32, "%s", sversion.c_str()); | 691 | snprintf(srs_version, 32, "%s", sversion.c_str()); |
| 689 | 692 | ||
| 690 | return ret; | 693 | return ret; |
| @@ -176,7 +176,8 @@ extern int srs_rtmp_connect_app(srs_rtmp_t rtmp); | @@ -176,7 +176,8 @@ extern int srs_rtmp_connect_app(srs_rtmp_t rtmp); | ||
| 176 | * SRS debug info: | 176 | * SRS debug info: |
| 177 | * @param srs_server_ip, 128bytes, debug info, server ip client connected at. | 177 | * @param srs_server_ip, 128bytes, debug info, server ip client connected at. |
| 178 | * @param srs_server, 128bytes, server info. | 178 | * @param srs_server, 128bytes, server info. |
| 179 | -* @param srs_primary_authors, 128bytes, primary authors. | 179 | +* @param srs_primary, 128bytes, primary authors. |
| 180 | +* @param srs_authors, 128bytes, authors. | ||
| 180 | * @param srs_version, 32bytes, server version. | 181 | * @param srs_version, 32bytes, server version. |
| 181 | * @param srs_id, int, debug info, client id in server log. | 182 | * @param srs_id, int, debug info, client id in server log. |
| 182 | * @param srs_pid, int, debug info, server pid in log. | 183 | * @param srs_pid, int, debug info, server pid in log. |
| @@ -184,7 +185,8 @@ extern int srs_rtmp_connect_app(srs_rtmp_t rtmp); | @@ -184,7 +185,8 @@ extern int srs_rtmp_connect_app(srs_rtmp_t rtmp); | ||
| 184 | * @return 0, success; otherswise, failed. | 185 | * @return 0, success; otherswise, failed. |
| 185 | */ | 186 | */ |
| 186 | extern int srs_rtmp_connect_app2(srs_rtmp_t rtmp, | 187 | extern int srs_rtmp_connect_app2(srs_rtmp_t rtmp, |
| 187 | - char srs_server_ip[128], char srs_server[128], char srs_primary_authors[128], | 188 | + char srs_server_ip[128], char srs_server[128], |
| 189 | + char srs_primary[128], char srs_authors[128], | ||
| 188 | char srs_version[32], int* srs_id, int* srs_pid | 190 | char srs_version[32], int* srs_id, int* srs_pid |
| 189 | ); | 191 | ); |
| 190 | 192 |
| @@ -188,7 +188,8 @@ int main(int argc, char** argv) | @@ -188,7 +188,8 @@ int main(int argc, char** argv) | ||
| 188 | 188 | ||
| 189 | srs_trace("srs(simple-rtmp-server) "RTMP_SIG_SRS_VERSION); | 189 | srs_trace("srs(simple-rtmp-server) "RTMP_SIG_SRS_VERSION); |
| 190 | srs_trace("license: "RTMP_SIG_SRS_LICENSE); | 190 | srs_trace("license: "RTMP_SIG_SRS_LICENSE); |
| 191 | - srs_trace("authors: "RTMP_SIG_SRS_PRIMARY_AUTHROS); | 191 | + srs_trace("primary: "RTMP_SIG_SRS_PRIMARY); |
| 192 | + srs_trace("authors: "RTMP_SIG_SRS_AUTHROS); | ||
| 192 | srs_trace("contributors: "SRS_AUTO_CONSTRIBUTORS); | 193 | srs_trace("contributors: "SRS_AUTO_CONSTRIBUTORS); |
| 193 | srs_trace("uname: "SRS_AUTO_UNAME); | 194 | srs_trace("uname: "SRS_AUTO_UNAME); |
| 194 | srs_trace("build: %s, %s", SRS_AUTO_BUILD_DATE, srs_is_little_endian()? "little-endian":"big-endian"); | 195 | srs_trace("build: %s, %s", SRS_AUTO_BUILD_DATE, srs_is_little_endian()? "little-endian":"big-endian"); |
| @@ -444,20 +444,22 @@ int SrsRtmpClient::connect_app(string app, string tc_url, | @@ -444,20 +444,22 @@ int SrsRtmpClient::connect_app(string app, string tc_url, | ||
| 444 | { | 444 | { |
| 445 | std::string srs_server_ip; | 445 | std::string srs_server_ip; |
| 446 | std::string srs_server; | 446 | std::string srs_server; |
| 447 | - std::string srs_primary_authors; | 447 | + std::string srs_primary; |
| 448 | + std::string srs_authors; | ||
| 448 | std::string srs_version; | 449 | std::string srs_version; |
| 449 | int srs_id = 0; | 450 | int srs_id = 0; |
| 450 | int srs_pid = 0; | 451 | int srs_pid = 0; |
| 451 | 452 | ||
| 452 | return connect_app2(app, tc_url, req, debug_srs_upnode, | 453 | return connect_app2(app, tc_url, req, debug_srs_upnode, |
| 453 | - srs_server_ip, srs_server, srs_primary_authors, | 454 | + srs_server_ip, srs_server, srs_primary, srs_authors, |
| 454 | srs_version, srs_id, srs_pid); | 455 | srs_version, srs_id, srs_pid); |
| 455 | } | 456 | } |
| 456 | 457 | ||
| 457 | int SrsRtmpClient::connect_app2( | 458 | int SrsRtmpClient::connect_app2( |
| 458 | string app, string tc_url, SrsRequest* req, bool debug_srs_upnode, | 459 | string app, string tc_url, SrsRequest* req, bool debug_srs_upnode, |
| 459 | - string& srs_server_ip, string& srs_server, string& srs_primary_authors, | ||
| 460 | - string& srs_version, int& srs_id, int& srs_pid | 460 | + string& srs_server_ip, string& srs_server, string& srs_primary, |
| 461 | + string& srs_authors, string& srs_version, int& srs_id, | ||
| 462 | + int& srs_pid | ||
| 461 | ){ | 463 | ){ |
| 462 | int ret = ERROR_SUCCESS; | 464 | int ret = ERROR_SUCCESS; |
| 463 | 465 | ||
| @@ -522,8 +524,11 @@ int SrsRtmpClient::connect_app2( | @@ -522,8 +524,11 @@ int SrsRtmpClient::connect_app2( | ||
| 522 | SrsAmf0EcmaArray* arr = data->to_ecma_array(); | 524 | SrsAmf0EcmaArray* arr = data->to_ecma_array(); |
| 523 | 525 | ||
| 524 | SrsAmf0Any* prop = NULL; | 526 | SrsAmf0Any* prop = NULL; |
| 525 | - if ((prop = arr->ensure_property_string("srs_primary_authors")) != NULL) { | ||
| 526 | - srs_primary_authors = prop->to_str(); | 527 | + if ((prop = arr->ensure_property_string("srs_primary")) != NULL) { |
| 528 | + srs_primary = prop->to_str(); | ||
| 529 | + } | ||
| 530 | + if ((prop = arr->ensure_property_string("srs_authors")) != NULL) { | ||
| 531 | + srs_authors = prop->to_str(); | ||
| 527 | } | 532 | } |
| 528 | if ((prop = arr->ensure_property_string("srs_version")) != NULL) { | 533 | if ((prop = arr->ensure_property_string("srs_version")) != NULL) { |
| 529 | srs_version = prop->to_str(); | 534 | srs_version = prop->to_str(); |
| @@ -927,7 +932,8 @@ int SrsRtmpServer::response_connect_app(SrsRequest *req, const char* server_ip) | @@ -927,7 +932,8 @@ int SrsRtmpServer::response_connect_app(SrsRequest *req, const char* server_ip) | ||
| 927 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); | 932 | data->set("srs_site", SrsAmf0Any::str(RTMP_SIG_SRS_WEB)); |
| 928 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); | 933 | data->set("srs_email", SrsAmf0Any::str(RTMP_SIG_SRS_EMAIL)); |
| 929 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); | 934 | data->set("srs_copyright", SrsAmf0Any::str(RTMP_SIG_SRS_COPYRIGHT)); |
| 930 | - data->set("srs_primary_authors", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY_AUTHROS)); | 935 | + data->set("srs_primary", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY)); |
| 936 | + data->set("srs_authors", SrsAmf0Any::str(RTMP_SIG_SRS_AUTHROS)); | ||
| 931 | 937 | ||
| 932 | if (server_ip) { | 938 | if (server_ip) { |
| 933 | data->set("srs_server_ip", SrsAmf0Any::str(server_ip)); | 939 | data->set("srs_server_ip", SrsAmf0Any::str(server_ip)); |
| @@ -268,14 +268,16 @@ public: | @@ -268,14 +268,16 @@ public: | ||
| 268 | * SRS debug info: | 268 | * SRS debug info: |
| 269 | * @param srs_server_ip, debug info, server ip client connected at. | 269 | * @param srs_server_ip, debug info, server ip client connected at. |
| 270 | * @param srs_server, server info. | 270 | * @param srs_server, server info. |
| 271 | - * @param srs_primary_authors, primary authors. | 271 | + * @param srs_primary, primary authors. |
| 272 | + * @param srs_authors, authors. | ||
| 272 | * @param srs_id, int, debug info, client id in server log. | 273 | * @param srs_id, int, debug info, client id in server log. |
| 273 | * @param srs_pid, int, debug info, server pid in log. | 274 | * @param srs_pid, int, debug info, server pid in log. |
| 274 | */ | 275 | */ |
| 275 | virtual int connect_app2( | 276 | virtual int connect_app2( |
| 276 | std::string app, std::string tc_url, SrsRequest* req, bool debug_srs_upnode, | 277 | std::string app, std::string tc_url, SrsRequest* req, bool debug_srs_upnode, |
| 277 | - std::string& srs_server_ip, std::string& srs_server, std::string& srs_primary_authors, | ||
| 278 | - std::string& srs_version, int& srs_id, int& srs_pid | 278 | + std::string& srs_server_ip, std::string& srs_server, std::string& srs_primary, |
| 279 | + std::string& srs_authors, std::string& srs_version, int& srs_id, | ||
| 280 | + int& srs_pid | ||
| 279 | ); | 281 | ); |
| 280 | /** | 282 | /** |
| 281 | * create a stream, then play/publish data over this stream. | 283 | * create a stream, then play/publish data over this stream. |
-
请 注册 或 登录 后发表评论