1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>v4l2_detect_gtf</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="mediadev.html#id-1.8.2" title="Video2Linux devices"><link rel="prev" href="API-v4l2-detect-cvt.html" title="v4l2_detect_cvt"><link rel="next" href="API-v4l2-calc-aspect-ratio.html" title="v4l2_calc_aspect_ratio"></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">v4l2_detect_gtf</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-v4l2-detect-cvt.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-v4l2-calc-aspect-ratio.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-v4l2-detect-gtf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>v4l2_detect_gtf — 
2     detect if the given timings follow the GTF standard
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">bool <b class="fsfunc">v4l2_detect_gtf </b>(</code></td><td>unsigned <var class="pdparam">frame_height</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">hfreq</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">vsync</var>, </td></tr><tr><td> </td><td>u32 <var class="pdparam">polarities</var>, </td></tr><tr><td> </td><td>bool <var class="pdparam">interlaced</var>, </td></tr><tr><td> </td><td>struct v4l2_fract <var class="pdparam">aspect</var>, </td></tr><tr><td> </td><td>struct v4l2_dv_timings * <var class="pdparam">fmt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.8.2.56.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>frame_height</code></em></span></dt><dd><p>
4     the total height of the frame (including blanking) in lines.
5    </p></dd><dt><span class="term"><em class="parameter"><code>hfreq</code></em></span></dt><dd><p>
6     the horizontal frequency in Hz.
7    </p></dd><dt><span class="term"><em class="parameter"><code>vsync</code></em></span></dt><dd><p>
8     the height of the vertical sync in lines.
9    </p></dd><dt><span class="term"><em class="parameter"><code>polarities</code></em></span></dt><dd><p>
10     the horizontal and vertical polarities (same as struct
11     v4l2_bt_timings polarities).
12    </p></dd><dt><span class="term"><em class="parameter"><code>interlaced</code></em></span></dt><dd><p>
13     if this flag is true, it indicates interlaced format
14    </p></dd><dt><span class="term"><em class="parameter"><code>aspect</code></em></span></dt><dd><p>
15     preferred aspect ratio. GTF has no method of determining the
16     aspect ratio in order to derive the image width from the
17     image height, so it has to be passed explicitly. Usually
18     the native screen aspect ratio is used for this. If it
19     is not filled in correctly, then 16:9 will be assumed.
20    </p></dd><dt><span class="term"><em class="parameter"><code>fmt</code></em></span></dt><dd><p>
21     the resulting timings.
22    </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.2.56.6"></a><h2>Description</h2><p>
23   This function will attempt to detect if the given values correspond to a
24   valid GTF format. If so, then it will return true, and fmt will be filled
25   in with the found GTF timings.
26</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-v4l2-detect-cvt.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mediadev.html#id-1.8.2">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-v4l2-calc-aspect-ratio.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">v4l2_detect_cvt</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">v4l2_calc_aspect_ratio</span></td></tr></table></div></body></html>
27