class BufferCollectionConstraints
Defined at line 5773 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h
Constraints on BufferCollection parameters. These constraints can be
specified per-participant. The sysmem service implements aggregation of
constraints from multiple participants.
This type is deprecated for new code, but is still used by some camera code.
Public Methods
void BufferCollectionConstraints (::fuchsia_sysmem::BufferUsage usage, uint32_t min_buffer_count_for_camping, uint32_t min_buffer_count_for_dedicated_slack, uint32_t min_buffer_count_for_shared_slack, uint32_t min_buffer_count, uint32_t max_buffer_count, bool has_buffer_memory_constraints, ::fuchsia_sysmem::BufferMemoryConstraints buffer_memory_constraints, uint32_t image_format_constraints_count, ::std::array< ::fuchsia_sysmem::ImageFormatConstraints, 32> image_format_constraints)
void BufferCollectionConstraints ()
Default constructs a |BufferCollectionConstraints| only if all of its members are default constructible.
Defined at line 5783 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h
void BufferCollectionConstraints (BufferCollectionConstraints && )
Defined at line 5786 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h
void BufferCollectionConstraints (Storage_ storage)
void BufferCollectionConstraints (const BufferCollectionConstraints & other)
BufferCollectionConstraints & operator= (const BufferCollectionConstraints & other)
bool operator== (const BufferCollectionConstraints & other)
bool operator!= (const BufferCollectionConstraints & other)
const ::fuchsia_sysmem::BufferUsage & usage ()
The usage is only meant as a hint to help sysmem choose a more optimal
PixelFormat or similar when multiple compatible options exist.
When aggregating BufferCollectionConstraints, these values bitwise-OR.
At least one usage bit must be specified unless the whole
BufferCollectionConstraints is logically null due to !has_constraints.
::fuchsia_sysmem::BufferUsage & usage ()
The usage is only meant as a hint to help sysmem choose a more optimal
PixelFormat or similar when multiple compatible options exist.
When aggregating BufferCollectionConstraints, these values bitwise-OR.
At least one usage bit must be specified unless the whole
BufferCollectionConstraints is logically null due to !has_constraints.
BufferCollectionConstraints & usage (::fuchsia_sysmem::BufferUsage value)
The usage is only meant as a hint to help sysmem choose a more optimal
PixelFormat or similar when multiple compatible options exist.
When aggregating BufferCollectionConstraints, these values bitwise-OR.
At least one usage bit must be specified unless the whole
BufferCollectionConstraints is logically null due to !has_constraints.
uint32_t min_buffer_count_for_camping ()
Per-participant number of buffers that the participant may concurrently
hold for its exclusive use for a non-transient period of time (camp on).
For example, a video decoder would specify (at least) the maximum number
of reference frames + 1 frame currently being decoded into.
A participant must not camp on more buffers than specified here (except
very transiently) else processing may get stuck.
When aggregating BufferCollectionConstraints, these values add.
In testing scenarios, camping on more buffers than this for any
significant duration may (ideally will) be flagged as a failure. In
testing scenarios, the participant may not be provided with more buffers
than this concurrently.
uint32_t & min_buffer_count_for_camping ()
Per-participant number of buffers that the participant may concurrently
hold for its exclusive use for a non-transient period of time (camp on).
For example, a video decoder would specify (at least) the maximum number
of reference frames + 1 frame currently being decoded into.
A participant must not camp on more buffers than specified here (except
very transiently) else processing may get stuck.
When aggregating BufferCollectionConstraints, these values add.
In testing scenarios, camping on more buffers than this for any
significant duration may (ideally will) be flagged as a failure. In
testing scenarios, the participant may not be provided with more buffers
than this concurrently.
BufferCollectionConstraints & min_buffer_count_for_camping (uint32_t value)
Per-participant number of buffers that the participant may concurrently
hold for its exclusive use for a non-transient period of time (camp on).
For example, a video decoder would specify (at least) the maximum number
of reference frames + 1 frame currently being decoded into.
A participant must not camp on more buffers than specified here (except
very transiently) else processing may get stuck.
When aggregating BufferCollectionConstraints, these values add.
In testing scenarios, camping on more buffers than this for any
significant duration may (ideally will) be flagged as a failure. In
testing scenarios, the participant may not be provided with more buffers
than this concurrently.
uint32_t min_buffer_count_for_dedicated_slack ()
Per-participant minimum number of buffers that are needed for slack
reasons, for better overlap of processing / better performance.
When aggregating BufferCollectionConstraints, these values add.
A participant should typically specify 0 or 1 here - typically 0 is
appropriate if min_buffer_count_for_camping is already enough to keep
the participant busy 100% of the time when the participant is slightly
behind, while 1 can be appropriate if 1 more buffer than strictly needed
for min-camping reasons gives enough slack to stay busy 100% of the time
(when slightly behind, vs. lower % without the extra buffer).
In testing scenarios, this field may be forced to 0, and all
participants are expected to continue to work without getting stuck. If
a buffer is needed for forward progress reasons, that buffer should be
accounted for in min_buffer_count_for_camping.
uint32_t & min_buffer_count_for_dedicated_slack ()
Per-participant minimum number of buffers that are needed for slack
reasons, for better overlap of processing / better performance.
When aggregating BufferCollectionConstraints, these values add.
A participant should typically specify 0 or 1 here - typically 0 is
appropriate if min_buffer_count_for_camping is already enough to keep
the participant busy 100% of the time when the participant is slightly
behind, while 1 can be appropriate if 1 more buffer than strictly needed
for min-camping reasons gives enough slack to stay busy 100% of the time
(when slightly behind, vs. lower % without the extra buffer).
In testing scenarios, this field may be forced to 0, and all
participants are expected to continue to work without getting stuck. If
a buffer is needed for forward progress reasons, that buffer should be
accounted for in min_buffer_count_for_camping.
BufferCollectionConstraints & min_buffer_count_for_dedicated_slack (uint32_t value)
Per-participant minimum number of buffers that are needed for slack
reasons, for better overlap of processing / better performance.
When aggregating BufferCollectionConstraints, these values add.
A participant should typically specify 0 or 1 here - typically 0 is
appropriate if min_buffer_count_for_camping is already enough to keep
the participant busy 100% of the time when the participant is slightly
behind, while 1 can be appropriate if 1 more buffer than strictly needed
for min-camping reasons gives enough slack to stay busy 100% of the time
(when slightly behind, vs. lower % without the extra buffer).
In testing scenarios, this field may be forced to 0, and all
participants are expected to continue to work without getting stuck. If
a buffer is needed for forward progress reasons, that buffer should be
accounted for in min_buffer_count_for_camping.
uint32_t min_buffer_count_for_shared_slack ()
Similar to min_buffer_count_for_dedicated_slack, except when aggregating
these values max (instead of add). The value here is not shared with
any participant's min_buffer_count_for_dedicated_slack.
A participant can specify > 0 here if a participant would like to ensure
there's some slack overall, but doesn't need that slack to be dedicated.
The choice whether to use min_buffer_count_for_dedicated_slack or
min_buffer_count_for_shared_slack (or both) will typically be about the
degree to which the extra slack improves performance.
In testing scenarios, this field may be forced to 0, and all
participants are expected to continue to work without getting stuck. If
a buffer is needed for forward progress reasons, that buffer should be
accounted for in min_buffer_count_for_camping.
uint32_t & min_buffer_count_for_shared_slack ()
Similar to min_buffer_count_for_dedicated_slack, except when aggregating
these values max (instead of add). The value here is not shared with
any participant's min_buffer_count_for_dedicated_slack.
A participant can specify > 0 here if a participant would like to ensure
there's some slack overall, but doesn't need that slack to be dedicated.
The choice whether to use min_buffer_count_for_dedicated_slack or
min_buffer_count_for_shared_slack (or both) will typically be about the
degree to which the extra slack improves performance.
In testing scenarios, this field may be forced to 0, and all
participants are expected to continue to work without getting stuck. If
a buffer is needed for forward progress reasons, that buffer should be
accounted for in min_buffer_count_for_camping.
BufferCollectionConstraints & min_buffer_count_for_shared_slack (uint32_t value)
Similar to min_buffer_count_for_dedicated_slack, except when aggregating
these values max (instead of add). The value here is not shared with
any participant's min_buffer_count_for_dedicated_slack.
A participant can specify > 0 here if a participant would like to ensure
there's some slack overall, but doesn't need that slack to be dedicated.
The choice whether to use min_buffer_count_for_dedicated_slack or
min_buffer_count_for_shared_slack (or both) will typically be about the
degree to which the extra slack improves performance.
In testing scenarios, this field may be forced to 0, and all
participants are expected to continue to work without getting stuck. If
a buffer is needed for forward progress reasons, that buffer should be
accounted for in min_buffer_count_for_camping.
uint32_t min_buffer_count ()
A particularly-picky participant may unfortunately need to demand a
tight range of buffer_count, or even a specific buffer_count. This
field should remain 0 unless a participant really must set this field to
constrain the overall BufferCollectionInfo_2.buffer_count. Any such
participant should still fill out the min_buffer_count_for_* fields
above.
uint32_t & min_buffer_count ()
A particularly-picky participant may unfortunately need to demand a
tight range of buffer_count, or even a specific buffer_count. This
field should remain 0 unless a participant really must set this field to
constrain the overall BufferCollectionInfo_2.buffer_count. Any such
participant should still fill out the min_buffer_count_for_* fields
above.
BufferCollectionConstraints & min_buffer_count (uint32_t value)
A particularly-picky participant may unfortunately need to demand a
tight range of buffer_count, or even a specific buffer_count. This
field should remain 0 unless a participant really must set this field to
constrain the overall BufferCollectionInfo_2.buffer_count. Any such
participant should still fill out the min_buffer_count_for_* fields
above.
uint32_t max_buffer_count ()
0 is treated as 0xFFFFFFFF.
uint32_t & max_buffer_count ()
0 is treated as 0xFFFFFFFF.
BufferCollectionConstraints & max_buffer_count (uint32_t value)
0 is treated as 0xFFFFFFFF.
bool has_buffer_memory_constraints ()
Constraints on BufferCollectionSettings.buffer_settings.
A participant that intends to specify image_format_constraints_count > 1
will typically specify the minimum buffer size implicitly via
image_format_constraints, and possibly specify only the max buffer size
via buffer_memory_constraints.
bool & has_buffer_memory_constraints ()
Constraints on BufferCollectionSettings.buffer_settings.
A participant that intends to specify image_format_constraints_count > 1
will typically specify the minimum buffer size implicitly via
image_format_constraints, and possibly specify only the max buffer size
via buffer_memory_constraints.
BufferCollectionConstraints & has_buffer_memory_constraints (bool value)
Constraints on BufferCollectionSettings.buffer_settings.
A participant that intends to specify image_format_constraints_count > 1
will typically specify the minimum buffer size implicitly via
image_format_constraints, and possibly specify only the max buffer size
via buffer_memory_constraints.
const ::fuchsia_sysmem::BufferMemoryConstraints & buffer_memory_constraints ()
::fuchsia_sysmem::BufferMemoryConstraints & buffer_memory_constraints ()
BufferCollectionConstraints & buffer_memory_constraints (::fuchsia_sysmem::BufferMemoryConstraints value)
Setter for buffer_memory_constraints.
uint32_t image_format_constraints_count ()
Optional constraints on the image format parameters of an image stored
in a buffer of the BufferCollection. This includes pixel format and
image layout. These constraints are per-pixel-format, so more than one
is permitted. Entries in the list must have unique pixel_formats.
When aggregating, only pixel formats that are specified by all
participants with non-zero image_format_constraints_count (and non-Null)
BufferCollectionConstraints are retained.
uint32_t & image_format_constraints_count ()
Optional constraints on the image format parameters of an image stored
in a buffer of the BufferCollection. This includes pixel format and
image layout. These constraints are per-pixel-format, so more than one
is permitted. Entries in the list must have unique pixel_formats.
When aggregating, only pixel formats that are specified by all
participants with non-zero image_format_constraints_count (and non-Null)
BufferCollectionConstraints are retained.
BufferCollectionConstraints & image_format_constraints_count (uint32_t value)
Optional constraints on the image format parameters of an image stored
in a buffer of the BufferCollection. This includes pixel format and
image layout. These constraints are per-pixel-format, so more than one
is permitted. Entries in the list must have unique pixel_formats.
When aggregating, only pixel formats that are specified by all
participants with non-zero image_format_constraints_count (and non-Null)
BufferCollectionConstraints are retained.
const ::std::array< ::fuchsia_sysmem::ImageFormatConstraints, 32> & image_format_constraints ()
::std::array< ::fuchsia_sysmem::ImageFormatConstraints, 32> & image_format_constraints ()
BufferCollectionConstraints & image_format_constraints (::std::array< ::fuchsia_sysmem::ImageFormatConstraints, 32> value)
Setter for image_format_constraints.
void BufferCollectionConstraints (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )
BufferCollectionConstraints & operator= (BufferCollectionConstraints && )
Defined at line 5787 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h
Friends
class MemberVisitor
class NaturalStructCodingTraits