ohos_media_sys/avcodec_base/avcodec_base_ffi.rs
1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6#![allow(deprecated)]
7#[cfg(feature = "api-11")]
8use crate::avbuffer::OH_AVBuffer;
9use crate::avbuffer_info::OH_AVCodecBufferAttr;
10#[allow(unused_imports)]
11use crate::averrors::OH_AVErrCode;
12use crate::avformat::OH_AVFormat;
13use crate::avmemory::OH_AVMemory;
14
15/// Forward declaration of OH_AVCodec.
16///
17///
18/// Available since API-level: 9
19#[repr(C)]
20pub struct OH_AVCodec {
21 _unused: [u8; 0],
22}
23/// When an error occurs in the running of the OH_AVCodec instance, the function pointer will be called
24/// to report specific error information.
25///
26///
27/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
28/// # Arguments
29///
30/// * `codec` - OH_AVCodec instance
31///
32/// * `errorCode` - specific error code
33///
34/// * `userData` - User specific data
35///
36/// Available since API-level: 9
37pub type OH_AVCodecOnError = ::core::option::Option<
38 unsafe extern "C" fn(
39 codec: *mut OH_AVCodec,
40 errorCode: i32,
41 userData: *mut ::core::ffi::c_void,
42 ),
43>;
44/// When the output stream changes, the function pointer will be called to report the new stream description
45/// information. It should be noted that the life cycle of the OH_AVFormat pointer
46/// is only valid when the function pointer is called, and it is forbidden to continue to access after the call ends.
47///
48///
49/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
50/// # Arguments
51///
52/// * `codec` - OH_AVCodec instance
53///
54/// * `format` - New output stream description information
55///
56/// * `userData` - User specific data
57///
58/// Available since API-level: 9
59pub type OH_AVCodecOnStreamChanged = ::core::option::Option<
60 unsafe extern "C" fn(
61 codec: *mut OH_AVCodec,
62 format: *mut OH_AVFormat,
63 userData: *mut ::core::ffi::c_void,
64 ),
65>;
66/// When OH_AVCodec needs new input data during the running process,
67/// the function pointer will be called and carry an available Buffer to fill in the new input data.
68///
69///
70/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
71/// # Arguments
72///
73/// * `codec` - OH_AVCodec instance
74///
75/// * `index` - The index corresponding to the newly available input buffer.
76///
77/// * `data` - New available input buffer.
78///
79/// * `userData` - User specific data
80///
81/// **Deprecated** since 11
82/// OH_AVCodecOnNeedInputBuffer
83///
84/// Available since API-level: 9
85#[deprecated(since = "11")]
86pub type OH_AVCodecOnNeedInputData = ::core::option::Option<
87 unsafe extern "C" fn(
88 codec: *mut OH_AVCodec,
89 index: u32,
90 data: *mut OH_AVMemory,
91 userData: *mut ::core::ffi::c_void,
92 ),
93>;
94/// When new output data is generated during the operation of OH_AVCodec, the function pointer will be
95/// called and carry a Buffer containing the new output data. It should be noted that the life cycle of the
96/// OH_AVCodecBufferAttr pointer is only valid when the function pointer is called. , which prohibits continued
97/// access after the call ends.
98///
99///
100/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
101/// # Arguments
102///
103/// * `codec` - OH_AVCodec instance
104///
105/// * `index` - The index corresponding to the new output Buffer.
106///
107/// * `data` - Buffer containing the new output data
108///
109/// * `attr` - The description of the new output Buffer, please refer to [`OH_AVCodecBufferAttr`]
110///
111/// * `userData` - specified data
112///
113/// **Deprecated** since 11
114/// OH_AVCodecOnNewOutputBuffer
115///
116/// Available since API-level: 9
117#[deprecated(since = "11")]
118pub type OH_AVCodecOnNewOutputData = ::core::option::Option<
119 unsafe extern "C" fn(
120 codec: *mut OH_AVCodec,
121 index: u32,
122 data: *mut OH_AVMemory,
123 attr: *mut OH_AVCodecBufferAttr,
124 userData: *mut ::core::ffi::c_void,
125 ),
126>;
127/// When OH_AVCodec needs new input data during the running process,
128/// the function pointer will be called and carry an available Buffer to fill in the new input data.
129///
130///
131/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
132/// # Arguments
133///
134/// * `codec` - OH_AVCodec instance
135///
136/// * `index` - The index corresponding to the newly available input buffer.
137///
138/// * `buffer` - New available input buffer.
139///
140/// * `userData` - User specific data
141///
142/// Available since API-level: 11
143#[cfg(feature = "api-11")]
144#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
145pub type OH_AVCodecOnNeedInputBuffer = ::core::option::Option<
146 unsafe extern "C" fn(
147 codec: *mut OH_AVCodec,
148 index: u32,
149 buffer: *mut OH_AVBuffer,
150 userData: *mut ::core::ffi::c_void,
151 ),
152>;
153/// When new output data is generated during the operation of OH_AVCodec, the function pointer will be
154/// called and carry a Buffer containing the new output data.
155///
156///
157/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
158/// # Arguments
159///
160/// * `codec` - OH_AVCodec instance
161///
162/// * `index` - The index corresponding to the new output Buffer.
163///
164/// * `buffer` - Buffer containing the new output buffer.
165///
166/// * `userData` - specified data
167///
168/// Available since API-level: 11
169#[cfg(feature = "api-11")]
170#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
171pub type OH_AVCodecOnNewOutputBuffer = ::core::option::Option<
172 unsafe extern "C" fn(
173 codec: *mut OH_AVCodec,
174 index: u32,
175 buffer: *mut OH_AVBuffer,
176 userData: *mut ::core::ffi::c_void,
177 ),
178>;
179/// A collection of all asynchronous callback function pointers in OH_AVCodec. Register an instance of this
180/// structure to the OH_AVCodec instance, and process the information reported through the callback to ensure the
181/// normal operation of OH_AVCodec.
182///
183///
184/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
185/// # Arguments
186///
187/// * `onError` - Monitor OH_AVCodec operation errors, refer to [`OH_AVCodecOnError`]
188///
189/// * `onStreamChanged` - Monitor codec stream information, refer to [`OH_AVCodecOnStreamChanged`]
190///
191/// * `onNeedInputData` - Monitoring codec requires input data, refer to [`OH_AVCodecOnNeedInputData`]
192///
193/// * `onNeedOutputData` - Monitor codec to generate output data, refer to [`OH_AVCodecOnNewOutputData`]
194///
195/// **Deprecated** since 11
196/// OH_AVCodecCallback
197///
198/// Available since API-level: 9
199#[deprecated(since = "11")]
200#[repr(C)]
201#[derive(Debug, Copy, Clone)]
202pub struct OH_AVCodecAsyncCallback {
203 pub onError: OH_AVCodecOnError,
204 pub onStreamChanged: OH_AVCodecOnStreamChanged,
205 pub onNeedInputData: OH_AVCodecOnNeedInputData,
206 pub onNeedOutputData: OH_AVCodecOnNewOutputData,
207}
208/// A collection of all asynchronous callback function pointers in OH_AVCodec. Register an instance of this
209/// structure to the OH_AVCodec instance, and process the information reported through the callback to ensure the
210/// normal operation of OH_AVCodec.
211///
212///
213/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
214/// # Arguments
215///
216/// * `onError` - Monitor OH_AVCodec operation errors, refer to [`OH_AVCodecOnError`]
217///
218/// * `onStreamChanged` - Monitor codec stream information, refer to [`OH_AVCodecOnStreamChanged`]
219///
220/// * `onNeedInputBuffer` - Monitoring codec requires input buffer, refer to [`OH_AVCodecOnNeedInputBuffer`]
221///
222/// * `onNewOutputBuffer` - Monitor codec to generate output buffer, refer to [`OH_AVCodecOnNewOutputBuffer`]
223///
224/// Available since API-level: 11
225#[cfg(feature = "api-11")]
226#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
227#[repr(C)]
228#[derive(Debug, Copy, Clone)]
229pub struct OH_AVCodecCallback {
230 pub onError: OH_AVCodecOnError,
231 pub onStreamChanged: OH_AVCodecOnStreamChanged,
232 pub onNeedInputBuffer: OH_AVCodecOnNeedInputBuffer,
233 pub onNewOutputBuffer: OH_AVCodecOnNewOutputBuffer,
234}
235/// the function pointer will be called to get sequence media data.
236///
237/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
238/// # Arguments
239///
240/// * `data` - OH_AVBuffer buffer to fill
241///
242/// * `length` - expected to read size;
243///
244/// * `pos` - current read offset
245///
246/// # Returns
247///
248/// * Actual size of data read to the buffer.
249///
250/// Available since API-level: 12
251#[cfg(feature = "api-12")]
252#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
253pub type OH_AVDataSourceReadAt = ::core::option::Option<
254 unsafe extern "C" fn(data: *mut OH_AVBuffer, length: i32, pos: i64) -> i32,
255>;
256/// User customized data source.
257///
258/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
259///
260/// Available since API-level: 12
261#[cfg(feature = "api-12")]
262#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
263#[repr(C)]
264#[derive(Debug, Copy, Clone)]
265pub struct OH_AVDataSource {
266 /// Total size of the data source.
267 pub size: i64,
268 /// Callback interface for reading data from datasource.
269 pub readAt: OH_AVDataSourceReadAt,
270}
271/// the function pointer will be called to get sequence media data.
272///
273/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
274/// # Arguments
275///
276/// * `data` - OH_AVBuffer buffer to fill
277///
278/// * `length` - expected to read size;
279///
280/// * `pos` - current read offset
281///
282/// * `userData` - user-defined data
283///
284/// # Returns
285///
286/// * Actual size of data read to the buffer.
287///
288/// Available since API-level: 20
289#[cfg(feature = "api-20")]
290#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
291pub type OH_AVDataSourceReadAtExt = ::core::option::Option<
292 unsafe extern "C" fn(
293 data: *mut OH_AVBuffer,
294 length: i32,
295 pos: i64,
296 userData: *mut ::core::ffi::c_void,
297 ) -> i32,
298>;
299/// User customized data source.
300///
301/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
302///
303/// Available since API-level: 20
304#[cfg(feature = "api-20")]
305#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
306#[repr(C)]
307#[derive(Debug, Copy, Clone)]
308pub struct OH_AVDataSourceExt {
309 /// Total size of the data source.
310 pub size: i64,
311 /// Callback interface for reading data from datasource.
312 pub readAt: OH_AVDataSourceReadAtExt,
313}
314impl OH_MediaType {
315 pub const MEDIA_TYPE_AUD: OH_MediaType = OH_MediaType(0);
316 pub const MEDIA_TYPE_VID: OH_MediaType = OH_MediaType(1);
317 /// track is subtitle.
318 ///
319 /// Available since API-level: 12
320 #[cfg(feature = "api-12")]
321 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
322 pub const MEDIA_TYPE_SUBTITLE: OH_MediaType = OH_MediaType(2);
323 /// track is timed meta.
324 ///
325 /// Available since API-level: 20
326 #[cfg(feature = "api-20")]
327 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
328 pub const MEDIA_TYPE_TIMED_METADATA: OH_MediaType = OH_MediaType(5);
329 /// track is auxiliary.
330 ///
331 /// Available since API-level: 20
332 #[cfg(feature = "api-20")]
333 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
334 pub const MEDIA_TYPE_AUXILIARY: OH_MediaType = OH_MediaType(6);
335}
336#[repr(transparent)]
337/// Media type.
338///
339///
340/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
341///
342/// Available since API-level: 9
343#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
344pub struct OH_MediaType(pub ::core::ffi::c_uint);
345impl OH_AACProfile {
346 pub const AAC_PROFILE_LC: OH_AACProfile = OH_AACProfile(0);
347 /// High-Efficiency AAC profile, contain the audio object types: AAC LC, SBR
348 ///
349 /// Available since API-level: 14
350 #[cfg(feature = "api-14")]
351 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
352 pub const AAC_PROFILE_HE: OH_AACProfile = OH_AACProfile(3);
353 /// High-Efficiency AAC v2 profile, contain the audio object types: AAC LC, SBR, PS
354 ///
355 /// Available since API-level: 14
356 #[cfg(feature = "api-14")]
357 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
358 pub const AAC_PROFILE_HE_V2: OH_AACProfile = OH_AACProfile(4);
359}
360#[repr(transparent)]
361/// AAC Profile
362///
363///
364/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
365///
366/// Available since API-level: 9
367#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
368pub struct OH_AACProfile(pub ::core::ffi::c_uint);
369impl OH_AVCProfile {
370 pub const AVC_PROFILE_BASELINE: OH_AVCProfile = OH_AVCProfile(0);
371 pub const AVC_PROFILE_HIGH: OH_AVCProfile = OH_AVCProfile(4);
372 pub const AVC_PROFILE_MAIN: OH_AVCProfile = OH_AVCProfile(8);
373}
374#[repr(transparent)]
375/// AVC Profile
376///
377///
378/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
379///
380/// Available since API-level: 9
381#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
382pub struct OH_AVCProfile(pub ::core::ffi::c_uint);
383impl OH_HEVCProfile {
384 pub const HEVC_PROFILE_MAIN: OH_HEVCProfile = OH_HEVCProfile(0);
385 pub const HEVC_PROFILE_MAIN_10: OH_HEVCProfile = OH_HEVCProfile(1);
386 pub const HEVC_PROFILE_MAIN_STILL: OH_HEVCProfile = OH_HEVCProfile(2);
387 ///
388 /// **Deprecated** since 14
389 #[deprecated(since = "14")]
390 pub const HEVC_PROFILE_MAIN_10_HDR10: OH_HEVCProfile = OH_HEVCProfile(3);
391 ///
392 /// **Deprecated** since 14
393 #[deprecated(since = "14")]
394 pub const HEVC_PROFILE_MAIN_10_HDR10_PLUS: OH_HEVCProfile = OH_HEVCProfile(4);
395}
396#[repr(transparent)]
397/// HEVC Profile
398///
399///
400/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
401///
402/// Available since API-level: 10
403#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
404pub struct OH_HEVCProfile(pub ::core::ffi::c_uint);
405#[cfg(feature = "api-15")]
406#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
407impl OH_VVCProfile {
408 /// Main 10 profile
409 pub const VVC_PROFILE_MAIN_10: OH_VVCProfile = OH_VVCProfile(1);
410 /// Main 12 profile
411 pub const VVC_PROFILE_MAIN_12: OH_VVCProfile = OH_VVCProfile(2);
412 /// Main 12 Intra profile
413 pub const VVC_PROFILE_MAIN_12_INTRA: OH_VVCProfile = OH_VVCProfile(10);
414 /// Multilayer Main 10 profile
415 pub const VVC_PROFILE_MULTI_MAIN_10: OH_VVCProfile = OH_VVCProfile(17);
416 /// Main 10 4:4:4 profile
417 pub const VVC_PROFILE_MAIN_10_444: OH_VVCProfile = OH_VVCProfile(33);
418 /// Main 12 4:4:4 profile
419 pub const VVC_PROFILE_MAIN_12_444: OH_VVCProfile = OH_VVCProfile(34);
420 /// Main 16 4:4:4 profile
421 pub const VVC_PROFILE_MAIN_16_444: OH_VVCProfile = OH_VVCProfile(36);
422 /// Main 12 4:4:4 Intra profile
423 pub const VVC_PROFILE_MAIN_12_444_INTRA: OH_VVCProfile = OH_VVCProfile(42);
424 /// Main 16 4:4:4 Intra profile
425 pub const VVC_PROFILE_MAIN_16_444_INTRA: OH_VVCProfile = OH_VVCProfile(44);
426 /// Multilayer Main 10 4:4:4 profile
427 pub const VVC_PROFILE_MULTI_MAIN_10_444: OH_VVCProfile = OH_VVCProfile(49);
428 /// Main 10 Still Picture profile
429 pub const VVC_PROFILE_MAIN_10_STILL: OH_VVCProfile = OH_VVCProfile(65);
430 /// Main 12 Still Picture profile
431 pub const VVC_PROFILE_MAIN_12_STILL: OH_VVCProfile = OH_VVCProfile(66);
432 /// Main 10 4:4:4 Still Picture profile
433 pub const VVC_PROFILE_MAIN_10_444_STILL: OH_VVCProfile = OH_VVCProfile(97);
434 /// Main 12 4:4:4 Still Picture profile
435 pub const VVC_PROFILE_MAIN_12_444_STILL: OH_VVCProfile = OH_VVCProfile(98);
436 /// Main 16 4:4:4 Still Picture profile
437 pub const VVC_PROFILE_MAIN_16_444_STILL: OH_VVCProfile = OH_VVCProfile(100);
438}
439#[repr(transparent)]
440/// Profile: A specified subset of the syntax of VVC.
441///
442///
443/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
444///
445/// Available since API-level: 15
446#[cfg(feature = "api-15")]
447#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
448#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
449pub struct OH_VVCProfile(pub ::core::ffi::c_uint);
450#[cfg(feature = "api-17")]
451#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
452impl OH_MPEG2Profile {
453 /// Simple profile
454 pub const MPEG2_PROFILE_SIMPLE: OH_MPEG2Profile = OH_MPEG2Profile(0);
455 /// Main profile
456 pub const MPEG2_PROFILE_MAIN: OH_MPEG2Profile = OH_MPEG2Profile(1);
457 /// SNR scalable profile
458 pub const MPEG2_PROFILE_SNR_SCALABLE: OH_MPEG2Profile = OH_MPEG2Profile(2);
459 /// Spatially scalable profile
460 pub const MPEG2_PROFILE_SPATIALLY_SCALABLE: OH_MPEG2Profile = OH_MPEG2Profile(3);
461 /// High profile
462 pub const MPEG2_PROFILE_HIGH: OH_MPEG2Profile = OH_MPEG2Profile(4);
463 /// 4:2:2 profile
464 pub const MPEG2_PROFILE_422: OH_MPEG2Profile = OH_MPEG2Profile(5);
465}
466#[repr(transparent)]
467/// MPEG2 Profile
468///
469///
470/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
471///
472/// Available since API-level: 17
473#[cfg(feature = "api-17")]
474#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
475#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
476pub struct OH_MPEG2Profile(pub ::core::ffi::c_uint);
477#[cfg(feature = "api-17")]
478#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
479impl OH_MPEG4Profile {
480 /// Simple profile
481 pub const MPEG4_PROFILE_SIMPLE: OH_MPEG4Profile = OH_MPEG4Profile(0);
482 /// Simple scalable profile
483 pub const MPEG4_PROFILE_SIMPLE_SCALABLE: OH_MPEG4Profile = OH_MPEG4Profile(1);
484 /// Core profile
485 pub const MPEG4_PROFILE_CORE: OH_MPEG4Profile = OH_MPEG4Profile(2);
486 /// Main profile
487 pub const MPEG4_PROFILE_MAIN: OH_MPEG4Profile = OH_MPEG4Profile(3);
488 /// N-Bit profile
489 pub const MPEG4_PROFILE_N_BIT: OH_MPEG4Profile = OH_MPEG4Profile(4);
490 /// Hybrid profile
491 pub const MPEG4_PROFILE_HYBRID: OH_MPEG4Profile = OH_MPEG4Profile(5);
492 /// Basic animated texture profile
493 pub const MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE: OH_MPEG4Profile = OH_MPEG4Profile(6);
494 /// Scalable texture profile
495 pub const MPEG4_PROFILE_SCALABLE_TEXTURE: OH_MPEG4Profile = OH_MPEG4Profile(7);
496 /// Simple FA profile
497 pub const MPEG4_PROFILE_SIMPLE_FA: OH_MPEG4Profile = OH_MPEG4Profile(8);
498 /// Advanced real time simple profile
499 pub const MPEG4_PROFILE_ADVANCED_REAL_TIME_SIMPLE: OH_MPEG4Profile = OH_MPEG4Profile(9);
500 /// Core scalable profile
501 pub const MPEG4_PROFILE_CORE_SCALABLE: OH_MPEG4Profile = OH_MPEG4Profile(10);
502 /// Advanced coding efficiency profile
503 pub const MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY: OH_MPEG4Profile = OH_MPEG4Profile(11);
504 /// Advanced core profile
505 pub const MPEG4_PROFILE_ADVANCED_CORE: OH_MPEG4Profile = OH_MPEG4Profile(12);
506 /// Advanced scalable texture profile
507 pub const MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE: OH_MPEG4Profile = OH_MPEG4Profile(13);
508 /// Advanced simple profile
509 pub const MPEG4_PROFILE_ADVANCED_SIMPLE: OH_MPEG4Profile = OH_MPEG4Profile(17);
510}
511#[repr(transparent)]
512/// MPEG4 Profile
513///
514///
515/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
516///
517/// Available since API-level: 17
518#[cfg(feature = "api-17")]
519#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
520#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
521pub struct OH_MPEG4Profile(pub ::core::ffi::c_uint);
522#[cfg(feature = "api-17")]
523#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
524impl OH_H263Profile {
525 /// Baseline profile
526 pub const H263_PROFILE_BASELINE: OH_H263Profile = OH_H263Profile(0);
527 /// Version 1 backward compatibility profile
528 pub const H263_PROFILE_VERSION_1_BACKWARD_COMPATIBILITY: OH_H263Profile = OH_H263Profile(2);
529}
530#[repr(transparent)]
531/// H263 Profile
532///
533///
534/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
535///
536/// Available since API-level: 17
537#[cfg(feature = "api-17")]
538#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
539#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
540pub struct OH_H263Profile(pub ::core::ffi::c_uint);
541impl OH_AVOutputFormat {
542 pub const AV_OUTPUT_FORMAT_DEFAULT: OH_AVOutputFormat = OH_AVOutputFormat(0);
543 pub const AV_OUTPUT_FORMAT_MPEG_4: OH_AVOutputFormat = OH_AVOutputFormat(2);
544 pub const AV_OUTPUT_FORMAT_M4A: OH_AVOutputFormat = OH_AVOutputFormat(6);
545 /// The muxer output amr file format.
546 ///
547 /// Available since API-level: 12
548 #[cfg(feature = "api-12")]
549 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
550 pub const AV_OUTPUT_FORMAT_AMR: OH_AVOutputFormat = OH_AVOutputFormat(8);
551 /// The muxer output mp3 file format.
552 ///
553 /// Available since API-level: 12
554 #[cfg(feature = "api-12")]
555 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
556 pub const AV_OUTPUT_FORMAT_MP3: OH_AVOutputFormat = OH_AVOutputFormat(9);
557 /// The muxer output wav file format.
558 ///
559 /// Available since API-level: 12
560 #[cfg(feature = "api-12")]
561 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
562 pub const AV_OUTPUT_FORMAT_WAV: OH_AVOutputFormat = OH_AVOutputFormat(10);
563 /// The muxer output aac file format.
564 ///
565 /// Available since API-level: 18
566 #[cfg(feature = "api-18")]
567 #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
568 pub const AV_OUTPUT_FORMAT_AAC: OH_AVOutputFormat = OH_AVOutputFormat(11);
569 /// The muxer output flac file format.
570 ///
571 /// Available since API-level: 20
572 #[cfg(feature = "api-20")]
573 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
574 pub const AV_OUTPUT_FORMAT_FLAC: OH_AVOutputFormat = OH_AVOutputFormat(12);
575}
576#[repr(transparent)]
577/// Enumerates the muxer output file format
578///
579///
580/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
581///
582/// Available since API-level: 10
583#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
584pub struct OH_AVOutputFormat(pub ::core::ffi::c_uint);
585impl OH_AVSeekMode {
586 pub const SEEK_MODE_NEXT_SYNC: OH_AVSeekMode = OH_AVSeekMode(0);
587 pub const SEEK_MODE_PREVIOUS_SYNC: OH_AVSeekMode = OH_AVSeekMode(1);
588 pub const SEEK_MODE_CLOSEST_SYNC: OH_AVSeekMode = OH_AVSeekMode(2);
589}
590#[repr(transparent)]
591/// Seek Mode
592///
593///
594/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
595///
596/// Available since API-level: 10
597#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
598pub struct OH_AVSeekMode(pub ::core::ffi::c_uint);
599impl OH_ScalingMode {
600 ///
601 /// **Deprecated** since 14
602 /// OH_SCALING_MODE_SCALE_TO_WINDOW_V2
603 #[deprecated(since = "14")]
604 pub const SCALING_MODE_SCALE_TO_WINDOW: OH_ScalingMode = OH_ScalingMode(1);
605 ///
606 /// **Deprecated** since 14
607 /// OH_SCALING_MODE_SCALE_CROP_V2
608 #[deprecated(since = "14")]
609 pub const SCALING_MODE_SCALE_CROP: OH_ScalingMode = OH_ScalingMode(2);
610}
611#[repr(transparent)]
612/// Scaling Mode
613///
614///
615/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
616///
617/// **Deprecated** since 14
618/// OHScalingModeV2
619///
620/// Available since API-level: 10
621#[deprecated(since = "14")]
622#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
623pub struct OH_ScalingMode(pub ::core::ffi::c_uint);
624impl OH_BitsPerSample {
625 pub const SAMPLE_U8: OH_BitsPerSample = OH_BitsPerSample(0);
626 pub const SAMPLE_S16LE: OH_BitsPerSample = OH_BitsPerSample(1);
627 pub const SAMPLE_S24LE: OH_BitsPerSample = OH_BitsPerSample(2);
628 pub const SAMPLE_S32LE: OH_BitsPerSample = OH_BitsPerSample(3);
629 pub const SAMPLE_F32LE: OH_BitsPerSample = OH_BitsPerSample(4);
630 pub const SAMPLE_U8P: OH_BitsPerSample = OH_BitsPerSample(5);
631 pub const SAMPLE_S16P: OH_BitsPerSample = OH_BitsPerSample(6);
632 pub const SAMPLE_S24P: OH_BitsPerSample = OH_BitsPerSample(7);
633 pub const SAMPLE_S32P: OH_BitsPerSample = OH_BitsPerSample(8);
634 pub const SAMPLE_F32P: OH_BitsPerSample = OH_BitsPerSample(9);
635 pub const INVALID_WIDTH: OH_BitsPerSample = OH_BitsPerSample(-1);
636}
637#[repr(transparent)]
638/// enum Audio Bits Per Coded Sample
639///
640///
641/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
642///
643/// Available since API-level: 10
644#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
645pub struct OH_BitsPerSample(pub ::core::ffi::c_int);
646impl OH_ColorPrimary {
647 pub const COLOR_PRIMARY_BT709: OH_ColorPrimary = OH_ColorPrimary(1);
648 pub const COLOR_PRIMARY_UNSPECIFIED: OH_ColorPrimary = OH_ColorPrimary(2);
649 pub const COLOR_PRIMARY_BT470_M: OH_ColorPrimary = OH_ColorPrimary(4);
650 pub const COLOR_PRIMARY_BT601_625: OH_ColorPrimary = OH_ColorPrimary(5);
651 pub const COLOR_PRIMARY_BT601_525: OH_ColorPrimary = OH_ColorPrimary(6);
652 pub const COLOR_PRIMARY_SMPTE_ST240: OH_ColorPrimary = OH_ColorPrimary(7);
653 pub const COLOR_PRIMARY_GENERIC_FILM: OH_ColorPrimary = OH_ColorPrimary(8);
654 pub const COLOR_PRIMARY_BT2020: OH_ColorPrimary = OH_ColorPrimary(9);
655 pub const COLOR_PRIMARY_SMPTE_ST428: OH_ColorPrimary = OH_ColorPrimary(10);
656 pub const COLOR_PRIMARY_P3DCI: OH_ColorPrimary = OH_ColorPrimary(11);
657 pub const COLOR_PRIMARY_P3D65: OH_ColorPrimary = OH_ColorPrimary(12);
658}
659#[repr(transparent)]
660/// Color Primary
661///
662///
663/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
664///
665/// Available since API-level: 10
666#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
667pub struct OH_ColorPrimary(pub ::core::ffi::c_uint);
668impl OH_TransferCharacteristic {
669 pub const TRANSFER_CHARACTERISTIC_BT709: OH_TransferCharacteristic =
670 OH_TransferCharacteristic(1);
671 pub const TRANSFER_CHARACTERISTIC_UNSPECIFIED: OH_TransferCharacteristic =
672 OH_TransferCharacteristic(2);
673 pub const TRANSFER_CHARACTERISTIC_GAMMA_2_2: OH_TransferCharacteristic =
674 OH_TransferCharacteristic(4);
675 pub const TRANSFER_CHARACTERISTIC_GAMMA_2_8: OH_TransferCharacteristic =
676 OH_TransferCharacteristic(5);
677 pub const TRANSFER_CHARACTERISTIC_BT601: OH_TransferCharacteristic =
678 OH_TransferCharacteristic(6);
679 pub const TRANSFER_CHARACTERISTIC_SMPTE_ST240: OH_TransferCharacteristic =
680 OH_TransferCharacteristic(7);
681 pub const TRANSFER_CHARACTERISTIC_LINEAR: OH_TransferCharacteristic =
682 OH_TransferCharacteristic(8);
683 pub const TRANSFER_CHARACTERISTIC_LOG: OH_TransferCharacteristic = OH_TransferCharacteristic(9);
684 pub const TRANSFER_CHARACTERISTIC_LOG_SQRT: OH_TransferCharacteristic =
685 OH_TransferCharacteristic(10);
686 pub const TRANSFER_CHARACTERISTIC_IEC_61966_2_4: OH_TransferCharacteristic =
687 OH_TransferCharacteristic(11);
688 pub const TRANSFER_CHARACTERISTIC_BT1361: OH_TransferCharacteristic =
689 OH_TransferCharacteristic(12);
690 pub const TRANSFER_CHARACTERISTIC_IEC_61966_2_1: OH_TransferCharacteristic =
691 OH_TransferCharacteristic(13);
692 pub const TRANSFER_CHARACTERISTIC_BT2020_10BIT: OH_TransferCharacteristic =
693 OH_TransferCharacteristic(14);
694 pub const TRANSFER_CHARACTERISTIC_BT2020_12BIT: OH_TransferCharacteristic =
695 OH_TransferCharacteristic(15);
696 pub const TRANSFER_CHARACTERISTIC_PQ: OH_TransferCharacteristic = OH_TransferCharacteristic(16);
697 pub const TRANSFER_CHARACTERISTIC_SMPTE_ST428: OH_TransferCharacteristic =
698 OH_TransferCharacteristic(17);
699 pub const TRANSFER_CHARACTERISTIC_HLG: OH_TransferCharacteristic =
700 OH_TransferCharacteristic(18);
701}
702#[repr(transparent)]
703/// Transfer Characteristic
704///
705///
706/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
707///
708/// Available since API-level: 10
709#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
710pub struct OH_TransferCharacteristic(pub ::core::ffi::c_uint);
711impl OH_MatrixCoefficient {
712 pub const MATRIX_COEFFICIENT_IDENTITY: OH_MatrixCoefficient = OH_MatrixCoefficient(0);
713 pub const MATRIX_COEFFICIENT_BT709: OH_MatrixCoefficient = OH_MatrixCoefficient(1);
714 pub const MATRIX_COEFFICIENT_UNSPECIFIED: OH_MatrixCoefficient = OH_MatrixCoefficient(2);
715 pub const MATRIX_COEFFICIENT_FCC: OH_MatrixCoefficient = OH_MatrixCoefficient(4);
716 pub const MATRIX_COEFFICIENT_BT601_625: OH_MatrixCoefficient = OH_MatrixCoefficient(5);
717 pub const MATRIX_COEFFICIENT_BT601_525: OH_MatrixCoefficient = OH_MatrixCoefficient(6);
718 pub const MATRIX_COEFFICIENT_SMPTE_ST240: OH_MatrixCoefficient = OH_MatrixCoefficient(7);
719 pub const MATRIX_COEFFICIENT_YCGCO: OH_MatrixCoefficient = OH_MatrixCoefficient(8);
720 pub const MATRIX_COEFFICIENT_BT2020_NCL: OH_MatrixCoefficient = OH_MatrixCoefficient(9);
721 pub const MATRIX_COEFFICIENT_BT2020_CL: OH_MatrixCoefficient = OH_MatrixCoefficient(10);
722 pub const MATRIX_COEFFICIENT_SMPTE_ST2085: OH_MatrixCoefficient = OH_MatrixCoefficient(11);
723 pub const MATRIX_COEFFICIENT_CHROMATICITY_NCL: OH_MatrixCoefficient = OH_MatrixCoefficient(12);
724 pub const MATRIX_COEFFICIENT_CHROMATICITY_CL: OH_MatrixCoefficient = OH_MatrixCoefficient(13);
725 pub const MATRIX_COEFFICIENT_ICTCP: OH_MatrixCoefficient = OH_MatrixCoefficient(14);
726}
727#[repr(transparent)]
728/// Matrix Coefficient
729///
730///
731/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
732///
733/// Available since API-level: 10
734#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
735pub struct OH_MatrixCoefficient(pub ::core::ffi::c_uint);
736#[cfg(feature = "api-12")]
737#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
738impl OH_AVCLevel {
739 pub const AVC_LEVEL_1: OH_AVCLevel = OH_AVCLevel(0);
740 pub const AVC_LEVEL_1b: OH_AVCLevel = OH_AVCLevel(1);
741 pub const AVC_LEVEL_11: OH_AVCLevel = OH_AVCLevel(2);
742 pub const AVC_LEVEL_12: OH_AVCLevel = OH_AVCLevel(3);
743 pub const AVC_LEVEL_13: OH_AVCLevel = OH_AVCLevel(4);
744 pub const AVC_LEVEL_2: OH_AVCLevel = OH_AVCLevel(5);
745 pub const AVC_LEVEL_21: OH_AVCLevel = OH_AVCLevel(6);
746 pub const AVC_LEVEL_22: OH_AVCLevel = OH_AVCLevel(7);
747 pub const AVC_LEVEL_3: OH_AVCLevel = OH_AVCLevel(8);
748 pub const AVC_LEVEL_31: OH_AVCLevel = OH_AVCLevel(9);
749 pub const AVC_LEVEL_32: OH_AVCLevel = OH_AVCLevel(10);
750 pub const AVC_LEVEL_4: OH_AVCLevel = OH_AVCLevel(11);
751 pub const AVC_LEVEL_41: OH_AVCLevel = OH_AVCLevel(12);
752 pub const AVC_LEVEL_42: OH_AVCLevel = OH_AVCLevel(13);
753 pub const AVC_LEVEL_5: OH_AVCLevel = OH_AVCLevel(14);
754 pub const AVC_LEVEL_51: OH_AVCLevel = OH_AVCLevel(15);
755 pub const AVC_LEVEL_52: OH_AVCLevel = OH_AVCLevel(16);
756 pub const AVC_LEVEL_6: OH_AVCLevel = OH_AVCLevel(17);
757 pub const AVC_LEVEL_61: OH_AVCLevel = OH_AVCLevel(18);
758 pub const AVC_LEVEL_62: OH_AVCLevel = OH_AVCLevel(19);
759}
760#[repr(transparent)]
761/// AVC Level.
762///
763///
764/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
765///
766/// Available since API-level: 12
767#[cfg(feature = "api-12")]
768#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
769#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
770pub struct OH_AVCLevel(pub ::core::ffi::c_uint);
771#[cfg(feature = "api-12")]
772#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
773impl OH_HEVCLevel {
774 pub const HEVC_LEVEL_1: OH_HEVCLevel = OH_HEVCLevel(0);
775 pub const HEVC_LEVEL_2: OH_HEVCLevel = OH_HEVCLevel(1);
776 pub const HEVC_LEVEL_21: OH_HEVCLevel = OH_HEVCLevel(2);
777 pub const HEVC_LEVEL_3: OH_HEVCLevel = OH_HEVCLevel(3);
778 pub const HEVC_LEVEL_31: OH_HEVCLevel = OH_HEVCLevel(4);
779 pub const HEVC_LEVEL_4: OH_HEVCLevel = OH_HEVCLevel(5);
780 pub const HEVC_LEVEL_41: OH_HEVCLevel = OH_HEVCLevel(6);
781 pub const HEVC_LEVEL_5: OH_HEVCLevel = OH_HEVCLevel(7);
782 pub const HEVC_LEVEL_51: OH_HEVCLevel = OH_HEVCLevel(8);
783 pub const HEVC_LEVEL_52: OH_HEVCLevel = OH_HEVCLevel(9);
784 pub const HEVC_LEVEL_6: OH_HEVCLevel = OH_HEVCLevel(10);
785 pub const HEVC_LEVEL_61: OH_HEVCLevel = OH_HEVCLevel(11);
786 pub const HEVC_LEVEL_62: OH_HEVCLevel = OH_HEVCLevel(12);
787}
788#[repr(transparent)]
789/// HEVC Level.
790///
791///
792/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
793///
794/// Available since API-level: 12
795#[cfg(feature = "api-12")]
796#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
797#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
798pub struct OH_HEVCLevel(pub ::core::ffi::c_uint);
799#[cfg(feature = "api-15")]
800#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
801impl OH_VVCLevel {
802 /// VVC level 1.0
803 pub const VVC_LEVEL_1: OH_VVCLevel = OH_VVCLevel(16);
804 /// VVC level 2.0
805 pub const VVC_LEVEL_2: OH_VVCLevel = OH_VVCLevel(32);
806 /// VVC level 2.1
807 pub const VVC_LEVEL_21: OH_VVCLevel = OH_VVCLevel(35);
808 /// VVC level 3.0
809 pub const VVC_LEVEL_3: OH_VVCLevel = OH_VVCLevel(48);
810 /// VVC level 3.1
811 pub const VVC_LEVEL_31: OH_VVCLevel = OH_VVCLevel(51);
812 /// VVC level 4.0
813 pub const VVC_LEVEL_4: OH_VVCLevel = OH_VVCLevel(64);
814 /// VVC level 4.1
815 pub const VVC_LEVEL_41: OH_VVCLevel = OH_VVCLevel(67);
816 /// VVC level 5.0
817 pub const VVC_LEVEL_5: OH_VVCLevel = OH_VVCLevel(80);
818 /// VVC level 5.1
819 pub const VVC_LEVEL_51: OH_VVCLevel = OH_VVCLevel(83);
820 /// VVC level 5.2
821 pub const VVC_LEVEL_52: OH_VVCLevel = OH_VVCLevel(86);
822 /// VVC level 6.0
823 pub const VVC_LEVEL_6: OH_VVCLevel = OH_VVCLevel(96);
824 /// VVC level 6.1
825 pub const VVC_LEVEL_61: OH_VVCLevel = OH_VVCLevel(99);
826 /// VVC level 6.2
827 pub const VVC_LEVEL_62: OH_VVCLevel = OH_VVCLevel(102);
828 /// VVC level 6.3
829 pub const VVC_LEVEL_63: OH_VVCLevel = OH_VVCLevel(105);
830 /// VVC level 15.5
831 pub const VVC_LEVEL_155: OH_VVCLevel = OH_VVCLevel(255);
832}
833#[repr(transparent)]
834/// VVC Level: A defined set of constraints on the values that may be taken by the syntax elements and variables
835/// of VVC, or the value of a transform coefficient prior to scaling.
836///
837///
838/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
839///
840/// Available since API-level: 15
841#[cfg(feature = "api-15")]
842#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
843#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
844pub struct OH_VVCLevel(pub ::core::ffi::c_uint);
845#[cfg(feature = "api-17")]
846#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
847impl OH_MPEG2Level {
848 /// Low level
849 pub const MPEG2_LEVEL_LOW: OH_MPEG2Level = OH_MPEG2Level(0);
850 /// Main level
851 pub const MPEG2_LEVEL_MAIN: OH_MPEG2Level = OH_MPEG2Level(1);
852 /// High 1440 level
853 pub const MPEG2_LEVEL_HIGH_1440: OH_MPEG2Level = OH_MPEG2Level(2);
854 /// High level
855 pub const MPEG2_LEVEL_HIGH: OH_MPEG2Level = OH_MPEG2Level(3);
856}
857#[repr(transparent)]
858/// MPEG2 Level.
859///
860///
861/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
862///
863/// Available since API-level: 17
864#[cfg(feature = "api-17")]
865#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
866#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
867pub struct OH_MPEG2Level(pub ::core::ffi::c_uint);
868#[cfg(feature = "api-17")]
869#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
870impl OH_MPEG4Level {
871 /// 0 level
872 pub const MPEG4_LEVEL_0: OH_MPEG4Level = OH_MPEG4Level(0);
873 /// 0B level
874 pub const MPEG4_LEVEL_0B: OH_MPEG4Level = OH_MPEG4Level(1);
875 /// 1 level
876 pub const MPEG4_LEVEL_1: OH_MPEG4Level = OH_MPEG4Level(2);
877 /// 2 level
878 pub const MPEG4_LEVEL_2: OH_MPEG4Level = OH_MPEG4Level(3);
879 /// 3 level
880 pub const MPEG4_LEVEL_3: OH_MPEG4Level = OH_MPEG4Level(4);
881 /// 3B level
882 pub const MPEG4_LEVEL_3B: OH_MPEG4Level = OH_MPEG4Level(5);
883 /// 4 level
884 pub const MPEG4_LEVEL_4: OH_MPEG4Level = OH_MPEG4Level(6);
885 /// 4A level
886 pub const MPEG4_LEVEL_4A: OH_MPEG4Level = OH_MPEG4Level(7);
887 /// 5 level
888 pub const MPEG4_LEVEL_5: OH_MPEG4Level = OH_MPEG4Level(8);
889 /// 6 level
890 pub const MPEG4_LEVEL_6: OH_MPEG4Level = OH_MPEG4Level(9);
891}
892#[repr(transparent)]
893/// MPEG4 Level.
894///
895///
896/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
897///
898/// Available since API-level: 17
899#[cfg(feature = "api-17")]
900#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
901#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
902pub struct OH_MPEG4Level(pub ::core::ffi::c_uint);
903#[cfg(feature = "api-17")]
904#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
905impl OH_H263Level {
906 /// 10 level
907 pub const H263_LEVEL_10: OH_H263Level = OH_H263Level(0);
908 /// 20 level
909 pub const H263_LEVEL_20: OH_H263Level = OH_H263Level(1);
910 /// 30 level
911 pub const H263_LEVEL_30: OH_H263Level = OH_H263Level(2);
912 /// 40 level
913 pub const H263_LEVEL_40: OH_H263Level = OH_H263Level(3);
914 /// 45 level
915 pub const H263_LEVEL_45: OH_H263Level = OH_H263Level(4);
916 /// 50 level
917 pub const H263_LEVEL_50: OH_H263Level = OH_H263Level(5);
918 /// 60 level
919 pub const H263_LEVEL_60: OH_H263Level = OH_H263Level(6);
920 /// 70 level
921 pub const H263_LEVEL_70: OH_H263Level = OH_H263Level(7);
922}
923#[repr(transparent)]
924/// H263 Level.
925///
926///
927/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
928///
929/// Available since API-level: 17
930#[cfg(feature = "api-17")]
931#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
932#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
933pub struct OH_H263Level(pub ::core::ffi::c_uint);
934#[cfg(feature = "api-12")]
935#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
936impl OH_TemporalGopReferenceMode {
937 /// Refer to latest short-term reference frame.
938 pub const ADJACENT_REFERENCE: OH_TemporalGopReferenceMode = OH_TemporalGopReferenceMode(0);
939 /// Refer to latest long-term reference frame.
940 pub const JUMP_REFERENCE: OH_TemporalGopReferenceMode = OH_TemporalGopReferenceMode(1);
941 /// Uniformly scaled reference structure, which has even distribution of video frames after drop the highest
942 /// enhance layer. The temporal group of pictures must be power of 2.
943 pub const UNIFORMLY_SCALED_REFERENCE: OH_TemporalGopReferenceMode =
944 OH_TemporalGopReferenceMode(2);
945}
946#[repr(transparent)]
947/// The reference mode in temporal group of picture.
948///
949///
950/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
951///
952/// Available since API-level: 12
953#[cfg(feature = "api-12")]
954#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
955#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
956pub struct OH_TemporalGopReferenceMode(pub ::core::ffi::c_uint);
957impl OH_BitrateMode {
958 /// Constant Bit rate mode.
959 pub const BITRATE_MODE_CBR: OH_BitrateMode = OH_BitrateMode(0);
960 /// Variable Bit rate mode.
961 pub const BITRATE_MODE_VBR: OH_BitrateMode = OH_BitrateMode(1);
962 /// Constant Quality mode.
963 pub const BITRATE_MODE_CQ: OH_BitrateMode = OH_BitrateMode(2);
964 /// Stable Quality RateControl.
965 ///
966 /// Available since API-level: 20
967 #[cfg(feature = "api-20")]
968 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
969 pub const BITRATE_MODE_SQR: OH_BitrateMode = OH_BitrateMode(3);
970}
971#[repr(transparent)]
972/// The bitrate mode of encoder.
973///
974/// Change the location of the header file, since 14.
975///
976///
977/// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
978///
979/// Available since API-level: 10
980#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
981pub struct OH_BitrateMode(pub ::core::ffi::c_uint);
982extern "C" {
983 /// Enumerates the mime types of video avc codec.
984 ///
985 ///
986 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
987 ///
988 /// Available since API-level: 9
989 pub static mut OH_AVCODEC_MIMETYPE_VIDEO_AVC: *const ::core::ffi::c_char;
990 /// Enumerates the mime types of audio aac codec.
991 ///
992 ///
993 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
994 ///
995 /// Available since API-level: 9
996 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_AAC: *const ::core::ffi::c_char;
997 /// Enumerates the mime types of audio flac codec.
998 ///
999 ///
1000 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1001 ///
1002 /// Available since API-level: 10
1003 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_FLAC: *const ::core::ffi::c_char;
1004 /// Enumerates the mime types of audio vorbis codec.
1005 ///
1006 ///
1007 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1008 ///
1009 /// Available since API-level: 10
1010 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_VORBIS: *const ::core::ffi::c_char;
1011 /// Enumerates the mime types of audio mp3 codec.
1012 ///
1013 ///
1014 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1015 ///
1016 /// Available since API-level: 10
1017 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_MPEG: *const ::core::ffi::c_char;
1018 /// Enumerates the mime types of video hevc codec.
1019 ///
1020 ///
1021 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1022 ///
1023 /// Available since API-level: 10
1024 pub static mut OH_AVCODEC_MIMETYPE_VIDEO_HEVC: *const ::core::ffi::c_char;
1025 /// Enumerates the mime types of video mpeg4 muxer.
1026 ///
1027 ///
1028 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1029 ///
1030 /// **Deprecated** since 11
1031 ///
1032 /// Available since API-level: 10
1033 #[deprecated(since = "11")]
1034 pub static mut OH_AVCODEC_MIMETYPE_VIDEO_MPEG4: *const ::core::ffi::c_char;
1035 /// Enumerates the mime types of cover jpg muxer.
1036 ///
1037 ///
1038 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1039 ///
1040 /// Available since API-level: 10
1041 pub static mut OH_AVCODEC_MIMETYPE_IMAGE_JPG: *const ::core::ffi::c_char;
1042 /// Enumerates the mime types of cover png muxer.
1043 ///
1044 ///
1045 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1046 ///
1047 /// Available since API-level: 10
1048 pub static mut OH_AVCODEC_MIMETYPE_IMAGE_PNG: *const ::core::ffi::c_char;
1049 /// Enumerates the mime types of cover bmp muxer.
1050 ///
1051 ///
1052 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1053 ///
1054 /// Available since API-level: 10
1055 pub static mut OH_AVCODEC_MIMETYPE_IMAGE_BMP: *const ::core::ffi::c_char;
1056 /// Enumerates the mime types of audio vivid codec.
1057 ///
1058 ///
1059 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1060 ///
1061 /// Available since API-level: 11
1062 #[cfg(feature = "api-11")]
1063 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1064 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_VIVID: *const ::core::ffi::c_char;
1065 /// Enumerates the mime types of audio amrnb codec.
1066 ///
1067 ///
1068 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1069 ///
1070 /// Available since API-level: 11
1071 #[cfg(feature = "api-11")]
1072 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1073 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_AMR_NB: *const ::core::ffi::c_char;
1074 /// Enumerates the mime types of audio amrwb codec.
1075 ///
1076 ///
1077 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1078 ///
1079 /// Available since API-level: 11
1080 #[cfg(feature = "api-11")]
1081 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1082 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_AMR_WB: *const ::core::ffi::c_char;
1083 /// Enumerates the mime types of audio opus codec.
1084 ///
1085 ///
1086 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1087 ///
1088 /// Available since API-level: 11
1089 #[cfg(feature = "api-11")]
1090 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1091 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_OPUS: *const ::core::ffi::c_char;
1092 /// Enumerates the mime types of audio g711mu codec.
1093 ///
1094 ///
1095 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1096 ///
1097 /// Available since API-level: 11
1098 #[cfg(feature = "api-11")]
1099 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1100 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_G711MU: *const ::core::ffi::c_char;
1101 /// Enumerates the mime type of audio ape codec.
1102 ///
1103 ///
1104 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1105 ///
1106 /// Available since API-level: 12
1107 #[cfg(feature = "api-12")]
1108 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1109 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_APE: *const ::core::ffi::c_char;
1110 /// Enumerates the MIME type of versatile video coding.
1111 ///
1112 ///
1113 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1114 ///
1115 /// Available since API-level: 12
1116 #[cfg(feature = "api-12")]
1117 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1118 pub static mut OH_AVCODEC_MIMETYPE_VIDEO_VVC: *const ::core::ffi::c_char;
1119 /// Enumerates the mime type of subtitle srt.
1120 ///
1121 ///
1122 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1123 ///
1124 /// Available since API-level: 12
1125 #[cfg(feature = "api-12")]
1126 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1127 pub static mut OH_AVCODEC_MIMETYPE_SUBTITLE_SRT: *const ::core::ffi::c_char;
1128 /// Enumerates the mime type of subtitle webvtt.
1129 ///
1130 ///
1131 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1132 ///
1133 /// Available since API-level: 12
1134 #[cfg(feature = "api-12")]
1135 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1136 pub static mut OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT: *const ::core::ffi::c_char;
1137 /// Enumerates the mime type of audio raw stream.
1138 ///
1139 ///
1140 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1141 ///
1142 /// Available since API-level: 18
1143 #[cfg(feature = "api-18")]
1144 #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1145 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_RAW: *const ::core::ffi::c_char;
1146 /// Enumerates the mime types of audio G711 A-law codec.
1147 ///
1148 ///
1149 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1150 ///
1151 /// Available since API-level: 20
1152 #[cfg(feature = "api-20")]
1153 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1154 pub static mut OH_AVCODEC_MIMETYPE_AUDIO_G711A: *const ::core::ffi::c_char;
1155 /// Enumerates the MIME type of video mpeg2 codec.
1156 ///
1157 ///
1158 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1159 ///
1160 /// Available since API-level: 17
1161 #[cfg(feature = "api-17")]
1162 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1163 pub static mut OH_AVCODEC_MIMETYPE_VIDEO_MPEG2: *const ::core::ffi::c_char;
1164 /// Enumerates the MIME type of video mpeg4 part2 codec.
1165 ///
1166 ///
1167 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1168 ///
1169 /// Available since API-level: 17
1170 #[cfg(feature = "api-17")]
1171 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1172 pub static mut OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2: *const ::core::ffi::c_char;
1173 /// Enumerates the MIME type of video h263 codec.
1174 ///
1175 ///
1176 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1177 ///
1178 /// Available since API-level: 17
1179 #[cfg(feature = "api-17")]
1180 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1181 pub static mut OH_AVCODEC_MIMETYPE_VIDEO_H263: *const ::core::ffi::c_char;
1182 /// Key for timeStamp in surface's extraData, value type is int64_t.
1183 ///
1184 ///
1185 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1186 ///
1187 /// **Deprecated** since 14
1188 ///
1189 /// Available since API-level: 9
1190 #[deprecated(since = "14")]
1191 pub static mut OH_ED_KEY_TIME_STAMP: *const ::core::ffi::c_char;
1192 /// Key for endOfStream in surface's extraData, value type is bool.
1193 ///
1194 ///
1195 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1196 ///
1197 /// **Deprecated** since 14
1198 ///
1199 /// Available since API-level: 9
1200 #[deprecated(since = "14")]
1201 pub static mut OH_ED_KEY_EOS: *const ::core::ffi::c_char;
1202 /// Key for track type, value type is int32_t, see [`OH_MediaType`].
1203 ///
1204 ///
1205 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1206 ///
1207 /// Available since API-level: 9
1208 pub static mut OH_MD_KEY_TRACK_TYPE: *const ::core::ffi::c_char;
1209 /// Key for codec mime type, value type is string.
1210 ///
1211 ///
1212 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1213 ///
1214 /// Available since API-level: 9
1215 pub static mut OH_MD_KEY_CODEC_MIME: *const ::core::ffi::c_char;
1216 /// Key for file duration in microseconds, value type is int64_t.
1217 ///
1218 ///
1219 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1220 ///
1221 /// Available since API-level: 9
1222 pub static mut OH_MD_KEY_DURATION: *const ::core::ffi::c_char;
1223 /// Key for bitrate, value type is int64_t.
1224 ///
1225 ///
1226 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1227 ///
1228 /// Available since API-level: 9
1229 pub static mut OH_MD_KEY_BITRATE: *const ::core::ffi::c_char;
1230 /// Key for max input size, value type is int32_t.
1231 ///
1232 ///
1233 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1234 ///
1235 /// Available since API-level: 9
1236 pub static mut OH_MD_KEY_MAX_INPUT_SIZE: *const ::core::ffi::c_char;
1237 /// Key for video width, value type is int32_t.
1238 ///
1239 ///
1240 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1241 ///
1242 /// Available since API-level: 9
1243 pub static mut OH_MD_KEY_WIDTH: *const ::core::ffi::c_char;
1244 /// Key for video height, value type is int32_t.
1245 ///
1246 ///
1247 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1248 ///
1249 /// Available since API-level: 9
1250 pub static mut OH_MD_KEY_HEIGHT: *const ::core::ffi::c_char;
1251 /// Key for video pixel format, value type is int32_t, see [`OH_AVPixelFormat`].
1252 ///
1253 ///
1254 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1255 ///
1256 /// Available since API-level: 9
1257 pub static mut OH_MD_KEY_PIXEL_FORMAT: *const ::core::ffi::c_char;
1258 /// key for audio raw format, value type is int32_t , see [`OH_BitsPerSample`].
1259 ///
1260 ///
1261 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1262 ///
1263 /// Available since API-level: 9
1264 pub static mut OH_MD_KEY_AUDIO_SAMPLE_FORMAT: *const ::core::ffi::c_char;
1265 /// Key for video frame rate, value type is double.
1266 ///
1267 ///
1268 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1269 ///
1270 /// Available since API-level: 9
1271 pub static mut OH_MD_KEY_FRAME_RATE: *const ::core::ffi::c_char;
1272 /// video encode bitrate mode, the value type is int32_t, see [`OH_VideoEncodeBitrateMode`].
1273 ///
1274 ///
1275 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1276 ///
1277 /// Available since API-level: 9
1278 pub static mut OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE: *const ::core::ffi::c_char;
1279 /// encode profile, the value type is int32_t. see [`OH_AVCProfile`], [`OH_HEVCProfile`],
1280 /// [`OH_AACProfile`].
1281 ///
1282 ///
1283 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1284 ///
1285 /// Available since API-level: 9
1286 pub static mut OH_MD_KEY_PROFILE: *const ::core::ffi::c_char;
1287 /// Key for audio channel count, value type is int32_t.
1288 ///
1289 ///
1290 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1291 ///
1292 /// Available since API-level: 9
1293 pub static mut OH_MD_KEY_AUD_CHANNEL_COUNT: *const ::core::ffi::c_char;
1294 /// Key for audio sample rate, value type is int32_t.
1295 ///
1296 ///
1297 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1298 ///
1299 /// Available since API-level: 9
1300 pub static mut OH_MD_KEY_AUD_SAMPLE_RATE: *const ::core::ffi::c_char;
1301 /// Key for the interval of key frame. value type is int32_t, the unit is milliseconds. A negative value means no
1302 /// key frames are requested after the first frame. A zero value means a stream containing all key frames is requested.
1303 ///
1304 ///
1305 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1306 ///
1307 /// Available since API-level: 9
1308 pub static mut OH_MD_KEY_I_FRAME_INTERVAL: *const ::core::ffi::c_char;
1309 /// Key of the surface rotation angle. value type is int32_t: should be {0, 90, 180, 270}, default is 0.
1310 ///
1311 ///
1312 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1313 ///
1314 /// Available since API-level: 9
1315 pub static mut OH_MD_KEY_ROTATION: *const ::core::ffi::c_char;
1316 /// Key for video YUV value range flag, value type is bool, true for full range, false for limited range.
1317 ///
1318 ///
1319 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1320 ///
1321 /// Available since API-level: 10
1322 pub static mut OH_MD_KEY_RANGE_FLAG: *const ::core::ffi::c_char;
1323 /// Key for video color primaries, value type is int32_t, see [`OH_ColorPrimary`].
1324 ///
1325 ///
1326 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1327 ///
1328 /// Available since API-level: 10
1329 pub static mut OH_MD_KEY_COLOR_PRIMARIES: *const ::core::ffi::c_char;
1330 /// Key for video transfer characteristics, value type is int32_t, see [`OH_TransferCharacteristic`].
1331 ///
1332 ///
1333 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1334 ///
1335 /// Available since API-level: 10
1336 pub static mut OH_MD_KEY_TRANSFER_CHARACTERISTICS: *const ::core::ffi::c_char;
1337 /// Key for video matrix coefficients, value type is int32_t, see [`OH_MatrixCoefficient`].
1338 ///
1339 ///
1340 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1341 ///
1342 /// Available since API-level: 10
1343 pub static mut OH_MD_KEY_MATRIX_COEFFICIENTS: *const ::core::ffi::c_char;
1344 /// Key for the request an I-Frame immediately, value type is bool.
1345 ///
1346 ///
1347 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1348 ///
1349 /// Available since API-level: 10
1350 pub static mut OH_MD_KEY_REQUEST_I_FRAME: *const ::core::ffi::c_char;
1351 /// Key for the desired encoding quality, value type is int32_t, this key is only.
1352 /// supported for encoders that are configured in constant quality mode.
1353 ///
1354 ///
1355 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1356 ///
1357 /// Available since API-level: 10
1358 pub static mut OH_MD_KEY_QUALITY: *const ::core::ffi::c_char;
1359 /// Key of the codec specific data. value type is a uint8_t pointer.
1360 ///
1361 ///
1362 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1363 ///
1364 /// Available since API-level: 10
1365 pub static mut OH_MD_KEY_CODEC_CONFIG: *const ::core::ffi::c_char;
1366 /// source format Key for title, value type is string.
1367 ///
1368 ///
1369 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1370 ///
1371 /// Available since API-level: 10
1372 pub static mut OH_MD_KEY_TITLE: *const ::core::ffi::c_char;
1373 /// source format Key for artist, value type is string.
1374 ///
1375 ///
1376 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1377 ///
1378 /// Available since API-level: 10
1379 pub static mut OH_MD_KEY_ARTIST: *const ::core::ffi::c_char;
1380 /// source format Key for album, value type is string.
1381 ///
1382 ///
1383 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1384 ///
1385 /// Available since API-level: 10
1386 pub static mut OH_MD_KEY_ALBUM: *const ::core::ffi::c_char;
1387 /// source format Key for album artist, value type is string.
1388 ///
1389 ///
1390 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1391 ///
1392 /// Available since API-level: 10
1393 pub static mut OH_MD_KEY_ALBUM_ARTIST: *const ::core::ffi::c_char;
1394 /// source format Key for date, value type is string.
1395 ///
1396 ///
1397 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1398 ///
1399 /// Available since API-level: 10
1400 pub static mut OH_MD_KEY_DATE: *const ::core::ffi::c_char;
1401 /// source format Key for comment, value type is string.
1402 ///
1403 ///
1404 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1405 ///
1406 /// Available since API-level: 10
1407 pub static mut OH_MD_KEY_COMMENT: *const ::core::ffi::c_char;
1408 /// source format Key for genre, value type is string.
1409 ///
1410 ///
1411 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1412 ///
1413 /// Available since API-level: 10
1414 pub static mut OH_MD_KEY_GENRE: *const ::core::ffi::c_char;
1415 /// source format Key for copyright, value type is string.
1416 ///
1417 ///
1418 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1419 ///
1420 /// Available since API-level: 10
1421 pub static mut OH_MD_KEY_COPYRIGHT: *const ::core::ffi::c_char;
1422 /// source format Key for language, value type is string.
1423 ///
1424 ///
1425 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1426 ///
1427 /// Available since API-level: 10
1428 pub static mut OH_MD_KEY_LANGUAGE: *const ::core::ffi::c_char;
1429 /// source format Key for description, value type is string.
1430 ///
1431 ///
1432 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1433 ///
1434 /// Available since API-level: 10
1435 pub static mut OH_MD_KEY_DESCRIPTION: *const ::core::ffi::c_char;
1436 /// source format Key for lyrics, value type is string.
1437 ///
1438 ///
1439 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1440 ///
1441 /// Available since API-level: 10
1442 pub static mut OH_MD_KEY_LYRICS: *const ::core::ffi::c_char;
1443 /// source format Key for track count, value type is int32_t.
1444 ///
1445 ///
1446 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1447 ///
1448 /// Available since API-level: 10
1449 pub static mut OH_MD_KEY_TRACK_COUNT: *const ::core::ffi::c_char;
1450 /// Key for the desired encoding channel layout, value type is int64_t, this key is only supported for encoders.
1451 ///
1452 ///
1453 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1454 ///
1455 /// Available since API-level: 10
1456 pub static mut OH_MD_KEY_CHANNEL_LAYOUT: *const ::core::ffi::c_char;
1457 /// Key for bits per coded sample, value type is int32_t, supported for flac encoder,
1458 /// see [`OH_BitsPerSample`].
1459 ///
1460 ///
1461 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1462 ///
1463 /// Available since API-level: 10
1464 pub static mut OH_MD_KEY_BITS_PER_CODED_SAMPLE: *const ::core::ffi::c_char;
1465 /// Key for the aac format, value type is int32_t, supported for aac decoder.
1466 ///
1467 ///
1468 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1469 ///
1470 /// Available since API-level: 10
1471 pub static mut OH_MD_KEY_AAC_IS_ADTS: *const ::core::ffi::c_char;
1472 /// Key for aac sbr mode, value type is int32_t, supported for aac encoder.
1473 ///
1474 ///
1475 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1476 ///
1477 /// Available since API-level: 10
1478 pub static mut OH_MD_KEY_SBR: *const ::core::ffi::c_char;
1479 /// Key for flac compliance level, value type is int32_t.
1480 ///
1481 ///
1482 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1483 ///
1484 /// Available since API-level: 10
1485 pub static mut OH_MD_KEY_COMPLIANCE_LEVEL: *const ::core::ffi::c_char;
1486 /// Key for vorbis identification header, value type is a uint8_t pointer, supported only for vorbis decoder.
1487 ///
1488 ///
1489 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1490 ///
1491 /// Available since API-level: 10
1492 pub static mut OH_MD_KEY_IDENTIFICATION_HEADER: *const ::core::ffi::c_char;
1493 /// Key for vorbis setup header, value type is a uint8_t pointer, supported only for vorbis decoder.
1494 ///
1495 ///
1496 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1497 ///
1498 /// Available since API-level: 10
1499 pub static mut OH_MD_KEY_SETUP_HEADER: *const ::core::ffi::c_char;
1500 /// Key for video scale type, value type is int32_t, see [`OH_ScalingMode`].
1501 ///
1502 ///
1503 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1504 ///
1505 /// **Deprecated** since 14
1506 /// OH_NativeWindow_NativeWindowSetScalingModeV2
1507 ///
1508 /// Available since API-level: 10
1509 #[deprecated(since = "14")]
1510 pub static mut OH_MD_KEY_SCALING_MODE: *const ::core::ffi::c_char;
1511 /// Key for max input buffer count, value type is int32_t.
1512 ///
1513 ///
1514 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1515 ///
1516 /// Available since API-level: 10
1517 pub static mut OH_MD_MAX_INPUT_BUFFER_COUNT: *const ::core::ffi::c_char;
1518 /// Key for max output buffer count, value type is int32_t.
1519 ///
1520 ///
1521 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1522 ///
1523 /// Available since API-level: 10
1524 pub static mut OH_MD_MAX_OUTPUT_BUFFER_COUNT: *const ::core::ffi::c_char;
1525 /// Key for audio codec compression level, value type is int32_t.
1526 ///
1527 ///
1528 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1529 ///
1530 /// Available since API-level: 11
1531 #[cfg(feature = "api-11")]
1532 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1533 pub static mut OH_MD_KEY_AUDIO_COMPRESSION_LEVEL: *const ::core::ffi::c_char;
1534 /// Key of the video is hdr vivid. value type is bool.
1535 ///
1536 ///
1537 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1538 ///
1539 /// Available since API-level: 11
1540 #[cfg(feature = "api-11")]
1541 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1542 pub static mut OH_MD_KEY_VIDEO_IS_HDR_VIVID: *const ::core::ffi::c_char;
1543 /// Key for number of audio objects. value type is int32_t.
1544 ///
1545 ///
1546 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1547 ///
1548 /// Available since API-level: 11
1549 #[cfg(feature = "api-11")]
1550 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1551 pub static mut OH_MD_KEY_AUDIO_OBJECT_NUMBER: *const ::core::ffi::c_char;
1552 /// Key for meta data of audio vivid. value type is a uint8_t pointer.
1553 ///
1554 ///
1555 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1556 ///
1557 /// Available since API-level: 11
1558 #[cfg(feature = "api-11")]
1559 #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1560 pub static mut OH_MD_KEY_AUDIO_VIVID_METADATA: *const ::core::ffi::c_char;
1561 /// Key for querying the maximum long-term reference count of video encoder, value type is int32_t.
1562 /// You should query the count through interface [`OH_AVCapability_GetFeatureProperties`]
1563 /// with enum [`VIDEO_ENCODER_LONG_TERM_REFERENCE`].
1564 ///
1565 ///
1566 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1567 ///
1568 /// Available since API-level: 12
1569 #[cfg(feature = "api-12")]
1570 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1571 pub static mut OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNT:
1572 *const ::core::ffi::c_char;
1573 /// Key for enable the temporal scalability mode, value type is int32_t (0 or 1): 1 is enabled, 0 otherwise.
1574 /// The default value is 0. To query supported, you should use the interface [`OH_AVCapability_IsFeatureSupported`]
1575 /// with enum [`VIDEO_ENCODER_TEMPORAL_SCALABILITY`]. This is an optional key that applies only to video encoder.
1576 /// It is used in configure.
1577 ///
1578 ///
1579 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1580 ///
1581 /// Available since API-level: 12
1582 #[cfg(feature = "api-12")]
1583 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1584 pub static mut OH_MD_KEY_VIDEO_ENCODER_ENABLE_TEMPORAL_SCALABILITY: *const ::core::ffi::c_char;
1585 /// Key for describing the temporal group of picture size, value type is int32_t. It takes effect only when
1586 /// temporal level scale is enable. This is an optional key that applies only to video encoder. It is used in configure.
1587 ///
1588 ///
1589 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1590 ///
1591 /// Available since API-level: 12
1592 #[cfg(feature = "api-12")]
1593 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1594 pub static mut OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_SIZE: *const ::core::ffi::c_char;
1595 /// Key for describing the reference mode in temporal group of picture, value type is int32_t, see enum
1596 /// [`OH_TemporalGopReferenceMode`]. It takes effect only when temporal level sacle is enabled.
1597 /// This is an optional key that applies only to video encoder. It is used in configure.
1598 ///
1599 ///
1600 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1601 ///
1602 /// Available since API-level: 12
1603 #[cfg(feature = "api-12")]
1604 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1605 pub static mut OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE: *const ::core::ffi::c_char;
1606 /// Key for describing the count of used long-term reference frames, value type is int32_t, must be within the
1607 /// supported range. To get supported range, you should query wthether the capability is supported through the interface
1608 /// [`OH_AVCapability_GetFeatureProperties`] with enum [`VIDEO_ENCODER_LONG_TERM_REFERENCE`], otherwise, not set
1609 /// the key. This is an optional key that applies only to video encoder. It is used in configure.
1610 ///
1611 ///
1612 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1613 ///
1614 /// Available since API-level: 12
1615 #[cfg(feature = "api-12")]
1616 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1617 pub static mut OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNT: *const ::core::ffi::c_char;
1618 /// Key for describing mark this frame as a long term reference frame, value type is int32_t (0 or 1): 1 is mark,
1619 /// 0 otherwise. It takes effect only when the number of used long term reference frames is configured. This is an
1620 /// optional key that applies only to video encoder input loop. It takes effect immediately.
1621 ///
1622 ///
1623 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1624 ///
1625 /// Available since API-level: 12
1626 #[cfg(feature = "api-12")]
1627 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1628 pub static mut OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTR: *const ::core::ffi::c_char;
1629 /// Key for describing the long term reference frame poc referenced by this frame, value type is int32_t. This is
1630 /// an optional key that applies only to video encoder input loop. It takes effect immediately.
1631 ///
1632 ///
1633 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1634 ///
1635 /// Available since API-level: 12
1636 #[cfg(feature = "api-12")]
1637 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1638 pub static mut OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTR: *const ::core::ffi::c_char;
1639 /// Key for indicating this frame is a long-term reference frame, value type is int32_t (0 or 1): 1 is LTR,
1640 /// 0 otherwise. This is an optional key that applies only to video encoder output loop.
1641 /// It indicates the attribute of the frame.
1642 ///
1643 ///
1644 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1645 ///
1646 /// Available since API-level: 12
1647 #[cfg(feature = "api-12")]
1648 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1649 pub static mut OH_MD_KEY_VIDEO_PER_FRAME_IS_LTR: *const ::core::ffi::c_char;
1650 /// Key for describing the frame poc, value type is int32_t. This is an optional key that applies only to video
1651 /// encoder output loop. It indicates the attribute of the frame.
1652 ///
1653 ///
1654 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1655 ///
1656 /// Available since API-level: 12
1657 #[cfg(feature = "api-12")]
1658 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1659 pub static mut OH_MD_KEY_VIDEO_PER_FRAME_POC: *const ::core::ffi::c_char;
1660 /// Key for describing the top-coordinate (y) of the crop rectangle, value type is int32_t. This is the top-most
1661 /// row included in the crop frame, where row indices start at 0.
1662 ///
1663 ///
1664 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1665 ///
1666 /// Available since API-level: 12
1667 #[cfg(feature = "api-12")]
1668 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1669 pub static mut OH_MD_KEY_VIDEO_CROP_TOP: *const ::core::ffi::c_char;
1670 /// Key for describing the bottom-coordinate (y) of the crop rectangle, value type is int32_t. This is the
1671 /// bottom-most row included in the crop frame, where row indices start at 0.
1672 ///
1673 ///
1674 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1675 ///
1676 /// Available since API-level: 12
1677 #[cfg(feature = "api-12")]
1678 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1679 pub static mut OH_MD_KEY_VIDEO_CROP_BOTTOM: *const ::core::ffi::c_char;
1680 /// Key for describing the left-coordinate (x) of the crop rectangle, value type is int32_t.
1681 /// This is the left-most column included in the crop frame, where column indices start at 0.
1682 ///
1683 ///
1684 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1685 ///
1686 /// Available since API-level: 12
1687 #[cfg(feature = "api-12")]
1688 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1689 pub static mut OH_MD_KEY_VIDEO_CROP_LEFT: *const ::core::ffi::c_char;
1690 /// Key for describing the right-coordinate (x) of the crop rectangle, value type is int32_t. This is the
1691 /// right-most column included in the crop frame, where column indices start at 0.
1692 ///
1693 ///
1694 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1695 ///
1696 /// Available since API-level: 12
1697 #[cfg(feature = "api-12")]
1698 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1699 pub static mut OH_MD_KEY_VIDEO_CROP_RIGHT: *const ::core::ffi::c_char;
1700 /// Key for describing the stride of the video buffer layout, value type is int32_t. Stride (or row increment) is
1701 /// the difference between the index of a pixel and that of the pixel directly underneath. For YUV 420 formats, the
1702 /// stride corresponds to the Y plane; the stride of the U and V planes can be calculated based on the color format,
1703 /// though it is generally undefined and depends on the device and release.
1704 ///
1705 ///
1706 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1707 ///
1708 /// Available since API-level: 12
1709 #[cfg(feature = "api-12")]
1710 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1711 pub static mut OH_MD_KEY_VIDEO_STRIDE: *const ::core::ffi::c_char;
1712 /// Key for describing the plane height of a multi-planar (YUV) video buffer layout, value type is int32_t.
1713 /// Slice height (or plane height/vertical stride) is the number of rows that must be skipped to get from
1714 /// the top of the Y plane to the top of the U plane in the buffer. In essence the offset of the U plane
1715 /// is sliceHeight * stride. The height of the U/V planes can be calculated based on the color format,
1716 /// though it is generally undefined and depends on the device and release.
1717 ///
1718 ///
1719 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1720 ///
1721 /// Available since API-level: 12
1722 #[cfg(feature = "api-12")]
1723 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1724 pub static mut OH_MD_KEY_VIDEO_SLICE_HEIGHT: *const ::core::ffi::c_char;
1725 /// Key for describing the valid picture width of the video, value type is int32_t.
1726 /// Get the value from an OH_AVFormat instance, which obtained by calling [`OH_VideoDecoder_GetOutputDescription`]
1727 /// or [`OH_AVCodecOnStreamChanged`].
1728 ///
1729 ///
1730 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1731 ///
1732 /// Available since API-level: 12
1733 #[cfg(feature = "api-12")]
1734 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1735 pub static mut OH_MD_KEY_VIDEO_PIC_WIDTH: *const ::core::ffi::c_char;
1736 /// Key for describing the valid picture height of the video, value type is int32_t.
1737 /// Get the value from an OH_AVFormat instance, which obtained by calling [`OH_VideoDecoder_GetOutputDescription`]
1738 /// or [`OH_AVCodecOnStreamChanged`].
1739 ///
1740 ///
1741 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1742 ///
1743 /// Available since API-level: 12
1744 #[cfg(feature = "api-12")]
1745 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1746 pub static mut OH_MD_KEY_VIDEO_PIC_HEIGHT: *const ::core::ffi::c_char;
1747 /// Key to enable the low latency mode, value type is int32_t (0 or 1):1 is enabled, 0 otherwise.
1748 /// If enabled, the video decoder doesn't hold input and output data more than required by
1749 /// the codec standards. This is an optional key that applies only to video decoder.
1750 /// It is used in configure.
1751 ///
1752 ///
1753 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1754 ///
1755 /// Available since API-level: 12
1756 #[cfg(feature = "api-12")]
1757 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1758 pub static mut OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCY: *const ::core::ffi::c_char;
1759 /// Key for describing the maximum quantization parameter allowed for video encoder, value type is int32_t.
1760 /// It is used in configure/setparameter or takes effect immediately with the frame.
1761 ///
1762 ///
1763 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1764 ///
1765 /// Available since API-level: 12
1766 #[cfg(feature = "api-12")]
1767 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1768 pub static mut OH_MD_KEY_VIDEO_ENCODER_QP_MAX: *const ::core::ffi::c_char;
1769 /// Key for describing the minimum quantization parameter allowed for video encoder, value type is int32_t.
1770 /// It is used in configure/setparameter or takes effect immediately with the frame.
1771 ///
1772 ///
1773 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1774 ///
1775 /// Available since API-level: 12
1776 #[cfg(feature = "api-12")]
1777 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1778 pub static mut OH_MD_KEY_VIDEO_ENCODER_QP_MIN: *const ::core::ffi::c_char;
1779 /// Key for describing the video frame averge quantization parameter, value type is int32_t.
1780 /// This is a part of a video encoder statistics export feature. This value is emitted from video encoder for a video
1781 /// frame.
1782 ///
1783 ///
1784 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1785 ///
1786 /// Available since API-level: 12
1787 #[cfg(feature = "api-12")]
1788 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1789 pub static mut OH_MD_KEY_VIDEO_ENCODER_QP_AVERAGE: *const ::core::ffi::c_char;
1790 /// Key for describing video frame mean squared error, value type is double.
1791 /// This is a part of a video encoder statistics export feature. This value is emitted from video encoder for a video
1792 /// frame.
1793 ///
1794 ///
1795 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1796 ///
1797 /// Available since API-level: 12
1798 #[cfg(feature = "api-12")]
1799 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1800 pub static mut OH_MD_KEY_VIDEO_ENCODER_MSE: *const ::core::ffi::c_char;
1801 /// Key for decoding timestamp of the buffer in microseconds, value type is int64_t.
1802 ///
1803 ///
1804 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1805 ///
1806 /// Available since API-level: 12
1807 #[cfg(feature = "api-12")]
1808 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1809 pub static mut OH_MD_KEY_DECODING_TIMESTAMP: *const ::core::ffi::c_char;
1810 /// Key for duration of the buffer in microseconds, value type is int64_t.
1811 ///
1812 ///
1813 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1814 ///
1815 /// Available since API-level: 12
1816 #[cfg(feature = "api-12")]
1817 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1818 pub static mut OH_MD_KEY_BUFFER_DURATION: *const ::core::ffi::c_char;
1819 /// Key for sample aspect ratio, value type is double.
1820 ///
1821 ///
1822 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1823 ///
1824 /// Available since API-level: 12
1825 #[cfg(feature = "api-12")]
1826 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1827 pub static mut OH_MD_KEY_VIDEO_SAR: *const ::core::ffi::c_char;
1828 /// Key for start time of the first frame in the media file in microseconds, value type is int64_t.
1829 ///
1830 ///
1831 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1832 ///
1833 /// Available since API-level: 12
1834 #[cfg(feature = "api-12")]
1835 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1836 pub static mut OH_MD_KEY_START_TIME: *const ::core::ffi::c_char;
1837 /// Key for start time of track in microseconds, value type is int64_t.
1838 ///
1839 ///
1840 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1841 ///
1842 /// Available since API-level: 12
1843 #[cfg(feature = "api-12")]
1844 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1845 pub static mut OH_MD_KEY_TRACK_START_TIME: *const ::core::ffi::c_char;
1846 /// Key for setting the output color space of video decoder. The value type is int32_t.
1847 /// The supported value is [`OH_COLORSPACE_BT709_LIMIT`], see [`OH_NativeBuffer_ColorSpace`]. It is used in
1848 /// [`OH_VideoDecoder_Configure`]. If the color space conversion capability is supported and this key is configured,
1849 /// the video decoder will automatically transcode an HDR Vivid video to an SDR video with color space BT709.
1850 /// If color space conversion capability is not supported, [`OH_VideoDecoder_Configure`] returns
1851 /// [`AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION`].
1852 /// If the input video is not an HDR vivid video, an error [`AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION`] will
1853 /// be reported by callback function [`OH_AVCodecOnError`].
1854 ///
1855 ///
1856 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1857 ///
1858 /// Available since API-level: 12
1859 #[cfg(feature = "api-12")]
1860 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1861 pub static mut OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE: *const ::core::ffi::c_char;
1862 /// Key for describing if enable VRR or not, value type is int32_t (0 or 1): 1 is enabled, 0 otherwise.
1863 /// This is an optional key that applies only to video decoder. It is used in configure.
1864 ///
1865 ///
1866 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1867 ///
1868 /// Available since API-level: 15
1869 #[cfg(feature = "api-15")]
1870 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1871 pub static mut OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR: *const ::core::ffi::c_char;
1872 /// Key for creation timestamp of a media file, value type is string.
1873 ///
1874 ///
1875 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1876 ///
1877 /// Available since API-level: 14
1878 #[cfg(feature = "api-14")]
1879 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1880 pub static mut OH_MD_KEY_CREATION_TIME: *const ::core::ffi::c_char;
1881 /// Key applies only when configuring a video encoder in surface mode, value type is int32_t.
1882 /// If no new frame became available since the last frame submitted to the encoder,
1883 /// it will sumbit the previous frame repeatly in milliseconds. It is used in configure.
1884 ///
1885 ///
1886 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1887 ///
1888 /// Available since API-level: 18
1889 #[cfg(feature = "api-18")]
1890 #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1891 pub static mut OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER: *const ::core::ffi::c_char;
1892 /// Key for describing the maximum count that the frame previously submitted to the encoder will be
1893 /// repeated, in case no new frame has been available since, value type is int32_t. This key takes effect only when
1894 /// [`VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER`] is vaild. It is used in configure.
1895 ///
1896 ///
1897 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1898 ///
1899 /// Available since API-level: 18
1900 #[cfg(feature = "api-18")]
1901 #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1902 pub static mut OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT: *const ::core::ffi::c_char;
1903 /// Key to enable B-frame encoding, value type is int32_t (0 or 1): 1 is enabled, 0 otherwise.
1904 ///
1905 /// This is an optional key that applies only to video encoder, default is 0.
1906 ///
1907 /// If enabled, the video encoder will use B-frame, the decode order will be different from the display order.
1908 ///
1909 /// For unsupported platforms, Configuring this key will have no effect.
1910 ///
1911 /// Platform capability can be checked via [`OH_AVCapability_IsFeatureSupported`] with
1912 /// [`OH_AVCapabilityFeature::VIDEO_ENCODER_B_FRAME`].
1913 ///
1914 /// It's only used in configuration phase.
1915 ///
1916 ///
1917 ///
1918 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1919 ///
1920 /// Available since API-level: 20
1921 #[cfg(feature = "api-20")]
1922 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1923 pub static mut OH_MD_KEY_VIDEO_ENCODER_ENABLE_B_FRAME: *const ::core::ffi::c_char;
1924 /// Key for describing the maximum B-frame count of video encoder, value type is int32_t.
1925 ///
1926 /// Note: This key is only for querying the capability of the codec currently.
1927 /// Usage specifications:
1928 /// 1. Check feature support via [`OH_AVCapability_IsFeatureSupported`] with
1929 /// [`OH_AVCapabilityFeature::VIDEO_ENCODER_B_FRAME`].
1930 ///
1931 /// 2. Obtain OH_AVFormat handle via [`OH_AVCapability_GetFeatureProperties`] with
1932 /// [`OH_AVCapabilityFeature::VIDEO_ENCODER_B_FRAME`].
1933 ///
1934 /// 3. Get maximum B-frame count via [`OH_AVFormat_GetIntValue`] with this key.
1935 ///
1936 ///
1937 ///
1938 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1939 ///
1940 /// Available since API-level: 20
1941 #[cfg(feature = "api-20")]
1942 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1943 pub static mut OH_MD_KEY_VIDEO_ENCODER_MAX_B_FRAMES: *const ::core::ffi::c_char;
1944 /// Key to set the region of interest(ROI) as QpOffset-Rects, value type is string in the format
1945 /// "Top1,Left1-Bottom1,Right1=Offset1;Top2,Left2-Bottom2,Right2=Offset2;". Each "Top,Left-Bottom,Right=Offset"
1946 /// represents the coordinate information and quantization parameter of one ROI. Each "=Offset" in the string
1947 /// can be omitted, like "Top1,Left1-Bottom1,Right1;Top2,Left2-Bottom2,Right2=Offset2;", the encoder
1948 /// will use the default quantization parameter to perform the ROI encoding on the first ROI and
1949 /// use Offset2 on the second ROI.
1950 ///
1951 /// This is an optional key that applies only to video encoder.
1952 /// It is used in running process and is set with each frame.
1953 /// In surface mode, it is used in [`OH_VideoEncoder_OnNeedInputParameter`].
1954 /// In buffer mode, it is configured via [`OH_AVBuffer_SetParameter`].
1955 ///
1956 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1957 ///
1958 /// Available since API-level: 20
1959 #[cfg(feature = "api-20")]
1960 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1961 pub static mut OH_MD_KEY_VIDEO_ENCODER_ROI_PARAMS: *const ::core::ffi::c_char;
1962 /// Key for front moov of the mp4 and m4a media file, value type is int32_t (0 or 1):1 is enabled, 0 otherwise.
1963 /// This key may affect the performance of the stop function of the mp4 and m4a muxer.
1964 ///
1965 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1966 ///
1967 /// Available since API-level: 20
1968 #[cfg(feature = "api-20")]
1969 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1970 pub static mut OH_MD_KEY_ENABLE_MOOV_FRONT: *const ::core::ffi::c_char;
1971 /// Key for the desired encoding quality, value type is int32_t, this key is only
1972 /// supported for encoders that are configured in Stable Quality RateControl, the higher
1973 /// values generally result in more efficient(smaller-sized) encoding.
1974 ///
1975 ///
1976 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1977 ///
1978 /// Available since API-level: 20
1979 #[cfg(feature = "api-20")]
1980 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1981 pub static mut OH_MD_KEY_SQR_FACTOR: *const ::core::ffi::c_char;
1982 /// Key for maximum bitrate, value type is int64_t.
1983 ///
1984 ///
1985 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1986 ///
1987 /// Available since API-level: 20
1988 #[cfg(feature = "api-20")]
1989 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1990 pub static mut OH_MD_KEY_MAX_BITRATE: *const ::core::ffi::c_char;
1991 /// Key for describing the reference relationship between tracks, value type is int32_t*.
1992 ///
1993 ///
1994 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
1995 ///
1996 /// Available since API-level: 20
1997 #[cfg(feature = "api-20")]
1998 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1999 pub static mut OH_MD_KEY_REFERENCE_TRACK_IDS: *const ::core::ffi::c_char;
2000 /// Key for describing the track reference type, value type is string.
2001 ///
2002 ///
2003 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
2004 ///
2005 /// Available since API-level: 20
2006 #[cfg(feature = "api-20")]
2007 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2008 pub static mut OH_MD_KEY_TRACK_REFERENCE_TYPE: *const ::core::ffi::c_char;
2009 /// Key for describing the track description, value type is string.
2010 ///
2011 ///
2012 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
2013 ///
2014 /// Available since API-level: 20
2015 #[cfg(feature = "api-20")]
2016 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2017 pub static mut OH_MD_KEY_TRACK_DESCRIPTION: *const ::core::ffi::c_char;
2018 /// Key to enable Bitrate Control Based on Presentation Time Stamp(PTS),
2019 /// value type is int32_t (0 or 1):1 is enabled, 0 otherwise.
2020 ///
2021 /// This is an optional key that applies only to video encoder, default is 0.
2022 /// If enabled, the PTS information must be carried in each video frame and sent to the encoder.
2023 /// It is used in configure.
2024 ///
2025 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
2026 ///
2027 /// Available since API-level: 20
2028 #[cfg(feature = "api-20")]
2029 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2030 pub static mut OH_MD_KEY_VIDEO_ENCODER_ENABLE_PTS_BASED_RATECONTROL: *const ::core::ffi::c_char;
2031 /// Key to enable synchronous mode, value type is (0 or 1): 1 is enabled, 0 otherwise.
2032 ///
2033 /// This is an optional key, default is 0.
2034 ///
2035 /// When enabled:
2036 /// - Callbacks should NOT be set for codecs
2037 /// - Buffer query APIs must be used instead
2038 /// - Only used in configuration phase
2039 ///
2040 ///
2041 /// Required System Capabilities: SystemCapability.Multimedia.Media.CodecBase
2042 ///
2043 /// Available since API-level: 20
2044 #[cfg(feature = "api-20")]
2045 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2046 pub static mut OH_MD_KEY_ENABLE_SYNC_MODE: *const ::core::ffi::c_char;
2047 /// Key for specifying whether to output a blank frame during video decoder shutdown,
2048 /// value type is int32_t (0 or 1): 1 is enabled, 0 otherwise.
2049 ///
2050 /// This is an optional key, only used when configuring a video decoder in surface mode.
2051 ///
2052 /// By default, this feature is disabled (0).
2053 ///
2054 /// When enabled, the video decoder will output a blank frame (typically black)
2055 /// when stop or release to ensure a smooth transition to no-signal state on display devices.
2056 ///
2057 /// This prevents display retention or flickering caused by abrupt termination.
2058 ///
2059 ///
2060 ///
2061 /// Available since API-level: 20
2062 #[cfg(feature = "api-20")]
2063 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2064 pub static mut OH_MD_KEY_VIDEO_DECODER_BLANK_FRAME_ON_SHUTDOWN: *const ::core::ffi::c_char;
2065}