1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>set()</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="dvb_kdapi.html" title="Chapter 15. Kernel Demux API"><link rel="prev" href="section_feed_api.html" title="Section Feed API"><link rel="next" href="ch15s08.html" title="allocate_filter()"></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">set()</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="section_feed_api.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Kernel Demux API</th><td width="20%" align="right"> <a accesskey="n" href="ch15s08.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="kdapi_set"></a>set()</h2></div></div></div><p>DESCRIPTION 2</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 3<p>This function sets the parameters of a section feed. Any filtering in progress on 4 the section feed must be stopped before calling this function. If descrambling 5 is enabled, the payload_scrambling_control and address_scrambling_control 6 fields of received DVB datagram sections should be observed. If either one is 7 non-zero, the section should be descrambled either in hardware or using the 8 functions descramble_mac_address() and descramble_section_payload() of the 9 demux API. Note that according to the MPEG-2 Systems specification, only 10 the payloads of private sections can be scrambled while the rest of the section 11 data must be sent in the clear.</p> 12</td></tr></tbody></table></div><p>SYNOPSIS 13</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 14<p>int set(dmx_section_feed_t⋆ feed, __u16 pid, size_t 15 circular_buffer_size, int descramble, int 16 check_crc);</p> 17</td></tr></tbody></table></div><p>PARAMETERS 18</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 19<p>dmx_section_feed_t* 20 feed</p> 21</td><td align="char"> 22<p>Pointer to the section feed API and instance data.</p> 23</td></tr><tr><td align="char"> 24<p>__u16 pid</p> 25</td><td align="char"> 26<p>PID value to filter; only the TS packets carrying the 27 specified PID will be accepted.</p> 28</td></tr><tr><td align="char"> 29<p>size_t 30 circular_buffer_size</p> 31</td><td align="char"> 32<p>Size of the circular buffer for filtered sections.</p> 33</td></tr><tr><td align="char"> 34<p>int descramble</p> 35</td><td align="char"> 36<p>If non-zero, descramble any sections that are scrambled.</p> 37</td></tr><tr><td align="char"> 38<p>int check_crc</p> 39</td><td align="char"> 40<p>If non-zero, check the CRC values of filtered sections.</p> 41</td></tr></tbody></table></div><p>RETURNS 42</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 43<p>0</p> 44</td><td align="char"> 45<p>The function was completed without errors.</p> 46</td></tr><tr><td align="char"> 47<p>-ENOMEM</p> 48</td><td align="char"> 49<p>Not enough memory for the requested buffer size.</p> 50</td></tr><tr><td align="char"> 51<p>-ENOSYS</p> 52</td><td align="char"> 53<p>No descrambling facility available for sections.</p> 54</td></tr><tr><td align="char"> 55<p>-EINVAL</p> 56</td><td align="char"> 57<p>Bad parameters.</p> 58</td></tr></tbody></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="section_feed_api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="dvb_kdapi.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch15s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Section Feed API </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> allocate_filter()</td></tr></table></div></body></html> 59