1 /*****************************************************************************
2 * omxil.h: helper functions
3 *****************************************************************************
4 * Copyright (C) 2010 VLC authors and VideoLAN
6 * Authors: Gildas Bazin <gbazin@videolan.org>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
27 /*****************************************************************************
29 *****************************************************************************/
31 #include "OMX_Index.h"
32 #include "OMX_Component.h"
33 #include "OMX_Video.h"
35 #include "omxil_utils.h"
36 #include "omxil_core.h"
40 BUF_STATE_NOT_OWNED
= 0,
44 /*****************************************************************************
45 * decoder_sys_t : omxil decoder descriptor
46 *****************************************************************************/
47 typedef struct OmxFifo
52 OMX_BUFFERHEADERTYPE
*p_first
;
53 OMX_BUFFERHEADERTYPE
**pp_last
;
59 typedef struct OmxPort
63 OMX_HANDLETYPE omx_handle
;
64 OMX_PARAM_PORTDEFINITIONTYPE definition
;
67 unsigned int i_frame_size
;
68 unsigned int i_frame_stride
;
69 unsigned int i_frame_stride_chroma_div
;
71 unsigned int i_buffers
;
72 OMX_BUFFERHEADERTYPE
**pp_buffers
;
76 OmxFormatParam format_param
;
78 OMX_BOOL b_reconfigure
;
79 OMX_BOOL b_update_def
;
86 OMX_HANDLETYPE omx_handle
;
90 char psz_component
[OMX_MAX_STRINGNAME_SIZE
];
91 char ppsz_components
[MAX_COMPONENTS_LIST_SIZE
][OMX_MAX_STRINGNAME_SIZE
];
92 unsigned int components
;
95 OmxEventQueue event_queue
;
104 bool b_aspect_ratio_handled
;
108 uint8_t i_nal_size_length
; /* Length of the NAL size field for H264 */