<table><tr><td style="">davidedmundson created this revision.<br />davidedmundson added a reviewer: Plasma.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: KWin, kwin, plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4366" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Works as follows:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Connect with a DBus interface similar to Screenshot</li>
<li class="remarkup-list-item">instead of a FD to a save location, clients pass a socket to their</li>
</ul>
<p>own very very minimal wayland server (with a compositor and shmpool)</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">kwin then connects to that as a client with a wl_surface of the</li>
</ul>
<p>rendered area, with each frame as a buffer.</p>
<p>This patch contains the relevant effect and a small test app.</p>
<p>Design Rationale:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">We need the recorder to have a shared memory pool, and only it knows</li>
</ul>
<p>when it's finished rendering it. The recorder being the "compositor"<br />
provides that</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Kwin acting as the "client" could easily cover a VNC like case in</li>
</ul>
<p>future, albeit with some shuffling.</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Using an existing wayland iface means this could become a standard</li>
</ul>
<p>Obviously not entirely finished, see TODOs in comments, and we probably<br />
want to include the region selection like Screenshot.</p>
<p>Was writing something to dump frames from kwin, was a good excuse to work<br />
on something useful.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Ran included test app<br />
Dragged window about</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>screencast</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4366" rel="noreferrer">https://phabricator.kde.org/D4366</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>effects/CMakeLists.txt<br />
effects/effect_builtins.cpp<br />
effects/screencast/CMakeLists.txt<br />
effects/screencast/screencast.cpp<br />
effects/screencast/screencast.h<br />
tests/CMakeLists.txt<br />
tests/screenrecorder.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, KWin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas<br /></div>