<?xml version="1.0" encoding="utf-8"?><!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  <xsl:include href="../_include/extbase.xsl"/>
  <xsl:template match="/extension">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title><xsl:value-of select="name"/></title>
	<link rel="stylesheet" href="../_css/style.css"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <xsl:call-template name="InitExtension"/>
	<script language="javascript">
	var aspect = 0;
	function onElementChange(id,value)
	{
		if (id == "aspect") {
			if (value == "4:3") {
				document.getElementById("wide").style.display="none";
				document.getElementById("square").style.display="block";
				aspect = 1;
			} else {
				document.getElementById("wide").style.display="block";
				document.getElementById("square").style.display="none";
				aspect = 0;
			}
		}
	}
	</script>
    </head>
    <body class="extension" onunload="StopPlay()" background="/img/back.png">
    <table width="214" border="0">
      <tr>
        <td><div align="center">
            <div>
              <h2>PVR/DVP Transcoder</h2>
              <img src="pvr.png" width="159" height="57" />
            </div>
            </div>
          <table width="100%" border="0">
            <tr>
              <td height="30"><p>Screen Aspect :</p></td>
              <td><xsl:call-template name="AddElement">
                <xsl:with-param name="element" select="elements/element[@id='aspect']"/>
				<xsl:with-param name="option" select="elements/element[@id='aspect']/option[1]"/>
                </xsl:call-template>
				<xsl:call-template name="AddElement">
                <xsl:with-param name="element" select="elements/element[@id='aspect']"/>
				<xsl:with-param name="option" select="elements/element[@id='aspect']/option[2]"/>
                </xsl:call-template>              </td>
            </tr>
            <tr>
              <td height="30"><p>Crop Method:</p></td><td>
                  <xsl:call-template name="AddElement">
                    <xsl:with-param name="element" select="elements/element[@id='crop']"/>
                </xsl:call-template>
              </td>
            </tr>
            <tr>
              <td width="80" height="30"><p>Video:</p></td>
              <td width="109"><xsl:call-template name="AddElement"><xsl:with-param name="element" select="elements/element[@id='video']"/></xsl:call-template></td>
            </tr>
            <tr>
              <td height="30">Resolution:</td>
              <td><xsl:call-template name="AddElement"><xsl:with-param name="element" select="elements/element[@id='res']"/></xsl:call-template></td>
            </tr>
            <tr>
              <td height="30">Frame rate:</td>
              <td><xsl:call-template name="AddElement"><xsl:with-param name="element" select="elements/element[@id='fps']"/></xsl:call-template> FPS </td>
            </tr>
            <tr>
              <td height="30"> Video Bitrate:</td>
              <td><xsl:call-template name="AddElement"><xsl:with-param name="element" select="elements/element[@id='bitrate']"/></xsl:call-template> KBps </td>
            </tr>
            <tr>
              <td height="30">Audio Quality :</td>
              <td><xsl:call-template name="AddElement"><xsl:with-param name="element" select="elements/element[@id='aq']"/></xsl:call-template></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
	<p align="center">
	  <label>
	  <input id="file" type="file" name="file" size="24"/>
	  <input name="button3" type="button" style="width: 64px" onclick="AddFile(document.getElementById('file').value)" value="Add File" />
	  </label>
	  <input name="button" type="button" style="width: 64px" onclick="PlayVideo(aspect ? sqrlcd() : widelcd())" value="Play" />
	  <input name="button2" type="button" style="width: 64px" onclick="PlayConvertedVideo(aspect ? sqrlcd() : widelcd())" value="Preview" />
	  <input name="button2" type="button" style="width: 64px" onclick="SendCommand('seek +10')" value="Skip 10s" />
	  <input name="button2" type="button" style="width: 64px" onclick="SendCommand('set_time')" value="SetTime" />
	  <input name="button2" type="button" style="width: 64px" onclick="SendCommand('transcode')" value="Start" />
    </p>
	<div id="wide">
    <div style="position:absolute; left: 235px; top: 5px"> <img src="tvwide.png" /> </div>
    <embed id="widelcd" type="application/x-mediacoder-scriptable-plugin" style="position:absolute; left: 263px; top: 28px; width: 385px; height: 216px;"></embed>
	</div>
	<div id="square" style="display:none">
    <div style="position:absolute; left: 230px; top: 15px"> <img src="tvsquare.png" /> </div>
    <embed id="sqrlcd" type="application/x-mediacoder-scriptable-plugin" style="position:absolute; left: 300px; top: 38px; width: 320px; height: 240px;"></embed>
	</div>
    </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
