Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mpipe_app_src.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
16
17#ifndef ZEPHYR_INCLUDE_MPIPE_BASE_MPIPE_APP_SRC_H_
18#define ZEPHYR_INCLUDE_MPIPE_BASE_MPIPE_APP_SRC_H_
19
37
38#include <stdint.h>
39
40#include <zephyr/kernel.h>
41#include <zephyr/net_buf.h>
42
47
51enum {
59};
60
66 struct mpipe_src src;
72 struct k_msgq msgq;
74 char msgq_buffer[(CONFIG_MPIPE_BASE_APP_SRC_QUEUE_DEPTH + 1) * sizeof(void *)];
75};
76
85int mpipe_app_src_init(struct mpipe_app_src *app_src, uint8_t id);
86
104int mpipe_app_src_alloc(struct mpipe_app_src *app_src, uint32_t size, k_timeout_t timeout,
105 struct net_buf **buf);
106
122int mpipe_app_src_push_buf(struct mpipe_app_src *app_src, struct net_buf *buf, uint32_t size,
123 k_timeout_t timeout);
124
141int mpipe_app_src_push(struct mpipe_app_src *app_src, const void *data, uint32_t size,
142 k_timeout_t timeout);
143
157int mpipe_app_src_eos(struct mpipe_app_src *app_src, k_timeout_t timeout);
158
160
161#endif /* ZEPHYR_INCLUDE_MPIPE_BASE_MPIPE_APP_SRC_H_ */
int mpipe_app_src_init(struct mpipe_app_src *app_src, uint8_t id)
Initialize an application source element.
int mpipe_app_src_alloc(struct mpipe_app_src *app_src, uint32_t size, k_timeout_t timeout, struct net_buf **buf)
Take a buffer of the element's pool to fill in place.
int mpipe_app_src_push(struct mpipe_app_src *app_src, const void *data, uint32_t size, k_timeout_t timeout)
Push one payload into the pipeline, by copy.
int mpipe_app_src_push_buf(struct mpipe_app_src *app_src, struct net_buf *buf, uint32_t size, k_timeout_t timeout)
Queue a filled buffer into the pipeline.
int mpipe_app_src_eos(struct mpipe_app_src *app_src, k_timeout_t timeout)
Declare end of stream.
@ MPIPE_PROP_BASE_APP_SRC_CAPS
Capability of the produced stream, a const struct mpipe_structure pointer, copied.
Definition mpipe_app_src.h:58
@ MPIPE_PROP_SRC_LAST
Last source property marker (for validation/iteration).
Definition mpipe_src.h:53
Public kernel APIs.
Buffer and buffer pool APIs.
Element: the unit a pipeline is built from.
Source: an element that produces buffers.
Structure: one media capability, held by value.
Buffer management.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Message Queue Structure.
Definition kernel.h:5265
Kernel timeout type.
Definition clock.h:65
Application source element structure.
Definition mpipe_app_src.h:64
char msgq_buffer[(CONFIG_MPIPE_BASE_APP_SRC_QUEUE_DEPTH+1) *sizeof(void *)]
Backing storage: the configured depth plus one slot for a sentinel.
Definition mpipe_app_src.h:74
struct mpipe_buffer_pool pool
Buffer pool the payloads travel in.
Definition mpipe_app_src.h:70
struct k_msgq msgq
Queue of pushed buffers, consumed by the pipeline thread.
Definition mpipe_app_src.h:72
struct mpipe_structure caps
Capability of the produced stream, offered at every negotiation.
Definition mpipe_app_src.h:68
struct mpipe_src src
Base source element (must be first).
Definition mpipe_app_src.h:66
Buffer pool structure.
Definition mpipe_buffer.h:75
Base Source Element Structure.
Definition mpipe_src.h:62
Fixed-size container holding the fields of one capability.
Definition mpipe_structure.h:179
Network buffer representation.
Definition net_buf.h:1054