1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>dmx_section_cb</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch06s02.html" title="Digital TV (DVB) devices"><link rel="prev" href="API-dmx-ts-cb.html" title="dmx_ts_cb"><link rel="next" href="API-enum-dmx-frontend-source.html" title="enum dmx_frontend_source"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">dmx_section_cb</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-dmx-ts-cb.html">Prev</a> </td><th width="60%" align="center">Digital TV (DVB) devices</th><td width="20%" align="right"> <a accesskey="n" href="API-enum-dmx-frontend-source.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-dmx-section-cb"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>dmx_section_cb — 
2     DVB demux TS filter callback function prototype
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">dmx_section_cb </b>(</code></td><td>const u8 * <var class="pdparam">buffer1</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">buffer1_len</var>, </td></tr><tr><td> </td><td>const u8 * <var class="pdparam">buffer2</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">buffer2_len</var>, </td></tr><tr><td> </td><td><a class="link" href="API-struct-dmx-section-filter.html" title="struct dmx_section_filter">struct dmx_section_filter</a> * <var class="pdparam">source</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.8.3.39.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>buffer1</code></em></span></dt><dd><p>
4     Pointer to the start of the filtered section, e.g.
5     within the circular buffer of the demux driver.
6    </p></dd><dt><span class="term"><em class="parameter"><code>buffer1_len</code></em></span></dt><dd><p>
7     Length of the filtered section data in <em class="parameter"><code>buffer1</code></em>,
8     including headers and CRC.
9    </p></dd><dt><span class="term"><em class="parameter"><code>buffer2</code></em></span></dt><dd><p>
10     Pointer to the tail of the filtered section data,
11     or NULL. Useful to handle the wrapping of a
12     circular buffer.
13    </p></dd><dt><span class="term"><em class="parameter"><code>buffer2_len</code></em></span></dt><dd><p>
14     Length of the filtered section data in <em class="parameter"><code>buffer2</code></em>,
15     including headers and CRC.
16    </p></dd><dt><span class="term"><em class="parameter"><code>source</code></em></span></dt><dd><p>
17     Indicates which section feed is the source of the
18     callback.
19    </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.3.39.6"></a><h2>Description</h2><p>
20   This function callback prototype, provided by the client of the demux API,
21   is called from the demux code. The function is only called when
22   filtering of sections has been enabled using the function
23   <span class="structname"><a class="link" href="API-struct-dmx-ts-feed.html" title="struct dmx_ts_feed">dmx_ts_feed</a></span>.<em class="parameter"><code>start_filtering</code></em>. When the demux driver has received a
24   complete section that matches at least one section filter, the client
25   is notified via this callback function. Normally this function is called
26   for each received section; however, it is also possible to deliver
27   multiple sections with one callback, for example when the system load
28   is high. If an error occurs while receiving a section, this
29   function should be called with the corresponding error type set in the
30   success field, whether or not there is data to deliver. The Section Feed
31   implementation should maintain a circular buffer for received sections.
32   However, this is not necessary if the Section Feed API is implemented as
33   a client of the TS Feed API, because the TS Feed implementation then
34   buffers the received data. The size of the circular buffer can be
35   configured using the <span class="structname"><a class="link" href="API-struct-dmx-ts-feed.html" title="struct dmx_ts_feed">dmx_ts_feed</a></span>.<em class="parameter"><code>set</code></em> function in the Section Feed API.
36   If there is no room in the circular buffer when a new section is received,
37   the section must be discarded. If this happens, the value of the success
38   parameter should be DMX_OVERRUN_ERROR on the next callback.
39</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-dmx-ts-cb.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06s02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-enum-dmx-frontend-source.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">dmx_ts_cb</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">enum dmx_frontend_source</span></td></tr></table></div></body></html>
40