home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 November
/
Chip_2002-11_cd1.bin
/
zkuste
/
vbasic
/
Data
/
Utils
/
WME71SDK.exe
/
RCDATA
/
CABINET
/
newencoder.asp
< prev
next >
Wrap
Text File
|
2001-03-15
|
18KB
|
865 lines
<%@ Language=VBScript CODEPAGE=65001 %>
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>New Encoder Input</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<style>
TD.clsEncHead
{
BACKGROUND-COLOR: #6699cc;
BORDER-LEFT: #99ccff 2px outset;
BORDER-RIGHT: #99ccff 2px outset;
BORDER-TOP: #99ccff 2px outset;
COLOR: #ffffff;
FONT-FAMILY: verdana;
FONT-SIZE: xx-small;
FONT-WEIGHT: bold
}
TD.clsEncHead A
{
COLOR: #ffffff;
FONT-SIZE: 95%;
TEXT-DECORATION: none
}
TD.clsTab
{
BACKGROUND-COLOR: #003366;
BORDER-BOTTOM: #99ccff 2px inset;
BORDER-LEFT: #6699cc 1px solid;
BORDER-RIGHT: #6699cc 1px solid;
BORDER-TOP: #003366 2px solid;
CURSOR: hand
}
TD.clsTab A
{
COLOR: #ffffff;
FONT-SIZE: 95%;
TEXT-DECORATION: none
}
TD.clsTab A:hover
{
COLOR: #ffffff;
FONT-SIZE: 95%;
TEXT-DECORATION: none
}
TD.clsTab A:active
{
COLOR: #ffffff;
FONT-SIZE: 95%;
TEXT-DECORATION: none
}
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function fnTabClick( nTab )
{
nTab = parseInt(nTab);
var oTab;
var prevTab = nTab-1;
var nextTab = nTab+1;
event.cancelBubble = true;
el = event.srcElement;
for (var i = 0; i < NewEnc.length; i++)
{
oTab = tabs[i];
oTab.className = "clsTab";
oTab.style.borderLeftStyle = "";
oTab.style.borderRightStyle = "";
NewEnc[i].style.display = "none";
}
NewEnc[nTab].style.display = "block";
tabs[nTab].className = "clsEncHead";
oTab = tabs[nextTab];
if (oTab) oTab.style.borderLeftStyle = "none";
oTab = tabs[prevTab];
if (oTab) oTab.style.borderRightStyle = "none";
event.returnValue = false;
}
function removeRow() {
var r, p, nr;
var Grp,Aud,Vid,Archive
if (lastSelection == null)
return false;
r = lastSelection;
if (r.tagName == "TD") {
if (r.innerText=="Group" || r.innerText=="Video" || r.innerText=="Audio" || r.innerText=="Archive"){
return false;
}
r = r.parentElement;
}
var head= r.innerHTML
var headFind="Group"
var pos=head.indexOf(headFind)
if (pos !=-1){
return false
}
p = r.parentElement;
p.removeChild(r);
lastSelection = null;
head=head.substring(4,head.length-1)
Grp=head.substring(0,head.indexOf("<"))
head=head.substring(head.indexOf("<") + 11,head.length-1)
Vid=head.substring(0,head.indexOf("<"))
head=head.substring(head.indexOf("<") + 11,head.length-1)
Aud=head.substring(0,head.indexOf("<"))
head=head.substring(head.indexOf("<") + 11,head.length-1)
Archive=head.substring(0,head.indexOf("<"))
//head=head.substring(head.indexOf("<") + 11,head.length-1)
GroupString=NewEncoder.Group.value
VideoString=NewEncoder.Video.value
AudioString=NewEncoder.Audio.value
ArchiveString=NewEncoder.Archive.value
PreString=GroupString.substring(0,GroupString.indexOf(Grp))
GroupString=GroupString.substring(GroupString.indexOf(Grp),GroupString.length)
GroupString=GroupString.substring(GroupString.indexOf(";")+1,GroupString.length)
GroupString=PreString+GroupString
NewEncoder.Group.value=GroupString
PreString=VideoString.substring(0,VideoString.indexOf(Grp))
VideoString=VideoString.substring(VideoString.indexOf(Grp),VideoString.length)
VideoString=VideoString.substring(VideoString.indexOf(";")+1,VideoString.length)
VideoString=PreString+VideoString
NewEncoder.Video.value=VideoString
PreString=AudioString.substring(0,AudioString.indexOf(Grp))
AudioString=AudioString.substring(AudioString.indexOf(Grp),AudioString.length)
AudioString=AudioString.substring(AudioString.indexOf(";")+1,AudioString.length)
AudioString=PreString+AudioString
NewEncoder.Audio.value=AudioString
PreString=ArchiveString.substring(0,ArchiveString.indexOf(Grp))
ArchiveString=ArchiveString.substring(ArchiveString.indexOf(Grp),ArchiveString.length)
ArchiveString=ArchiveString.substring(ArchiveString.indexOf(";")+1,ArchiveString.length)
ArchiveString=PreString+ArchiveString
NewEncoder.Archive.value=ArchiveString
return r;
}
function select(element) {
var e, r, c;
if (element == null) {
e = window.event.srcElement;
} else {
e = element;
}
//if ((window.event.altKey) || (e.tagName == "TR")) {
r = findRow(e);
if (r != null) {
if (lastSelection != null) {
deselectRowOrCell(lastSelection);
}
selectRowOrCell(r);
lastSelection = r;
}
}
function deselectRowOrCell(r) {
r.runtimeStyle.backgroundColor = "";
r.runtimeStyle.color = "";
//r.runtimeStyle.fontFamily = "Verdana";
}
function selectRowOrCell(r) {
r.runtimeStyle.backgroundColor = "darkblue";
r.runtimeStyle.color = "white";
//r.runtimeStyle.fontFamily = "Verdana";
}
function cancelSelect() {
if (window.event.srcElement.tagName != "BODY")
return;
if (lastSelection != null) {
deselectRowOrCell(lastSelection);
lastSelection = null;
}
}
//document.onclick = cancelSelect;
function findRow(e) {
if (e.tagName == "TR") {
return e;
} else if (e.tagName == "BODY") {
return null;
} else {
return findRow(e.parentElement);
}
}
function addCell(Group,Video,Audio,Archive) {
var r, p, c, nc, text;
if (lastSelection == null)
return false;
r = lastSelection;
if (r.tagName == "TD") {
r = r.parentElement;
c = lastSelection;
} else {
c = null;
}
nc = document.createElement("TD");
text = document.createTextNode(Group);
nc.appendChild(text, null);
r.appendChild(nc, c);
nc = document.createElement("TD");
text = document.createTextNode(Video);
nc.appendChild(text, null);
r.appendChild(nc, c);
nc = document.createElement("TD");
text = document.createTextNode(Audio);
nc.appendChild(text, null);
r.appendChild(nc, c);
nc = document.createElement("TD");
text = document.createTextNode(Archive);
nc.appendChild(text, null);
r.appendChild(nc, c);
select(nc);
return nc;
}
function NewSrc(){
window.open("NewSrc.asp","newwin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=570,height=295")
}
var lastSelection
function InsertSrc(Group,Video,Audio,Archive){
var r, p, nr;
if (lastSelection == null) {
r = null;
p = Sources.children[0];
}
else {
r = lastSelection;
if (r.tagName == "TD") {
r = r.parentElement;
}
p = r.parentElement;
}
nr = document.createElement("TR");
p.appendChild(nr, r);
select(nr);
addCell(Group,Video,Audio,Archive);
ExistGroup=NewEncoder.Group.value
ExistVideo=NewEncoder.Video.value
ExistAudio=NewEncoder.Audio.value
ExistArchive=NewEncoder.Archive.value
ExistGroup= ExistGroup + Group + ";"
ExistVideo=ExistVideo + Video + ";"
ExistAudio=ExistAudio + Audio + ";"
ExistArchive=ExistArchive + Archive + ";"
NewEncoder.Group.value=ExistGroup
NewEncoder.Video.value=ExistVideo
NewEncoder.Audio.value=ExistAudio
NewEncoder.Archive.value=ExistArchive
return nr;
}
function FileSlct() {
if(NewEncoder.cFile.checked==true){
NewEncoder.cFile.value=1
NewEncoder.tFile.disabled=false
NewEncoder.tFile.style.backgroundColor="white"
}
else{
NewEncoder.cFile.value=0
NewEncoder.tFile.disabled=true
NewEncoder.tFile.style.backgroundColor="#a9a9a9"
}
}
function Brdcst(){
if(NewEncoder.cBdcst.checked==true){
NewEncoder.cBdcst.value=1
NewEncoder.tPrt.disabled=false
NewEncoder.tPrt.style.backgroundColor="white"
}
else{
NewEncoder.cBdcst.value=0
NewEncoder.tPrt.disabled=true
NewEncoder.tPrt.style.backgroundColor="#a9a9a9"
}
}
function CreateNew(){
if (NewEncoder.cBdcst.checked==false && NewEncoder.cFile.checked==false){
alert("Please enter either a broadcast port and/or archive path on the output tab")
return
}
if (NewEncoder.cBdcst.checked==true && NewEncoder.tPrt.value==""){
alert("please enter a broadcast port")
return
}
if (NewEncoder.cFile.checked==true && NewEncoder.tFile.value==""){
alert("please enter a Archive path")
return
}
if (NewEncoder.tIdentification.value=="" ){
alert("Please enter a name for the Encoder on the Name Tab. This name cannot be blank and must be unique on the remote machine.")
return
}
NewEncoder.hOpt.value=1
NewEncoder.submit()
}
function CrtCancel(){
NewEncoder.hOpt.value=0
NewEncoder.submit()
}
function Error_Display(iNum,sDesc){
if (iNum!=0){
alert(sDesc)
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<%dim AgentLoc
dim Encoder
dim MchName
dim PrfCol
on Error Resume Next
set AgentLoc=Session("AgentLocSess")
if Err.number <> 0 then
ErrorNum=1
ErrorDesc=Err.description
Err.Clear
end if
MchName=Session("MchNameSess")
set EncAgent=AgentLoc.GetAgent(MchName)
if Err.number <> 0 then
ErrorNum=1
ErrorDesc=Err.description
Err.Clear
end if
set EncApp=EncAgent.CreateEncoder("EncPrf")
set Session("EncAppG")=EncApp
set Encoder=EncAgent.GetEncoder("EncPrf")
set PrfCol=Encoder.ProfileCollection
if Err.number <> 0 then
ErrorNum=1
ErrorDesc=Err.description
Err.Clear
end if%>
<FORM id=NewEncoder action=CrtNewEncoder.asp method=post>
<P>
<TABLE align=left bgColor=#d4d0c9 border=1 cellPadding=1 cellSpacing=1
width="100%">
<TR>
<TD colspan=5>
<TABLE>
<TR>
<TD class="clsEncHead" id="tabs"
onclick="fnTabClick('0');" width="20%" align=middle>
<A href="javascript.void()"
onclick="fnTabClick('0');">Name</A>
</TD>
<TD class="clsTab" id="tabs"
onclick="fnTabClick('1');" width="20%" align=middle>
<A href="javascript.void()"
onclick="fnTabClick('1');">Sources</A>
</TD>
<TD class="clsTab" id="tabs"
onclick="fnTabClick('2');" width="20%" align=middle>
<A href="javascript.void()"
onclick="fnTabClick('2');">Display Information </A>
</TD>
<TD class="clsTab" id="tabs"
onclick="fnTabClick('3');" width="20%" align=middle>
<A href="javascript.void()"
onclick="fnTabClick('3');">Profile</A>
</TD>
<TD class="clsTab" id="tabs"
onclick="fnTabClick('4');" width="20%" align=middle>
<A href="javascript.void()"
onclick="fnTabClick('4');">Output</A>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD colspan=5>
<TABLE border=1 cellPadding=1 cellSpacing=1 width="100%" id="NewEnc" style="DISPLAY: block; HEIGHT: 143px; WIDTH: 584px">
<TR>
<TD> </TD></TR>
<TR>
<TD> Identification name of this encoder:</TD></TR>
<TR>
<TD> <INPUT
id=tIdentification name=tIdentification
style="HEIGHT: 22px; WIDTH: 531px"></TD></TR></TABLE>
</TD>
</TR>
<TR>
<TD colspan=5>
<TABLE border=1 cellPadding=1 cellSpacing=1 width="100%" id="NewEnc" style="DISPLAY:none; HEIGHT: 295px; WIDTH: 582px">
<TR>
<TD>
<P>Setup source groups For the session note that
all the source groups in a session
must
have the same set of source types</P>
</TD>
</TR>
<TR>
<TD>
<div id=TableContainer>
<TABLE bgColor=white
width="100%" id=Sources>
<TR bgcolor=#d4d0c9>
<TD>
Group
</TD>
<TD>
Video
</TD>
<TD>
Audio
</TD>
<TD>
Archive
</TD>
</TR>
<TR>
<TD>
</TD>
<TD>
</TD>
<TD>
</TD>
<TD>
</TD>
</TR>
</TABLE>
</div>
<SCRIPT LANGUAGE=javascript>
<!--
TableContainer.onclick = select;
//-->
</SCRIPT>
</TD>
</TR>
<TR>
<TD> <INPUT id=bNew name=bNew
style="HEIGHT: 24px; WIDTH: 88px"
type=button value=New... onclick="NewSrc()">
<INPUT id=bRemove name=bRemove
style="HEIGHT: 24px; WIDTH: 88px"
type=button value=Remove onclick="removeRow()">
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD colspan=5>
<TABLE border=1 cellPadding=1 cellSpacing=1 width="100%" id="NewEnc" style="DISPLAY: none">
<TR>
<TD colspan=2>
Type display information to be
included in the encode output.This information
will
be shown in the Windows Media Player
</TD>
</TR>
<TR>
<TD>
Tiltle:
</TD>
<TD><INPUT id=tTitle name=tTitle
style ="HEIGHT: 22px; WIDTH: 493px">
</TD>
</TR>
<TR>
<TD>
Author:
</TD>
<TD><INPUT id=tAuthor name=tAuthor
style ="HEIGHT: 22px; WIDTH: 493px">
</TD>
</TR>
<TR>
<TD>
Copyright:
</TD>
<TD><INPUT id=tCopyright name=tCopyright
style ="HEIGHT: 22px; WIDTH: 492px">
</TD>
</TR>
<TR>
<TD>
Rating:
</TD>
<TD><INPUT id=tRating name=text4
style ="HEIGHT: 22px; WIDTH: 492px">
</TD>
</TR>
<TR>
<TD>
Description:
</TD>
<TD><TEXTAREA id=taDescription name=taDescription style="HEIGHT: 117px; WIDTH: 493px"></TEXTAREA>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD colspan=5>
<TABLE border=1 cellPadding=1 cellSpacing=1 width="100%" style="DISPLAY: none; HEIGHT: 107px; WIDTH: 576px" id="NewEnc">
<TR>
<TD colspan=2>
Select a profile that best
describes the content you are encoding
</TD>
</TR>
<TR>
<TD>
Profile:
</TD>
<TD><SELECT id=sProfile name=sProfile
style ="HEIGHT: 22px; WIDTH: 512px" >
<%for each Prf in PrfCol%>
<OPTION><%=Prf.Name%></OPTION>
<%next%>
</SELECT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD colspan=5>
<TABLE border=1 cellPadding=1 cellSpacing=1 width="100%" id="NewEnc" style="DISPLAY: none; HEIGHT: 218px; WIDTH: 583px">
<TR>
<TD colspan=2>
Select how would you like the
encoded output distributed.You can either
broadcast
it or store it in a file
</TD>
</TR>
<TR>
<TD colspan=2><INPUT id=cBdcst name=cBdcst
type=checkbox CHECKED onclick="Brdcst()" value=1> Broadcast encoded output
</TD>
</TR>
<TR>
<TD width="30%"> Use
HTTP Port :
</TD>
<TD width="70%"><INPUT id=tPrt name=tPrt
style ="HEIGHT: 22px; WIDTH: 52px" value=8080>
</TD>
</TR>
<TR>
<TD colspan=2>
<INPUT id=cFile name=cFile
type=checkbox onclick="FileSlct()" value=0> Archive to file:
</TD>
</TR>
<TR>
<TD colspan=2>
<INPUT id=tFile
name=tFile style ="BACKGROUND-COLOR: #a9a9a9; HEIGHT: 22px; WIDTH: 531px"
disabled>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<tr>
<td>
<INPUT id=bOk name=bOk style="HEIGHT: 24px; WIDTH: 89px"
type=button value=Ok onclick="CreateNew()">
<INPUT id=bCancel name=bCancel style="HEIGHT: 24px; WIDTH: 91px"
type=button value=Cancel onclick="CrtCancel()">
</td>
</tr>
</TABLE>
</P>
<INPUT type="hidden" id=Group name=Group>
<INPUT type="hidden" id=Video name=Video>
<INPUT type="hidden" id=Audio name=Audio>
<INPUT type="hidden" id=Archive name=Archive>
<INPUT type="hidden" id=hOpt name=hOpt>
<INPUT type="hidden" id=hBroadcast name=hBroadcast>
<INPUT type="hidden" id=hFile name=hFile>
<%if ErrorNum<>0 then%>
<SCRIPT LANGUAGE=javascript>
<!--
Error_Display("<%=ErrorNum%>","<%=ErrorDesc%>")
//-->
</SCRIPT>
<%end if%>
</FORM>
</BODY>
</HTML>