[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] admin/web/build/server config_broad_rtmp_send.html, NONE, 1.1
From:       yijil () helixcommunity ! org
Date:       2012-06-26 16:45:23
[Download RAW message or body]

Update of /cvsroot/server/admin/web/build/server
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv3082/build/server

Added Files:
	config_broad_rtmp_send.html 
Log Message:
Committed to : HEAD

Reviewed by : Chytanya, Xiaocheng Li

Synopsis:
=========
CDN integration for RTMP

Branch: HEAD

Suggested Reviewers: Chytanya and anyone

Description:
============
I. Intro
==========================================
CDN integration for RTMP is to upload streams come from slta/Helix Producer/AFML to \
CDN, then client can play stream through CDN using RTMP protocol.

II. What feature have been implemented in the version

1. admin page for CDN RTMP, it can add/delete/modify CDN account and use new \
configure without restart server

2. push single-rate live stream to CDN account in configure file

3. push multi-rate live stream to CDN account in configure file

4. support VP6/mp3/NellyMoser when using AFML as source

5. the configuration information
	<List Name="EdgeNetworkDistributionRTMP">
	<Var EnableDistribution="1"/>
    <List Name="Accounts">
        <List Name="Akamai">
			<Var CDNName="Akamai"/>
            <Var EnableAccount="1"/>
			<Var PrimaryURL="rtmp://p.ep27977.i.akamaientrypoint.net/EntryPoint"/>
            <Var BackupURL="rtmp://b.ep27977.i.akamaientrypoint.net/EntryPoint"/>
			<Var UserName="99410"/>
            <Var Password="testing"/>
			<Var StreamNameExt="27977"/>
			<Var RetryInterval="10" />
            <Var MaxRetryInterval="30" />
			<Var StreamParameter="%i" />
            <List Name="Sources">
                <List Name="100">
                    <Var EnableSource="1"/>
                    <Var SourcePath="/rtmplive/"/>
                </List>
                <List Name="200">
                    <Var EnableSource ="1"/>
                    <Var SourcePath="/broadcast/"/>
                </List>
            </List>
        </List>
    </List>
</List>

"RetryInterval" is the retry interval when failure occurs, itsunit is second. \
"MaxRetryInterval" is the max retry interval when failure occurs, its unit is minute. \
Every time when failure occurs, the interval time will be multiplied by 2. When the \
interval time is up to " MaxRetryInterval ", then the retry interval will always be " \
MaxRetryInterval ". These two parameters are optional, when not defined, the default \
value is "10" and "30" for each other. "StreamParameter " is the parameter used for \
publishing stream to CDN when stream is multi-rate. It can be set to "%i" or "%b". \
"%i" means the index of the bit rate. "%b" means the total bit rate including audio \
and video. It is optional, when not defined, the default value is "%i". \
"StreamNameExt" is the stream name extension used when publish stream to CDN. It can \
be "27977" or "@27977", it is necessary. For example, then the name of the stream \
received from producer is "live.mp4", when single-rate, the publish stream name is \
live.mp4@27977. When multi-rate and "StreamParameter" is "%i", the publish stream \
name will like live.mp4_1@27977 and live.mp4_2@27977. When multi-rate and \
"StreamParameter" is "%b", the publish stream name will like live.mp4_80k@27977 and \
live.mp4_120k@27977 depends on the stream bitrate.

IV. Solution Description

Add new plugin rtmppushpln for CDN integration for RTMP. It is non multi-load plugin \
and is loaded when start. In rtmppushpln, it watches the change of " LiveConnections \
", when a new live stream connected, function CRTMPPushPlugin::AddedProp will be \
called, and a new push event will be created.

CDN Account of RTMP and souce path information and the relationship between then is \
managed by three map given bellow. m_pRTMPStreamConfigMap hold all the CDN accounts. \
m_pSource2RTMPConfigMap holds the pointer to CDN accounts to which all the stream \
from given source path should push. m_pAccount2SourceMap holds the relationship \
between accounts name and souce path.

CRTMPPushConfigMap*					m_pRTMPStreamConfigMap;
Dict*								m_pSource2RTMPConfigMap;
Dict*								m_pAccount2SourceMap;

All these three maps control the push of streams. If there is no information in these \
maps, then the stream isn`t need to push to CDN. If one CDN accounts or souce path is \
removed/updated/added, these three maps will be updated.

class CRTMPPushProtocol is used to initialize connection between CDN, handle commands \
from CDN and send stream data to CDN. It is a member of class CRTMPPushEvent. class \
CRTMPPushEvent controls pushing one stream to an account including primary URL and \
backup URL. It is a member of class CRTMPPushHandler. class CRTMPPushHandler handles \
one live stream from slta/helix producer/afml, re-packetize packets if needed and \
uses CRTMPPushEvent to send the stream to all the CDN accounts. CRTMPPushHandler \
holds a map of CRTMPPushEvent.

V. Files affected:
===============

build/BIF/helixinternal.bif
build/umakepf/helix-server-all-defines.pf

server/admin/web/server.opt
server/admin/web/src/srvprxy/pageData.pm
server/admin/web/src/srvprxy/toc~server.js.wasm
server/admin/web/build/server/toc.js
server/admin/web/build/mserver/toc.js

server-restricted/installer/server/retailservinst.cpp
server_rn/protocol/flash/rtmp/chunk.cpp
server_rn/protocol/flash/rtmp/handshake.cpp
server_rn/protocol/flash/rtmp/rtmpprot.cpp
server_rn/protocol/flash/rtmpserv/rtmpencoder.cpp
server_rn/protocol/flash/rtmpserv/rtmpserv.cpp
server_rn/protocol/flash/rtmpserv/pub/rtmpencoder.h
server_rn/protocol/flash/rtmpserv/pub/rtmpserv.h
server_rn/protocol/flash/include/hxrtmp.h
server_rn/protocol/flash/utils/rtmplog.cpp

VI. New Files added:
=================
server_rn/broadcast/transport/rtmp/send/guids.cpp
server_rn/broadcast/transport/rtmp/send/rtmppush.cpp
server_rn/broadcast/transport/rtmp/send/rtmppushconfig.cpp
server_rn/broadcast/transport/rtmp/send/rtmppushevent.cpp
server_rn/broadcast/transport/rtmp/send/rtmppushhandler.cpp
server_rn/broadcast/transport/rtmp/send/rtmppushmap.cpp
server_rn/broadcast/transport/rtmp/send/rtmppushpln.cpp
server_rn/broadcast/transport/rtmp/send/Umakefile
server_rn/broadcast/transport/rtmp/send/pub/rtmppush.h
server_rn/broadcast/transport/rtmp/send/pub/rtmppushconfig.h
server_rn/broadcast/transport/rtmp/send/pub/rtmppushevent.h
server_rn/broadcast/transport/rtmp/send/pub/rtmppushhandler.h
server_rn/broadcast/transport/rtmp/send/pub/rtmppushmap.h
server_rn/broadcast/transport/rtmp/send/pub/rtmppushpln.h

server/admin/web/src/srvprxy/config_broad_rtmp_send.html.wasm
server/admin/web/build/server/ config_broad_rtmp_send.html 
server/admin/web/build/mserver/config_broad_rtmp_send.html

Testing Performed:
================
Unit Tests:
None

Integration Tests:
1. Add configuration like given upstairs 

2. start Helix server

3. push stream to Helix server using slta/Helix Producer/AFML

3. play back live stream in http://support.akamai.com/flash/

4. add/delete/modify cdn account information, helix server can work using new \
configure data without restart

Leak Tests: None
Performance Tests: N/A

Platforms Tested: Windows32

Builds Verified: Windows32

QA Hints
========
None.



--- NEW FILE: config_broad_rtmp_send.html ---

<HTML>

<HEAD>

<META http-equiv="Content-Type" content="text/html; charset=utf-8"> 
         <TITLE>CDN RTMP Setting</TITLE>

<SCRIPT SRC="xblib.js"></SCRIPT>
<SCRIPT SRC="string.js"></SCRIPT>
<SCRIPT SRC="client.js"></SCRIPT>
<SCRIPT SRC="results.js"></SCRIPT>
<SCRIPT SRC="help.js"></SCRIPT>
<SCRIPT SRC="Docs/home.js"></SCRIPT>
<SCRIPT>
if ( isX11 )
{
   document.write( '<LINK REL=stylesheet HREF="main_nav4_x.css" TYPE="text/css">' );
}
else if ( isIE && isMac )
{
   document.write( '<LINK REL=stylesheet HREF="main_ie_mac.css" TYPE="text/css">' );
}
else if ( isNav4 && isMac )
{
   document.write( '<LINK REL=stylesheet HREF="main_nav4_mac.css" TYPE="text/css">' \
); }
else
{
   document.write( '<LINK REL=stylesheet HREF="main.css" TYPE="text/css">' );
}
var contextID = "61";
</SCRIPT>

<SCRIPT SRC="propview.js"></SCRIPT>

<SCRIPT SRC="enumproplist.js"></SCRIPT>

<SCRIPT SRC="propview_nolist.js"></SCRIPT>

<SCRIPT SRC="propview_enum.js"></SCRIPT>

<SCRIPT SRC="servvar.get.html?rtmp2cdn=config.EdgeNetworkDistributionRTMP"></SCRIPT>

<SCRIPT language="JavaScript">
var theForm = null;

var propSetSources =

[

	new PropObj( 'SourcePath', "", false, true, null, null, 'path', 'Source Path' ),

	new PropObj( 'EnablePathUploads', "1", false, false,  null, null, "int", "Enable \
Path for CDN Upload" )

];

var propSetAccount =

[

    new PropObj( 'EnableUploads', "1", false, false,  null, null, "int", "Enable \
Uploading to Account" ),

	new PropObj( 'CDNName', "Akamai", false, true, null, null, null, "Content Network" \
),

	new PropObj( 'PrimaryURL',  "", false, true, null, null, null, "Primary URL" ),

	new PropObj( 'BackupURL', "", false, true, null, null, null, "Backup URL" ),

	new PropObj( 'StreamNameExt',  "", false, true, null, null, "", "StreamName \
Extention" ),

	new PropObj( 'UserName',  "", false, true, null, null, "", "User Name" ),

	new PropObj( 'Password',  "", false, true, null, null, "", "Password" ),

	new PropList( 'Sources',  null, null, propSetSources )

];

var propSetMain =

[

    new PropObj( 'EnableDistribution', "0", false, false,  null, null, "int", "Enable \
Upload2CDN" ),

	new PropList( 'Accounts', null, null, propSetAccount )

];

var propList = new PropList( "EdgeNetworkDistributionRTMP", rtmp2cdn, propSetMain);

var subListAccounts = propList.subList( "Accounts" );

function SourcePropView ()

{

	this.base = NestedEnumPropListView ;

	this.base( "Sources", propList.subList("Accounts"), "Source", "", "servvar", 

				"theForm", "theSourceList", "SourcePath", null,

				"SourcePath", "Source" );

}

SourcePropView.prototype = new NestedEnumPropListView ;

function RTMP2CDNPropView ()

{

    this.base = NestedPropListView ;

    this.base( "CDN RTMP Setting", propList, "CDN RTMP Live Account", 

               "config.EdgeNetworkDistributionRTMP.", "servvar",

               "theForm", "theList", "theEdit" );

    this.m_itemDefValue = "Akamai";

	this.m_subListParent = subListAccounts;

	this.addSubView( new SourcePropView() );

}

RTMP2CDNPropView.prototype = new NestedPropListView ;

var propView = new RTMP2CDNPropView();

function onLoad ()

{

    theForm = document.theForm;

    propView.onLoad( window );

}   // onLoad 

function addSource ()

{

	if ( ! propView.getSubList() )

	{

		alert( "An account must be created before adding a Source Path." );

		return;

	}

	var sublist = propView.subView( 'Sources' );

	sublist.createSubList();

}
</SCRIPT>

</HEAD>

<BODY 
   CLASS="CONFIG" 
   onLoad="_configOnLoadDefault( onLoad );"
   onUnLoad="_configOnUnLoadDefault(  );"
> 
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR><TD align="left" valign="bottom" width="100%" NOWRAP>
   <P class="headline">BROADCASTING</P>
</TD></TR>
<TR>
</TABLE>
<BR>
<TABLE border="0" cellpadding="0" cellspacing="0" width="476">
<tr><TD class="bodyText">
Media segmentation breaks any file or stream containing supported codecs into media \
chunks which can be viewed using the iPhone,  or other compatible handset or client.  \
These media segments can be used in iPhone playback,  allowing for features such as \
on-demand and live rate adaptation, encryption, and live archiving. </td></tr>
</TABLE>
<BR>
<FORM 
   method="POST" 
   action="javascript:propView.doSubmit();" 
   onsubmit="return propView.validate()" 
   onreset="onLoad(); return false;"
   name="theForm"
> 
<table border="0" cellspacing="0" cellpadding="0" width="476" style="width:476;">
<TR><TD bgcolor="#E6E6E6" width="19"><img src="images/spacer.gif"  BORDER="0" \
HEIGHT="17" HSPACE="0" NAME="IMG_DIRTY_TAB" VSPACE="0" WIDTH="19"></TD> <TD \
bgcolor="#E6E6E6" class="TabText" width="243" NOWRAP>CDN RTMP Setting</TD> <TD \
bgcolor="#FFFFFF" width="20"><img src="images/diagonal.gif"></TD> <TD \
bgcolor="#FFFFFF" width="194" align="right"><SPAN ID="RESTART_IMG_SPAN" \
STYLE="visibility:hidden;"><A HREF="javascript://" onclick="displayChanges()"><img \
src="images/spacer.gif"  BORDER="0" HEIGHT="16" HSPACE="8" NAME="RESTART_IMG" \
VSPACE="0" WIDTH="102"></A></SPAN><A CLASS="linkText" HREF="javascript://" \
onclick="contextHelp()">HELP</A></TD> </TR>
</TABLE>
<table class="formTable" border="0" cellspacing="0" cellpadding="6" width="476">
      <tr>
      <TD class="input" valign="top" align="RIGHT" width="44%">
      		<span class="offsetLabel">Enable Upload2CDN</span>
      	</td>
      	<TD class="input" valign="top" align="left" width="56%">
      		<select CLASS="input" NAME="EnableDistribution" SIZE="1" WIDTH="253">
                  <OPTION value="1">Yes</OPTION>
                  <OPTION value="0">No</OPTION>
              </SELECT>
      	</td>
      </tr>
<tr </tr>
<tr>
    <TD class="input" valign="top" width="44%">
          <TABLE CLASS="PROPLIST_LABEL" width="199" BORDER="0" CELLSPACING="0" \
CELLPADDING="0"><TR>  <TD NOWRAP align="left" class="input">CDN RTMP Setting</TD>
          <TD NOWRAP align="right"><A href="javascript://" \
onclick="propView.createSubList()"><IMG src="images/add_g.gif" HSPACE=1 ALT="Add New \
CDN RTMP Setting" BORDER=0></A><A href="javascript://" \
onclick="propView.removeSubList()"><IMG src="images/delete_g.gif" HSPACE=1 \
ALT="Remove Current CDN RTMP Setting" BORDER=0></A><A href="javascript://" \
onclick="propView.copySubList()"><IMG src="images/copy_g.gif" HSPACE=1 ALT="Copy \
Current CDN RTMP Setting" BORDER=0></A></TD>  </TR></TABLE>
          <DIV STYLE="overflow:hidden;"><FONT CLASS="input"><SELECT  \
CLASS="longInput" NAME="theList" SIZE="8" WIDTH="199">  <SCRIPT>
                 if ( isMac && isNav4 )
                 {
                    document.write( "<OPTION>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" );
                 }
              </SCRIPT>
          </SELECT></FONT></DIV>
    </TD>
    <TD class="input" valign="top" width="56%">
        Edit Account Name
        <BR>
        <input CLASS="longInput" MAXLENGTH="255" NAME="theEdit" SIZE="20" TYPE="text" \
VALUE="">

        Enable Uploading to Account
        <BR>
        <select CLASS="input" NAME="EnableUploads" SIZE="1" WIDTH="253">
            <OPTION value="1">Yes</OPTION>
            <OPTION value="0">No</OPTION>
        </SELECT>

        <BR>

		Content Network
		<BR>
		<select CLASS="longInput" NAME="CDNName" SIZE="1" WIDTH="253">
		    <OPTION value="Akamai">Akamai</OPTION>
		</SELECT>

		Primary URL
		<BR>
		<input CLASS="longInput" MAXLENGTH="255" NAME="PrimaryURL" SIZE="20" TYPE="text" \
VALUE="">

		Backup URL
		<BR>
		<input CLASS="longInput" MAXLENGTH="255" NAME="BackupURL" SIZE="20" TYPE="text" \
VALUE="">

		StreanName Extention
		<BR>
		<input CLASS="longInput" MAXLENGTH="255" NAME="StreamNameExt" SIZE="20" TYPE="text" \
VALUE="">

		User Name
		<BR>
		<input CLASS="longInput" MAXLENGTH="255" NAME="UserName" SIZE="20" TYPE="text" \
VALUE="">

		Password
		<BR>
		<input CLASS="longInput" MAXLENGTH="14" NAME="Password" SIZE="20" TYPE="password" \
VALUE="">

		Confirm Password
		<BR>
		<input CLASS="longInput" MAXLENGTH="14" NAME="Password2" SIZE="20" TYPE="password" \
VALUE="">  </TD>
</TR>
<tr </tr>
<tr>
    <TD class="input" valign="top" width="44%">
          <TABLE CLASS="PROPLIST_LABEL" width="199" BORDER="0" CELLSPACING="0" \
CELLPADDING="0"><TR>  <TD NOWRAP align="left" class="input">Source Path Uploaded</TD>
          <TD NOWRAP align="right"><A href="javascript://" onclick="addSource() \
"><IMG src="images/add_g.gif" HSPACE=1 ALT="Add New Source Path Uploaded" \
BORDER=0></A><A href="javascript://" onclick="propView.subView( 'Sources' \
).removeSubList()"><IMG src="images/delete_g.gif" HSPACE=1 ALT="Remove Current Source \
Path Uploaded" BORDER=0></A></TD>  </TR></TABLE>
          <DIV STYLE="overflow:hidden;"><FONT CLASS="input"><SELECT  \
CLASS="longInput" NAME="theSourceList" SIZE="8" WIDTH="199">  <SCRIPT>
                 if ( isMac && isNav4 )
                 {
                    document.write( "<OPTION>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" );
                 }
              </SCRIPT>
          </SELECT></FONT></DIV>
    </TD>
    <TD class="input" valign="top" width="56%">
        Edit Source Path
        <BR>
        <input CLASS="longInput" MAXLENGTH="255" NAME="SourcePath" SIZE="20" \
TYPE="text" VALUE="">

		Enable Path for CDN Upload
		<BR>
		<select CLASS="input" NAME="EnablePathUploads" SIZE="1" WIDTH="253">
		    <OPTION value="1">Yes</OPTION>
		    <OPTION value="0">No</OPTION>
		</SELECT>
    </TD>
</TR>

<SCRIPT>
if ( ! isNav4 )
{
	document.write( '</TABLE><table class="formTable" border="0" cellspacing="0" \
cellpadding="6" width="476">' ); }
else
{
	document.write( "<TR </TR>" );
}
</SCRIPT>
<TR>
   <TD colspan="2" bgcolor="#E6E6E6" valign="middle" align="right">
      <img src="images/spacer.gif"  BORDER="0" HEIGHT="17" HSPACE="0" \
NAME="IMG_DIRTY_APPLY" VSPACE="0" WIDTH="19"><input type="image" \
src="images/apply.gif" alt="Apply changes made to this page" name="Apply changes made \
to this page" value="Apply" border="0">&nbsp;<A HREF="javascript://" \
onclick="window.onLoad();"><img src="images/reset.gif"  ALT="Cancel un-applied \
changes" BORDER="0" HSPACE="0" VSPACE="0"></A>  </TD>
</TR>
</TABLE>
</FORM>
<SCRIPT>
   if ( isMac && isNav4 )
   {
      document.write( '<LAYER ID="MACFIX" BGCOLOR="#FFFFFF" WIDTH="476" HEIGHT="800" \
PAGEX="0" PAGEY="0" STYLE="position:absolute;"></LAYER>' );  }
</SCRIPT>

<DIV ID="DIV_DYNFORM" style="position:absolute;visibility:hidden"></DIV>
</BODY>
</HTML>



_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic