1 /*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 //#define LOG_NDEBUG 0
18 #define LOG_TAG "NdkMediaFormat"
19
20 #include <inttypes.h>
21
22 #include <media/NdkMediaFormat.h>
23 #include <media/NdkMediaFormatPriv.h>
24
25 #include <utils/Log.h>
26 #include <utils/StrongPointer.h>
27 #include <media/stagefright/foundation/ABuffer.h>
28 #include <media/stagefright/foundation/AMessage.h>
29
30 using namespace android;
31
32 extern "C" {
33
34 /*
35 * public function follow
36 */
37 EXPORT
AMediaFormat_new()38 AMediaFormat *AMediaFormat_new() {
39 ALOGV("ctor");
40 sp<AMessage> msg = new AMessage();
41 return AMediaFormat_fromMsg(&msg);
42 }
43
44 EXPORT
AMediaFormat_delete(AMediaFormat * mData)45 media_status_t AMediaFormat_delete(AMediaFormat *mData) {
46 ALOGV("dtor");
47 delete mData;
48 return AMEDIA_OK;
49 }
50
51 EXPORT
AMediaFormat_clear(AMediaFormat * format)52 void AMediaFormat_clear(AMediaFormat *format) {
53 format->mFormat->clear();
54 }
55
56 EXPORT
AMediaFormat_copy(AMediaFormat * to,AMediaFormat * from)57 media_status_t AMediaFormat_copy(AMediaFormat *to, AMediaFormat *from) {
58 if (!to || !from) {
59 return AMEDIA_ERROR_INVALID_PARAMETER;
60 }
61 to->mFormat->clear();
62 to->mFormat->extend(from->mFormat);
63 return AMEDIA_OK;
64 }
65
66
67 EXPORT
AMediaFormat_toString(AMediaFormat * mData)68 const char* AMediaFormat_toString(AMediaFormat *mData) {
69 sp<AMessage> f = mData->mFormat;
70 String8 ret;
71 int num = f->countEntries();
72 for (int i = 0; i < num; i++) {
73 if (i != 0) {
74 ret.append(", ");
75 }
76 AMessage::Type t;
77 const char *name = f->getEntryNameAt(i, &t);
78 ret.append(name);
79 ret.append(": ");
80 switch (t) {
81 case AMessage::kTypeInt32:
82 {
83 int32_t val;
84 f->findInt32(name, &val);
85 ret.appendFormat("int32(%" PRId32 ")", val);
86 break;
87 }
88 case AMessage::kTypeInt64:
89 {
90 int64_t val;
91 f->findInt64(name, &val);
92 ret.appendFormat("int64(%" PRId64 ")", val);
93 break;
94 }
95 case AMessage::kTypeSize:
96 {
97 size_t val;
98 f->findSize(name, &val);
99 ret.appendFormat("size_t(%zu)", val);
100 break;
101 }
102 case AMessage::kTypeFloat:
103 {
104 float val;
105 f->findFloat(name, &val);
106 ret.appendFormat("float(%f)", val);
107 break;
108 }
109 case AMessage::kTypeDouble:
110 {
111 double val;
112 f->findDouble(name, &val);
113 ret.appendFormat("double(%f)", val);
114 break;
115 }
116 case AMessage::kTypeRect:
117 {
118 int32_t left, top, right, bottom;
119 f->findRect(name, &left, &top, &right, &bottom);
120 ret.appendFormat("Rect(%" PRId32 ", %" PRId32 ", %" PRId32 ", %" PRId32 ")",
121 left, top, right, bottom);
122 break;
123 }
124 case AMessage::kTypeString:
125 {
126 AString val;
127 f->findString(name, &val);
128 ret.appendFormat("string(%s)", val.c_str());
129 break;
130 }
131 case AMessage::kTypeBuffer:
132 {
133 ret.appendFormat("data");
134 break;
135 }
136 default:
137 {
138 ret.appendFormat("unknown(%d)", t);
139 break;
140 }
141 }
142 }
143 ret.append("}");
144 mData->mDebug = ret;
145 return mData->mDebug.string();
146 }
147
148 EXPORT
AMediaFormat_getInt32(AMediaFormat * format,const char * name,int32_t * out)149 bool AMediaFormat_getInt32(AMediaFormat* format, const char *name, int32_t *out) {
150 return format->mFormat->findInt32(name, out);
151 }
152
153 EXPORT
AMediaFormat_getInt64(AMediaFormat * format,const char * name,int64_t * out)154 bool AMediaFormat_getInt64(AMediaFormat* format, const char *name, int64_t *out) {
155 return format->mFormat->findInt64(name, out);
156 }
157
158 EXPORT
AMediaFormat_getFloat(AMediaFormat * format,const char * name,float * out)159 bool AMediaFormat_getFloat(AMediaFormat* format, const char *name, float *out) {
160 return format->mFormat->findFloat(name, out);
161 }
162
163 EXPORT
AMediaFormat_getDouble(AMediaFormat * format,const char * name,double * out)164 bool AMediaFormat_getDouble(AMediaFormat* format, const char *name, double *out) {
165 return format->mFormat->findDouble(name, out);
166 }
167
168 EXPORT
AMediaFormat_getSize(AMediaFormat * format,const char * name,size_t * out)169 bool AMediaFormat_getSize(AMediaFormat* format, const char *name, size_t *out) {
170 return format->mFormat->findSize(name, out);
171 }
172
173 EXPORT
AMediaFormat_getRect(AMediaFormat * format,const char * name,int32_t * left,int32_t * top,int32_t * right,int32_t * bottom)174 bool AMediaFormat_getRect(AMediaFormat* format, const char *name,
175 int32_t *left, int32_t *top, int32_t *right, int32_t *bottom) {
176 return format->mFormat->findRect(name, left, top, right, bottom);
177 }
178
179 EXPORT
AMediaFormat_getBuffer(AMediaFormat * format,const char * name,void ** data,size_t * outsize)180 bool AMediaFormat_getBuffer(AMediaFormat* format, const char *name, void** data, size_t *outsize) {
181 sp<ABuffer> buf;
182 if (format->mFormat->findBuffer(name, &buf)) {
183 *data = buf->data() + buf->offset();
184 *outsize = buf->size();
185 return true;
186 }
187 return false;
188 }
189
190 EXPORT
AMediaFormat_getString(AMediaFormat * mData,const char * name,const char ** out)191 bool AMediaFormat_getString(AMediaFormat* mData, const char *name, const char **out) {
192
193 for (size_t i = 0; i < mData->mStringCache.size(); i++) {
194 if (strcmp(mData->mStringCache.keyAt(i).string(), name) == 0) {
195 mData->mStringCache.removeItemsAt(i, 1);
196 break;
197 }
198 }
199
200 AString tmp;
201 if (mData->mFormat->findString(name, &tmp)) {
202 String8 ret(tmp.c_str());
203 ssize_t i = mData->mStringCache.add(String8(name), ret);
204 if (i < 0) {
205 return false;
206 }
207 *out = mData->mStringCache.valueAt(i).string();
208 return true;
209 }
210 return false;
211 }
212
213 EXPORT
AMediaFormat_setInt32(AMediaFormat * format,const char * name,int32_t value)214 void AMediaFormat_setInt32(AMediaFormat* format, const char *name, int32_t value) {
215 format->mFormat->setInt32(name, value);
216 }
217
218 EXPORT
AMediaFormat_setInt64(AMediaFormat * format,const char * name,int64_t value)219 void AMediaFormat_setInt64(AMediaFormat* format, const char *name, int64_t value) {
220 format->mFormat->setInt64(name, value);
221 }
222
223 EXPORT
AMediaFormat_setFloat(AMediaFormat * format,const char * name,float value)224 void AMediaFormat_setFloat(AMediaFormat* format, const char* name, float value) {
225 format->mFormat->setFloat(name, value);
226 }
227
228 EXPORT
AMediaFormat_setDouble(AMediaFormat * format,const char * name,double value)229 void AMediaFormat_setDouble(AMediaFormat* format, const char* name, double value) {
230 format->mFormat->setDouble(name, value);
231 }
232
233 EXPORT
AMediaFormat_setSize(AMediaFormat * format,const char * name,size_t value)234 void AMediaFormat_setSize(AMediaFormat* format, const char* name, size_t value) {
235 format->mFormat->setSize(name, value);
236 }
237
238 EXPORT
AMediaFormat_setRect(AMediaFormat * format,const char * name,int32_t left,int32_t top,int32_t right,int32_t bottom)239 void AMediaFormat_setRect(AMediaFormat* format, const char *name,
240 int32_t left, int32_t top, int32_t right, int32_t bottom) {
241 format->mFormat->setRect(name, left, top, right, bottom);
242 }
243
244 EXPORT
AMediaFormat_setString(AMediaFormat * format,const char * name,const char * value)245 void AMediaFormat_setString(AMediaFormat* format, const char* name, const char* value) {
246 // AMessage::setString() makes a copy of the string
247 format->mFormat->setString(name, value, strlen(value));
248 }
249
250 EXPORT
AMediaFormat_setBuffer(AMediaFormat * format,const char * name,const void * data,size_t size)251 void AMediaFormat_setBuffer(AMediaFormat* format, const char* name, const void* data, size_t size) {
252 // the ABuffer(void*, size_t) constructor doesn't take ownership of the data, so create
253 // a new buffer and copy the data into it
254 sp<ABuffer> buf = new ABuffer(size);
255 memcpy(buf->data(), data, size);
256 buf->setRange(0, size);
257 // AMessage::setBuffer() increases the refcount of the buffer
258 format->mFormat->setBuffer(name, buf);
259 }
260
261
262 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_ATTENUATION_FACTOR = "aac-drc-cut-level";
263 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_BOOST_FACTOR = "aac-drc-boost-level";
264 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_HEAVY_COMPRESSION = "aac-drc-heavy-compression";
265 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_TARGET_REFERENCE_LEVEL = "aac-target-ref-level";
266 EXPORT const char* AMEDIAFORMAT_KEY_AAC_ENCODED_TARGET_LEVEL = "aac-encoded-target-level";
267 EXPORT const char* AMEDIAFORMAT_KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT = "aac-max-output-channel_count";
268 EXPORT const char* AMEDIAFORMAT_KEY_AAC_PROFILE = "aac-profile";
269 EXPORT const char* AMEDIAFORMAT_KEY_AAC_SBR_MODE = "aac-sbr-mode";
270 EXPORT const char* AMEDIAFORMAT_KEY_ALBUM = "album";
271 EXPORT const char* AMEDIAFORMAT_KEY_ALBUMART = "albumart";
272 EXPORT const char* AMEDIAFORMAT_KEY_ALBUMARTIST = "albumartist";
273 EXPORT const char* AMEDIAFORMAT_KEY_ARTIST = "artist";
274 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_INFO = "audio-presentation-info";
275 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_PRESENTATION_ID =
276 "audio-presentation-presentation-id";
277 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_PROGRAM_ID = "audio-presentation-program-id";
278 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_SESSION_ID = "audio-session-id";
279 EXPORT const char* AMEDIAFORMAT_KEY_AUTHOR = "author";
280 EXPORT const char* AMEDIAFORMAT_KEY_BITRATE_MODE = "bitrate-mode";
281 EXPORT const char* AMEDIAFORMAT_KEY_BIT_RATE = "bitrate";
282 EXPORT const char* AMEDIAFORMAT_KEY_BITS_PER_SAMPLE = "bits-per-sample";
283 EXPORT const char* AMEDIAFORMAT_KEY_CAPTURE_RATE = "capture-rate";
284 EXPORT const char* AMEDIAFORMAT_KEY_CDTRACKNUMBER = "cdtracknum";
285 EXPORT const char* AMEDIAFORMAT_KEY_CHANNEL_COUNT = "channel-count";
286 EXPORT const char* AMEDIAFORMAT_KEY_CHANNEL_MASK = "channel-mask";
287 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_FORMAT = "color-format";
288 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_RANGE = "color-range";
289 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_STANDARD = "color-standard";
290 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_TRANSFER = "color-transfer";
291 EXPORT const char* AMEDIAFORMAT_KEY_COMPILATION = "compilation";
292 EXPORT const char* AMEDIAFORMAT_KEY_COMPLEXITY = "complexity";
293 EXPORT const char* AMEDIAFORMAT_KEY_COMPOSER = "composer";
294 EXPORT const char* AMEDIAFORMAT_KEY_CREATE_INPUT_SURFACE_SUSPENDED = "create-input-buffers-suspended";
295 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_DEFAULT_IV_SIZE = "crypto-default-iv-size";
296 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_ENCRYPTED_BYTE_BLOCK = "crypto-encrypted-byte-block";
297 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_ENCRYPTED_SIZES = "crypto-encrypted-sizes";
298 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_IV = "crypto-iv";
299 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_KEY = "crypto-key";
300 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_MODE = "crypto-mode";
301 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_PLAIN_SIZES = "crypto-plain-sizes";
302 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_SKIP_BYTE_BLOCK = "crypto-skip-byte-block";
303 EXPORT const char* AMEDIAFORMAT_KEY_CSD = "csd";
304 EXPORT const char* AMEDIAFORMAT_KEY_CSD_0 = "csd-0";
305 EXPORT const char* AMEDIAFORMAT_KEY_CSD_1 = "csd-1";
306 EXPORT const char* AMEDIAFORMAT_KEY_CSD_2 = "csd-2";
307 EXPORT const char* AMEDIAFORMAT_KEY_CSD_AVC = "csd-avc";
308 EXPORT const char* AMEDIAFORMAT_KEY_CSD_HEVC = "csd-hevc";
309 EXPORT const char* AMEDIAFORMAT_KEY_D263 = "d263";
310 EXPORT const char* AMEDIAFORMAT_KEY_DATE = "date";
311 EXPORT const char* AMEDIAFORMAT_KEY_DISCNUMBER = "discnum";
312 EXPORT const char* AMEDIAFORMAT_KEY_DISPLAY_CROP = "crop";
313 EXPORT const char* AMEDIAFORMAT_KEY_DISPLAY_HEIGHT = "display-height";
314 EXPORT const char* AMEDIAFORMAT_KEY_DISPLAY_WIDTH = "display-width";
315 EXPORT const char* AMEDIAFORMAT_KEY_DURATION = "durationUs";
316 EXPORT const char* AMEDIAFORMAT_KEY_ENCODER_DELAY = "encoder-delay";
317 EXPORT const char* AMEDIAFORMAT_KEY_ENCODER_PADDING = "encoder-padding";
318 EXPORT const char* AMEDIAFORMAT_KEY_ESDS = "esds";
319 EXPORT const char* AMEDIAFORMAT_KEY_EXIF_OFFSET = "exif-offset";
320 EXPORT const char* AMEDIAFORMAT_KEY_EXIF_SIZE = "exif-size";
321 EXPORT const char* AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level";
322 EXPORT const char* AMEDIAFORMAT_KEY_FRAME_COUNT = "frame-count";
323 EXPORT const char* AMEDIAFORMAT_KEY_FRAME_RATE = "frame-rate";
324 EXPORT const char* AMEDIAFORMAT_KEY_GENRE = "genre";
325 EXPORT const char* AMEDIAFORMAT_KEY_GRID_COLUMNS = "grid-cols";
326 EXPORT const char* AMEDIAFORMAT_KEY_GRID_ROWS = "grid-rows";
327 EXPORT const char* AMEDIAFORMAT_KEY_HAPTIC_CHANNEL_COUNT = "haptic-channel-count";
328 EXPORT const char* AMEDIAFORMAT_KEY_HDR_STATIC_INFO = "hdr-static-info";
329 EXPORT const char* AMEDIAFORMAT_KEY_HDR10_PLUS_INFO = "hdr10-plus-info";
330 EXPORT const char* AMEDIAFORMAT_KEY_HEIGHT = "height";
331 EXPORT const char* AMEDIAFORMAT_KEY_ICC_PROFILE = "icc-profile";
332 EXPORT const char* AMEDIAFORMAT_KEY_INTRA_REFRESH_PERIOD = "intra-refresh-period";
333 EXPORT const char* AMEDIAFORMAT_KEY_IS_ADTS = "is-adts";
334 EXPORT const char* AMEDIAFORMAT_KEY_IS_AUTOSELECT = "is-autoselect";
335 EXPORT const char* AMEDIAFORMAT_KEY_IS_DEFAULT = "is-default";
336 EXPORT const char* AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE = "is-forced-subtitle";
337 EXPORT const char* AMEDIAFORMAT_KEY_IS_SYNC_FRAME = "is-sync-frame";
338 EXPORT const char* AMEDIAFORMAT_KEY_I_FRAME_INTERVAL = "i-frame-interval";
339 EXPORT const char* AMEDIAFORMAT_KEY_LANGUAGE = "language";
340 EXPORT const char* AMEDIAFORMAT_KEY_LAST_SAMPLE_INDEX_IN_CHUNK = "last-sample-index-in-chunk";
341 EXPORT const char* AMEDIAFORMAT_KEY_LATENCY = "latency";
342 EXPORT const char* AMEDIAFORMAT_KEY_LEVEL = "level";
343 EXPORT const char* AMEDIAFORMAT_KEY_LOCATION = "location";
344 EXPORT const char* AMEDIAFORMAT_KEY_LOOP = "loop";
345 EXPORT const char* AMEDIAFORMAT_KEY_LOW_LATENCY = "low-latency";
346 EXPORT const char* AMEDIAFORMAT_KEY_LYRICIST = "lyricist";
347 EXPORT const char* AMEDIAFORMAT_KEY_MANUFACTURER = "manufacturer";
348 EXPORT const char* AMEDIAFORMAT_KEY_MAX_BIT_RATE = "max-bitrate";
349 EXPORT const char* AMEDIAFORMAT_KEY_MAX_FPS_TO_ENCODER = "max-fps-to-encoder";
350 EXPORT const char* AMEDIAFORMAT_KEY_MAX_HEIGHT = "max-height";
351 EXPORT const char* AMEDIAFORMAT_KEY_MAX_INPUT_SIZE = "max-input-size";
352 EXPORT const char* AMEDIAFORMAT_KEY_MAX_PTS_GAP_TO_ENCODER = "max-pts-gap-to-encoder";
353 EXPORT const char* AMEDIAFORMAT_KEY_MAX_WIDTH = "max-width";
354 EXPORT const char* AMEDIAFORMAT_KEY_MIME = "mime";
355 EXPORT const char* AMEDIAFORMAT_KEY_MPEG_USER_DATA = "mpeg-user-data";
356 EXPORT const char* AMEDIAFORMAT_KEY_MPEG2_STREAM_HEADER = "mpeg2-stream-header";
357 EXPORT const char* AMEDIAFORMAT_KEY_MPEGH_COMPATIBLE_SETS = "mpegh-compatible-sets";
358 EXPORT const char* AMEDIAFORMAT_KEY_MPEGH_PROFILE_LEVEL_INDICATION =
359 "mpegh-profile-level-indication";
360 EXPORT const char* AMEDIAFORMAT_KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT =
361 "mpegh-reference-channel-layout";
362 EXPORT const char* AMEDIAFORMAT_KEY_OPERATING_RATE = "operating-rate";
363 EXPORT const char* AMEDIAFORMAT_KEY_PCM_ENCODING = "pcm-encoding";
364 EXPORT const char* AMEDIAFORMAT_KEY_PICTURE_TYPE = "picture-type";
365 EXPORT const char* AMEDIAFORMAT_KEY_PRIORITY = "priority";
366 EXPORT const char* AMEDIAFORMAT_KEY_PROFILE = "profile";
367 EXPORT const char* AMEDIAFORMAT_KEY_PCM_BIG_ENDIAN = "pcm-big-endian";
368 EXPORT const char* AMEDIAFORMAT_KEY_PSSH = "pssh";
369 EXPORT const char* AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown";
370 EXPORT const char* AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER = "repeat-previous-frame-after";
371 EXPORT const char* AMEDIAFORMAT_KEY_ROTATION = "rotation-degrees";
372 EXPORT const char* AMEDIAFORMAT_KEY_SAMPLE_FILE_OFFSET = "sample-file-offset";
373 EXPORT const char* AMEDIAFORMAT_KEY_SAMPLE_RATE = "sample-rate";
374 EXPORT const char* AMEDIAFORMAT_KEY_SAMPLE_TIME_BEFORE_APPEND = "sample-time-before-append";
375 EXPORT const char* AMEDIAFORMAT_KEY_SAR_HEIGHT = "sar-height";
376 EXPORT const char* AMEDIAFORMAT_KEY_SAR_WIDTH = "sar-width";
377 EXPORT const char* AMEDIAFORMAT_KEY_SEI = "sei";
378 EXPORT const char* AMEDIAFORMAT_KEY_SLICE_HEIGHT = "slice-height";
379 EXPORT const char* AMEDIAFORMAT_KEY_SLOW_MOTION_MARKERS = "slow-motion-markers";
380 EXPORT const char* AMEDIAFORMAT_KEY_STRIDE = "stride";
381 EXPORT const char* AMEDIAFORMAT_KEY_TARGET_TIME = "target-time";
382 EXPORT const char* AMEDIAFORMAT_KEY_TEMPORAL_LAYER_COUNT = "temporal-layer-count";
383 EXPORT const char* AMEDIAFORMAT_KEY_TEMPORAL_LAYER_ID = "temporal-layer-id";
384 EXPORT const char* AMEDIAFORMAT_KEY_TEMPORAL_LAYERING = "ts-schema";
385 EXPORT const char* AMEDIAFORMAT_KEY_TEXT_FORMAT_DATA = "text-format-data";
386 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_CSD_AV1C = "thumbnail-csd-av1c";
387 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_CSD_HEVC = "thumbnail-csd-hevc";
388 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_HEIGHT = "thumbnail-height";
389 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_TIME = "thumbnail-time";
390 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_WIDTH = "thumbnail-width";
391 EXPORT const char* AMEDIAFORMAT_KEY_TILE_HEIGHT = "tile-height";
392 EXPORT const char* AMEDIAFORMAT_KEY_TILE_WIDTH = "tile-width";
393 EXPORT const char* AMEDIAFORMAT_KEY_TIME_US = "timeUs";
394 EXPORT const char* AMEDIAFORMAT_KEY_TITLE = "title";
395 EXPORT const char* AMEDIAFORMAT_KEY_TRACK_ID = "track-id";
396 EXPORT const char* AMEDIAFORMAT_KEY_TRACK_INDEX = "track-index";
397 EXPORT const char* AMEDIAFORMAT_KEY_VALID_SAMPLES = "valid-samples";
398 EXPORT const char* AMEDIAFORMAT_KEY_VIDEO_ENCODING_STATISTICS_LEVEL =
399 "video-encoding-statistics-level";
400 EXPORT const char* AMEDIAFORMAT_KEY_VIDEO_QP_AVERAGE = "video-qp-average";
401 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_B_MAX = "video-qp-b-max";
402 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_B_MIN = "video-qp-b-min";
403 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_I_MAX = "video-qp-i-max";
404 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_I_MIN = "video-qp-i-min";
405 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_MAX = "video-qp-max";
406 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_MIN = "video-qp-min";
407 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_P_MAX = "video-qp-p-max";
408 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_P_MIN = "video-qp-p-min";
409 EXPORT const char* AMEDIAFORMAT_KEY_WIDTH = "width";
410 EXPORT const char* AMEDIAFORMAT_KEY_XMP_OFFSET = "xmp-offset";
411 EXPORT const char* AMEDIAFORMAT_KEY_XMP_SIZE = "xmp-size";
412 EXPORT const char* AMEDIAFORMAT_KEY_YEAR = "year";
413
414 } // extern "C"
415
416
417