<%@ Language=VBScript CODEPAGE=65001%> New Encoder <% dim ConfigPath dim Name dim PrfName dim Port dim ArchPath dim InDev dim InPath dim AgentLoc dim MchName dim EncAgent dim Bct dim Broadcast dim Bdcst on Error Resume Next if Request.Form("hOpt")=0 then Response.Write("You chose To Cancel The Creation Of The New Encoder") 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 Enc=EncAgent.GetEncoder("EncPrf") set Enc=nothing set Session("EncAppg")=nothing%>

Return To The Statistics Page <%else 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 Enc=EncAgent.GetEncoder("EncPrf") set Enc=nothing set Session("EncAppg")=nothing EncName=Request.Form("tIdentification") set Session(EncName)=EncAgent.CreateEncoder(EncName) if Err.number <> 0 then ErrorNum=1 ErrorDesc=Err.description Err.Clear end if set Encoder=EncAgent.GetEncoder(EncName) PrfName=Request.Form("sProfile") set SrcGrpCol=Encoder.SourceGroupCollection if Err.number <> 0 then ErrorNum=1 ErrorDesc=Err.description Err.Clear end if Group=Request.Form("Group") Video=Request.Form("Video") Audio=Request.Form("Audio") Archive=Request.Form("Archive") Bdcst=Request.Form("cBdcst") FStat=Request.Form("cFile") Port=Request.Form("tPrt") File=Request.Form("tFile") if Bdcst<>0 then set Broadcast=Encoder.Broadcast Broadcast.PortNumber(1)=Port end if if FStat<>0 then set IFile=Encoder.File IFile.LocalFileName=File end if set PrfCol=Encoder.profileCollection if Err.number <> 0 then ErrorNum=1 ErrorDesc=Err.description Err.Clear end if for each Prf in PrfCol if PrfName=Prf.Name then set PrfAdd=Prf exit for end if next while Group <>"" PosGrp=instr(1,Group,";") PosGrp=PosGrp-1 SrcGrp=mid(Group,1,PosGrp) PosGrp=instr(1,Group,";") PosGrp=PosGrp+1 Group=mid(Group,PosGrp) PosVid=instr(1,Video,";") PosVid=PosVid-1 Vid=mid(Video,1,PosVid) PosVid=instr(1,Video,";") PosVid=PosVid+1 Video=mid(Video,PosVid) PosAud=instr(1,Audio,";") PosAud=PosAud-1 Aud=mid(Audio,1,PosAud) PosAud=instr(1,Audio,";") PosAud=PosAud+1 Audio=mid(Audio,PosAud) PosArch=instr(1,Archive,";") PosArch=PosArch-1 Arch=mid(Archive,1,PosArch) PosArch=instr(1,Archive,";") PosArch=PosArch+1 Archive=mid(Archive,PosArch) set SrcGrpAdd=SrcGrpCol.Add(SrcGrp) set AudSrc=SrcGrpAdd.AddSource(1) set VidSrc=SrcGrpAdd.AddSource(2) if instr(UCase(Vid),"DEVICE://")=0 and instr(UCase(Vid),"SCREENCAP:")=0 then Vid="FILE:" & "//" & Vid VidSrc.SetInput Vid else VidSrc.SetInput Vid end if if instr(1,UCase(Aud),"DEVICE://")=0 then Aud="FILE://" & Aud AudSrc.SetInput Aud else AudSrc.SetInput Aud end if If Archive="Record" then SrcGrpAdd.AutoArchive(1)=1 end if If Archive="Pause" then SrcGrpAdd.AutoArchive(1)=3 end if If Archive="Stop" then SrcGrpAdd.AutoArchive(1)=2 end if SrcGrpAdd.Profile=PrfAdd wend Encoder.PrepareToEncode(True) if Err.number <> 0 then ErrorNum=1 ErrorDesc=Err.description Err.Clear end if if ErrorNum<>0 then%> <%else Response.Write("Encoder Sucessfully Created") end if%>

Return To The Statistics Page <%end if%>