Cheese TNG: less libcheese, more D-Bus

Post on 14-Feb-2017

214 views 0 download

Transcript of Cheese TNG: less libcheese, more D-Bus

GUADECThe ConferenceTM

History Future Summary

Cheese TNG: less libcheese, more D-Bus

David King <amigadave@amigadave.com>

2014-07-29 / GUADEC

Shouldn’t that be "amigodave"?

Keeping the Amiga alive

GUADECThe ConferenceTM

History Future Summary

In the beginning

Started as a GSoC 2007 project by Daniel SiegelFirst released as part of GNOME 2.22Initially conceived as a Photobooth clone

2.22

2.22

GUADECThe ConferenceTM

History Future Summary

Early development

GSoC projects to add better GNOME integration (FelixKaser) and OpenGL effects (Filippo Argiolas)auto-detection of camera devices with HAL, later udevsplit into a library by Bastien Nocera in 2.29UI rewritten in Vala in 2.31

2.28

Picard does not like Vala

GUADECThe ConferenceTM

History Future Summary

GNOME 3

split off effects into gnome-video-effectsuse clutter for video widgetlots of GtkApplication and GTK+ 3 porting by PatriciaSantana Cruz as part of Openismus trainee program (andlater OPW)I joined as a maintainer around 3.2.0

New Cheese maintainer

3.2

GUADECThe ConferenceTM

History Future Summary

Post-GNOME3 development

port to GStreamer 1.0 and camerabin2composite widget templatesheader barsbetter fullscreen handling (implemented by Rashi Aswani)

3.12

Picard does not like CSD

GUADECThe ConferenceTM

History Future Summary

Planned design overhaul

thanks to Fabiana and Allanhttps://wiki.gnome.org/Design/Apps/Cheesestreamlined interface with on-canvas (OSD) controlsheader bar and fullscreen mode changes mergedlooking for a willing GSoC student!

3.16?

GUADECThe ConferenceTM

History Future Summary

Cheese as a sandboxed application

sandboxed applications will not have access to raw devicenodesit will be necessary to request access to hardware devicesaccess to the webcam should be suspended on logout,screen lock and user switching

GUADECThe ConferenceTM

History Future Summary

Application sandboxing (easy bits)

CheeseAvatarChooser is used to take webcam photos anduse them as avatar imagesreplace in-process libcheese API with an out-of-processD-Bus API to show a chooser dialogueD-Bus service handles requests, shows the dialogue andreturns an image to the applicationno direct access to the V4L2 device is needed by theapplicationprototype implementation exists

GUADECThe ConferenceTM

History Future Summary

Difficulties for advanced applications

Applications like Cheese need access to the video stream,to apply effects and do processingChanging properties of the camera (resolution, brightness,autofocus, and so on) needs access to the device nodeNo good way to enforce permissions on the video devicenode in a user session service

GUADECThe ConferenceTM

History Future Summary

What about another D-Bus service?

a D-Bus service on the system bus, with exclusivepermission to the video device nodesmove most of the camera properties and video processingof libcheese into the serviceprovide a video stream to sandboxed clientslots of overhead going through the D-Bus server

GUADECThe ConferenceTM

History Future Summary

PulseVideo?

video is like audio, in that low latency and high(er)throughput is requiredtraditional D-Bus is not fast enoughuse kdbus/memfds as a transportnot too difficult for the Cheese use case, but difficult toexpose all properties and be generic

GUADECThe ConferenceTM

History Future Summary

Summary

need to figure out the scope of a video device serverwaiting on memfds and kdbus to be merged into the kernelsandboxing itself is not a hard requirement (but a videoserver is required for better application sandboxing)D-Bus avatar chooser service in 3.14 (hopefully!)

Picard loves application sandboxing

GUADECThe ConferenceTM

Acknowledgements

Bastien Nocera for all his great workHans de Goede for various patchesDaniel Siegel for starting off the project (and the Laphroaig)Luciana Fujii Pontello for maintenance and GStreamer helpStar Trek: TNG