home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 49 / cda49.iso / Share / Multi / MicrosoftWindowsMediaEncoder7 / wmencoder.exe / newsrc.asp < prev    next >
Encoding:
Text File  |  2000-06-12  |  7.6 KB  |  354 lines

  1. <%@ Language=VBScript CODEPAGE=65001 %>
  2.  
  3.  
  4. <HTML>
  5. <HEAD>
  6.  
  7. <meta http-equiv="Content-Language" content="en-us">
  8. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  9. <TITLE>New Source For The Encoder</TITLE>
  10. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
  11. <SCRIPT LANGUAGE=javascript>
  12. <!--
  13.     function AddSource(){
  14.         var Archive
  15.         if (fSrc.tName.value==""){
  16.             alert("Please enter a valid group name")
  17.             return
  18.         }    
  19.         
  20.         var Grp=fSrc.tName.value
  21.         var Vid=fSrc.tVideo.value
  22.         var Aud=fSrc.tAudio.value
  23.         if (fSrc.rRecord.checked==true){
  24.             Archive="Record"
  25.         }
  26.             
  27.         if (fSrc.rPause.checked==true){
  28.             Archive="Pause"
  29.         }    
  30.         
  31.         if (fSrc.rStop.checked==true){
  32.             Archive="Stop"
  33.         }    
  34.         
  35.         window.opener.InsertSrc(Grp,Vid,Aud,Archive)    
  36.         window.close()
  37.     }
  38.     
  39.     function SrcCancel(){
  40.         window.close()
  41.     }
  42.     
  43.     function SlctAudio(){
  44.         fSrc.tAudio.value=fSrc.sAudio.value
  45.     
  46.     }
  47.     function SlctVideo(){
  48.         fSrc.tVideo.value=fSrc.sVideo.value
  49.     }
  50.     function Error_Display(iNum,sDesc){
  51.     if (iNum!=0){
  52.         alert(sDesc)
  53.         }     
  54.  
  55.     }
  56. //-->
  57. </SCRIPT>
  58.  
  59.  
  60.  
  61. </HEAD>
  62. <BODY>
  63.  
  64. <%
  65. on Error Resume Next
  66. set AgentLoc=Session("AgentLocSess")
  67. if Err.number <> 0 then
  68.     ErrorNum=1
  69.     ErrorDesc=Err.description
  70.     Err.Clear
  71. end if
  72. MchName=Session("MchNameSess")
  73. set EncAgent=AgentLoc.GetAgent(MchName)
  74. set Encoder=EncAgent.GetEncoder("EncPrf")
  75. if Err.number <> 0 then
  76.     ErrorNum=1
  77.     ErrorDesc=Err.description
  78.     Err.Clear
  79. end if
  80. dim DeviceInfoMgr
  81. dim I
  82.  
  83. Set DeviceInfoMgr = Encoder.SourcePluginInfoManager
  84. if Err.number <> 0 then
  85.     ErrorNum=1
  86.     ErrorDesc=Err.description
  87.     Err.Clear
  88. end if%>
  89.  
  90.  
  91.  
  92. <FORM id=fSrc>
  93. <P>
  94. <TABLE border=1 cellPadding=1 cellSpacing=1 style="BACKGROUND-COLOR: #d4d0c9; 
  95. HEIGHT: 226px; WIDTH: 525px" width="100%">
  96.   
  97.     <TR>
  98.         <TD>
  99.         Name:
  100.         </TD>
  101.     
  102.         <TD colspan=3><INPUT type="text" id=tName name=tName
  103.             style  ="HEIGHT: 22px; WIDTH: 399px">
  104.         </TD>
  105.     
  106.         
  107.     
  108.     </TR>
  109.     <TR>
  110.         <TD colspan=4>
  111.             Sources and Archive
  112.         </TD>
  113.     
  114.         
  115.     
  116.     </TR>
  117.     
  118.     <TR>
  119.     
  120.         <TD width="20%">  
  121.                 
  122.             Video:
  123.         </TD>
  124.         
  125.         
  126.         <%I = DeviceInfoMgr.Count
  127.         I = I - 1
  128.         do while I>=0
  129.             Set DeviceInfo = DeviceInfoMgr.Item(I)
  130.             if Err.number <> 0 then
  131.                 ErrorNum=1
  132.                 ErrorDesc=Err.description
  133.                 Err.Clear
  134.             end if
  135.             If LCase(DeviceInfo.SchemeType) <> "file" Then
  136.                 AltPath = DeviceInfo.SchemeType
  137.                 AltPath = AltPath & "://"
  138.             
  139.                 If DeviceInfo.MediaType = 2 Then
  140.                     If DeviceInfo.Resources = False Then
  141.                         NameVideo=AltPath & DeviceInfo.Name
  142.                         exit do
  143.                     else
  144.                         J = DeviceInfo.Count
  145.                         J = J - 1
  146.                         AltPath = AltPath & DeviceInfo.Item(J)
  147.                         NameVideo=AltPath
  148.                         exit do
  149.                     end if
  150.                 end if
  151.                 
  152.             end if
  153.             I=I-1    
  154.         loop%>
  155.         
  156.         
  157.         <TD colspan=3>
  158.             <INPUT id=tVideo name=tVideo style="HEIGHT: 22px; WIDTH: 400px" value="<%=NameVideo%>">
  159.             <BR>
  160.             <SELECT id=sVideo name=sVideo 
  161.              style  ="HEIGHT: 22px; WIDTH: 402px" onclick="SlctVideo()">
  162.              <%I = DeviceInfoMgr.Count
  163.              I = I - 1
  164.              While I >= 0
  165.                 Set DeviceInfo = DeviceInfoMgr.Item(I)
  166.                 
  167.                 if Err.number <> 0 then
  168.                     ErrorNum=1
  169.                     ErrorDesc=Err.description
  170.                     Err.Clear
  171.                 end if
  172.                 If LCase(DeviceInfo.SchemeType) <> "file" Then
  173.                     AltPath = DeviceInfo.SchemeType
  174.                     AltPath = AltPath & "://"
  175.                     If DeviceInfo.MediaType = 2 Then
  176.                         If DeviceInfo.Resources = False Then
  177.                             AltPath=AltPath & DeviceInfo.Name
  178.                             if I=DeviceInfoMgr.Count-1 then%> 
  179.                         
  180.                                 <OPTION  selected value="<%=AltPath%>">
  181.                                 <%=AltPath%></OPTION>
  182.                         
  183.                             <%else%>
  184.                         
  185.                                 <OPTION   value="<%=AltPAth%>">
  186.                                 <%=AltPath%></OPTION>
  187.                         
  188.                             <%end if%>    
  189.                     
  190.                     
  191.                         <%else
  192.                             J = DeviceInfo.Count
  193.                             J = J - 1
  194.                             While J >= 0
  195.                                 AltPath="DEVICE://"
  196.                                 AltPath = AltPath & DeviceInfo.Item(J)
  197.                                 if I=DeviceInfoMgr.Count-1 and j=DeviceInfo.Count-1 then%>
  198.                                 
  199.                                     <OPTION  selected value="<%=AltPath%>">
  200.                                     <%=AltPath%></OPTION>
  201.                             
  202.                                 <%else%>
  203.                                 
  204.                                     <OPTION   value="<%=AltPAth%>">
  205.                                     <%=AltPath%></OPTION>
  206.                                 <%end if
  207.                                 J=J-1
  208.                             wend
  209.                         end if
  210.                     end if
  211.                     
  212.                 end if
  213.                 I=I-1        
  214.             wend%>                
  215.             </SELECT>
  216.         </TD>
  217.     
  218.         
  219.     </TR>
  220.     <TR>
  221.         
  222.         <TD>       Audio:
  223.         </TD>
  224.         <%I = DeviceInfoMgr.Count
  225.         I = I - 1
  226.         do while I>=0
  227.             Set DeviceInfo = DeviceInfoMgr.Item(I)
  228.             If LCase(DeviceInfo.SchemeType) <> "file" Then
  229.                 AltPath = DeviceInfo.SchemeType
  230.                 AltPath = AltPath & "://"
  231.                 If DeviceInfo.MediaType = 1 Then
  232.                     If DeviceInfo.Resources = False Then
  233.                         AltPath=AltPath & DeviceInfo.Name
  234.                         NameAudio=AltPath
  235.                         exit do
  236.                     else
  237.                         J = DeviceInfo.Count
  238.                         J = J - 1
  239.                         AltPath = AltPath & DeviceInfo.Item(J)
  240.                         NameAudio=AltPath
  241.                         exit do
  242.                     end if
  243.                 end if
  244.                 
  245.             end if
  246.             I=I-1    
  247.         loop%>
  248.         
  249.         
  250.         <TD colspan=3>
  251.             <INPUT id=tAudio name=tAudio style="HEIGHT: 22px; WIDTH: 402px" value="<%=NameAudio%>">
  252.             <BR>
  253.             <SELECT id=sAudio name=sAudio 
  254.              style  ="HEIGHT: 22px; WIDTH: 402px" onclick="SlctAudio()"> 
  255.             <%I = DeviceInfoMgr.Count
  256.             I = I - 1
  257.             While I >= 0
  258.                 Set DeviceInfo = DeviceInfoMgr.Item(I)
  259.                 If LCase(DeviceInfo.SchemeType) <> "file" Then
  260.                     AltPath = DeviceInfo.SchemeType
  261.                     AltPath = AltPath & "://"
  262.                     If DeviceInfo.MediaType = 1 Then
  263.                         If DeviceInfo.Resources = False Then
  264.                             AltPath=AltPath & DeviceInfo.Name
  265.                             if I=DeviceInfoMgr.Count-1 then%> 
  266.                         
  267.                                 <OPTION  selected value="<%=AltPath%>">
  268.                                 <%=AltPath%></OPTION>
  269.                         
  270.                             <%else%>
  271.                         
  272.                                 <OPTION   value="<%=AltPAth%>">
  273.                                 <%=AltPath%></OPTION>
  274.                         
  275.                             <%end if%>    
  276.                     
  277.                     
  278.                         <%else
  279.                             J = DeviceInfo.Count
  280.                             J = J - 1
  281.                             While J >= 0
  282.                                 AltPath="DEVICE://"
  283.                                 AltPath = AltPath & DeviceInfo.Item(J)
  284.                                 if I=DeviceInfoMgr.Count-1 and j=DeviceInfo.Count-1 then%>
  285.                                 
  286.                                     <OPTION  selected value="<%=AltPath%>">
  287.                                     <%=AltPath%></OPTION>
  288.                             
  289.                                 <%else%>
  290.                                 
  291.                                     <OPTION   value="<%=AltPAth%>">
  292.                                     <%=AltPath%></OPTION>
  293.                                 <%end if
  294.                                 J=J-1
  295.                             wend
  296.                         end if
  297.                     end if
  298.                     
  299.                 end if
  300.                 I=I-1    
  301.             wend%>      
  302.                  
  303.             </SELECT>
  304.             
  305.             
  306.         </TD>
  307.         
  308.         
  309.     
  310.     </TR>
  311.     <TR>
  312.  
  313.         <TD>  Archive:
  314.         </TD>
  315.         
  316.         <TD><INPUT id=rRecord name=rArchive 
  317.       type=radio CHECKED> Record
  318.         </TD>
  319.         
  320.         <TD><INPUT id=rPause name=rArchive 
  321.       type=radio> Pause
  322.         </TD>
  323.         
  324.         <TD><INPUT id=rStop name=rArchive 
  325.     type=radio> Stop
  326.         </TD>
  327.     
  328.     </TR>
  329. </TABLE>
  330. </P>
  331. <P>
  332.  
  333.  
  334.  
  335.  
  336.                                                                              
  337. <INPUT id=bOk name=bOk onclick="AddSource()"
  338.  style="HEIGHT: 29px; WIDTH: 102px" type=button value=Ok>  
  339.  <INPUT id=bCancel name=bCancel style="HEIGHT: 30px; WIDTH: 100px" 
  340.  type=button value=Cancel onclick="SrcCancel()">  </P>
  341. <%if ErrorNum<>0 then%>
  342.     <SCRIPT LANGUAGE=javascript>
  343.         <!--
  344.         Error_Display("<%=ErrorNum%>","<%=ErrorDesc%>")
  345.         //-->
  346.     </SCRIPT>
  347.  
  348.     
  349. <%end if%>
  350.  
  351. </FORM>
  352. </BODY>
  353. </HTML>
  354.