summaryrefslogtreecommitdiff
path: root/static/netbsd/man9/video.9 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/netbsd/man9/video.9 3.html')
-rw-r--r--static/netbsd/man9/video.9 3.html182
1 files changed, 0 insertions, 182 deletions
diff --git a/static/netbsd/man9/video.9 3.html b/static/netbsd/man9/video.9 3.html
deleted file mode 100644
index 8177e9c8..00000000
--- a/static/netbsd/man9/video.9 3.html
+++ /dev/null
@@ -1,182 +0,0 @@
-<table class="head">
- <tr>
- <td class="head-ltitle">VIDEO(9)</td>
- <td class="head-vol">Kernel Developer's Manual</td>
- <td class="head-rtitle">VIDEO(9)</td>
- </tr>
-</table>
-<div class="manual-text">
-<section class="Sh">
-<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
-<p class="Pp"><code class="Nm">video</code> &#x2014; <span class="Nd">interface
- between low and high level video drivers</span></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
-<p class="Pp"><code class="In">#include
- &lt;<a class="In">dev/video_if.h</a>&gt;</code></p>
-<p class="Pp"><var class="Ft">device_t</var>
- <br/>
- <code class="Fn">video_attach_mi</code>(<var class="Fa" style="white-space: nowrap;">const
- struct video_hw_if *hw_if</var>,
- <var class="Fa" style="white-space: nowrap;">device_t hw_dev</var>);</p>
-<p class="Pp"><var class="Ft">void</var>
- <br/>
- <code class="Fn">video_submit_payload</code>(<var class="Fa" style="white-space: nowrap;">device_t
- vl_dev</var>, <var class="Fa" style="white-space: nowrap;">const struct
- video_payload *payload</var>);</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
-<p class="Pp">The video device driver is divided into a high level, machine
- independent layer, and a low level hardware dependent layer. The interface
- between these is the <var class="Fa">video_hw_if</var> structure function
- pointers called by the video layer, and video layer functions called by the
- hardware driver.</p>
-<p class="Pp">The high level video driver attaches to the low level driver when
- the latter calls <var class="Fa">video_attach_mi</var>. The
- <var class="Fa">video_hw_if</var> struct is as shown below.
- <var class="Fa">dev</var> is the device struct for the hardware device.
- Return value is the video layer device.</p>
-<div class="Bd Pp Li">
-<pre>struct video_hw_if {
- int (*open)(void *, int); /* open hardware */
- void (*close)(void *); /* close hardware */
-
- const char * (*get_devname)(void *);
-
- int (*enum_format)(void *, uint32_t, struct video_format *);
- int (*get_format)(void *, struct video_format *);
- int (*set_format)(void *, struct video_format *);
- int (*try_format)(void *, struct video_format *);
-
- int (*start_transfer)(void *);
- int (*stop_transfer)(void *);
-
- int (*control_iter_init)(void *, struct video_control_iter *);
- int (*control_iter_next)(void *, struct video_control_iter *);
- int (*get_control_desc_group)(void *,
- struct video_control_desc_group *);
- int (*get_control_group)(void *, struct video_control_group *);
- int (*set_control_group)(void *, const struct video_control_group *);
-};</pre>
-</div>
-<p class="Pp">The upper layer of the video driver allocates buffers for video
- samples. The hardware driver submits data to the video layer with
- <var class="Fa">video_submit_payload</var>. <var class="Fa">vl_dev</var> is
- the video layer device returned by
- <var class="Fa">video_attach_mi</var>.</p>
-<div class="Bd Pp Li">
-<pre>struct video_payload {
- const uint8_t *data;
- size_t size;
- int frameno;
- bool end_of_frame;
-};</pre>
-</div>
-<dl class="Bl-tag">
- <dt><var class="Fa">data</var></dt>
- <dd>Pointer to the video data for this payload. This may only be a portion of
- the data in one video sample or frame.</dd>
- <dt><var class="Fa">size</var></dt>
- <dd>Size in bytes of the video data in this payload</dd>
- <dt><var class="Fa">frameno</var></dt>
- <dd>Frame number to which this payload belongs. The hardware driver must
- toggle the frame number between 0 and 1 so the video layer can detect
- sample or frame boundaries.</dd>
- <dt><var class="Fa">end_of_frame</var></dt>
- <dd>Optional end of frame marker. If the hardware layer sets this, the video
- layer can immediately pass the completed sample or frame to userspace
- rather than waiting for the next payload to toggle
- <var class="Fa">frameno</var>.</dd>
-</dl>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="HARDWARE-LAYER_FUNCTIONS"><a class="permalink" href="#HARDWARE-LAYER_FUNCTIONS">HARDWARE-LAYER
- FUNCTIONS</a></h1>
-<p class="Pp">The fields of <var class="Va">video_hw_if</var> are described in
- some more detail below. Some fields are optional and can be set to
- <code class="Dv">NULL</code> if not needed.</p>
-<dl class="Bl-tag">
- <dt id="int"><a class="permalink" href="#int"><code class="Dv">int open(void
- *hdl, int flags)</code></a></dt>
- <dd>optional, is called when the video device is opened. It should initialize
- the hardware for I/O. Every successful call to <var class="Va">open</var>
- is matched by a call to <var class="Va">close</var>. Return 0 on success,
- otherwise an error code.</dd>
- <dt id="void"><a class="permalink" href="#void"><code class="Dv">void
- close(void *hdl)</code></a></dt>
- <dd>optional, is called when the audio device is closed.</dd>
- <dt id="const"><a class="permalink" href="#const"><code class="Dv">const char
- * get_devname(void *hdl)</code></a></dt>
- <dd>mandatory, returns a NUL-terminated string naming the device, e.g. a
- vendor and product model name.</dd>
- <dt id="int~2"><a class="permalink" href="#int~2"><code class="Dv">int
- enum_format(void *hdl, uint32_t index, struct video_format
- *format);</code></a></dt>
- <dd>mandatory, called with an <var class="Va">index</var> from 0 to
- <var class="Va">max_index - 1</var>. Fills <var class="Va">format</var>
- with the format description at that index. Returns 0 on success, otherwise
- an error code.</dd>
- <dt id="int~3"><a class="permalink" href="#int~3"><code class="Dv">int
- get_format(void *hdl, struct video_format *format)</code></a></dt>
- <dd>mandatory, fills <var class="Va">format</var> with the current video
- format. There should be a default format so this function works before and
- streaming has begun. Returns 0 on success, otherwise an error code.</dd>
- <dt id="int~4"><a class="permalink" href="#int~4"><code class="Dv">int
- set_format(void *hdl, struct video_format *format)</code></a></dt>
- <dd>mandatory, sets the format of the video stream based on
- <var class="Va">format</var>. Fills <var class="Va">format</var> with the
- actual format used which may not be the same as requested. Returns 0 on
- success, otherwise an error code.</dd>
- <dt id="int~5"><a class="permalink" href="#int~5"><code class="Dv">int
- try_format(void *hdl, struct video_format *format)</code></a></dt>
- <dd>optional, like <var class="Va">set_format</var> but does not actually
- change the stream format, just checks what is available. Returns 0 on
- success, otherwise an error code.</dd>
- <dt id="int~6"><a class="permalink" href="#int~6"><code class="Dv">int
- start_transfer(void *hdl)</code></a></dt>
- <dd>mandatory, starts the capture of video frames. Incoming video data must be
- submitted to the video layer with repeated calls to
- <a class="permalink" href="#video_submit_payload"><code class="Fn" id="video_submit_payload">video_submit_payload</code></a>().</dd>
- <dt id="int~7"><a class="permalink" href="#int~7"><code class="Dv">int
- stop_transfer(void *hdl)</code></a></dt>
- <dd style="width: auto;">&#x00A0;</dd>
- <dt id="int~8"><a class="permalink" href="#int~8"><code class="Dv">int
- control_iter_init(void *hdl, struct video_control_iter *)</code></a></dt>
- <dd>Does nothing at this time.</dd>
- <dt id="int~9"><a class="permalink" href="#int~9"><code class="Dv">int
- control_iter_next(void *hdl, struct video_control_iter *)</code></a></dt>
- <dd>Does nothing at this time.</dd>
- <dt id="int~10"><a class="permalink" href="#int~10"><code class="Dv">int
- get_control_group(void *hdl, struct video_control_group *)</code></a></dt>
- <dd style="width: auto;">&#x00A0;</dd>
- <dt id="int~11"><a class="permalink" href="#int~11"><code class="Dv">int
- set_control_group(void *hdl, struct video_control_group *)</code></a></dt>
- <dd style="width: auto;">&#x00A0;</dd>
-</dl>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
- ALSO</a></h1>
-<p class="Pp"><a class="Xr">video(4)</a></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
-<p class="Pp"><span class="An">Patrick Mahoney</span>
- &lt;<a class="Mt" href="mailto:pat@polycrystal.org">pat@polycrystal.org</a>&gt;</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
-<p class="Pp">Incomplete. Only supports a single video capture stream. Does not
- support output streams. Format handling may change in the future. Control
- handling may change. Current design requires copying all incoming video
- data.</p>
-</section>
-</div>
-<table class="foot">
- <tr>
- <td class="foot-date">July 24, 2008</td>
- <td class="foot-os">NetBSD 10.1</td>
- </tr>
-</table>