This file is indexed.

/usr/share/doc/libopusfile-doc/html/group__stream__seeking.html is in libopusfile-doc 0.9+20170913-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>opusfile: Seeking</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="opus_logo.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">opusfile
   &#160;<span id="projectnumber">0.9+20170913</span>
   </div>
   <div id="projectbrief">Stand-alone decoder library for .opus files.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Seeking</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Functions for seeking in Opus streams</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp8473e007a1dbf141b8dfa72682bbc9ed"></a>These functions let you seek in Opus streams, if the underlying stream support it.</p>
<p>Seeking is implemented for all built-in stream I/O routines, though some individual streams may not be seekable (pipes, live HTTP streams, or HTTP streams from a server that does not support <code>Range</code> requests).</p>
<p><a class="el" href="group__stream__seeking.html#gaf83b0fc6cdf94508876a206ab980851a" title="Seek to a byte offset relative to the compressed data. ">op_raw_seek()</a> is the fastest: it is guaranteed to perform at most one physical seek, but, since the target is a byte position, makes no guarantee how close to a given time it will come. <a class="el" href="group__stream__seeking.html#gad4f20d0601c2bab8d724f647673ae92c" title="Seek to the specified PCM offset, such that decoding will begin at exactly the requested position...">op_pcm_seek()</a> provides sample-accurate seeking. The number of physical seeks it requires is still quite small (often 1 or 2, even in highly variable bitrate streams).</p>
<p>Seeking in Opus requires decoding some pre-roll amount before playback to allow the internal state to converge (as if recovering from packet loss). This is handled internally by <code>libopusfile</code>, but means there is little extra overhead for decoding up to the exact position requested (since it must decode some amount of audio anyway). It also means that decoding after seeking may not return exactly the same values as would be obtained by decoding the stream straight through. However, such differences are expected to be smaller than the loss introduced by Opus's lossy compression. </p>
</td></tr>
<tr class="memitem:gaf83b0fc6cdf94508876a206ab980851a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stream__seeking.html#gaf83b0fc6cdf94508876a206ab980851a">op_raw_seek</a> (OggOpusFile *_of, opus_int64 _byte_offset) OP_ARG_NONNULL(1)</td></tr>
<tr class="memdesc:gaf83b0fc6cdf94508876a206ab980851a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seek to a byte offset relative to the <b>compressed</b> data.  <a href="#gaf83b0fc6cdf94508876a206ab980851a">More...</a><br /></td></tr>
<tr class="separator:gaf83b0fc6cdf94508876a206ab980851a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad4f20d0601c2bab8d724f647673ae92c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stream__seeking.html#gad4f20d0601c2bab8d724f647673ae92c">op_pcm_seek</a> (OggOpusFile *_of, ogg_int64_t _pcm_offset) OP_ARG_NONNULL(1)</td></tr>
<tr class="memdesc:gad4f20d0601c2bab8d724f647673ae92c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seek to the specified PCM offset, such that decoding will begin at exactly the requested position.  <a href="#gad4f20d0601c2bab8d724f647673ae92c">More...</a><br /></td></tr>
<tr class="separator:gad4f20d0601c2bab8d724f647673ae92c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaf83b0fc6cdf94508876a206ab980851a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf83b0fc6cdf94508876a206ab980851a">&#9670;&nbsp;</a></span>op_raw_seek()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int op_raw_seek </td>
          <td>(</td>
          <td class="paramtype">OggOpusFile *&#160;</td>
          <td class="paramname"><em>_of</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">opus_int64&#160;</td>
          <td class="paramname"><em>_byte_offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Seek to a byte offset relative to the <b>compressed</b> data. </p>
<p>This also scans packets to update the PCM cursor. It will cross a logical bitstream boundary, but only if it can't get any packets out of the tail of the link to which it seeks. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_of</td><td>The <code>OggOpusFile</code> in which to seek. </td></tr>
    <tr><td class="paramname">_byte_offset</td><td>The byte position to seek to. This must be between 0 and <a class="el" href="group__stream__info.html#gaa433bdeab96315d315269b60ba52b877" title="Get the total (compressed) size of the stream, or of an individual link in a (possibly-chained) Ogg O...">op_raw_total</a>(<em>_of</em>,<code>-1</code>) (inclusive). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, or a negative error code on failure. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#ga3ad48a4f99b1bed72acec552296dfc08" title="An underlying read, seek, or tell operation failed when it should have succeeded. ...">OP_EREAD</a></td><td>The underlying seek operation failed. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#gae0879acafe9cc0ab72462d291fdb6fb6" title="One or more parameters to a function were invalid. ">OP_EINVAL</a></td><td>The stream was only partially open, or the target was outside the valid range for the stream. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#gadd54f4d82cfabedb5963331fbe0bc99c" title="An operation that requires seeking was requested on an unseekable stream. ">OP_ENOSEEK</a></td><td>This stream is not seekable. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#gaf7b58a439a471366e9eb5b8f2a8cd041" title="We failed to find data we had seen before, or the bitstream structure was sufficiently malformed that...">OP_EBADLINK</a></td><td>Failed to initialize a decoder for a stream for an unknown reason. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad4f20d0601c2bab8d724f647673ae92c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad4f20d0601c2bab8d724f647673ae92c">&#9670;&nbsp;</a></span>op_pcm_seek()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int op_pcm_seek </td>
          <td>(</td>
          <td class="paramtype">OggOpusFile *&#160;</td>
          <td class="paramname"><em>_of</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ogg_int64_t&#160;</td>
          <td class="paramname"><em>_pcm_offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Seek to the specified PCM offset, such that decoding will begin at exactly the requested position. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_of</td><td>The <code>OggOpusFile</code> in which to seek. </td></tr>
    <tr><td class="paramname">_pcm_offset</td><td>The PCM offset to seek to. This is in samples at 48 kHz relative to the start of the stream. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, or a negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#ga3ad48a4f99b1bed72acec552296dfc08" title="An underlying read, seek, or tell operation failed when it should have succeeded. ...">OP_EREAD</a></td><td>An underlying read or seek operation failed. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#gae0879acafe9cc0ab72462d291fdb6fb6" title="One or more parameters to a function were invalid. ">OP_EINVAL</a></td><td>The stream was only partially open, or the target was outside the valid range for the stream. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#gadd54f4d82cfabedb5963331fbe0bc99c" title="An operation that requires seeking was requested on an unseekable stream. ">OP_ENOSEEK</a></td><td>This stream is not seekable. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__error__codes.html#gaf7b58a439a471366e9eb5b8f2a8cd041" title="We failed to find data we had seen before, or the bitstream structure was sufficiently malformed that...">OP_EBADLINK</a></td><td>We failed to find data we had seen before, or the bitstream structure was sufficiently malformed that seeking to the target destination was impossible. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>