<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pica-pica/pica-client/videodevice.cpp, branch master</title>
<subtitle>Main Pica Pica repository</subtitle>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/'/>
<entry>
<title>pica-client: fix releasing call resources</title>
<updated>2026-11-13T20:27:08+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-11-13T20:27:08+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=6d8ece9aa9a90937434ef2a4b6917a319a325d4e'/>
<id>6d8ece9aa9a90937434ef2a4b6917a319a325d4e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: impose limits on partial frames</title>
<updated>2026-11-11T03:24:45+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-11-11T03:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=15720f9ab20d41d7ba316e8e174f2bc1d2b611dc'/>
<id>15720f9ab20d41d7ba316e8e174f2bc1d2b611dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: handle VAEntrypointEncSliceLP, add low_power option</title>
<updated>2026-11-10T22:47:36+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-11-10T22:47:36+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=7f0f0a965b7bc3c9ba1179264d1fac3d42eba9b5'/>
<id>7f0f0a965b7bc3c9ba1179264d1fac3d42eba9b5</id>
<content type='text'>
for VAAPI-accelerated hardware encoding of the video stream.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for VAAPI-accelerated hardware encoding of the video stream.
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: fix windows hardware acceleration usage</title>
<updated>2026-10-04T17:07:46+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-10-04T17:07:46+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=5253fff0e57da39ae56108c827f7226f9e14d154'/>
<id>5253fff0e57da39ae56108c827f7226f9e14d154</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: more hardware acceleration options on Windows</title>
<updated>2026-10-04T16:27:09+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-10-04T16:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=8f87c8491ffd9567df97979e9c18d4c148357870'/>
<id>8f87c8491ffd9567df97979e9c18d4c148357870</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: add d3d12va encoding acceleration on Windows</title>
<updated>2026-10-04T11:44:10+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-10-04T11:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=85e2f8f019b50f16ad61e7c9f214b205aa528379'/>
<id>85e2f8f019b50f16ad61e7c9f214b205aa528379</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: fix capture at requested fps</title>
<updated>2026-10-03T18:12:26+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-10-03T18:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=e7a468d008de86ddfdf62c7d4cb2888678402370'/>
<id>e7a468d008de86ddfdf62c7d4cb2888678402370</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: callwindow layout, video resize</title>
<updated>2026-10-03T16:33:04+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-10-03T16:33:04+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=835b124bd871afecd88c1e5e9105e3af4d4c5b27'/>
<id>835b124bd871afecd88c1e5e9105e3af4d4c5b27</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: configurable resolutions, codecs, bitrates for a call</title>
<updated>2026-09-26T15:00:40+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-09-26T15:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=76225a538e1e960eda9e31a34846f4bc62adef87'/>
<id>76225a538e1e960eda9e31a34846f4bc62adef87</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: compressed camera formats on Windows</title>
<updated>2026-08-24T02:11:27+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-08-24T02:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=acba2cd3eec20b31415e4b1d8e3bed85e9ab821b'/>
<id>acba2cd3eec20b31415e4b1d8e3bed85e9ab821b</id>
<content type='text'>
Lets a camera's own H.264 or MJPEG go straight onto the network on Windows as
it already could on Linux, so nothing has to be decoded and re-encoded.

Finding out what a camera offers takes rather more than the single v4l2 ioctl
it takes on Linux: the camera has to be instantiated, its output pins found,
and each pin's stream capabilities walked through IAMStreamConfig, reading the
FourCC out of the BITMAPINFOHEADER in every media type. Asking for the result
is spelled differently too - dshow has no input_format option and takes the
choice from AVFormatContext::video_codec_id instead, which is what
"-vcodec mjpeg" ahead of "-i" sets, and which has to be set on a context
allocated by us rather than by avformat_open_input().

Opening now loosens its constraints a step at a time rather than giving up on
the format at the first refusal. Listing a format, producing it at a given
size, and producing it at a given frame rate are three separate claims, and
cameras honour them independently: an integrated webcam here offers MJPEG but
not at 640x480 15fps, and was falling all the way back to re-encoding. The
frame rate is given up first, then the size, and the format last, since the
format is the one that decides whether anything has to be re-encoded at all.
What the camera settles on is what gets announced to the peer, so this changes
what is sent rather than what is claimed about it.

That relaxation exposed an assumption that was already wrong: the encoder was
hard-wired to kFrameRate with a plain incrementing pts, while the pre-existing
"let the camera choose" fallback had always been able to open without a frame
rate at all. A camera delivering 30fps therefore produced a stream whose
timestamps claimed half that. It now takes the rate from the opened stream,
and the keyframe interval with it, so two seconds between keyframes stays two
seconds - kGopSize is gone, a fixed frame count no longer meaning a fixed
duration.

Every FourCC a camera reports is logged, mapped or not. An integrated camera
offering nothing but uncompressed types while advertising MJPEG under v4l2
would have meant the Windows Camera Frame Server had already decoded it, with
nothing to be done from here - worth being able to tell apart from a FourCC we
simply failed to map, which is what this turned out not to be.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01CBqDgvq3Ty6C6BjLFH16bw
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lets a camera's own H.264 or MJPEG go straight onto the network on Windows as
it already could on Linux, so nothing has to be decoded and re-encoded.

Finding out what a camera offers takes rather more than the single v4l2 ioctl
it takes on Linux: the camera has to be instantiated, its output pins found,
and each pin's stream capabilities walked through IAMStreamConfig, reading the
FourCC out of the BITMAPINFOHEADER in every media type. Asking for the result
is spelled differently too - dshow has no input_format option and takes the
choice from AVFormatContext::video_codec_id instead, which is what
"-vcodec mjpeg" ahead of "-i" sets, and which has to be set on a context
allocated by us rather than by avformat_open_input().

Opening now loosens its constraints a step at a time rather than giving up on
the format at the first refusal. Listing a format, producing it at a given
size, and producing it at a given frame rate are three separate claims, and
cameras honour them independently: an integrated webcam here offers MJPEG but
not at 640x480 15fps, and was falling all the way back to re-encoding. The
frame rate is given up first, then the size, and the format last, since the
format is the one that decides whether anything has to be re-encoded at all.
What the camera settles on is what gets announced to the peer, so this changes
what is sent rather than what is claimed about it.

That relaxation exposed an assumption that was already wrong: the encoder was
hard-wired to kFrameRate with a plain incrementing pts, while the pre-existing
"let the camera choose" fallback had always been able to open without a frame
rate at all. A camera delivering 30fps therefore produced a stream whose
timestamps claimed half that. It now takes the rate from the opened stream,
and the keyframe interval with it, so two seconds between keyframes stays two
seconds - kGopSize is gone, a fixed frame count no longer meaning a fixed
duration.

Every FourCC a camera reports is logged, mapped or not. An integrated camera
offering nothing but uncompressed types while advertising MJPEG under v4l2
would have meant the Windows Camera Frame Server had already decoded it, with
nothing to be done from here - worth being able to tell apart from a FourCC we
simply failed to map, which is what this turned out not to be.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01CBqDgvq3Ty6C6BjLFH16bw
</pre>
</div>
</content>
</entry>
</feed>
