summaryrefslogtreecommitdiff
path: root/omx/openmax/NVOMX_TrackList.h
blob: b8e5a3e90b89a6b4f5e2c30af86952d35d733122 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/* Copyright (c) 2008 NVIDIA Corporation.  All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject
 * to the following conditions:
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

/** 
 * @file
 * <b>NVIDIA Tegra: OpenMAX Container Tracklist Extension Interface</b>
 *
 */

#ifndef NVOMX_TrackList_h
#define NVOMX_TrackList_h

/***************************************************************
 ****  THIS INTERFACE IS DEPRECATED AND NO LONGER SUPPORTED ****
 ***************************************************************/

/**
 * @defgroup nv_omx_il_tracklist Tracklist
 *   
 * This is the NVIDIA OpenMAX container demux class tracklist interface extension.
 *
 * It defines the container extension interface to play multiple files with one graph
 * as well as support for gapless audio playback.
 *
 * @ingroup nvomx_container_extension
 * @{
 */

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <OMX_Core.h>

/**
 * If NvxTrack_AutoAdvance is set, the next track will automatically be
 * played
 */
typedef enum
{
    NvxTrack_NoFlags        = 0x00000000,
    NvxTrack_AutoAdvance    = 0x00000001,

    NvxTrack_Force32        = 0x7FFFFFFF
} NvxTrackFlags;

/**
 * Filetypes to override the automatic detection.
 */
typedef enum
{
    NvxType_Default = 0, // Generally, use this.
    NvxType_Asf, // asf, wma, wmv
    NvxType_3gp, // mov, 3gp, m4a, m4v
    NvxType_Avi,
    NvxType_Mp3,
    NvxType_Ogg,
    NvxType_Ogm,
    NvxType_Wav,
    NvxType_Mkv, // mkv
    NvxType_Force32 = 0x7FFFFFFF
} NvxFileType;
/**
 * Holds information about a single track.
 *
 * pClientPrivate may be set to anything the IL client desires
 *
 * pPath _must_ be in UTF-8.
 */
typedef struct NvxTrackInfoRec
{
    NvxTrackFlags eTrackFlag;
    void *pClientPrivate;
    OMX_U32 uSize;
    OMX_U8 *pPath;
    NvxFileType eType;
} NvxTrackInfo;

typedef OMX_HANDLETYPE NvxTrackList;

/**
 * Get/Set a tracklist handle.  
 *
 * Get the handle from the parser component, and set it on all other components
 * in the chain (ie, audio decoder, audio renderer).
 */
#define NVX_INDEX_CONFIG_TRACKLIST "OMX.Nvidia.index.config.tracklist"
/** Holds a tracklist handle. */
typedef struct NVX_CONFIG_TRACKLIST
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    NvxTrackList hTrackList;        /**< Tracklist handle */
} NVX_CONFIG_TRACKLIST;

/**
 * Add/Get a track.
 *
 * Add a track to the specified position (uIndex) with SetConfig.
 * Get info on a track at the specified position (uIndex) with GetConfig.
 * 
 * Only valid on the parser component.
 */ 
#define NVX_INDEX_CONFIG_TRACKLIST_TRACK "OMX.Nvidia.index.config.tracklist.track"
/** Holds tracklist information. */
typedef struct NVX_CONFIG_TRACKLIST_TRACK
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 uIndex;                 /**< Index of track */
    NvxTrackInfo *pTrackInfo;       /**< Track information */
} NVX_CONFIG_TRACKLIST_TRACK;

/**
 * Delete tracks from a tracklist.
 *
 * Use -1 for nIndex to delete all tracks from the tracklist.
 *
 * Only valid on the parser component.
 */
#define NVX_INDEX_CONFIG_TRACKLIST_DELETE "OMX.Nvidia.index.config.tracklist.delete"
/** Holds a tracklist index. */
typedef struct NVX_CONFIG_TRACKLIST_DELETE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_S32 nIndex;                 /**< Index of track to delete */
} NVX_CONFIG_TRACKLIST_DELETE;

/**
 * Query the size of the tracklist.
 *
 * Only valid as a GetConfig on the parser component.
 */
#define NVX_INDEX_CONFIG_TRACKLIST_SIZE "OMX.Nvidia.index.config.tracklist.size"
/** Holds a tracklist size. */
typedef struct NVX_CONFIG_TRACKLIST_SIZE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 uTracklistSize;         /**< Number of tracks in the tracklist */
} NVX_CONFIG_TRACKLIST_SIZE;

/**
 * Get/Set the current track.
 *
 * pTrackInfo will be filled on GetConfig, and unused on SetConfig.
 *
 * Only valid on the parser component.
 */
#define NVX_INDEX_CONFIG_TRACKLIST_CURRENT "OMX.Nvidia.index.config.tracklist.current"
/** Holds tracklist information. */
typedef struct NVX_CONFIG_TRACKLIST_CURRENT
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 uIndex;                 /**< Index of track to query info from */
    NvxTrackInfo *pTrackInfo;       /**< Track information */
} NVX_CONFIG_TRACKLIST_CURRENT;

/**
 * This event will be sent when a track is finished playing
 */
#define NVX_EventTrackFinished 0x7A000001

#ifdef __cplusplus
}
#endif /* __cplusplus */

/** @} */
#endif

/* File EOF */