MMAL_3-15-2015
mmal_connection.h
1 /*
2 Copyright (c) 2012, Broadcom Europe Ltd
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the copyright holder nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef MMAL_CONNECTION_H
29 #define MMAL_CONNECTION_H
30 
82 #ifdef __cplusplus
83 extern "C" {
84 #endif
85 
89 /* @{ */
92 #define MMAL_CONNECTION_FLAG_TUNNELLING 0x1
93 
94 #define MMAL_CONNECTION_FLAG_ALLOCATION_ON_INPUT 0x2
95 
96 #define MMAL_CONNECTION_FLAG_ALLOCATION_ON_OUTPUT 0x4
97 
98 #define MMAL_CONNECTION_FLAG_KEEP_BUFFER_REQUIREMENTS 0x8
99 
102 #define MMAL_CONNECTION_FLAG_DIRECT 0x10
103 /* @} */
104 
107 
113 typedef void (*MMAL_CONNECTION_CALLBACK_T)(MMAL_CONNECTION_T *connection);
114 
117 
118  void *user_data;
121  uint32_t is_enabled;
123  uint32_t flags;
130  MMAL_QUEUE_T *queue;
132  const char *name;
134  /* Used for debug / statistics */
135  int64_t time_setup;
136  int64_t time_enable;
137  int64_t time_disable;
138 };
139 
156  MMAL_PORT_T *out, MMAL_PORT_T *in, uint32_t flags);
157 
167 
178 
189 
203 
210 
222  MMAL_BUFFER_HEADER_T *buffer);
223 
224 #ifdef __cplusplus
225 }
226 #endif
227 
230 #endif /* MMAL_CONNECTION_H */
uint32_t flags
Definition: mmal_connection.h:123
int64_t time_setup
Definition: mmal_connection.h:135
MMAL_POOL_T * pool
Definition: mmal_connection.h:129
MMAL_STATUS_T mmal_connection_create(MMAL_CONNECTION_T **connection, MMAL_PORT_T *out, MMAL_PORT_T *in, uint32_t flags)
MMAL_STATUS_T mmal_connection_destroy(MMAL_CONNECTION_T *connection)
Definition: mmal_port.h:79
Definition: mmal_pool.h:43
int64_t time_disable
Definition: mmal_connection.h:137
Definition: mmal_connection.h:116
MMAL_PORT_T * out
Definition: mmal_connection.h:127
uint32_t is_enabled
Definition: mmal_connection.h:121
void(* MMAL_CONNECTION_CALLBACK_T)(MMAL_CONNECTION_T *connection)
Definition: mmal_connection.h:113
void mmal_connection_acquire(MMAL_CONNECTION_T *connection)
MMAL_STATUS_T mmal_connection_release(MMAL_CONNECTION_T *connection)
MMAL_QUEUE_T * queue
Definition: mmal_connection.h:130
const char * name
Definition: mmal_connection.h:132
int64_t time_enable
Definition: mmal_connection.h:136
MMAL_PORT_T * in
Definition: mmal_connection.h:126
void * user_data
Definition: mmal_connection.h:118
MMAL_STATUS_T mmal_connection_event_format_changed(MMAL_CONNECTION_T *connection, MMAL_BUFFER_HEADER_T *buffer)
MMAL_STATUS_T mmal_connection_enable(MMAL_CONNECTION_T *connection)
MMAL_STATUS_T mmal_connection_disable(MMAL_CONNECTION_T *connection)
Definition: mmal_buffer.h:69
MMAL_STATUS_T
Definition: mmal_types.h:46
MMAL_CONNECTION_CALLBACK_T callback
Definition: mmal_connection.h:119