gnome-shell/src/shell-camera-monitor.h
robert.mader@collabora.com d09d24666a shell: Add device monitor for cameras
Pipewire allows us to easily track whether any cameras are in used by
checking the state of camera nodes. Add a simple camera monitor to the
shell, allowing us to show e.g. a status indicator.

Naturally the monitor is limited to apps using Pipewire for camera
access and thus subject to the same chicken-egg problem like the camera
portal - it could confuse users that apps may use the camera without
being noticed by the monitor. The hope and assumption here is that a
better shell integration might speed up adoption of the new camera APIs

Pipewire 0.3.49 is required for refcounted `pw_init()`/`pw_deinit()`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2840>
2023-07-29 13:55:15 +03:00

36 lines
1.1 KiB
C

/*
* Shell camera monitor
*
* Copyright (C) 2023 Collabora Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef __SHELL_CAMERA_MONITOR_H__
#define __SHELL_CAMERA_MONITOR_H__
#include <glib-object.h>
G_BEGIN_DECLS
#define SHELL_TYPE_CAMERA_MONITOR (shell_camera_monitor_get_type ())
G_DECLARE_FINAL_TYPE (ShellCameraMonitor, shell_camera_monitor,
SHELL, CAMERA_MONITOR, GObject)
G_END_DECLS
#endif /* __SHELL_CAMERA_MONITOR_H__ */