1 /*--------------------------------------------------------------------------
2 Copyright (c) 2011-2012 The Linux Foundation. All rights reserved.
3 
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6     * Redistributions of source code must retain the above copyright
7       notice, this list of conditions and the following disclaimer.
8     * Redistributions in binary form must reproduce the above copyright
9       notice, this list of conditions and the following disclaimer in the
10       documentation and/or other materials provided with the distribution.
11     * Neither the name of The Linux Foundation nor
12       the names of its contributors may be used to endorse or promote
13       products derived from this software without specific prior written
14       permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 --------------------------------------------------------------------------*/
28 
29 #ifndef __H_QOMX_SOURCEEXTENSIONS_H__
30 #define __H_QOMX_SOURCEEXTENSIONS_H__
31 /*========================================================================
32 *//** @file QOMX_SourceExtensions.h
33 
34 @par FILE SERVICES:
35     Qualcomm extensions API for OpenMax IL demuxer component.
36 
37     This file contains the description of the Qualcomm OpenMax IL
38     demuxer component extention interface, through which the IL client and
39     OpenMax components can access additional capabilities of the demuxer.
40 
41 *//*====================================================================== */
42 
43 
44 /*========================================================================
45                      INCLUDE FILES FOR MODULE
46 ========================================================================== */
47 #include <OMX_Core.h>
48 /*========================================================================
49                       DEFINITIONS AND DECLARATIONS
50 ========================================================================== */
51 
52 #if defined( __cplusplus )
53 extern "C"
54 {
55 #endif /* end of macro __cplusplus */
56 /* Frame size query supported extension string */
57 #define OMX_QCOM_INDEX_PARAM_FRAMESIZEQUERYSUPPORTED       "OMX.QCOM.index.param.FrameSizeQuerySupported"      /**< reference: QOMX_FRAMESIZETYPE */
58 
59 /* Content interface extension strings */
60 #define OMX_QCOM_INDEX_PARAM_CONTENTINTERFACE_IXSTREAM     "OMX.QCOM.index.param.contentinterface.ixstream"    /**< reference: QOMX_CONTENTINTERFACETYPE*/
61 #define OMX_QCOM_INDEX_PARAM_CONTENTINTERFACE_ISTREAMPORT  "OMX.QCOM.index.param.contentinterface.istreamport" /**< reference: QOMX_CONTENTINTERFACETYPE*/
62 
63 /* Source seek access extension string */
64 #define OMX_QCOM_INDEX_PARAM_SEEK_ACCESS            "OMX.QCOM.index.param.SeekAccess"                   /**< reference: QOMX_PARAM_SEEKACCESSTYPE*/
65 
66 /* Media duration extension string*/
67 #define OMX_QCOM_INDEX_CONFIG_MEDIADURATION                "OMX.QCOM.index.config.MediaDuration"               /**< reference: OMX_TIME_CONFIG_MEDIADURATIONTYPE*/
68 
69 /**
70  *  Data interface Params
71  *
72  *  STRUCT MEMBERS:
73  *  nSize          : Size of the structure in bytes
74  *  nVersion       : OMX specification version information
75  *  nInterfaceSize : Size of the data pointed by pInterface
76  *  pInterface     : Interface pointer
77  */
78 typedef struct QOMX_CONTENTINTERFACETYPE {
79     OMX_U32 nSize;
80     OMX_VERSIONTYPE nVersion;
81     OMX_U32 nInterfaceSize;
82     OMX_U8 pInterface[1];
83 } QOMX_DATAINTERFACETYPE;
84 
85 /**
86  *  Seek Access Parameters
87  *
88  *  STRUCT MEMBERS:
89  *  nSize          : Size of the structure in bytes
90  *  nVersion       : OMX specification version information
91  *  nPortIndex     : Index of port
92  *  bSeekAllowed   : Flag to indicate whether seek is supported or not
93  */
94 typedef struct QOMX_PARAM_SEEKACCESSTYPE {
95     OMX_U32 nSize;
96     OMX_VERSIONTYPE nVersion;
97     OMX_U32 nPortIndex;
98     OMX_BOOL bSeekAllowed;
99 } QOMX_PARAM_SEEKACCESSTYPE;
100 
101 /**
102  *  Media Duration parameters
103  *
104  *  STRUCT MEMBERS:
105  *  nSize          : Size of the structure in bytes
106  *  nVersion       : OMX specification version information
107  *  nPortIndex     : Index of port
108  *  nDuration      : Total duration of the media
109 */
110 typedef struct OMX_TIME_CONFIG_MEDIADURATIONTYPE {
111     OMX_U32 nSize;
112     OMX_VERSIONTYPE nVersion;
113     OMX_U32 nPortIndex;
114     OMX_TICKS nDuration;
115 } OMX_TIME_CONFIG_MEDIADURATIONTYPE;
116 
117 /**
118  *  The parameters for QOMX_FRAMESIZETYPE are defined as
119  *  follows:
120  *
121  *  STRUCT MEMBERS:
122  *  nSize           : Size of the structure in bytes
123  *  nVersion        : OMX specification version information
124  *  nPortIndex      : Represents the port that this structure
125  *                    applies to
126  *  sFrameSize      : Indicates the size of the frame
127  *  nFrameSizeIndex : Enumerates the possible frame sizes for
128  *                    the given session/URL configuration. The
129  *                    caller specifies all fields and the
130  *                    OMX_GetParameter call returns the value of
131  *                    the frame size. The value of
132  *                    nFrameSizeIndex goes from 0 to N-1, where
133  *                    N is the number of frame sizes that may be
134  *                    emitted by the port. The port does not
135  *                    need to report N as the caller can
136  *                    determine N by enumerating all the frame
137  *                    sizes supported by the port. If the port
138  *                    does not have advance knowledge of the
139  *                    possible frame sizes, it may report no
140  *                    frame sizes. If there are no more frame
141  *                    sizes, OMX_GetParameter returns
142  *                    OMX_ErrorNoMore.
143  */
144 typedef struct QOMX_FRAMESIZETYPE
145 {
146   OMX_U32 nSize;
147   OMX_VERSIONTYPE nVersion;
148   OMX_U32 nPortIndex;
149   OMX_FRAMESIZETYPE sFrameSize;
150   OMX_U32 nFrameSizeIndex;
151 } QOMX_FRAMESIZETYPE;
152 
153 #if defined( __cplusplus )
154 }
155 #endif /* end of macro __cplusplus */
156 
157 #endif /* end of macro __H_QOMX_SOURCEEXTENSIONS_H__ */
158