diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-01-01 13:28:06 +0200 |
---|---|---|
committer | Miika Turkia <miika.turkia@gmail.com> | 2017-01-01 13:28:06 +0200 |
commit | 9b9d065447cb531b6c144faa7086f1515bf98b9f (patch) | |
tree | 8b3e6388b4745b6b8d973a2ff4342427da18d7f4 /xslt | |
parent | f28280db999d07ba7e2e736cd1f4b03576e08fc7 (diff) | |
download | subsurface-9b9d065447cb531b6c144faa7086f1515bf98b9f.tar.gz |
AV1 import: grab NDL info
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/av1.xslt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/xslt/av1.xslt b/xslt/av1.xslt index bcd558628..9fb9adee5 100644 --- a/xslt/av1.xslt +++ b/xslt/av1.xslt @@ -63,6 +63,12 @@ <xsl:with-param name="remaining" select="substring-after($remaining, $lf)"/> </xsl:call-template> </xsl:if> + <xsl:if test="$remaining != ''"> + <xsl:call-template name="findNDL"> + <xsl:with-param name="line" select="substring-before($remaining, $lf)"/> + <xsl:with-param name="remaining" select="substring-after($remaining, $lf)"/> + </xsl:call-template> + </xsl:if> </sample> </xsl:when> <xsl:otherwise> @@ -139,4 +145,33 @@ </xsl:if> </xsl:template> + <xsl:template name="findNDL"> + <xsl:param name="line"/> + <xsl:param name="remaining"/> + + <xsl:if test="string(number(substring($line, 1, 1))) = 'NaN'"> + <xsl:choose> + <xsl:when test="substring-before($line, '=') = 'NDL'"> + <xsl:if test="substring-after($line, '= -') = ''"> + <xsl:variable name="value"> + <xsl:value-of select="substring-after($line, '= ')"/> + </xsl:variable> + <xsl:attribute name="ndl"> + <xsl:value-of select="concat(floor($value div 60), ':', format-number($value mod 60, '00'), ' min')"/> + </xsl:attribute> + </xsl:if> + </xsl:when> + + <xsl:otherwise> + <xsl:if test="$remaining != ''"> + <xsl:call-template name="findNDL"> + <xsl:with-param name="line" select="substring-before($remaining, $lf)"/> + <xsl:with-param name="remaining" select="substring-after($remaining, $lf)"/> + </xsl:call-template> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:template> + </xsl:stylesheet> |