My Project
mmal_connection.h
Go to the documentation of this file.
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 #define MMAL_CONNECTION_FLAG_KEEP_PORT_FORMATS 0x20
105 /* @} */
106 
109 
115 typedef void (*MMAL_CONNECTION_CALLBACK_T)(MMAL_CONNECTION_T *connection);
116 
119 
120  void *user_data;
123  uint32_t is_enabled;
125  uint32_t flags;
134  const char *name;
136  /* Used for debug / statistics */
137  int64_t time_setup;
138  int64_t time_enable;
139  int64_t time_disable;
140 };
141 
158  MMAL_PORT_T *out, MMAL_PORT_T *in, uint32_t flags);
159 
169 
180 
191 
205 
212 
224  MMAL_BUFFER_HEADER_T *buffer);
225 
226 #ifdef __cplusplus
227 }
228 #endif
229 
232 #endif /* MMAL_CONNECTION_H */
MMAL_POOL_T * pool
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)
MMAL_PORT_T * out
void(* MMAL_CONNECTION_CALLBACK_T)(MMAL_CONNECTION_T *connection)
void mmal_connection_acquire(MMAL_CONNECTION_T *connection)
MMAL_STATUS_T mmal_connection_release(MMAL_CONNECTION_T *connection)
MMAL_QUEUE_T * queue
struct MMAL_QUEUE_T MMAL_QUEUE_T
Definition: mmal_queue.h:43
MMAL_PORT_T * in
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)
MMAL_STATUS_T
Definition: mmal_types.h:46
MMAL_CONNECTION_CALLBACK_T callback