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

List:       helix-server-cvs
Subject:    [Server-cvs] admin/web/build/server config_drm.html, 1.1.2.3, 1.1.2.4
From:       packard () helixcommunity ! org
Date:       2012-05-22 6:00:50
[Download RAW message or body]

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


Modified Files:
      Tag: SERVER_14_3_VERIMETRIX_HLS_LR
	config_drm.html 
Log Message:
Synopsis
========
DRM HLS LR implementation, version 3(new feature added)
Branches: SERVER_14_3_VERIMETRIX_HLS_LR 

reviewed by: Xiaocheng Li


Description
===========
I.
Now there are two resource-id ranges, one for vod, one live.
Besides, user could set different section.
<List Name="Verimatrix_DRM">
    <Var KeyServerAddr="74.62.179.10"/>
    <Var KeyServerPort="12684"/>
    <Var EnableKeyServerSSL="0"/>
    <Var KeyServerRequestTimeout="10"/>
    <Var VodConfigSavePath="d:\Program Files\Real\Helix Server143lr2\vmx.dat"/>  #vod \
map file in disk, this file is loaded in startup time, and updated when mapping is \
changed.  <Var EnableRandomKeyWhenFail="1"/>
    <List Name="HLS_DRM">
        <List Name="DRM Setting1">  #section 
            <Var defaultKeyCount="10"/>
            <Var LiveResourceIDRange="20000-21000"/>
            <Var OndemandResourceIDRange="22000-22008"/>
        </List>
        <List Name="DRM Setting2">  #section 
            <Var defaultKeyCount="10"/>
            <Var LiveResourceIDRange="30000-31000"/>   #new range name for live
            <Var OndemandResourceIDRange="32000-32008"/> #new range name for vod
        </List>
    </List>
</List>

II. API
1.	Get all map info
http://localhost:8009/__drm/?method=getall

server returns
if success,
<?xml version="1.0" encoding="UTF-8"?>
<Items>
<Item ID="22000">/iPhone-src/3.mp4</Item>
<Item ID="22001">/iPhone-src/2.mp4</Item>
</Items>
Else
Return http 400 error

2.	Get one map info for a certain resource-id
http://localhost:8009/__drm/?method=getone&r=resource-id
eg. http://localhost:8009/__drm/?method=getone&r=20000

server returns
if success,
<?xml version="1.0" encoding="UTF-8"?>
<Items>
<Item ID="22000">/iPhone-src/3.mp4</Item>
</Items>
Else
Return http 400 error


3.	Delete one map info for a certain resource-id
http://localhost:8009/__drm/?method=delone&r=resource-id
eg. http://localhost:8009/__drm/?method=delone&r=20000

if success,
return OK
else
return FAIL

III.
License file update.
use the following setting,
    <List Name="DRM">
        <List Name="RNBA">
            <List Name="MimeTypes">
                <List Name="Default">
                    <Var Name="Enabled" Value="True"/>
                </List>
            </List>
        </List>
		<Var Name="VCASSupport" Value="True"/>
    </List>

Files Affected
==============
include/defslice.h
include/hxiids.h
engine/core/core_proc.cpp
engine/core/pub/proc_container.h
engine/core/proc_container.cpp
engine/core/server_context.cpp
common/util/drmpathmap.cpp
common/util/drmutil.cpp
common/util/pub/drmpathmap.h
common/util/pub/drmutil.h
common/util/pub/mpeg2ts_config_names.h
datatype/mpeg2ts/pub/streamhandler.h
datatype/mpeg2ts/streamhandler.cpp
server-restricted/installer/server/retailservinst.cpp
server-restricted/protocol/http-ctrl/ssplgethandler.cpp
server-restricted/protocol/http-ctrl/Umakefil

Testing Performed
=================
Test with Helix Server and iPhone

Index: config_drm.html
===================================================================
RCS file: /cvsroot/server/admin/web/build/server/Attic/config_drm.html,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- config_drm.html	16 May 2012 14:24:08 -0000	1.1.2.3
+++ config_drm.html	22 May 2012 06:00:47 -0000	1.1.2.4
@@ -47,7 +47,9 @@
 
 [
 
-	new PropObj( 'ResourceIDRange', "", false, true,  null, null, "hostname", "Resource \
ID Range" ), +	new PropObj( 'LiveResourceIDRange', "", false, true,  null, null, \
"hostname", "Resource ID Range" ), +
+	new PropObj( 'OndemandResourceIDRange', "", false, true,  null, null, "hostname", \
"Resource ID Range" ),  
 	new PropObj( 'defaultKeyCount', "10", false, true,  null, null, "int", "default Key \
Count" ),  
@@ -101,43 +103,81 @@
 
 {
 
-	if ( ! checkPort( getCtrlValue( theForm.Range0 ), 
+	if ( ! checkLivePort( getCtrlValue( theForm.LRange0 ), 
 
-					  getCtrlValue( theForm.Range1 ) ) )
+					  getCtrlValue( theForm.LRange1 ) ) )
 
 		return false ;
 
-	setCtrlValue( theForm.ResourceIDRange, 
+	if ( ! checkVodPort( getCtrlValue( theForm.VRange0 ), 
 
-		( ("" == getCtrlValue( theForm.Range0 )) ? "" :
+					  getCtrlValue( theForm.VRange1 ) ) )
 
-			getCtrlValue( theForm.Range0 ) + "-" + 
+		return false ;
 
-			getCtrlValue( theForm.Range1 ) ) );
+	setCtrlValue( theForm.LiveResourceIDRange, 
+
+		( ("" == getCtrlValue( theForm.LRange0 )) ? "" :
+
+			getCtrlValue( theForm.LRange0 ) + "-" + 
+
+			getCtrlValue( theForm.LRange1 ) ) );
+
+	setCtrlValue( theForm.OndemandResourceIDRange, 
+
+		( ("" == getCtrlValue( theForm.VRange0 )) ? "" :
+
+			getCtrlValue( theForm.VRange0 ) + "-" + 
+
+			getCtrlValue( theForm.VRange1 ) ) );
 
 	return true;
 
 }
 
-function checkPort ( port1, port2 )
+function checkLivePort ( port1, port2 )
 
 {
 
 	if ( ! (port1 && port2) )
 
-		return rejectInput( theForm.Range0, "A Resource Range is required." );
+		return rejectInput( theForm.LRange0, "A Live Resource Range is required." );
 
 	if ( ! propList.port_validate( port1 ) )
 
-		return rejectInput( theForm.Range0, propList.errMsg );
+		return rejectInput( theForm.LRange0, propList.errMsg );
 
 	if ( ! propList.port_validate( port2 ) )
 
-		return rejectInput( theForm.Range1, propList.errMsg );
+		return rejectInput( theForm.LRange1, propList.errMsg );
 
 	if ( parseInt( port1 ) >= parseInt( port2 ) )
 
-		return rejectInput( theForm.Range0, "Invalid Resource Range." );
+		return rejectInput( theForm.LRange0, "Invalid Live Resource Range." );
+
+	return true ;
+
+}
+
+function checkVodPort ( port1, port2 )
+
+{
+
+	if ( ! (port1 && port2) )
+
+		return rejectInput( theForm.VRange0, "A Ondemand Resource Range is required." );
+
+	if ( ! propList.port_validate( port1 ) )
+
+		return rejectInput( theForm.VRange0, propList.errMsg );
+
+	if ( ! propList.port_validate( port2 ) )
+
+		return rejectInput( theForm.VRange1, propList.errMsg );
+
+	if ( parseInt( port1 ) >= parseInt( port2 ) )
+
+		return rejectInput( theForm.VRange0, "Invalid Ondemand Resource Range." );
 
 	return true ;
 
@@ -217,11 +257,17 @@
 
 	// fillForm isn't recursive - have to do it for sublists
 
-    var aTemp = getCtrlValue( theForm.ResourceIDRange ).split( /\s*-\s*/ );	
+    var aTemp = getCtrlValue( theForm.LiveResourceIDRange ).split( /\s*-\s*/ );	
 
-    setCtrlValue( theForm.Range0, (aTemp[0] ? aTemp[0] : ""), true );
+    setCtrlValue( theForm.LRange0, (aTemp[0] ? aTemp[0] : ""), true );
 
-    setCtrlValue( theForm.Range1, (aTemp[1] ? aTemp[1] : ""), true );
+    setCtrlValue( theForm.LRange1, (aTemp[1] ? aTemp[1] : ""), true );
+
+	var aTemp = getCtrlValue( theForm.OndemandResourceIDRange ).split( /\s*-\s*/ );	
+
+    setCtrlValue( theForm.VRange0, (aTemp[0] ? aTemp[0] : ""), true );
+
+    setCtrlValue( theForm.VRange1, (aTemp[1] ? aTemp[1] : ""), true );
 
     return true;
 
@@ -286,7 +332,9 @@
    name="theForm"
 >
 
-<input type="hidden" name="ResourceIDRange" value="">
+<input type="hidden" name="LiveResourceIDRange" value="">
+
+<input type="hidden" name="OndemandResourceIDRange" value="">
 <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>DRM Setting</TD> @@ -363,9 \
+411,15 @@  
 		<BR>
 
-		Resouce ID Range
+		Live Resouce ID Range
 		<BR>
-		<input type="text" class="input" name="Range0" size="15" >&nbsp;to&nbsp;<input \
type="text" class="input" name="Range1" size="15" > +		<input type="text" \
class="input" name="LRange0" size="15" >&nbsp;to&nbsp;<input type="text" \
class="input" name="LRange1" size="15" > +
+		<BR>
+
+		Ondemand Resouce ID Range
+		<BR>
+		<input type="text" class="input" name="VRange0" size="15" >&nbsp;to&nbsp;<input \
type="text" class="input" name="VRange1" size="15" >  
 		<BR>
 


_______________________________________________
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