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:
parent
d672fae255
commit
db7af6259a
9 changed files with 80 additions and 44 deletions
|
@ -88,9 +88,10 @@ package
|
|||
* "", otherwise empty string.
|
||||
* @param as_on_progress_change, function(percent:Number):void, where:
|
||||
* percent, the progress percent, 0 means 0%, 100 means 100%.
|
||||
* @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:
|
||||
* @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:
|
||||
* srs_server: the srs server info.
|
||||
* srs_primary_authors: the srs version info.
|
||||
* srs_primary: the srs primary authors info.
|
||||
* srs_authors: the srs authors info.
|
||||
* srs_id: the tracable log id, to direclty grep the log..
|
||||
* srs_pid: the srs process id, to direclty grep the log.
|
||||
* srs_server_ip: the srs server ip, where client connected at.
|
||||
|
@ -112,7 +113,7 @@ package
|
|||
* @param js_on_ready, function(js_id:String):void, callback when bandwidth tool is ready to run.
|
||||
* @param js_on_status_change, function(js_id:String, code:String, data:String):void
|
||||
* @param as_on_progress_change, function(js_id:String, percent:Number):void
|
||||
* @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
|
||||
* @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
|
||||
* @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
|
||||
*
|
||||
* the js export functions.
|
||||
|
@ -268,7 +269,8 @@ package
|
|||
* srs debug infos
|
||||
*/
|
||||
private var srs_server:String = null;
|
||||
private var srs_primary_authors:String = null;
|
||||
private var srs_primary:String = null;
|
||||
private var srs_authors:String = null;
|
||||
private var srs_id:String = null;
|
||||
private var srs_pid:String = null;
|
||||
private var srs_server_ip:String = null;
|
||||
|
@ -486,8 +488,11 @@ package
|
|||
if (evt.info.data.hasOwnProperty("srs_server")) {
|
||||
srs_server = evt.info.data.srs_server;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_primary_authors")) {
|
||||
srs_primary_authors = evt.info.data.srs_primary_authors;
|
||||
if (evt.info.data.hasOwnProperty("srs_primary")) {
|
||||
srs_primary = evt.info.data.srs_primary;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_authors")) {
|
||||
srs_authors = evt.info.data.srs_authors;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_id")) {
|
||||
srs_id = evt.info.data.srs_id;
|
||||
|
@ -500,11 +505,11 @@ package
|
|||
}
|
||||
|
||||
if (this.as_on_srs_info != null) {
|
||||
this.as_on_srs_info(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip);
|
||||
this.as_on_srs_info(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip);
|
||||
}
|
||||
if (this.js_on_srs_info != null) {
|
||||
flash.external.ExternalInterface.call(this.js_on_srs_info, this.js_id,
|
||||
srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip);
|
||||
srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip);
|
||||
}
|
||||
}
|
||||
if (evt.info.code) {
|
||||
|
|
|
@ -39,9 +39,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
bandwidth.on_update_status = function(status) {
|
||||
// console.log(status);
|
||||
}
|
||||
bandwidth.on_srs_info = function(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) {
|
||||
bandwidth.on_srs_info = function(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip) {
|
||||
// console.log(
|
||||
// "server:" + srs_server + ", authors:" + srs_primary_authors +
|
||||
// "server:" + srs_server + ", primary:" + srs_primary + ", authors:" + srs_authors +
|
||||
// ", srs_id:" + srs_id + ", srs_pid:" + srs_pid + ", ip:" + srs_server_ip
|
||||
//);
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ SrsBandwidth.prototype.on_update_progress = function(percent) {
|
|||
}
|
||||
SrsBandwidth.prototype.on_update_status = function(status) {
|
||||
}
|
||||
SrsBandwidth.prototype.on_srs_info = function(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) {
|
||||
SrsBandwidth.prototype.on_srs_info = function(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip) {
|
||||
}
|
||||
SrsBandwidth.prototype.on_complete = function(start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time) {
|
||||
}
|
||||
|
@ -233,11 +233,11 @@ function __srs_on_update_status(id, code, data) {
|
|||
bandwidth.status = status;
|
||||
bandwidth.on_update_status(status);
|
||||
}
|
||||
function __srs_on_srs_info(id, srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) {
|
||||
function __srs_on_srs_info(id, srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip) {
|
||||
var bandwidth = __srs_find_bandwidth(id);
|
||||
bandwidth.status = status;
|
||||
bandwidth.server = srs_server_ip;
|
||||
bandwidth.on_srs_info(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip);
|
||||
bandwidth.on_srs_info(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip);
|
||||
}
|
||||
function __srs_on_complete(id, start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time) {
|
||||
var bandwidth = __srs_find_bandwidth(id);
|
||||
|
|
|
@ -101,8 +101,8 @@ package
|
|||
var as_on_progress_change:Function = function(percent:Number):void {
|
||||
self.on_progress(percent);
|
||||
};
|
||||
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 {
|
||||
self.update_context_items(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip);
|
||||
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 {
|
||||
self.update_context_items(srs_server, srs_primary, srs_authors, srs_id, srs_pid, srs_server_ip);
|
||||
};
|
||||
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 {
|
||||
self.on_complete(start_time, end_time, play_kbps, publish_kbps, play_bytes, publish_bytes, play_time, publish_time);
|
||||
|
@ -130,7 +130,7 @@ package
|
|||
trace("progress:" + percent + "%");
|
||||
}
|
||||
private function update_context_items(
|
||||
srs_server:String, srs_primary_authors:String,
|
||||
srs_server:String, srs_primary:String, srs_authors:String,
|
||||
srs_id:String, srs_pid:String, srs_server_ip:String
|
||||
):void {
|
||||
// for context menu
|
||||
|
@ -138,8 +138,11 @@ package
|
|||
if (srs_server != null) {
|
||||
customItems.push(new ContextMenuItem("Server: " + srs_server));
|
||||
}
|
||||
if (srs_primary_authors != null) {
|
||||
customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary_authors));
|
||||
if (srs_primary != null) {
|
||||
customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary));
|
||||
}
|
||||
if (srs_authors != null) {
|
||||
customItems.push(new ContextMenuItem("Authors: " + srs_authors));
|
||||
}
|
||||
if (srs_server_ip != null) {
|
||||
customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip));
|
||||
|
|
|
@ -152,8 +152,11 @@ package
|
|||
if (srs_server != null) {
|
||||
obj.server = srs_server;
|
||||
}
|
||||
if (srs_primary_authors != null) {
|
||||
obj.contributor = srs_primary_authors;
|
||||
if (srs_primary != null) {
|
||||
obj.contributor = srs_primary;
|
||||
}
|
||||
if (srs_authors != null) {
|
||||
obj.contributor = srs_authors;
|
||||
}
|
||||
|
||||
var code:int = flash.external.ExternalInterface.call(js_on_player_metadata, js_id, obj);
|
||||
|
@ -267,7 +270,8 @@ package
|
|||
|
||||
// srs infos
|
||||
private var srs_server:String = null;
|
||||
private var srs_primary_authors:String = null;
|
||||
private var srs_primary:String = null;
|
||||
private var srs_authors:String = null;
|
||||
private var srs_id:String = null;
|
||||
private var srs_pid:String = null;
|
||||
private var srs_server_ip:String = null;
|
||||
|
@ -277,8 +281,11 @@ package
|
|||
if (srs_server != null) {
|
||||
customItems.push(new ContextMenuItem("Server: " + srs_server));
|
||||
}
|
||||
if (srs_primary_authors != null) {
|
||||
customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary_authors));
|
||||
if (srs_primary != null) {
|
||||
customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary));
|
||||
}
|
||||
if (srs_authors != null) {
|
||||
customItems.push(new ContextMenuItem("Authors: " + srs_authors));
|
||||
}
|
||||
if (srs_server_ip != null) {
|
||||
customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip));
|
||||
|
@ -318,8 +325,11 @@ package
|
|||
if (evt.info.data.hasOwnProperty("srs_server")) {
|
||||
srs_server = evt.info.data.srs_server;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_primary_authors")) {
|
||||
srs_primary_authors = evt.info.data.srs_primary_authors;
|
||||
if (evt.info.data.hasOwnProperty("srs_primary")) {
|
||||
srs_primary = evt.info.data.srs_primary;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_authors")) {
|
||||
srs_authors = evt.info.data.srs_authors;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_id")) {
|
||||
srs_id = evt.info.data.srs_id;
|
||||
|
|
|
@ -136,7 +136,8 @@ package
|
|||
|
||||
// srs infos
|
||||
private var srs_server:String = null;
|
||||
private var srs_primary_authors:String = null;
|
||||
private var srs_primary:String = null;
|
||||
private var srs_authors:String = null;
|
||||
private var srs_id:String = null;
|
||||
private var srs_pid:String = null;
|
||||
private var srs_server_ip:String = null;
|
||||
|
@ -146,8 +147,11 @@ package
|
|||
if (srs_server != null) {
|
||||
customItems.push(new ContextMenuItem("Server: " + srs_server));
|
||||
}
|
||||
if (srs_primary_authors != null) {
|
||||
customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary_authors));
|
||||
if (srs_primary != null) {
|
||||
customItems.push(new ContextMenuItem("PrimaryAuthors: " + srs_primary));
|
||||
}
|
||||
if (srs_authors != null) {
|
||||
customItems.push(new ContextMenuItem("Authors: " + srs_authors));
|
||||
}
|
||||
if (srs_server_ip != null) {
|
||||
customItems.push(new ContextMenuItem("SrsIp: " + srs_server_ip));
|
||||
|
@ -217,8 +221,11 @@ package
|
|||
if (evt.info.data.hasOwnProperty("srs_server")) {
|
||||
srs_server = evt.info.data.srs_server;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_primary_authors")) {
|
||||
srs_primary_authors = evt.info.data.srs_primary_authors;
|
||||
if (evt.info.data.hasOwnProperty("srs_primary")) {
|
||||
srs_primary = evt.info.data.srs_primary;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_authors")) {
|
||||
srs_authors = evt.info.data.srs_authors;
|
||||
}
|
||||
if (evt.info.data.hasOwnProperty("srs_id")) {
|
||||
srs_id = evt.info.data.srs_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue