shaka-packager/html/options/segment_template_formatting...

151 lines
6.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Segment template formatting &#8212; Shaka Packager documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/sphinxdoc_new.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
<link rel="stylesheet" type="text/css" href="../_static/table_styling.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="../index.html">Shaka Packager documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Segment template formatting</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="segment-template-formatting">
<h1>Segment template formatting<a class="headerlink" href="#segment-template-formatting" title="Permalink to this headline"></a></h1>
<p>The implementation is based on <em>Template-based Segment URL construction</em>
described in ISO/IEC 23009-1:2014.</p>
<table class="styled-table docutils align-default" id="id1">
<caption><span class="caption-text">Supported identifiers</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 19%" />
<col style="width: 41%" />
<col style="width: 41%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="left-align head"><p>$&lt;Identifier&gt;$</p></th>
<th class="left-align head"><p>Substitution parameter</p></th>
<th class="left-align head"><p>Format</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td class="left-align"><p>$$</p></td>
<td class="left-align"><p>is an escape sequence, i.e.
“$$” is replaced with a single
“$”.</p></td>
<td class="left-align"><p>Not applicable.</p></td>
</tr>
<tr class="row-odd"><td class="left-align"><p>$Number$</p></td>
<td class="left-align"><p>This identifier is substitued
with the <em>number</em> of the
corresponding Segment.</p></td>
<td class="left-align"><p>The format tag may be present.</p>
<p>If no format tag is present, a
default format tag with
<em>width</em>=1 shall be used.</p>
</td>
</tr>
<tr class="row-even"><td class="left-align"><p>$Time$</p></td>
<td class="left-align"><p>This identifier is substituted
with the value of the
<strong>SegmentTimeline&#64;t</strong>
attribute for the Segment
being accessed. Either
$Number$ or $Time$ may be used
but not both at the same time.</p></td>
<td class="left-align"><p>The format tag may be present.</p>
<p>If no format tag is present, a
default format tag with
<em>width</em>=1 shall be used.</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Identifiers $RepresentationID$ and $Bandwidth$ are not supported in this
version. Please file an <a class="reference external" href="https://github.com/google/shaka-packager/issues">issue</a> if you want it to be
supported.</p>
</div>
<p>In each URL, the identifiers shall be replaced by the substitution parameter
per the definition in the above table. Identifier matching is case-sensitive.</p>
<p>Each identifier may be suffixed, within the enclosing $ characters, with an
additional format tag aligned with the <em>printf</em> format tag as defined in IEEE
1003.1-2008 following this prototype:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span><span class="mi">0</span><span class="p">[</span><span class="n">width</span><span class="p">]</span><span class="n">d</span>
</pre></div>
</div>
<p>The <em>width</em> parameter is an unsigned integer that provides the minimum number
of characters to be printed. If the value to be printed is shorter than this
number, the result shall be padded with zeros. The value is not truncated even
if the result is larger.</p>
<p>Strings outside identifiers shall only contain characters that are permitted
within URLs according to RFC 3986.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/segment_template_formatting.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="nav-item nav-item-0"><a href="../index.html">Shaka Packager documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Segment template formatting</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Google.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3.
</div>
</body>
</html>