<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE window SYSTEM "chrome://transerver/locale/transerver.dtd">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/MediaCoderPrefs/node[@key='videoenc']/node[@key='x264']">
<window xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        flex="1"
        >
    <label style="font-weight:bold">X264 Encoder</label>
<grid flex="1">
    <columns>
        <column/><column/>
        <column/>
        <column/><column/>
    </columns>
    <rows >
        <row align="center">
            <label>&pref.xsl.profile;</label>
            <menulist flex="false" oncommand="OnMenuChange2(this,'videoenc.x264.profile')">
                <menupopup>
                    <xsl:for-each select="./node[@key='profile']/enum">
                    <menuitem>
                        <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
                        <xsl:if test=".=../value"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
                    </menuitem>
                    </xsl:for-each>
                </menupopup>
            </menulist>
            <spacer width="30"/>
            <label>&pref.xsl.x264.level;</label>
            <textbox onchange="OnTextboxChange2(this,'videoenc.x264.level');" size="8" type="number" max="51" min="0">
                <xsl:attribute name="value"><xsl:value-of select="./node[@key='level']/value"/></xsl:attribute>
            </textbox>
        </row>
        <row align="center">
            <label>&pref.xsl.preset;</label>
             <menulist flex="false" oncommand="OnMenuChange2(this,'videoenc.x264.preset')">
                <menupopup>
                    <xsl:for-each select="./node[@key='preset']/enum">
                    <menuitem>
                        <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
                        <xsl:if test=".=../value"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
                    </menuitem>
                    </xsl:for-each>
                </menupopup>
            </menulist>
             <spacer/>
             <label>&pref.xsl.x264.bframe;</label>
            <textbox onchange="OnTextboxChange2(this,'videoenc.x264.bframes');" size="8" type="number" max="16" min="0">
                <xsl:attribute name="value"><xsl:value-of select="./node[@key='bframes']/value"/></xsl:attribute>
            </textbox>
        </row>
        <row align="center">
             <label>&pref.xsl.x264.tune;</label>
             <menulist flex="false" oncommand="OnMenuChange2(this,'videoenc.x264.tune')">
                <menupopup>
                    <xsl:for-each select="./node[@key='tune']/enum">
                    <menuitem>
                        <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
                        <xsl:if test=".=../value"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
                    </menuitem>
                    </xsl:for-each>
                </menupopup>
            </menulist>
             <spacer/>
             <label>&pref.xsl.x264.frameref;</label>
              <textbox onchange="OnTextboxChange2(this,'videoenc.x264.frameref');" size="8" type="number" max="16" min="0">
                <xsl:attribute name="value"><xsl:value-of select="./node[@key='frameref']/value"/></xsl:attribute>
            </textbox>
        </row>
        <row align="center">
            <label>&pref.xsl.x264.me;</label>
            <menulist flex="false" oncommand="OnMenuChange2(this,'videoenc.x264.me')">
                <menupopup>
                    <xsl:for-each select="./node[@key='me']/enum">
                    <menuitem>
                        <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
                        <xsl:if test=".=../value"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
                    </menuitem>
                    </xsl:for-each>
                </menupopup>
            </menulist>
            <spacer/>
            <label>&pref.xsl.x264.subq;</label>
             <textbox onchange="OnTextboxChange2(this,'videoenc.x264.subq');" size="8" type="number" max="10" min="0">
                <xsl:attribute name="value"><xsl:value-of select="./node[@key='subq']/value"/></xsl:attribute>
            </textbox>
        </row>
        <row align="center">
            <label>&pref.xsl.x264.merange;</label>
             <textbox onchange="OnTextboxChange2(this,'videoenc.x264.me_range');" size="8" type="number" max="64" min="4">
                <xsl:attribute name="value"><xsl:value-of select="./node[@key='me_range']/value"/></xsl:attribute>
            </textbox>
             <spacer/>
             <button label="&pref.xsl.btn.tree;" oncommand="OnOpenAdvancedSplitter('adv_splitter')"></button>
        </row>
     </rows>
    </grid> 
</window>
</xsl:template>
</xsl:stylesheet>