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 if (format == nullptr) {
151 return false;
152 }
153 if (name == nullptr) {
154 return false;
155 }
156 return format->mFormat->findInt32(name, out);
157 }
158
159 EXPORT
AMediaFormat_getInt64(AMediaFormat * format,const char * name,int64_t * out)160 bool AMediaFormat_getInt64(AMediaFormat* format, const char *name, int64_t *out) {
161 if (format == nullptr) {
162 return false;
163 }
164 if (name == nullptr) {
165 return false;
166 }
167 return format->mFormat->findInt64(name, out);
168 }
169
170 EXPORT
AMediaFormat_getFloat(AMediaFormat * format,const char * name,float * out)171 bool AMediaFormat_getFloat(AMediaFormat* format, const char *name, float *out) {
172 if (format == nullptr) {
173 return false;
174 }
175 if (name == nullptr) {
176 return false;
177 }
178 return format->mFormat->findFloat(name, out);
179 }
180
181 EXPORT
AMediaFormat_getDouble(AMediaFormat * format,const char * name,double * out)182 bool AMediaFormat_getDouble(AMediaFormat* format, const char *name, double *out) {
183 if (format == nullptr) {
184 return false;
185 }
186 if (name == nullptr) {
187 return false;
188 }
189 return format->mFormat->findDouble(name, out);
190 }
191
192 EXPORT
AMediaFormat_getSize(AMediaFormat * format,const char * name,size_t * out)193 bool AMediaFormat_getSize(AMediaFormat* format, const char *name, size_t *out) {
194 if (format == nullptr) {
195 return false;
196 }
197 if (name == nullptr) {
198 return false;
199 }
200 return format->mFormat->findSize(name, out);
201 }
202
203 EXPORT
AMediaFormat_getRect(AMediaFormat * format,const char * name,int32_t * left,int32_t * top,int32_t * right,int32_t * bottom)204 bool AMediaFormat_getRect(AMediaFormat* format, const char *name,
205 int32_t *left, int32_t *top, int32_t *right, int32_t *bottom) {
206 if (format == nullptr) {
207 return false;
208 }
209 if (name == nullptr) {
210 return false;
211 }
212 return format->mFormat->findRect(name, left, top, right, bottom);
213 }
214
215 EXPORT
AMediaFormat_getBuffer(AMediaFormat * format,const char * name,void ** data,size_t * outsize)216 bool AMediaFormat_getBuffer(AMediaFormat* format, const char *name, void** data, size_t *outsize) {
217 sp<ABuffer> buf;
218 if (format == nullptr) {
219 return false;
220 }
221 if (name == nullptr) {
222 return false;
223 }
224 if (format->mFormat->findBuffer(name, &buf)) {
225 *data = buf->data() + buf->offset();
226 *outsize = buf->size();
227 return true;
228 }
229 return false;
230 }
231
232 EXPORT
AMediaFormat_getString(AMediaFormat * mData,const char * name,const char ** out)233 bool AMediaFormat_getString(AMediaFormat* mData, const char *name, const char **out) {
234 if (mData == nullptr) {
235 return false;
236 }
237 if (name == nullptr) {
238 return false;
239 }
240 for (size_t i = 0; i < mData->mStringCache.size(); i++) {
241 if (strcmp(mData->mStringCache.keyAt(i).string(), name) == 0) {
242 mData->mStringCache.removeItemsAt(i, 1);
243 break;
244 }
245 }
246
247 AString tmp;
248 if (mData->mFormat->findString(name, &tmp)) {
249 String8 ret(tmp.c_str());
250 ssize_t i = mData->mStringCache.add(String8(name), ret);
251 if (i < 0) {
252 return false;
253 }
254 *out = mData->mStringCache.valueAt(i).string();
255 return true;
256 }
257 return false;
258 }
259
260 EXPORT
AMediaFormat_setInt32(AMediaFormat * format,const char * name,int32_t value)261 void AMediaFormat_setInt32(AMediaFormat* format, const char *name, int32_t value) {
262 if (format == nullptr) {
263 return;
264 }
265 if (name == nullptr) {
266 return;
267 }
268 format->mFormat->setInt32(name, value);
269 }
270
271 EXPORT
AMediaFormat_setInt64(AMediaFormat * format,const char * name,int64_t value)272 void AMediaFormat_setInt64(AMediaFormat* format, const char *name, int64_t value) {
273 if (format == nullptr) {
274 return;
275 }
276 if (name == nullptr) {
277 return;
278 }
279 format->mFormat->setInt64(name, value);
280 }
281
282 EXPORT
AMediaFormat_setFloat(AMediaFormat * format,const char * name,float value)283 void AMediaFormat_setFloat(AMediaFormat* format, const char* name, float value) {
284 if (format == nullptr) {
285 return;
286 }
287 if (name == nullptr) {
288 return;
289 }
290 format->mFormat->setFloat(name, value);
291 }
292
293 EXPORT
AMediaFormat_setDouble(AMediaFormat * format,const char * name,double value)294 void AMediaFormat_setDouble(AMediaFormat* format, const char* name, double value) {
295 if (format == nullptr) {
296 return;
297 }
298 if (name == nullptr) {
299 return;
300 }
301 format->mFormat->setDouble(name, value);
302 }
303
304 EXPORT
AMediaFormat_setSize(AMediaFormat * format,const char * name,size_t value)305 void AMediaFormat_setSize(AMediaFormat* format, const char* name, size_t value) {
306 if (format == nullptr) {
307 return;
308 }
309 if (name == nullptr) {
310 return;
311 }
312 format->mFormat->setSize(name, value);
313 }
314
315 EXPORT
AMediaFormat_setRect(AMediaFormat * format,const char * name,int32_t left,int32_t top,int32_t right,int32_t bottom)316 void AMediaFormat_setRect(AMediaFormat* format, const char *name,
317 int32_t left, int32_t top, int32_t right, int32_t bottom) {
318 if (format == nullptr) {
319 return;
320 }
321 if (name == nullptr) {
322 return;
323 }
324 format->mFormat->setRect(name, left, top, right, bottom);
325 }
326
327 EXPORT
AMediaFormat_setString(AMediaFormat * format,const char * name,const char * value)328 void AMediaFormat_setString(AMediaFormat* format, const char* name, const char* value) {
329 if (format == nullptr) {
330 return;
331 }
332 if (name == nullptr) {
333 return;
334 }
335 if (value == nullptr) {
336 return;
337 }
338 // AMessage::setString() makes a copy of the string
339 format->mFormat->setString(name, value, strlen(value));
340 }
341
342 EXPORT
AMediaFormat_setBuffer(AMediaFormat * format,const char * name,const void * data,size_t size)343 void AMediaFormat_setBuffer(AMediaFormat* format, const char* name, const void* data, size_t size) {
344 if (format == nullptr) {
345 return;
346 }
347 if (name == nullptr) {
348 return;
349 }
350 // the ABuffer(void*, size_t) constructor doesn't take ownership of the data, so create
351 // a new buffer and copy the data into it
352 sp<ABuffer> buf = new ABuffer(size);
353 memcpy(buf->data(), data, size);
354 buf->setRange(0, size);
355 // AMessage::setBuffer() increases the refcount of the buffer
356 format->mFormat->setBuffer(name, buf);
357 }
358
359
360 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_ATTENUATION_FACTOR = "aac-drc-cut-level";
361 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_BOOST_FACTOR = "aac-drc-boost-level";
362 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_HEAVY_COMPRESSION = "aac-drc-heavy-compression";
363 EXPORT const char* AMEDIAFORMAT_KEY_AAC_DRC_TARGET_REFERENCE_LEVEL = "aac-target-ref-level";
364 EXPORT const char* AMEDIAFORMAT_KEY_AAC_ENCODED_TARGET_LEVEL = "aac-encoded-target-level";
365 EXPORT const char* AMEDIAFORMAT_KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT = "aac-max-output-channel_count";
366 EXPORT const char* AMEDIAFORMAT_KEY_AAC_PROFILE = "aac-profile";
367 EXPORT const char* AMEDIAFORMAT_KEY_AAC_SBR_MODE = "aac-sbr-mode";
368 EXPORT const char* AMEDIAFORMAT_KEY_ALBUM = "album";
369 EXPORT const char* AMEDIAFORMAT_KEY_ALBUMART = "albumart";
370 EXPORT const char* AMEDIAFORMAT_KEY_ALBUMARTIST = "albumartist";
371 EXPORT const char* AMEDIAFORMAT_KEY_ALLOW_FRAME_DROP = "allow-frame-drop";
372 EXPORT const char* AMEDIAFORMAT_KEY_ARTIST = "artist";
373 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_INFO = "audio-presentation-info";
374 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_PRESENTATION_ID =
375 "audio-presentation-presentation-id";
376 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_PROGRAM_ID = "audio-presentation-program-id";
377 EXPORT const char* AMEDIAFORMAT_KEY_AUDIO_SESSION_ID = "audio-session-id";
378 EXPORT const char* AMEDIAFORMAT_KEY_AUTHOR = "author";
379 EXPORT const char* AMEDIAFORMAT_KEY_BITRATE_MODE = "bitrate-mode";
380 EXPORT const char* AMEDIAFORMAT_KEY_BIT_RATE = "bitrate";
381 EXPORT const char* AMEDIAFORMAT_KEY_BITS_PER_SAMPLE = "bits-per-sample";
382 EXPORT const char* AMEDIAFORMAT_KEY_CAPTURE_RATE = "capture-rate";
383 EXPORT const char* AMEDIAFORMAT_KEY_CDTRACKNUMBER = "cdtracknum";
384 EXPORT const char* AMEDIAFORMAT_KEY_CHANNEL_COUNT = "channel-count";
385 EXPORT const char* AMEDIAFORMAT_KEY_CHANNEL_MASK = "channel-mask";
386 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_FORMAT = "color-format";
387 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_RANGE = "color-range";
388 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_STANDARD = "color-standard";
389 EXPORT const char* AMEDIAFORMAT_KEY_COLOR_TRANSFER = "color-transfer";
390 EXPORT const char* AMEDIAFORMAT_KEY_COMPILATION = "compilation";
391 EXPORT const char* AMEDIAFORMAT_KEY_COMPLEXITY = "complexity";
392 EXPORT const char* AMEDIAFORMAT_KEY_COMPOSER = "composer";
393 EXPORT const char* AMEDIAFORMAT_KEY_CREATE_INPUT_SURFACE_SUSPENDED = "create-input-buffers-suspended";
394 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_DEFAULT_IV_SIZE = "crypto-default-iv-size";
395 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_ENCRYPTED_BYTE_BLOCK = "crypto-encrypted-byte-block";
396 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_ENCRYPTED_SIZES = "crypto-encrypted-sizes";
397 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_IV = "crypto-iv";
398 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_KEY = "crypto-key";
399 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_MODE = "crypto-mode";
400 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_PLAIN_SIZES = "crypto-plain-sizes";
401 EXPORT const char* AMEDIAFORMAT_KEY_CRYPTO_SKIP_BYTE_BLOCK = "crypto-skip-byte-block";
402 EXPORT const char* AMEDIAFORMAT_KEY_CSD = "csd";
403 EXPORT const char* AMEDIAFORMAT_KEY_CSD_0 = "csd-0";
404 EXPORT const char* AMEDIAFORMAT_KEY_CSD_1 = "csd-1";
405 EXPORT const char* AMEDIAFORMAT_KEY_CSD_2 = "csd-2";
406 EXPORT const char* AMEDIAFORMAT_KEY_CSD_AVC = "csd-avc";
407 EXPORT const char* AMEDIAFORMAT_KEY_CSD_HEVC = "csd-hevc";
408 EXPORT const char* AMEDIAFORMAT_KEY_D263 = "d263";
409 EXPORT const char* AMEDIAFORMAT_KEY_DATE = "date";
410 EXPORT const char* AMEDIAFORMAT_KEY_DISCNUMBER = "discnum";
411 EXPORT const char* AMEDIAFORMAT_KEY_DISPLAY_CROP = "crop";
412 EXPORT const char* AMEDIAFORMAT_KEY_DISPLAY_HEIGHT = "display-height";
413 EXPORT const char* AMEDIAFORMAT_KEY_DISPLAY_WIDTH = "display-width";
414 EXPORT const char* AMEDIAFORMAT_KEY_DURATION = "durationUs";
415 EXPORT const char* AMEDIAFORMAT_KEY_ENCODER_DELAY = "encoder-delay";
416 EXPORT const char* AMEDIAFORMAT_KEY_ENCODER_PADDING = "encoder-padding";
417 EXPORT const char* AMEDIAFORMAT_KEY_ESDS = "esds";
418 EXPORT const char* AMEDIAFORMAT_KEY_EXIF_OFFSET = "exif-offset";
419 EXPORT const char* AMEDIAFORMAT_KEY_EXIF_SIZE = "exif-size";
420 EXPORT const char* AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level";
421 EXPORT const char* AMEDIAFORMAT_KEY_FRAME_COUNT = "frame-count";
422 EXPORT const char* AMEDIAFORMAT_KEY_FRAME_RATE = "frame-rate";
423 EXPORT const char* AMEDIAFORMAT_KEY_GENRE = "genre";
424 EXPORT const char* AMEDIAFORMAT_KEY_GRID_COLUMNS = "grid-cols";
425 EXPORT const char* AMEDIAFORMAT_KEY_GRID_ROWS = "grid-rows";
426 EXPORT const char* AMEDIAFORMAT_KEY_HAPTIC_CHANNEL_COUNT = "haptic-channel-count";
427 EXPORT const char* AMEDIAFORMAT_KEY_HDR_STATIC_INFO = "hdr-static-info";
428 EXPORT const char* AMEDIAFORMAT_KEY_HDR10_PLUS_INFO = "hdr10-plus-info";
429 EXPORT const char* AMEDIAFORMAT_KEY_HEIGHT = "height";
430 EXPORT const char* AMEDIAFORMAT_KEY_ICC_PROFILE = "icc-profile";
431 EXPORT const char* AMEDIAFORMAT_KEY_INTRA_REFRESH_PERIOD = "intra-refresh-period";
432 EXPORT const char* AMEDIAFORMAT_KEY_IS_ADTS = "is-adts";
433 EXPORT const char* AMEDIAFORMAT_KEY_IS_AUTOSELECT = "is-autoselect";
434 EXPORT const char* AMEDIAFORMAT_KEY_IS_DEFAULT = "is-default";
435 EXPORT const char* AMEDIAFORMAT_KEY_IS_FORCED_SUBTITLE = "is-forced-subtitle";
436 EXPORT const char* AMEDIAFORMAT_KEY_IS_SYNC_FRAME = "is-sync-frame";
437 EXPORT const char* AMEDIAFORMAT_KEY_I_FRAME_INTERVAL = "i-frame-interval";
438 EXPORT const char* AMEDIAFORMAT_KEY_LANGUAGE = "language";
439 EXPORT const char* AMEDIAFORMAT_KEY_LAST_SAMPLE_INDEX_IN_CHUNK = "last-sample-index-in-chunk";
440 EXPORT const char* AMEDIAFORMAT_KEY_LATENCY = "latency";
441 EXPORT const char* AMEDIAFORMAT_KEY_LEVEL = "level";
442 EXPORT const char* AMEDIAFORMAT_KEY_LOCATION = "location";
443 EXPORT const char* AMEDIAFORMAT_KEY_LOOP = "loop";
444 EXPORT const char* AMEDIAFORMAT_KEY_LOW_LATENCY = "low-latency";
445 EXPORT const char* AMEDIAFORMAT_KEY_LYRICIST = "lyricist";
446 EXPORT const char* AMEDIAFORMAT_KEY_MANUFACTURER = "manufacturer";
447 EXPORT const char* AMEDIAFORMAT_KEY_MAX_BIT_RATE = "max-bitrate";
448 EXPORT const char* AMEDIAFORMAT_KEY_MAX_B_FRAMES = "max-bframes";
449 EXPORT const char* AMEDIAFORMAT_KEY_MAX_FPS_TO_ENCODER = "max-fps-to-encoder";
450 EXPORT const char* AMEDIAFORMAT_KEY_MAX_HEIGHT = "max-height";
451 EXPORT const char* AMEDIAFORMAT_KEY_MAX_INPUT_SIZE = "max-input-size";
452 EXPORT const char* AMEDIAFORMAT_KEY_MAX_PTS_GAP_TO_ENCODER = "max-pts-gap-to-encoder";
453 EXPORT const char* AMEDIAFORMAT_KEY_MAX_WIDTH = "max-width";
454 EXPORT const char* AMEDIAFORMAT_KEY_MIME = "mime";
455 EXPORT const char* AMEDIAFORMAT_KEY_MPEG_USER_DATA = "mpeg-user-data";
456 EXPORT const char* AMEDIAFORMAT_KEY_MPEG2_STREAM_HEADER = "mpeg2-stream-header";
457 EXPORT const char* AMEDIAFORMAT_KEY_MPEGH_COMPATIBLE_SETS = "mpegh-compatible-sets";
458 EXPORT const char* AMEDIAFORMAT_KEY_MPEGH_PROFILE_LEVEL_INDICATION =
459 "mpegh-profile-level-indication";
460 EXPORT const char* AMEDIAFORMAT_KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT =
461 "mpegh-reference-channel-layout";
462 EXPORT const char* AMEDIAFORMAT_KEY_OPERATING_RATE = "operating-rate";
463 EXPORT const char* AMEDIAFORMAT_KEY_PCM_ENCODING = "pcm-encoding";
464 EXPORT const char* AMEDIAFORMAT_KEY_PICTURE_TYPE = "picture-type";
465 EXPORT const char* AMEDIAFORMAT_KEY_PRIORITY = "priority";
466 EXPORT const char* AMEDIAFORMAT_KEY_PROFILE = "profile";
467 EXPORT const char* AMEDIAFORMAT_KEY_PCM_BIG_ENDIAN = "pcm-big-endian";
468 EXPORT const char* AMEDIAFORMAT_KEY_PSSH = "pssh";
469 EXPORT const char* AMEDIAFORMAT_KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown";
470 EXPORT const char* AMEDIAFORMAT_KEY_REPEAT_PREVIOUS_FRAME_AFTER = "repeat-previous-frame-after";
471 EXPORT const char* AMEDIAFORMAT_KEY_ROTATION = "rotation-degrees";
472 EXPORT const char* AMEDIAFORMAT_KEY_SAMPLE_FILE_OFFSET = "sample-file-offset";
473 EXPORT const char* AMEDIAFORMAT_KEY_SAMPLE_RATE = "sample-rate";
474 EXPORT const char* AMEDIAFORMAT_KEY_SAMPLE_TIME_BEFORE_APPEND = "sample-time-before-append";
475 EXPORT const char* AMEDIAFORMAT_KEY_SAR_HEIGHT = "sar-height";
476 EXPORT const char* AMEDIAFORMAT_KEY_SAR_WIDTH = "sar-width";
477 EXPORT const char* AMEDIAFORMAT_KEY_SEI = "sei";
478 EXPORT const char* AMEDIAFORMAT_KEY_SLICE_HEIGHT = "slice-height";
479 EXPORT const char* AMEDIAFORMAT_KEY_SLOW_MOTION_MARKERS = "slow-motion-markers";
480 EXPORT const char* AMEDIAFORMAT_KEY_STRIDE = "stride";
481 EXPORT const char* AMEDIAFORMAT_KEY_TARGET_TIME = "target-time";
482 EXPORT const char* AMEDIAFORMAT_KEY_TEMPORAL_LAYER_COUNT = "temporal-layer-count";
483 EXPORT const char* AMEDIAFORMAT_KEY_TEMPORAL_LAYER_ID = "temporal-layer-id";
484 EXPORT const char* AMEDIAFORMAT_KEY_TEMPORAL_LAYERING = "ts-schema";
485 EXPORT const char* AMEDIAFORMAT_KEY_TEXT_FORMAT_DATA = "text-format-data";
486 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_CSD_AV1C = "thumbnail-csd-av1c";
487 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_CSD_HEVC = "thumbnail-csd-hevc";
488 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_HEIGHT = "thumbnail-height";
489 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_TIME = "thumbnail-time";
490 EXPORT const char* AMEDIAFORMAT_KEY_THUMBNAIL_WIDTH = "thumbnail-width";
491 EXPORT const char* AMEDIAFORMAT_KEY_TILE_HEIGHT = "tile-height";
492 EXPORT const char* AMEDIAFORMAT_KEY_TILE_WIDTH = "tile-width";
493 EXPORT const char* AMEDIAFORMAT_KEY_TIME_US = "timeUs";
494 EXPORT const char* AMEDIAFORMAT_KEY_TITLE = "title";
495 EXPORT const char* AMEDIAFORMAT_KEY_TRACK_ID = "track-id";
496 EXPORT const char* AMEDIAFORMAT_KEY_TRACK_INDEX = "track-index";
497 EXPORT const char* AMEDIAFORMAT_KEY_VALID_SAMPLES = "valid-samples";
498 EXPORT const char* AMEDIAFORMAT_KEY_VIDEO_ENCODING_STATISTICS_LEVEL =
499 "video-encoding-statistics-level";
500 EXPORT const char* AMEDIAFORMAT_KEY_VIDEO_QP_AVERAGE = "video-qp-average";
501 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_B_MAX = "video-qp-b-max";
502 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_B_MIN = "video-qp-b-min";
503 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_I_MAX = "video-qp-i-max";
504 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_I_MIN = "video-qp-i-min";
505 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_MAX = "video-qp-max";
506 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_MIN = "video-qp-min";
507 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_P_MAX = "video-qp-p-max";
508 EXPORT const char* AMEDIAFORMAT_VIDEO_QP_P_MIN = "video-qp-p-min";
509 EXPORT const char* AMEDIAFORMAT_KEY_WIDTH = "width";
510 EXPORT const char* AMEDIAFORMAT_KEY_XMP_OFFSET = "xmp-offset";
511 EXPORT const char* AMEDIAFORMAT_KEY_XMP_SIZE = "xmp-size";
512 EXPORT const char* AMEDIAFORMAT_KEY_YEAR = "year";
513
514 } // extern "C"
515
516
517