My Project
mmal_component_private.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_COMPONENT_PRIVATE_H
29 #define MMAL_COMPONENT_PRIVATE_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #define MMAL_VIDEO_DECODE "video_decode"
36 #define MMAL_VIDEO_ENCODE "video_encode"
37 #define MMAL_VIDEO_RENDER "video_render"
38 #define MMAL_AUDIO_DECODE "audio_decode"
39 #define MMAL_AUDIO_ENCODE "audio_encode"
40 #define MMAL_AUDIO_RENDER "audio_render"
41 #define MMAL_CAMERA "camera"
42 
43 #if defined(__GNUC__) && (__GNUC__ > 2)
44 # define MMAL_CONSTRUCTOR(func) void __attribute__((constructor,used)) func(void)
45 # define MMAL_DESTRUCTOR(func) void __attribute__((destructor,used)) func(void)
46 #else
47 # define MMAL_CONSTRUCTOR(func) void func(void)
48 # define MMAL_DESTRUCTOR(func) void func(void)
49 #endif
50 
51 #include "mmal.h"
52 #include "mmal_component.h"
53 
56 {
58  struct MMAL_COMPONENT_MODULE_T *module;
59 
63 
66 
68  int refcount;
72 
75  int priority;
76 };
77 
85  const MMAL_PARAMETER_HEADER_T *param);
86 
95 
106  void (*pf_action)(MMAL_COMPONENT_T *));
107 
114 
122 
130 
137 
140  MMAL_COMPONENT_T *component);
141 
153  MMAL_STATUS_T (*constructor)(const char *name, MMAL_COMPONENT_T *),
154  struct MMAL_COMPONENT_MODULE_T *constructor_private,
155  MMAL_COMPONENT_T **component);
156 
162 void mmal_component_supplier_register(const char *prefix,
164 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #endif /* MMAL_COMPONENT_PRIVATE_H */
MMAL_STATUS_T(* pf_destroy)(MMAL_COMPONENT_T *component)
MMAL_STATUS_T mmal_component_parameter_set(MMAL_PORT_T *control_port, const MMAL_PARAMETER_HEADER_T *param)
MMAL_STATUS_T mmal_component_action_register(MMAL_COMPONENT_T *component, void(*pf_action)(MMAL_COMPONENT_T *))
MMAL_STATUS_T mmal_component_action_unlock(MMAL_COMPONENT_T *component)
MMAL_STATUS_T mmal_component_action_deregister(MMAL_COMPONENT_T *component)
void mmal_component_supplier_register(const char *prefix, MMAL_COMPONENT_SUPPLIER_FUNCTION_T create_fn)
MMAL_STATUS_T mmal_component_action_lock(MMAL_COMPONENT_T *component)
MMAL_STATUS_T mmal_component_create_with_constructor(const char *name, MMAL_STATUS_T(*constructor)(const char *name, MMAL_COMPONENT_T *), struct MMAL_COMPONENT_MODULE_T *constructor_private, MMAL_COMPONENT_T **component)
MMAL_STATUS_T mmal_component_parameter_get(MMAL_PORT_T *control_port, MMAL_PARAMETER_HEADER_T *param)
MMAL_STATUS_T(* pf_disable)(MMAL_COMPONENT_T *component)
MMAL_STATUS_T(* MMAL_COMPONENT_SUPPLIER_FUNCTION_T)(const char *name, MMAL_COMPONENT_T *component)
struct MMAL_COMPONENT_MODULE_T * module
MMAL_STATUS_T(* pf_enable)(MMAL_COMPONENT_T *component)
MMAL_STATUS_T
Definition: mmal_types.h:46
MMAL_STATUS_T mmal_component_action_trigger(MMAL_COMPONENT_T *component)