chromium/media/capture/video/chromeos/mojom/camera_features.mojom

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Next min version: 1

module cros.mojom;

// Camera3StreamEffect indicates which effect is applied to the stream.
[Extensible]
union Camera3StreamEffect {
  // A default field is required by extensible unions.
  // Any unrecognized field that is received will deserialize to this field.
  [Default] uint8 unknown_config;
  // Portrait Mode effect attributes.
  PortraitModeConfig portrait_mode_config;
};

// Structure used for Portrait Mode effect attributes. Used by Camera3StreamEffect.
struct PortraitModeConfig {
  // Turns on/off face distortion correction.
  bool enable_rectiface;
};

// The status of Portrait Mode segmentation result.
enum PortraitModeSegResult {
  kSuccess = 0,   // Portrait mode segmentation succeeds.
  kFailure = 1,   // Portrait mode segmentation fails.
  kTimeout = 2,   // Portrait processing timeout.
  kNoFaces = 3,   // Portrait mode segmentation fails with no face detected.
  kUnknown = 4,   // Portrait mode segmentation fails with unknown reason.
};