.. _org.freedesktop.portal.Camera:

=============================
 Camera
=============================

-----------
Description
-----------

.. _org.freedesktop.portal.Camera Description:

Camera portal

The camera portal enables applications to access camera devices, such as
web cams.



.. _org.freedesktop.portal.Camera Properties:

----------
Properties
----------

.. _org.freedesktop.portal.Camera:IsCameraPresent:

org.freedesktop.portal.Camera:IsCameraPresent
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    IsCameraPresent readable b


A boolean stating whether there is any cameras available.




.. _org.freedesktop.portal.Camera:version:

org.freedesktop.portal.Camera:version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    version readable u




.. _org.freedesktop.portal.Camera Methods:

-------
Methods
-------

.. _org.freedesktop.portal.Camera.AccessCamera:

org.freedesktop.portal.Camera.AccessCamera
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    AccessCamera (
      IN options a{sv},
      OUT handle o
    )



Request to gain access to the camera.

Supported keys in the ``options`` vardict include:

* ``handle_token`` (``s``)
  A string that will be used as the last element of the ``handle``. Must be a valid
  object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
  more information about the ``handle``.

Following the :ref:`org.freedesktop.portal.Request::Response` signal, if
granted, `org.freedesktop.portal.Camera.OpenPipeWireRemote`_ can be used to
open a PipeWire remote.



options
  Vardict with optional further information

handle
  Object path for the :ref:`org.freedesktop.portal.Request` object representing this call



.. _org.freedesktop.portal.Camera.OpenPipeWireRemote:

org.freedesktop.portal.Camera.OpenPipeWireRemote
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    OpenPipeWireRemote (
      IN options a{sv},
      OUT fd h
    )



Open a file descriptor to the PipeWire remote where the camera nodes
are available. The file descriptor should be used to create a
``pw_core`` object, by using ``pw_context_connect_fd()``.

This method will only succeed if the application already has permission
to access camera devices.

There are currently no supported keys in the ``options`` vardict.



options
  Vardict with optional further information

fd
  File descriptor of an open PipeWire remote.


