FakeDynamicRangeProfiles


class FakeDynamicRangeProfiles : DynamicRangeProfilesWrapper


A fake implementation of DynamicRangeProfilesWrapper for testing.

This class allows setting mock values for supported profiles, capture request constraints, and extra latency profiles.

Summary

Public constructors

FakeDynamicRangeProfiles(
    supportedProfiles: Set<Long>,
    compatibleProfiles: Map<LongSet<Long>>,
    extraLatencyProfiles: Set<Long>
)

Public functions

open Set<Long>

Returns a set of supported dynamic range profiles that can be referenced in a single capture request along with the given profile.

open Boolean

Checks whether a given dynamic range profile incurs extra latency.

open T?
<T : Any> unwrapAs(type: Class<T>)

Attempts to unwrap this object into the specified underlying type.

Public properties

open Set<Long>

Returns a set of supported dynamic range profiles.

Public constructors

FakeDynamicRangeProfiles

FakeDynamicRangeProfiles(
    supportedProfiles: Set<Long> = setOf(DynamicRangeProfilesWrapper.STANDARD),
    compatibleProfiles: Map<LongSet<Long>> = emptyMap(),
    extraLatencyProfiles: Set<Long> = emptySet()
)

Public functions

getCompatibleProfiles

Added in 1.7.0-alpha03
open fun getCompatibleProfiles(profile: Long): Set<Long>

Returns a set of supported dynamic range profiles that can be referenced in a single capture request along with the given profile.

A profile is always compatible with itself, and is included in the returned set.

Parameters
profile: Long

The dynamic range profile to query compatibility for.

Returns
Set<Long>

An unmodifiable set of supported dynamic range profiles.

hasExtraLatency

Added in 1.7.0-alpha03
open fun hasExtraLatency(profile: Long): Boolean

Checks whether a given dynamic range profile incurs extra latency.

Profiles that incur extra latency may not be suitable for latency-sensitive use cases, such as real-time previews.

Parameters
profile: Long

The dynamic range profile to check.

Returns
Boolean

true if the profile incurs extra latency, false otherwise.

unwrapAs

Added in 1.7.0-alpha03
open fun <T : Any> unwrapAs(type: Class<T>): T?

Attempts to unwrap this object into the specified underlying type.

Callers should use this method to retrieve the wrapped platform object.

Implementation Notes

  • If the requested type is not supported by this wrapper, this method must return null.

  • Implementations designed for testing (e.g., fakes, mocks, or no-op wrappers) should return null to signal that no real underlying object is available.

Parameters
<T : Any>

The expected type of the underlying object.

type: Class<T>

The Class representing the expected type of the underlying object.

Returns
T?

The underlying object cast to T, or null if the object cannot be unwrapped into the requested type.

Public properties

supportedProfiles

Added in 1.7.0-alpha03
open val supportedProfilesSet<Long>

Returns a set of supported dynamic range profiles.

Returns
Set<Long>

An unmodifiable set of supported dynamic range profiles.