cidre 0.13.0

Apple frameworks bindings for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
/// Recommendations for configuring VTCompressionSessions
///
/// These are recommendations for configuring VTCompressionSessions for some common scenarios.  
/// These are starting points; you may find that the details of your application necessitate further adjustments.
///
/// Video-conferencing, live capture, and live broadcast scenarios:
/// • kVTCompressionPropertyKey_RealTime: kCFBooleanTrue
/// • kVTCompressionPropertyKey_ExpectedFrameRate: set to real-time frame rate if possible
///
/// Offline transcode initiated by a user, who is waiting for the results:
/// • kVTCompressionPropertyKey_RealTime: kCFBooleanFalse
/// • kVTCompressionPropertyKey_MaximizePowerEfficiency: kCFBooleanFalse
///
/// Offline transcode in the background (when the user is not aware):
/// • kVTCompressionPropertyKey_RealTime: kCFBooleanFalse
/// • kVTCompressionPropertyKey_MaximizePowerEfficiency: kCFBooleanTrue
///
/// Ultra-low-latency capture / conferencing / cloud gaming (cases where every millisecond counts):
/// • kVTCompressionPropertyKey_RealTime: kCFBooleanTrue
/// • kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality: kCFBooleanTrue
pub mod keys {
    use crate::{api, cf};

    /// The number of pending frames in the compression session.
    ///
    /// This number may decrease asynchronously.
    #[doc(alias = "kVTCompressionPropertyKey_NumberOfPendingFrames")]
    #[inline]
    pub fn number_of_pending_frames() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_NumberOfPendingFrames }
    }

    /// Indicates whether the a common pixel buffer pool is shared between
    /// the video encoder and the session client.
    ///
    /// This is false if separate pools are used because the video encoder's
    /// and the client's pixel buffer attributes were incompatible.
    #[doc(alias = "kVTCompressionPropertyKey_PixelBufferPoolIsShared")]
    #[inline]
    pub fn pixel_buf_pool_is_shared() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_PixelBufferPoolIsShared }
    }

    /// The video encoder's pixel buffer attributes for the compression session.
    ///
    /// You can use these to create a pixel buffer pool for source pixel buffers.
    #[doc(alias = "kVTCompressionPropertyKey_VideoEncoderPixelBufferAttributes")]
    #[inline]
    pub fn video_encoder_pixel_buf_attrs() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_VideoEncoderPixelBufferAttributes }
    }

    /// The maximum interval between key frames, also known as the key frame rate.
    ///
    /// Key frames, also known as sync frames, reset inter-frame
    /// dependencies; decoding a key frame is sufficient to prepare a
    /// decoder for correctly decoding the difference frames that
    /// follow.
    /// Video encoders are allowed to generate key frames more frequently if
    /// this would result in more efficient compression.
    /// The default key frame interval is 0, which indicates that the
    /// video encoder should choose where to place all key frames. A key
    /// frame interval of 1 indicates that every frame must be a key
    /// frame, 2 indicates that at least every other frame must be a key
    /// frame, etc.
    /// See also kVTCompressionPropertyKey_AllowTemporalCompression.
    ///
    /// This key can be set in conjunction with
    /// kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration,
    /// and both limits will be enforced - requiring a keyframe every X
    /// frames or every Y seconds, whichever comes first.
    #[doc(alias = "kVTCompressionPropertyKey_MaxKeyFrameInterval")]
    #[inline]
    pub fn max_key_frame_interval() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MaxKeyFrameInterval }
    }

    /// The maximum duration from one key frame to the next in seconds.
    ///
    /// Zero by default, which means no limit.  
    /// This property is particularly useful when the frame rate is variable.
    /// See kVTCompressionPropertyKey_MaxKeyFrameInterval for more discussion
    /// of key frames.
    ///
    /// This key can be set in conjunction with
    /// kVTCompressionPropertyKey_MaxKeyFrameInterval,
    /// and both limits will be enforced - requiring a keyframe every X
    /// frames or every Y seconds, whichever comes first.
    #[doc(alias = "kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration")]
    #[inline]
    pub fn max_key_frame_interval_duration() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration }
    }

    /// Enables temporal compression.
    ///
    /// True by default.  Set this to false to require key-frame-only compression.
    #[doc(alias = "kVTCompressionPropertyKey_AllowTemporalCompression")]
    #[inline]
    pub fn allow_temporal_compression() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_AllowTemporalCompression }
    }

    /// Enables frame reordering.
    ///
    /// In order to encode B frames, a video encoder must reorder frames,
    /// which means that the order in which they will be emitted and
    /// stored (the decode order) is different from the order in which
    /// they were presented to the video encoder (the display order).
    /// True by default. Set this to false to prevent frame reordering.
    #[doc(alias = "kVTCompressionPropertyKey_AllowFrameReordering")]
    #[inline]
    pub fn allow_frame_reordering() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_AllowFrameReordering }
    }

    /// Enables Open GOP (Group Of Pictures) encoding.
    ///
    /// Only applicable to certain video encoders. For HEVC encoding the property
    /// value is kCFBooleanTrue by default - which means that the encoder may use
    /// Open GOP structures, but it is not guaranteed to. Set this to kCFBooleanFalse
    /// to prevent the encoder from using any form of Open GOP during encoding.
    /// If set to kCFBooleanFalse, this will mean that the encoder will generate groups
    /// of pictures that are independently decodable; there will be no frame dependencies
    /// across sync samples (frames where kCMSampleAttachmentKey_NotSync is absent or kCFBooleanFalse)
    /// When the value is kCFBooleanTrue, the encoder may use Open GOP frame dependency
    /// structures to increase compression efficiency or quality.
    #[doc(alias = "kVTCompressionPropertyKey_AllowOpenGOP")]
    #[inline]
    pub fn allow_open_gop() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_AllowOpenGOP }
    }

    /// The long-term desired average bit rate in bits per second.
    ///
    /// This is not a hard limit; the bit rate may peak above this.
    /// The default bit rate is zero, which indicates that the video encoder
    /// should determine the size of compressed data.
    /// Note that bit rate settings only have an effect when timing
    /// information is provided for source frames, and that some codecs do
    /// not support limiting to specified bit rates.
    #[doc(alias = "kVTCompressionPropertyKey_AverageBitRate")]
    #[inline]
    pub fn avarage_bit_rate() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_AverageBitRate }
    }

    /// Zero, one or two hard limits on data rate.
    ///
    /// Each hard limit is described by a data size in bytes and a
    /// duration in seconds, and requires that the total size of
    /// compressed data for any contiguous segment of that duration (in
    /// decode time) must not exceed the data size.
    /// By default, no data rate limits are set.
    /// The property is a CFArray of an even number of CFNumbers,
    /// alternating between bytes and seconds.
    /// Note that data rate settings only have an effect when timing
    /// information is provided for source frames, and that some codecs do
    /// not support limiting to specified data rates.
    #[doc(alias = "kVTCompressionPropertyKey_DataRateLimits")]
    #[inline]
    pub fn data_rate_limits() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_DataRateLimits }
    }

    /// The desired compression quality.
    ///
    /// Some encoders, such as JPEG, describe the compression level of each
    /// image with a quality value.  This value should be specified as a
    /// number in the range of 0.0 to 1.0, where low = 0.25, normal = 0.50,
    /// high = 0.75, and 1.0 implies lossless compression for encoders that
    /// support it.
    #[doc(alias = "kVTCompressionPropertyKey_Quality")]
    #[inline]
    pub fn quality() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_Quality }
    }

    #[doc(alias = "kVTCompressionPropertyKey_TargetQualityForAlpha")]
    #[inline]
    pub fn target_quality_for_alpha() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_TargetQualityForAlpha }
    }

    #[doc(alias = "kVTCompressionPropertyKey_MoreFramesBeforeStart")]
    #[inline]
    pub fn more_frames_before_start() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MoreFramesBeforeStart }
    }

    #[doc(alias = "kVTCompressionPropertyKey_MoreFramesAfterEnd")]
    #[inline]
    pub fn more_frames_after_end() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MoreFramesAfterEnd }
    }

    /// Hint for the video encoder that it should maximize its speed during encode, sacrificing quality
    /// if needed
    ///
    /// Video encoders sometimes have a tradeoff available between encoding speed and quality at a given bitrate.
    /// For example, by spending more time refining encoding decisions, it may be possible to make marginal improvements on quality.
    /// This property lets a client indicate its preference for any such tradeoff.
    /// Clients may set this property to kCFBooleanTrue to indicate that
    /// the encoder can take steps to maximize its speed by reducing quality,
    /// or to kCFBooleanFalse to indicate that the priority should be maximizing quality (at a given bitrate).
    /// When the property value is NULL, the video encoder will choose its default behavior.
    /// H.264 and HEVC hardware video encoders prioritize quality over speed by default.
    /// ProRes hardware encoders currently prioritize speed over quality by default.
    /// Not all video encoders support this property.
    /// By default, this property is NULL.
    #[doc(alias = "kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality")]
    #[inline]
    pub fn prioritize_encoding_speed_over_quality() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality }
    }

    #[doc(alias = "kVTCompressionPropertyKey_ProfileLevel")]
    #[inline]
    pub fn profile_lvl() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ProfileLevel }
    }

    #[doc(alias = "kVTCompressionPropertyKey_OutputBitDepth")]
    #[inline]
    pub fn output_bit_depth() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_OutputBitDepth }
    }

    #[doc(alias = "kVTCompressionPropertyKey_HDRMetadataInsertionMode")]
    #[inline]
    pub fn hdr_metadata_insertion_mode() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_HDRMetadataInsertionMode }
    }

    #[doc(alias = "kVTCompressionPropertyKey_H264EntropyMode")]
    #[inline]
    pub fn h264_entropy_mode() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_H264EntropyMode }
    }

    #[doc(alias = "kVTCompressionPropertyKey_Depth")]
    #[inline]
    pub fn depth() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_Depth }
    }

    /// The maximum frame delay count is the maximum number of frames that
    /// a compressor is allowed to hold before it must output a compressed
    /// frame.
    ///
    /// It limits the number of frames that may be held in the
    /// "compression window". If the maximum frame delay count is M, then
    /// before the call to encode frame N returns, frame N-M must have
    /// been emitted.
    ///
    /// The default is UNLIMITED_FRAME_DELAY_COUNT, which sets no limit
    /// on the compression window.
    #[doc(alias = "kVTCompressionPropertyKey_MaxFrameDelayCount")]
    #[inline]
    pub fn max_frame_delay_count() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MaxFrameDelayCount }
    }

    #[doc(alias = "kVTCompressionPropertyKey_MaxH264SliceBytes")]
    #[inline]
    pub fn max_h264_slice_bytes() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MaxH264SliceBytes }
    }

    /// Hints the video encoder that compression is, or is not, being performed in real time.
    ///
    /// For offline compression, clients are advised to set this property to kCFBooleanFalse.
    /// This indicates that the timeline of the frames is not connected to wall-clock time at all.
    /// This allows the video encoder to run either slower than real-time or faster than real-time,
    /// depending upon the situation and device capabilities.
    /// For real-time compression, clients are advised to set this property to kCFBooleanTrue.
    /// This indicates that the timeline of frames is connected to real time (so, for example,
    /// the client expects to encode one second of frames each second, on average).
    /// In such a case, it is important that encoding keep up, but it is also not valuable to encode
    /// substantially faster than real time.  
    /// When this property is set to kCFBooleanTrue, the video encoder may use the value of the
    /// kVTCompressionPropertyKey_ExpectedFrameRate property to optimize energy usage,
    /// by anticipating that encoding requests will happen at this rate.
    /// By default, this property is NULL, indicating unknown.  
    #[doc(alias = "kVTCompressionPropertyKey_RealTime")]
    #[inline]
    pub fn real_time() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_RealTime }
    }

    /// Hints to the video encoder that it should maximize power efficiency during encode.
    ///
    /// For compression where the client is operating in the background, clients may set this property to kCFBooleanTrue, which indicates that
    /// the encoder can take steps to minimize impact on power usage and other system activity.
    /// Setting the property to NULL is equivalent to setting it to kCFBooleanFalse.
    /// Not all video encoders support this property.
    /// By default, this property is NULL.
    /// If the kVTCompressionPropertyKey_RealTime property is set to kCFBooleanTrue,
    /// the video encoder may act as though this property were set to kCFBooleanFalse.
    #[doc(alias = "kVTCompressionPropertyKey_MaximizePowerEfficiency")]
    #[inline]
    pub fn maximize_power_efficiecy() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MaximizePowerEfficiency }
    }

    #[doc(alias = "kVTCompressionPropertyKey_SourceFrameCount")]
    #[inline]
    pub fn source_frame_count() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_SourceFrameCount }
    }

    #[doc(alias = "kVTCompressionPropertyKey_ExpectedFrameRate")]
    #[inline]
    pub fn expected_frame_rate() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ExpectedFrameRate }
    }

    /// Indicates the maximum real time rate at which frames could be submitted to the VTCompressionSession
    /// CFNumber/Optional
    ///
    /// The frame rate is measured in frames per second.
    /// This property can be used to inform the encoder of the maximum rate that frames could be submitted to the encoder during realtime
    /// encoding.  This allows the encoder to configure itself to ensure this capability.
    /// This property can only be used when kVTCompressionPropertyKey_RealTime has been set to true.
    /// Unlike kVTCompressionPropertyKey_ExpectedFrameRate, this property informs the maximum possible rate that the
    /// VTCompressionSession could see, not the average frame rate that is expected in normal operation.
    /// By default, the property has a value of zero indicating "unknown".
    #[doc(alias = "kVTCompressionPropertyKey_MaximumRealTimeFrameRate")]
    #[api::available(macos = 15.0, ios = 18.0, tvos = 18.0, visionos = 2.0)]
    #[inline]
    pub fn max_real_time_frame_rate() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MaximumRealTimeFrameRate }
    }

    /// An estimate of the expected size in bytes of a single encoded frame based
    /// on the current configuration.
    ///
    /// When supported, this option is intended to allow clients to estimate the output file size for an encoded video stream.
    /// This property is not implemented by all video encoders.
    /// Read Only, CFNumber (bytes per frame)
    #[doc(alias = "kVTCompressionPropertyKey_EstimatedAverageBytesPerFrame")]
    #[api::available(macos = 13.0, ios = 16.0, tvos = 16.0, visionos = 1.0)]
    #[inline]
    pub fn estimated_average_bytes_per_frame() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_EstimatedAverageBytesPerFrame }
    }

    /// Requires that the encoder use a variable bitrate (VBR) rate control algorithm and specifies the desired variable bitrate in bits per second.
    ///
    /// The actual peak bitrate present in the bitstream may be above or below this value based on other parameters
    /// such as kVTCompressionPropertyKey_VBVMaxBitRate.
    /// This property key needs to be set to achieve Variable Bitrate (VBR) rate control.
    /// This property key is not compatible with:
    ///   1. kVTCompressionPropertyKey_AverageBitRate,
    ///   2. kVTCompressionPropertyKey_ConstantBitRate,
    ///   3. kVTCompressionPropertyKey_DataRateLimits,
    ///   4. VTVideoEncoderSpecification_EnableLowLatencyRateControl = True.
    ///
    /// Read/write, `CFNumber<u32>`, Optional
    #[doc(alias = "kVTCompressionPropertyKey_VariableBitRate")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
    #[inline]
    pub fn variable_bit_rate() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_VariableBitRate }
    }

    /// Defines the maximum bitrate that can enter the video buffering verifier (VBV) model at any time in variable bitrate (VBR) mode.
    ///
    /// The value of this property must be greater than zero.
    /// This property key is not compatible with:
    ///   1. kVTCompressionPropertyKey_AverageBitRate,
    ///   2. kVTCompressionPropertyKey_ConstantBitRate,
    ///   3. kVTCompressionPropertyKey_DataRateLimits,
    ///   4. VTVideoEncoderSpecification_EnableLowLatencyRateControl = True.
    ///
    /// Read/write, `CFNumber<u32>`, Optional
    #[doc(alias = "kVTCompressionPropertyKey_VBVMaxBitRate")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
    #[inline]
    pub fn vbv_max_bit_rate() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_VBVMaxBitRate }
    }

    /// Capacity of the video buffering verifier (VBV) model in seconds.
    ///
    /// VBV model allows for larger variations in bitrates while avoiding decoder-side overflows or underflows.
    /// A larger VBV model size may improve compression quality, but it requires more memory and may introduce delay.
    /// The value of this property must be greater than 0.0.
    /// The default value is set as 2.5 seconds.
    /// This property key is compatible with constant bitrate (CBR) or variable bitrate (VBR) rate control.
    ///
    /// This property key is not compatible with:
    ///   1. kVTCompressionPropertyKey_AverageBitRate,
    ///   2. kVTCompressionPropertyKey_DataRateLimits,
    ///   3. VTVideoEncoderSpecification_EnableLowLatencyRateControl = True.
    ///
    /// Read/write, `CFNumber<f32>`, Optional
    #[doc(alias = "kVTCompressionPropertyKey_VBVBufferDuration")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
    #[inline]
    pub fn vbv_buf_duration() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_VBVBufferDuration }
    }

    /// Initial delay of the VBV model between storing the picture in the VBV buffer model and decoding of that picture, as a percentage of VBV buffer duration.
    ///
    /// This value should be specified as a number in the range of 0 to 100.
    /// Larger value increases the delay but results in smoother playback.
    /// Default value is 90, meaning 90% of the VBV buffer duration.
    ///
    /// This property key is not compatible with:
    ///   1. kVTCompressionPropertyKey_AverageBitRate,
    ///   2. kVTCompressionPropertyKey_DataRateLimits,
    ///   3. VTVideoEncoderSpecification_EnableLowLatencyRateControl = True.
    ///
    /// Read/write, `CFNumber<f32>`, Optional
    #[doc(alias = "kVTCompressionPropertyKey_VBVInitialDelayPercentage")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
    #[inline]
    pub fn vbv_initial_delay_percentage() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_VBVInitialDelayPercentage }
    }

    #[doc(alias = "kVTCompressionPropertyKey_BaseLayerFrameRateFraction")]
    #[inline]
    pub fn base_layer_frame_rate_fraction() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_BaseLayerFrameRateFraction }
    }

    #[doc(alias = "kVTCompressionPropertyKey_BaseLayerBitRateFraction")]
    #[inline]
    pub fn base_layer_bit_rate_fraction() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_BaseLayerBitRateFraction }
    }

    #[doc(alias = "kVTCompressionPropertyKey_ExpectedDuration")]
    #[inline]
    pub fn expected_duration() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ExpectedDuration }
    }

    #[doc(alias = "kVTCompressionPropertyKey_BaseLayerFrameRate")]
    #[inline]
    pub fn base_layer_frame_rate() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_BaseLayerFrameRate }
    }

    #[doc(alias = "kVTCompressionPropertyKey_SupportsBaseFrameQP")]
    #[inline]
    pub fn support_base_frame_qp() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_SupportsBaseFrameQP }
    }

    #[doc(alias = "kVTCompressionPropertyKey_CleanAperture")]
    #[inline]
    pub fn clean_aperture() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_CleanAperture }
    }

    /// Describes the pixel aspect ratio for encoded frames.
    ///
    /// Some video encoders may enforce specific pixel aspect ratios;
    /// in those cases this property will be read-only (SetProperty will return kVTPropertyReadOnlyErr).
    /// The pixel aspect ratio will be set on the format description for output samples,
    /// and may affect source frame scaling.
    /// None is a valid value for this property, meaning square pixels (1:1).
    #[doc(alias = "kVTCompressionPropertyKey_PixelAspectRatio")]
    #[inline]
    pub fn pixel_aspect_ratio() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_PixelAspectRatio }
    }

    #[doc(alias = "kVTCompressionPropertyKey_FieldCount")]
    #[inline]
    pub fn field_count() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_FieldCount }
    }

    #[doc(alias = "kVTCompressionPropertyKey_FieldDetail")]
    #[inline]
    pub fn field_detail() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_FieldDetail }
    }

    #[doc(alias = "kVTCompressionPropertyKey_AspectRatio16x9")]
    #[inline]
    pub fn aspect_ratio_16x9() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_AspectRatio16x9 }
    }

    #[doc(alias = "kVTCompressionPropertyKey_ProgressiveScan")]
    #[inline]
    pub fn progressive_scan() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ProgressiveScan }
    }

    #[doc(alias = "kVTCompressionPropertyKey_ColorPrimaries")]
    #[inline]
    pub fn color_primaries() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ColorPrimaries }
    }

    #[doc(alias = "kVTCompressionPropertyKey_TransferFunction")]
    #[inline]
    pub fn transfer_fn() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_TransferFunction }
    }

    #[doc(alias = "kVTCompressionPropertyKey_YCbCrMatrix")]
    #[inline]
    pub fn ycbcr_matrix() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_YCbCrMatrix }
    }

    #[doc(alias = "kVTCompressionPropertyKey_ICCProfile")]
    #[inline]
    pub fn icc_profile() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ICCProfile }
    }

    #[doc(alias = "kVTCompressionPropertyKey_MasteringDisplayColorVolume")]
    #[inline]
    pub fn master_display_color_volume() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MasteringDisplayColorVolume }
    }

    #[doc(alias = "kVTCompressionPropertyKey_ContentLightLevelInfo")]
    #[inline]
    pub fn content_light_lvl_info() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ContentLightLevelInfo }
    }

    #[doc(alias = "kVTCompressionPropertyKey_GammaLevel")]
    #[inline]
    pub fn gamma_lvl() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_GammaLevel }
    }

    #[doc(alias = "kVTCompressionPropertyKey_AlphaChannelMode")]
    #[inline]
    pub fn alpha_channel_mode() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_AlphaChannelMode }
    }

    #[doc(alias = "kVTCompressionPropertyKey_PixelTransferProperties")]
    #[inline]
    pub fn pixel_transfer_properties() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_PixelTransferProperties }
    }

    #[doc(alias = "kVTCompressionPropertyKey_MultiPassStorage")]
    #[inline]
    pub fn multi_pass_storage() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MultiPassStorage }
    }

    #[doc(alias = "kVTCompressionPropertyKey_EncoderID")]
    #[inline]
    pub fn encoder_id() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_EncoderID }
    }

    #[doc(alias = "kVTCompressionPropertyKey_PreserveDynamicHDRMetadata")]
    #[inline]
    pub fn preserve_dynamic_hdr_metadata() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_PreserveDynamicHDRMetadata }
    }

    /// Specifies the minimum allowed encoded frame QP (Quantization Parameter).
    ///
    /// This is an optional parameter. Use it only when you have a specific requirement for the video quality and you are
    /// familiar with frame QP.
    /// This is not supported in all encoders or in all encoder operating modes. kVTPropertyNotSupportedErr will be
    /// returned when this option is not supported.
    #[doc(alias = "kVTCompressionPropertyKey_MaxAllowedFrameQP")]
    #[inline]
    pub fn max_allowed_frame_qp() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_MaxAllowedFrameQP }
    }

    /// Enable Long Term Reference (LTR) frames during encoding
    ///
    /// When an LTR frame is encoded, encoder will signal a unique token of the LTR frame in the encoder callback through:
    /// kVTSampleAttachmentKey_RequireLTRAcknowledgementToken
    /// Clients are responsible for reporting acknowledged LTR frames to the encoder through:
    /// - kVTEncodeFrameOptionKey_AcknowledgedLTRTokens
    ///    Client can request a refresh frame at any time through:
    /// - kVTEncodeFrameOptionKey_ForceLTRRefresh
    ///   Encoder will encode a P frame by using one of acknowledged LTR frames
    /// as the reference. Encoder will encode a new reference frame using an acknowledged LTR,
    /// or an IDR if no LTR frames have been acknowledged.
    #[doc(alias = "kVTCompressionPropertyKey_EnableLTR")]
    #[inline]
    pub fn enable_ltr() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_EnableLTR }
    }

    /// Requires that the encoder use a Constant Bit Rate algorithm.
    ///
    /// The property kVTCompressionPropertyKey_ExpectedFrameRate should be set
    /// along with kVTCompressionPropertyKey_ConstantBitRate
    /// to ensure effective CBR rate control.
    ///
    /// This property is not compatible with kVTCompressionPropertyKey_DataRateLimits and
    /// kVTCompressionPropertyKey_AverageBitRate.
    ///
    /// The encoder will pad the frame if they are smaller than they need to be based on the Constant BitRate. This
    /// property is not recommended for general streaming or export scenarios. It is intended for interoperability with
    /// stremaing CDNs which specifically require that data rates not drop even during low motion and activity scenes.
    /// This is not supported in all encoders or in all encoder operating modes. kVTPropertyNotSupportedErr will be
    /// returned when this option is not supported.
    #[doc(alias = "kVTCompressionPropertyKey_ConstantBitRate")]
    #[inline]
    pub fn constant_bit_rate() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_ConstantBitRate }
    }

    /// Read/write, cf::Number, Optional
    ///
    /// Requests that the encoder retain the specified number of frames during encoding. These frames will be used for additional analysis and statistics
    /// gathering before the frame is finally encoded at the end of the window. When this property is not set, video encoder will automatically determine
    /// the number of lookahead frames.
    ///
    /// Encoder will choose number of lookahead frames closer to the suggested value based on internal configuration. This property directly affects latency
    /// of the video encoder. The following properties also affect look ahead frames:
    ///
    /// 1. Value of this property must be less than or equal to `kVTCompressionPropertyKey_MaxFrameDelayCount`.
    /// 2. This property is ignored when `VTVideoEncoderSpecification_EnableLowLatencyRateControl` is set to true
    /// 3. This property is ignored when `kVTCompressionPropertyKey_Quality` is set to 1.0
    /// 4. This property can not be used in conjunction with multi-pass feature (`kVTCompressionPropertyKey_MultiPassStorage`)
    #[doc(alias = "kVTCompressionPropertyKey_SuggestedLookAheadFrameCount")]
    #[inline]
    #[api::available(macos = 15.0)]
    pub fn suggested_look_ahead_frame_count() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_SuggestedLookAheadFrameCount }
    }

    /// Read/write, cf::Number, Optional
    /// Control spatial adaptation of the quantization parameter (QP) based on per-frame statistics.
    ///
    /// If set to `qp_modulation_level::disable()`, spatial QP adaptation is not applied based on per-frame statistics.
    /// If set to `qp_modulation_level::default()`, video encoder is allowed to apply spatial QP adaptation for each macro block (or coding unit) within a video frame.
    /// QP adaptation is based on spatial characteristics of a frame and the level of spatial QP adaptation is decided internally by the rate controller.
    #[doc(alias = "kVTCompressionPropertyKey_SpatialAdaptiveQPLevel")]
    #[inline]
    #[api::available(macos = 15.0)]
    pub fn spatial_adaptive_qp_level() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_SpatialAdaptiveQPLevel }
    }

    #[doc(alias = "kVTCompressionPropertyKey_SupportedPresetDictionaries")]
    #[inline]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
    pub fn supported_preset_dictionaries() -> &'static cf::String {
        unsafe { kVTCompressionPropertyKey_SupportedPresetDictionaries }
    }

    #[link(name = "VideoToolbox", kind = "framework")]
    #[api::weak]
    unsafe extern "C" {
        static kVTCompressionPropertyKey_NumberOfPendingFrames: &'static cf::String;
        static kVTCompressionPropertyKey_PixelBufferPoolIsShared: &'static cf::String;
        static kVTCompressionPropertyKey_VideoEncoderPixelBufferAttributes: &'static cf::String;
        static kVTCompressionPropertyKey_MaxKeyFrameInterval: &'static cf::String;
        static kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration: &'static cf::String;
        static kVTCompressionPropertyKey_AllowTemporalCompression: &'static cf::String;
        static kVTCompressionPropertyKey_AllowFrameReordering: &'static cf::String;
        static kVTCompressionPropertyKey_AllowOpenGOP: &'static cf::String;
        static kVTCompressionPropertyKey_AverageBitRate: &'static cf::String;
        static kVTCompressionPropertyKey_DataRateLimits: &'static cf::String;
        static kVTCompressionPropertyKey_Quality: &'static cf::String;
        static kVTCompressionPropertyKey_TargetQualityForAlpha: &'static cf::String;
        static kVTCompressionPropertyKey_MoreFramesBeforeStart: &'static cf::String;
        static kVTCompressionPropertyKey_MoreFramesAfterEnd: &'static cf::String;
        static kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality: &'static cf::String;
        static kVTCompressionPropertyKey_ProfileLevel: &'static cf::String;
        static kVTCompressionPropertyKey_OutputBitDepth: &'static cf::String;
        static kVTCompressionPropertyKey_HDRMetadataInsertionMode: &'static cf::String;
        static kVTCompressionPropertyKey_H264EntropyMode: &'static cf::String;
        static kVTCompressionPropertyKey_Depth: &'static cf::String;
        static kVTCompressionPropertyKey_MaxFrameDelayCount: &'static cf::String;
        static kVTCompressionPropertyKey_MaxH264SliceBytes: &'static cf::String;
        static kVTCompressionPropertyKey_RealTime: &'static cf::String;
        static kVTCompressionPropertyKey_MaximizePowerEfficiency: &'static cf::String;
        static kVTCompressionPropertyKey_SourceFrameCount: &'static cf::String;
        static kVTCompressionPropertyKey_ExpectedFrameRate: &'static cf::String;

        #[api::available(macos = 15.0, ios = 18.0, tvos = 18.0, visionos = 2.0)]
        static kVTCompressionPropertyKey_MaximumRealTimeFrameRate: &'static cf::String;
        #[api::available(macos = 13.0, ios = 16.0, tvos = 16.0, visionos = 1.0)]
        static kVTCompressionPropertyKey_EstimatedAverageBytesPerFrame: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
        static kVTCompressionPropertyKey_VariableBitRate: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
        static kVTCompressionPropertyKey_VBVMaxBitRate: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
        static kVTCompressionPropertyKey_VBVBufferDuration: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, visionos = 26.0)]
        static kVTCompressionPropertyKey_VBVInitialDelayPercentage: &'static cf::String;

        static kVTCompressionPropertyKey_ConstantBitRate: &'static cf::String;
        static kVTCompressionPropertyKey_BaseLayerFrameRateFraction: &'static cf::String;
        static kVTCompressionPropertyKey_BaseLayerBitRateFraction: &'static cf::String;
        static kVTCompressionPropertyKey_ExpectedDuration: &'static cf::String;
        static kVTCompressionPropertyKey_BaseLayerFrameRate: &'static cf::String;
        static kVTCompressionPropertyKey_SupportsBaseFrameQP: &'static cf::String;
        static kVTCompressionPropertyKey_CleanAperture: &'static cf::String;
        static kVTCompressionPropertyKey_PixelAspectRatio: &'static cf::String;
        static kVTCompressionPropertyKey_FieldCount: &'static cf::String;
        static kVTCompressionPropertyKey_FieldDetail: &'static cf::String;
        static kVTCompressionPropertyKey_AspectRatio16x9: &'static cf::String;
        static kVTCompressionPropertyKey_ProgressiveScan: &'static cf::String;
        static kVTCompressionPropertyKey_ColorPrimaries: &'static cf::String;
        static kVTCompressionPropertyKey_TransferFunction: &'static cf::String;
        static kVTCompressionPropertyKey_YCbCrMatrix: &'static cf::String;
        static kVTCompressionPropertyKey_ICCProfile: &'static cf::String;
        static kVTCompressionPropertyKey_MasteringDisplayColorVolume: &'static cf::String;
        static kVTCompressionPropertyKey_ContentLightLevelInfo: &'static cf::String;
        static kVTCompressionPropertyKey_GammaLevel: &'static cf::String;
        static kVTCompressionPropertyKey_AlphaChannelMode: &'static cf::String;
        static kVTCompressionPropertyKey_PixelTransferProperties: &'static cf::String;
        static kVTCompressionPropertyKey_MultiPassStorage: &'static cf::String;
        static kVTCompressionPropertyKey_EncoderID: &'static cf::String;
        static kVTCompressionPropertyKey_PreserveDynamicHDRMetadata: &'static cf::String;
        static kVTCompressionPropertyKey_MaxAllowedFrameQP: &'static cf::String;
        static kVTCompressionPropertyKey_EnableLTR: &'static cf::String;

        #[api::available(macos = 15.0)]
        static kVTCompressionPropertyKey_SuggestedLookAheadFrameCount: &'static cf::String;

        #[api::available(macos = 15.0)]
        static kVTCompressionPropertyKey_SpatialAdaptiveQPLevel: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        static kVTCompressionPropertyKey_SupportedPresetDictionaries: &'static cf::String;
    }
}

pub mod qp_modulation_level {
    use crate::cf;

    #[doc(alias = "kVTQPModulationLevel_Default")]
    pub fn default() -> &'static cf::Number {
        cf::Number::tagged_i32(-1)
    }

    #[doc(alias = "kVTQPModulationLevel_Disable")]
    pub fn disabled() -> &'static cf::Number {
        cf::Number::tagged_i32(0)
    }
}

#[doc(alias = "kVTUnlimitedFrameDelayCount")]
pub const UNLIMITED_FRAME_DELAY_COUNT: i32 = -1;

pub mod h264_entropy_mode {
    use crate::cf;

    #[inline]
    pub fn cavlc() -> &'static cf::String {
        unsafe { kVTH264EntropyMode_CAVLC }
    }

    #[inline]
    pub fn cabac() -> &'static cf::String {
        unsafe { kVTH264EntropyMode_CABAC }
    }

    #[link(name = "VideoToolbox", kind = "framework")]
    unsafe extern "C" {
        static kVTH264EntropyMode_CAVLC: &'static cf::String;
        static kVTH264EntropyMode_CABAC: &'static cf::String;
    }
}

pub mod hdr_metadata_insertion_mode {
    use crate::cf;

    #[inline]
    pub fn none() -> &'static cf::String {
        unsafe { kVTHDRMetadataInsertionMode_None }
    }

    #[inline]
    pub fn auto() -> &'static cf::String {
        unsafe { kVTHDRMetadataInsertionMode_Auto }
    }

    #[link(name = "VideoToolbox", kind = "framework")]
    unsafe extern "C" {
        static kVTHDRMetadataInsertionMode_None: &'static cf::String;
        static kVTHDRMetadataInsertionMode_Auto: &'static cf::String;
    }
}

pub mod profile_level {

    pub mod hevc {
        use crate::cf;
        pub fn main_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_HEVC_Main_AutoLevel }
        }

        pub fn main10_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_HEVC_Main10_AutoLevel }
        }

        pub fn main42210_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_HEVC_Main42210_AutoLevel }
        }

        #[link(name = "VideoToolbox", kind = "framework")]
        unsafe extern "C" {
            static kVTProfileLevel_HEVC_Main_AutoLevel: &'static cf::String;
            static kVTProfileLevel_HEVC_Main10_AutoLevel: &'static cf::String;
            static kVTProfileLevel_HEVC_Main42210_AutoLevel: &'static cf::String;
        }
    }

    pub mod h264 {
        use crate::cf;

        #[doc(alias = "kVTProfileLevel_H264_Baseline_1_3")]
        pub fn baseline_1_3() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_1_3 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_3_0")]
        pub fn baseline_3_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_3_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_3_1")]
        pub fn baseline_3_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_3_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_3_2")]
        pub fn baseline_3_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_3_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_4_0")]
        pub fn baseline_4_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_4_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_4_1")]
        pub fn baseline_4_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_4_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_4_2")]
        pub fn baseline_4_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_4_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_5_0")]
        pub fn baseline_5_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_5_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_5_1")]
        pub fn baseline_5_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_5_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_5_2")]
        pub fn baseline_5_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_5_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Baseline_AutoLevel")]
        pub fn baseline_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Baseline_AutoLevel }
        }

        #[doc(alias = "kVTProfileLevel_H264_ConstrainedBaseline_AutoLevel")]
        pub fn constrained_baseline_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_ConstrainedBaseline_AutoLevel }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_3_0")]
        pub fn main_3_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_3_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_3_1")]
        pub fn main_3_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_3_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_3_2")]
        pub fn main_3_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_3_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_4_0")]
        pub fn main_4_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_4_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_4_1")]
        pub fn main_4_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_4_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_4_2")]
        pub fn main_4_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_4_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_5_0")]
        pub fn main_5_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_5_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_5_1")]
        pub fn main_5_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_5_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_5_2")]
        pub fn main_5_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_5_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Main_AutoLevel")]
        pub fn main_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Main_AutoLevel }
        }

        #[doc(alias = "kVTProfileLevel_H264_Extended_5_0")]
        pub fn extended_5_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Extended_5_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_Extended_AutoLevel")]
        pub fn extended_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_Extended_AutoLevel }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_3_0")]
        pub fn high_3_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_3_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_3_1")]
        pub fn high_3_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_3_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_3_2")]
        pub fn high_3_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_3_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_4_0")]
        pub fn high_4_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_4_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_4_1")]
        pub fn high_4_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_4_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_4_2")]
        pub fn high_4_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_4_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_5_0")]
        pub fn high_5_0() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_5_0 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_5_1")]
        pub fn high_5_1() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_5_1 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_5_2")]
        pub fn high_5_2() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_5_2 }
        }

        #[doc(alias = "kVTProfileLevel_H264_High_AutoLevel")]
        pub fn high_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_High_AutoLevel }
        }

        #[doc(alias = "kVTProfileLevel_H264_ConstrainedHigh_AutoLevel")]
        pub fn constrained_high_auto_lvl() -> &'static cf::String {
            unsafe { kVTProfileLevel_H264_ConstrainedHigh_AutoLevel }
        }

        #[link(name = "VideoToolbox", kind = "framework")]
        unsafe extern "C" {
            static kVTProfileLevel_H264_Baseline_1_3: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_3_0: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_3_1: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_3_2: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_4_0: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_4_1: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_4_2: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_5_0: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_5_1: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_5_2: &'static cf::String;
            static kVTProfileLevel_H264_Baseline_AutoLevel: &'static cf::String;
            static kVTProfileLevel_H264_ConstrainedBaseline_AutoLevel: &'static cf::String;

            static kVTProfileLevel_H264_Main_3_0: &'static cf::String;
            static kVTProfileLevel_H264_Main_3_1: &'static cf::String;
            static kVTProfileLevel_H264_Main_3_2: &'static cf::String;
            static kVTProfileLevel_H264_Main_4_0: &'static cf::String;
            static kVTProfileLevel_H264_Main_4_1: &'static cf::String;
            static kVTProfileLevel_H264_Main_4_2: &'static cf::String;
            static kVTProfileLevel_H264_Main_5_0: &'static cf::String;
            static kVTProfileLevel_H264_Main_5_1: &'static cf::String;
            static kVTProfileLevel_H264_Main_5_2: &'static cf::String;
            static kVTProfileLevel_H264_Main_AutoLevel: &'static cf::String;
            static kVTProfileLevel_H264_Extended_5_0: &'static cf::String;
            static kVTProfileLevel_H264_Extended_AutoLevel: &'static cf::String;

            static kVTProfileLevel_H264_High_3_0: &'static cf::String;
            static kVTProfileLevel_H264_High_3_1: &'static cf::String;
            static kVTProfileLevel_H264_High_3_2: &'static cf::String;

            static kVTProfileLevel_H264_High_4_0: &'static cf::String;
            static kVTProfileLevel_H264_High_4_1: &'static cf::String;
            static kVTProfileLevel_H264_High_4_2: &'static cf::String;

            static kVTProfileLevel_H264_High_5_0: &'static cf::String;
            static kVTProfileLevel_H264_High_5_1: &'static cf::String;
            static kVTProfileLevel_H264_High_5_2: &'static cf::String;
            static kVTProfileLevel_H264_High_AutoLevel: &'static cf::String;
            static kVTProfileLevel_H264_ConstrainedHigh_AutoLevel: &'static cf::String;
        }
    }

    pub mod mp4v {
        use crate::cf;

        pub fn simple_l0() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_Simple_L0 }
        }

        pub fn simple_l1() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_Simple_L1 }
        }

        pub fn simple_l2() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_Simple_L2 }
        }

        pub fn simple_l3() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_Simple_L3 }
        }

        pub fn main_l2() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_Main_L2 }
        }

        pub fn main_l3() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_Main_L3 }
        }

        pub fn main_l4() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_Main_L4 }
        }

        pub fn advanced_simple_l0() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_AdvancedSimple_L0 }
        }

        pub fn advanced_simple_l1() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_AdvancedSimple_L1 }
        }

        pub fn advanced_simple_l2() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_AdvancedSimple_L2 }
        }
        pub fn advanced_simple_l3() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_AdvancedSimple_L3 }
        }

        pub fn advanced_simple_l4() -> &'static cf::String {
            unsafe { kVTProfileLevel_MP4V_AdvancedSimple_L4 }
        }

        #[link(name = "VideoToolbox", kind = "framework")]
        unsafe extern "C" {
            static kVTProfileLevel_MP4V_Simple_L0: &'static cf::String;
            static kVTProfileLevel_MP4V_Simple_L1: &'static cf::String;
            static kVTProfileLevel_MP4V_Simple_L2: &'static cf::String;
            static kVTProfileLevel_MP4V_Simple_L3: &'static cf::String;

            static kVTProfileLevel_MP4V_Main_L2: &'static cf::String;
            static kVTProfileLevel_MP4V_Main_L3: &'static cf::String;
            static kVTProfileLevel_MP4V_Main_L4: &'static cf::String;

            static kVTProfileLevel_MP4V_AdvancedSimple_L0: &'static cf::String;
            static kVTProfileLevel_MP4V_AdvancedSimple_L1: &'static cf::String;
            static kVTProfileLevel_MP4V_AdvancedSimple_L2: &'static cf::String;
            static kVTProfileLevel_MP4V_AdvancedSimple_L3: &'static cf::String;
            static kVTProfileLevel_MP4V_AdvancedSimple_L4: &'static cf::String;
        }
    }

    pub mod h263 {
        use crate::cf;

        pub fn profile0_lvl_10() -> &'static cf::String {
            unsafe { kVTProfileLevel_H263_Profile0_Level10 }
        }

        pub fn profile0_lvl_45() -> &'static cf::String {
            unsafe { kVTProfileLevel_H263_Profile0_Level45 }
        }

        pub fn profile3_lvl_45() -> &'static cf::String {
            unsafe { kVTProfileLevel_H263_Profile3_Level45 }
        }

        #[link(name = "VideoToolbox", kind = "framework")]
        unsafe extern "C" {
            static kVTProfileLevel_H263_Profile0_Level10: &'static cf::String;
            static kVTProfileLevel_H263_Profile0_Level45: &'static cf::String;
            static kVTProfileLevel_H263_Profile3_Level45: &'static cf::String;
        }
    }
}

/// Per-Frame Configuration
pub mod frame_keys {
    use crate::cf;

    /// [`cf::Boolean`] value indicating whether the current frame is forced to be a key frame.
    pub fn force_key_frame() -> &'static cf::String {
        unsafe { kVTEncodeFrameOptionKey_ForceKeyFrame }
    }

    pub fn base_frame_qp() -> &'static cf::String {
        unsafe { kVTEncodeFrameOptionKey_BaseFrameQP }
    }

    #[link(name = "VideoToolbox", kind = "framework")]
    unsafe extern "C" {
        static kVTEncodeFrameOptionKey_ForceKeyFrame: &'static cf::String;
        static kVTEncodeFrameOptionKey_BaseFrameQP: &'static cf::String;
    }
}

pub mod preset_keys {
    use crate::{api, cf};

    #[doc(alias = "kVTCompressionPreset_HighQuality")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
    pub fn hight_quality() -> &'static cf::String {
        unsafe { kVTCompressionPreset_HighQuality }
    }

    #[doc(alias = "kVTCompressionPreset_Balanced")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
    pub fn balanced() -> &'static cf::String {
        unsafe { kVTCompressionPreset_Balanced }
    }

    #[doc(alias = "kVTCompressionPreset_HighSpeed")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
    pub fn high_speed() -> &'static cf::String {
        unsafe { kVTCompressionPreset_HighSpeed }
    }

    #[doc(alias = "kVTCompressionPreset_VideoConferencing")]
    #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
    pub fn video_conferencing() -> &'static cf::String {
        unsafe { kVTCompressionPreset_VideoConferencing }
    }

    #[link(name = "VideoToolbox", kind = "framework")]
    #[api::weak]
    unsafe extern "C" {
        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        static kVTCompressionPreset_HighQuality: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        static kVTCompressionPreset_Balanced: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        static kVTCompressionPreset_HighSpeed: &'static cf::String;

        #[api::available(macos = 26.0, ios = 26.0, tvos = 26.0, watchos = 26.0, visionos = 26.0)]
        static kVTCompressionPreset_VideoConferencing: &'static cf::String;
    }
}