2 * Broadcom BM2835 V4L2 driver
4 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
10 * Authors: Vincent Sanders <vincent.sanders@collabora.co.uk>
11 * Dave Stevenson <dsteve@broadcom.com>
12 * Simon Mellor <simellor@broadcom.com>
13 * Luke Diamand <luked@broadcom.com>
16 /* MMAL_PORT_TYPE_T */
18 MMAL_PORT_TYPE_UNKNOWN
= 0, /**< Unknown port type */
19 MMAL_PORT_TYPE_CONTROL
, /**< Control port */
20 MMAL_PORT_TYPE_INPUT
, /**< Input port */
21 MMAL_PORT_TYPE_OUTPUT
, /**< Output port */
22 MMAL_PORT_TYPE_CLOCK
, /**< Clock port */
25 /** The port is pass-through and doesn't need buffer headers allocated */
26 #define MMAL_PORT_CAPABILITY_PASSTHROUGH 0x01
27 /** The port wants to allocate the buffer payloads.
28 * This signals a preference that payload allocation should be done
29 * on this port for efficiency reasons. */
30 #define MMAL_PORT_CAPABILITY_ALLOCATION 0x02
31 /** The port supports format change events.
32 * This applies to input ports and is used to let the client know
33 * whether the port supports being reconfigured via a format
34 * change event (i.e. without having to disable the port). */
35 #define MMAL_PORT_CAPABILITY_SUPPORTS_EVENT_FORMAT_CHANGE 0x04
37 /* mmal port structure (MMAL_PORT_T)
39 * most elements are informational only, the pointer values for
40 * interogation messages are generally provided as additional
41 * strucures within the message. When used to set values only teh
42 * buffer_num, buffer_size and userdata parameters are writable.
45 void *priv
; /* Private member used by the framework */
46 const char *name
; /* Port name. Used for debugging purposes (RO) */
48 u32 type
; /* Type of the port (RO) enum mmal_port_type */
49 u16 index
; /* Index of the port in its type list (RO) */
50 u16 index_all
; /* Index of the port in the list of all ports (RO) */
52 u32 is_enabled
; /* Indicates whether the port is enabled or not (RO) */
53 struct mmal_es_format
*format
; /* Format of the elementary stream */
55 u32 buffer_num_min
; /* Minimum number of buffers the port
56 * requires (RO). This is set by the
60 u32 buffer_size_min
; /* Minimum size of buffers the port
61 * requires (RO). This is set by the
65 u32 buffer_alignment_min
; /* Minimum alignment requirement for
66 * the buffers (RO). A value of
67 * zero means no special alignment
68 * requirements. This is set by the
72 u32 buffer_num_recommended
; /* Number of buffers the port
73 * recommends for optimal
74 * performance (RO). A value of
75 * zero means no special
76 * recommendation. This is set
80 u32 buffer_size_recommended
; /* Size of buffers the port
81 * recommends for optimal
82 * performance (RO). A value of
83 * zero means no special
84 * recommendation. This is set
88 u32 buffer_num
; /* Actual number of buffers the port will use.
89 * This is set by the client.
92 u32 buffer_size
; /* Actual maximum size of the buffers that
93 * will be sent to the port. This is set by
97 void *component
; /* Component this port belongs to (Read Only) */
99 void *userdata
; /* Field reserved for use by the client */
101 u32 capabilities
; /* Flags describing the capabilities of a
102 * port (RO). Bitwise combination of \ref
103 * portcapabilities "Port capabilities"