qt: playlist: use item title if available
[vlc.git] / modules / codec / omxil / omxil.h
blobe79bd5ed8d0cb711016377d1f94247e13bcb77bf
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 *****************************************************************************/
23 #ifdef RPI_OMX
24 #define OMX_SKIP64BIT
25 #endif
27 /*****************************************************************************
28 * Includes
29 *****************************************************************************/
30 #include "OMX_Core.h"
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"
38 enum
40 BUF_STATE_NOT_OWNED = 0,
41 BUF_STATE_OWNED,
44 /*****************************************************************************
45 * decoder_sys_t : omxil decoder descriptor
46 *****************************************************************************/
47 typedef struct OmxFifo
49 vlc_mutex_t lock;
50 vlc_cond_t wait;
52 OMX_BUFFERHEADERTYPE *p_first;
53 OMX_BUFFERHEADERTYPE **pp_last;
55 int offset;
57 } OmxFifo;
59 typedef struct OmxPort
61 bool b_valid;
62 OMX_U32 i_port_index;
63 OMX_HANDLETYPE omx_handle;
64 OMX_PARAM_PORTDEFINITIONTYPE definition;
65 es_format_t *p_fmt;
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;
74 OmxFifo fifo;
76 OmxFormatParam format_param;
78 OMX_BOOL b_reconfigure;
79 OMX_BOOL b_update_def;
80 OMX_BOOL b_direct;
81 OMX_BOOL b_flushed;
82 } OmxPort;
84 typedef struct
86 OMX_HANDLETYPE omx_handle;
88 bool b_enc;
90 char psz_component[OMX_MAX_STRINGNAME_SIZE];
91 char ppsz_components[MAX_COMPONENTS_LIST_SIZE][OMX_MAX_STRINGNAME_SIZE];
92 unsigned int components;
93 int i_quirks;
95 OmxEventQueue event_queue;
97 OmxPort *p_ports;
98 unsigned int ports;
99 OmxPort in;
100 OmxPort out;
102 bool b_error;
104 bool b_aspect_ratio_handled;
106 date_t end_date;
108 uint8_t i_nal_size_length; /* Length of the NAL size field for H264 */
109 int b_use_pts;
111 } decoder_sys_t;