Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Structure: one media capability, held by value. More...

Go to the source code of this file.

Data Structures

struct  mpipe_structure
 Fixed-size container holding the fields of one capability. More...

Macros

#define MPIPE_STRUCTURE_FLAG_ANY   BIT(0)
 The structure constrains nothing and intersects with anything.
#define MPIPE_FRAME_INTERVAL_FROM_FPS(fps)
 Convert a frame rate in frames per second to a frame interval in microseconds.
#define MPIPE_STRUCTURE_DEFINE(name, media, fields)
 Define a read-only Capability Structure in .rodata.

Enumerations

enum  mpipe_media_type { MPIPE_MEDIA_UNKNOWN = 0 , MPIPE_MEDIA_AUDIO_PCM , MPIPE_MEDIA_VIDEO , MPIPE_MEDIA_END }
 Media type a capability describes. More...
enum  mpipe_caps_field {
  MPIPE_CAPS_PIXEL_FORMAT = 0 , MPIPE_CAPS_IMAGE_WIDTH , MPIPE_CAPS_IMAGE_HEIGHT , MPIPE_CAPS_SAMPLE_RATE ,
  MPIPE_CAPS_BITWIDTH , MPIPE_CAPS_NUM_OF_CHANNEL , MPIPE_CAPS_INTERLEAVED , MPIPE_CAPS_FRAME_INTERVAL ,
  MPIPE_CAPS_END
}
 Caps field identifiers. More...

Functions

int mpipe_structure_init (struct mpipe_structure *structure, uint8_t media_type_id)
 Initialize an Capability Structure.
int mpipe_structure_init_fields (struct mpipe_structure *structure, uint8_t media_type_id,...)
 Initialize an Capability Structure with a media type and a list of fields.
int mpipe_structure_init_any (struct mpipe_structure *structure)
 Initialize a structure that constrains nothing.
bool mpipe_structure_is_any (const struct mpipe_structure *structure)
 Check whether a structure constrains nothing.
bool mpipe_structure_is_empty (const struct mpipe_structure *structure)
 Check whether an Capability Structure matches nothing.
int mpipe_structure_append_value (struct mpipe_structure *structure, uint8_t field_id, const struct mpipe_value *value)
 Append a field to an Capability Structure from caller-owned storage.
int mpipe_structure_copy_field (const struct mpipe_structure *src, struct mpipe_structure *dst, uint8_t field_id)
 Copy a field from one Capability Structure to another.
int mpipe_structure_clear (struct mpipe_structure *structure)
 Empty an Capability Structure, dropping every field it carries.
bool mpipe_structure_is_fixed (const struct mpipe_structure *structure)
 Check if an Capability Structure is fixed.
const struct mpipe_value * mpipe_structure_get_value (const struct mpipe_structure *structure, uint8_t field_id)
 Get the value of a field in an Capability Structure.
int mpipe_structure_remove_field (struct mpipe_structure *structure, uint8_t field_id)
 Remove a field from an Capability Structure.
int mpipe_structure_intersect (const struct mpipe_structure *struct1, const struct mpipe_structure *struct2, struct mpipe_structure *out)
 Intersect two structures into caller-provided storage.
int mpipe_structure_fixate (const struct mpipe_structure *src, struct mpipe_structure *out)
 Fixate a structure into caller-provided storage.
void mpipe_structure_print (const struct mpipe_structure *structure)
 Print an Capability Structure.

Detailed Description

Structure: one media capability, held by value.