1/*
2Copyright (c) 2012, Broadcom Europe Ltd
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, 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
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON 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
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28/** \file
29 * OpenMAX IL adaptation layer for MMAL - Commands related functions
30 */
31
32OMX_ERRORTYPE mmalomx_command_state_set(
33 OMX_HANDLETYPE hComponent,
34 OMX_STATETYPE state);
35
36OMX_ERRORTYPE mmalomx_command_port_mark(
37 OMX_HANDLETYPE hComponent,
38 OMX_U32 nPortIndex,
39 OMX_PTR *pCmdData);
40
41OMX_ERRORTYPE mmalomx_command_port_flush(
42 OMX_HANDLETYPE hComponent,
43 OMX_U32 nPortIndex);
44
45OMX_ERRORTYPE mmalomx_command_port_enable(
46 OMX_HANDLETYPE hComponent,
47 OMX_U32 nPortIndex);
48
49OMX_ERRORTYPE mmalomx_command_port_disable(
50 OMX_HANDLETYPE hComponent,
51 OMX_U32 nPortIndex);
52
53#define MMALOMX_ACTION_ENABLE 0x01
54#define MMALOMX_ACTION_DISABLE 0x02
55#define MMALOMX_ACTION_FLUSH 0x04
56
57#define MMALOMX_ACTION_PENDING_ENABLE 0x010
58#define MMALOMX_ACTION_PENDING_DISABLE 0x020
59#define MMALOMX_ACTION_PENDING_FLUSH 0x040
60
61#define MMALOMX_ACTION_CHECK_ALLOCATED 0x0100
62#define MMALOMX_ACTION_CHECK_DEALLOCATED 0x0200
63#define MMALOMX_ACTION_CHECK_FLUSHED 0x0400
64
65#define MMALOMX_ACTION_NOTIFY_DISABLE 0x1000
66#define MMALOMX_ACTION_NOTIFY_ENABLE 0x2000
67#define MMALOMX_ACTION_NOTIFY_FLUSH 0x4000
68#define MMALOMX_ACTION_NOTIFY_STATE 0x8000
69
70#define MMALOMX_COMMAND_EXIT 0
71#define MMALOMX_COMMAND_STATE_SET 1
72#define MMALOMX_COMMAND_PORT_MARK 2
73#define MMALOMX_COMMAND_PORT_FLUSH 3
74#define MMALOMX_COMMAND_PORT_ENABLE 4
75#define MMALOMX_COMMAND_PORT_DISABLE 5
76
77OMX_ERRORTYPE mmalomx_command_queue(
78 MMALOMX_COMPONENT_T *component, OMX_U32 arg1, OMX_U32 arg2);
79OMX_ERRORTYPE mmalomx_command_dequeue(
80 MMALOMX_COMPONENT_T *component, OMX_U32 *arg1, OMX_U32 *arg2);
81
82void mmalomx_commands_actions_check(MMALOMX_COMPONENT_T *component);
83void mmalomx_commands_actions_signal(MMALOMX_COMPONENT_T *component);
84void mmalomx_commands_actions_next(MMALOMX_COMPONENT_T *component);
85
86