Why libcamera in PipeWire?

Architecture PipeWire-libcamera

                       

Integration of RDKC with PipeWire-libcamera

Below list of changes set for PipeWire-libcamera

Libcamera Recipes:
https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/refs/heads/rdk-next/recipes-multimedia/libcamera/
https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/opensource/oe/meta-openembedded/+/refs/heads/dunfell/meta-multimedia/recipes-multimedia/libcamera/

Enabling Libcamera SPA Plugin Pipewire:
https://code.rdkcentral.com/r/c/components/generic/rdk-oe/meta-cmf-camera/+/81195
https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/81171

PipeWire Overview and Flow in RDK-C



Overview of PipeWire-Libcamera Internals


     

SPA Plugin Creation (pipewire/spa/plugins)

  1. Implemented each SPA plugins with a group of factories.
  2. Each factory should have the below details
        * Version ( SPA_VERSION_HANDLE_FACTORY )
        * Factory Name ( SPA_NAME_API_* - eg.SPA_NAME_API_LIBCAMERA_ENUM_UDEV)
        * SPA dictionary information ( struct spa_dict )
        * Get size callback  - impl_get_size()
            - Each factory has its own impl structure for to maintain some specific details.
            - With this callback, we can get the size of this factory impl structure
        * Initialization callback – impl_init()
            - This will initialize this factory-specific activity
        * Enum interface info callback - impl_enum_interface_info()
  3. Each SPA plugin's factories are associated with the spa_handle_factory_enum() function.
  4. Libcamera SPA plugin’s factories(libcamera.c)

Libcamera API sequence



PipeWire API sequence in RDK-C:



Supported Usecases using Pipewire-Libcamera:

  1. WebRTC Streaming
  2. RTSP Streaming
  3. Continuous Video Recording



Libcamera Roadmap

Features planned down the lane: 

                               

                                                                                                                                                                                Sony IMX477

                                                                                                                                                                               Zooming Camera.