-
Notifications
You must be signed in to change notification settings - Fork 3
/
omx.vapi
1927 lines (1624 loc) · 57.8 KB
/
omx.vapi
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
[CCode (cheader_filename="omx.h")]
namespace Omx {
[CCode (cname="OMX_ALL")]
const uint ALL;
[CCode (cname="OMX_MAX_STRINGNAME_SIZE")]
const uint MAX_STRING_SIZE;
[CCode (cname="OMX_COMMANDTYPE", cprefix="OMX_Command", has_type_id=false)]
public enum Command {
StateSet,
Flush,
PortDisable,
PortEnable,
MarkBuffer;
public unowned string to_string() {
switch(this) {
case StateSet:
return "Change the component state";
case Flush:
return "Flush the queue(s) of buffers on a port of a component";
case PortDisable:
return "Disable a port on a component";
case PortEnable:
return "Enable a port on a component";
case MarkBuffer:
return "Mark a buffer and specify which other component will raise the event mark received";
default:
return "(unknown)";
}
}
}
[CCode (cname="OMX_STATETYPE", cprefix="OMX_State", has_type_id=false)]
public enum State {
Invalid,
Loaded,
Idle,
Executing,
Pause,
WaitForResources;
public unowned string to_string() {
switch(this) {
case Invalid:
return "Component is corrupt or has encountered an error from which it cannot recover";
case Loaded:
return "Component has been loaded but has no resources allocated";
case Idle:
return "Component has all resources but has not transferred any buffers or begun processing data";
case Executing:
return "Component is transferring buffers and is processing data (if data is available)";
case Pause:
return "Component data processing has been paused but may be resumed from the point it was paused";
case WaitForResources:
return "Component is waiting for a resource to become available";
default:
return "(unknown)";
}
}
}
[CCode (cname="OMX_ERRORTYPE", cprefix="OMX_Error", has_type_id=false)]
public enum Error {
None,
InsufficientResources,
Undefined,
InvalidComponentName,
ComponentNotFound,
InvalidComponent,
BadParameter,
NotImplemented,
Underflow,
Overflow,
Hardware,
InvalidState,
StreamCorrupt,
PortsNotCompatible,
ResourcesLost,
NoMore,
VersionMismatch,
NotReady,
Timeout,
SameState,
ResourcesPreempted,
PortUnresponsiveDuringAllocation,
PortUnresponsiveDuringDeallocation,
PortUnresponsiveDuringStop,
IncorrectStateTransition,
IncorrectStateOperation,
UnsupportedSetting,
UnsupportedIndex,
BadPortIndex,
PortUnpopulated,
ComponentSuspended,
DynamicResourcesUnavailable,
MbErrorsInFrame,
FormatNotDetected,
ContentPipeOpenFailed,
ContentPipeCreationFailed,
[CCode (cname="OMX_ErrorSeperateTablesUsed")]
SeparateTablesUsed,
TunnelingUnsupported;
public unowned string to_string() {
switch(this) {
case None:
return "The function returned successfully";
case InsufficientResources:
return "There were insufficient resources to perform the requested operation";
case Undefined:
return "There was an error but the cause of the error could not be determined";
case InvalidComponentName:
return "The component name string was invalid";
case ComponentNotFound:
return "No component with the specified name string was found";
case InvalidComponent:
return "The component name string was invalid";
case BadParameter:
return "One or more parameters were invalid";
case NotImplemented:
return "The requested function is not implemented";
case Underflow:
return "The buffer was emptied before the next buffer was ready";
case Overflow:
return "The buffer was not available when it was needed";
case Hardware:
return "The hardware failed to respond as expected";
case InvalidState:
return "The component is in the OMX_StateInvalid state";
case StreamCorrupt:
return "The stream is found to be corrupt";
case PortsNotCompatible:
return "Ports being set up for tunneled communication are incompatible";
case ResourcesLost:
return "Resources allocated to a component in the OMX_StateIdle state have been lost";
case NoMore:
return "No more indices can be enumerated";
case VersionMismatch:
return "The component detected a version mismatch";
case NotReady:
return "The component is not ready to return data at this time";
case Timeout:
return "A timeout occurred where the component was unable to process the call in a reasonable amount of time";
case SameState:
return "The component tried to transition into the state that it is currently in";
case ResourcesPreempted:
return "Resources allocated to a component in the OMX_StateExecuting or OMX_StatePause states have been pre-empted";
case PortUnresponsiveDuringAllocation:
return "The non-supplier port deemed that it had waited an unusually long time for the supplier port to send it an allocated buffer via an OMX_UseBuffer call";
case PortUnresponsiveDuringDeallocation:
return "The non-supplier port deemed that it had waited an unusually long time for the supplier port to request the de-allocation of a buffer header via a OMX_FreeBuffer call";
case PortUnresponsiveDuringStop:
return "The supplier port deemed that it had waited an unusually long time for the non-supplier port to return a buffer via an EmptyThisBuffer or FillThisBuffer call";
case IncorrectStateTransition:
return "A state transition was attempted that is not allowed";
case IncorrectStateOperation:
return "A command or method was attempted that is not allowed during the present state";
case UnsupportedSetting:
return "One or more values encapsulated in the parameter or configuration structure are unsupported";
case UnsupportedIndex:
return "The parameter or configuration indicated by the given index is unsupported";
case BadPortIndex:
return "The port index that was supplied is incorrect";
case PortUnpopulated:
return "The port has lost one or more of its buffers and is thus unpopulated";
case ComponentSuspended:
return "Component suspended due to temporary loss of resources";
case DynamicResourcesUnavailable:
return "Component suspended due to inability to acquire dynamic resources";
case MbErrorsInFrame:
return "Errors detected in frame";
case FormatNotDetected:
return "Component cannot parse or determine the format of the given datastream";
case ContentPipeOpenFailed:
return "Opening the Content Pipe failed";
case ContentPipeCreationFailed:
return "Creating the Content Pipe failed";
case SeparateTablesUsed:
return "Attempting to query for single Chroma table when separate quantization tables are used for the Chroma (Cb and Cr) coefficients";
case TunnelingUnsupported:
return "Tunneling is not supported by the component";
default:
return "(unknown)";
}
}
}
[Flags]
[CCode (cprefix="OMX_BUFFERFLAG_", has_type_id=false)]
public enum BufferFlag {
EOS,
STARTTIME,
DECODEONLY,
DATACORRUPT,
ENDOFFRAME,
SYNCFRAME,
EXTRADATA,
CODECCONFIG
}
public struct Structure {
[CCode (cname="nSize")]
public ulong size;
[CCode (cname="nVersion")]
public Version version;
public void init();
}
public struct PortStructure: Structure {
[CCode (cname="nPortIndex")]
public uint32 port_index;
}
[Compact]
[CCode (cname="OMX_BUFFERHEADERTYPE", ref_function = "", unref_function = "")]
public class BufferHeader {
[CCode (cname="nSize")]
public ulong size;
[CCode (cname="nVersion")]
public Version version;
[CCode (cname="pBuffer", array_length_cname = "nAllocLen")]
public uint8[] buffer;
[CCode (cname="nFilledLen")]
public uint32 length;
[CCode (cname="nOffset")]
public uint32 offset;
[CCode (cname="pAppPrivate")]
public void *app_private;
[CCode (cname="pPlatformPrivate")]
public void *platform_private;
[CCode (cname="pInputPortPrivate")]
public void *input_port_private;
[CCode (cname="pOutputPortPrivate")]
public void *output_port_private;
[CCode (cname="hMarkTargetComponent")]
public Handle mark_target_component;
[CCode (cname="pMarkData")]
public void *mark_data;
[CCode (cname="nTickCount")]
public uint32 tick_count;
[CCode (cname="nTimeStamp")]
public int64 time_stamp;
[CCode (cname="nFlags")]
public uint32 flags;
[CCode (cname="nOutputPortIndex")]
public uint32 output_port_index;
[CCode (cname="nInputPortIndex")]
public uint32 input_port_index;
}
[CCode (cname="OMX_PORT_PARAM_TYPE")]
public struct PortParam: Structure {
[CCode (cname="nPorts")]
public uint32 ports;
[CCode (cname="nStartPortNumber")]
public uint32 start_port_number;
}
[CCode (cname="OMX_EVENTTYPE", cprefix="OMX_Event", has_type_id=false)]
public enum Event {
CmdComplete,
Error,
Mark,
PortSettingsChanged,
BufferFlag,
ResourcesAcquired,
ComponentResumed,
DynamicResourcesAvailable,
PortFormatDetected;
public unowned string to_string() {
switch(this) {
case CmdComplete:
return "Component has completed the execution of a command";
case Error:
return "Component has detected an error condition";
case Mark:
return "A buffer mark has reached the target component, and the IL client has received this event with the private data pointer of the mark";
case PortSettingsChanged:
return "Component has changed port settings. For example, the component has changed port settings resulting from bit stream parsing";
case BufferFlag:
return "The event that a component sends when it detects the end of a stream";
case ResourcesAcquired:
return "The component has been granted resources and is transitioning from the OMX_StateWaitForResources state to the OMX_StateIdle state";
case ComponentResumed:
return "The component has been resumed (i.e. no longer suspended) due to reacquisition of resources";
case DynamicResourcesAvailable:
return "The component has acquired previously unavailable dynamic resources";
case PortFormatDetected:
return "Component has successfully recognized a format and determined that it can support it";
default:
return "(unknown)";
}
}
}
[CCode (cname="OMX_PORTDOMAINTYPE", cprefix="OMX_PortDomain", has_type_id=false)]
public enum PortDomain {
Audio,
Video,
Image,
Other
}
[CCode (cname="OMX_MARKTYPE")]
public struct Mark {
[CCode (cname="hMarkTargetComponent")]
public Handle mark_target_component;
[CCode (cname="pMarkData")]
public void *mark_data;
}
[CCode (instance_pos=1.1)]
public delegate Error EventHandlerFunc(
Handle component,
Event event,
uint32 data1,
uint32 data2,
void *event_data);
[CCode (instance_pos=1.1)]
public delegate Error EmptyBufferDoneFunc(
Handle component,
BufferHeader buffer);
[CCode (instance_pos=1.1)]
public delegate Error FillBufferDoneFunc(
Handle component,
BufferHeader buffer);
[CCode (cname="OMX_CALLBACKTYPE")]
public struct Callback {
[CCode (cname="EventHandler")]
public EventHandlerFunc event_handler;
[CCode (cname="EmptyBufferDone")]
public EmptyBufferDoneFunc empty_buffer_done;
[CCode (cname="FillBufferDone")]
public FillBufferDoneFunc fill_buffer_done;
}
[CCode (cname="OMX_BUFFERSUPPLIERTYPE", cprefix="OMX_BufferSupply", has_type_id=false)]
public enum BufferSupplier {
Unspecified,
Input,
Output
}
[Flags]
[CCode (cprefix="OMX_PORTTUNNELFLAG_", has_type_id=false)]
public enum PortTunnelFlag {
READONLY
}
[Compact]
[CCode (cname="void", type_id="G_TYPE_POINTER", set_value_function="g_value_set_pointer", param_spec_function="g_param_spec_pointer", ref_function="", unref_function="")]
public class Handle {
[CCode (cname="OMX_SendCommand")]
public Error send_command(Command cmd, uint param, void *cmd_data=null);
[CCode (cname="OMX_GetState")]
public Error get_state(out State state);
[CCode (cname="OMX_UseBuffer")]
public Error use_buffer(out BufferHeader buffer, uint n_port, void *app_priv, uint n_bytes, char *pbuffer);
[CCode (cname="OMX_AllocateBuffer")]
public Error allocate_buffer(out BufferHeader buffer, uint n_port, void *app_priv, uint n_bytes);
[CCode (cname="OMX_FreeBuffer")]
public Error free_buffer(uint n_port, BufferHeader buffer);
[CCode (cname="OMX_EmptyThisBuffer")]
public Error empty_this_buffer(BufferHeader buffer);
[CCode (cname="OMX_FillThisBuffer")]
public Error fill_this_buffer(BufferHeader buffer);
[CCode (cname="OMX_GetConfig")]
public Error get_config(uint config_index, PortStructure config_structure);
[CCode (cname="OMX_SetConfig")]
public Error set_config(uint config_index, PortStructure config_structure);
[CCode (cname="OMX_GetExtensionIndex")]
public Error get_extension_index(string parameter_name, out uint index_type);
[CCode (cname="OMX_GetParameter")]
public Error get_parameter(uint param_index, Structure parameter_structure);
[CCode (cname="OMX_SetParameter")]
public Error set_parameter(uint param_index, Structure parameter_structure);
}
[CCode (cname="OMX_Init")]
public Error init();
[CCode (cname="OMX_Deinit")]
public Error deinit();
[CCode (cname="OMX_GetHandle")]
public Error get_handle(out Handle component, string component_name, void *app_data, Callback callbacks);
[CCode (cname="OMX_FreeHandle")]
public Error free_handle(Handle component);
[CCode (cname="OMX_SetupTunnel")]
public Error setup_tunnel(Handle output, uint32 port_output, Handle input, uint32 port_input);
[CCode (cname="OMX_DIRTYPE", cprefix="OMX_Dir", has_type_id=false)]
public enum Dir {
Input,
Output;
public unowned string to_string() {
switch(this) {
case Input:
return "Input";
case Output:
return "Output";
default:
return "(uknnown)";
}
}
}
[CCode (cname="OMX_ENDIANTYPE", cprefix="OMX_Endian", has_type_id=false)]
public enum Endian {
Big,
Little
}
[CCode (cname="OMX_NUMERICALDATATYPE", cprefix="OMX_NumericalData", has_type_id=false)]
public enum NumericalData {
Signed,
Unsigned
}
[CCode (cname="OMX_BS32")]
public struct bounded {
[CCode (cname="nValue")]
public int32 value;
[CCode (cname="nMin")]
public int32 min;
[CCode (cname="nMax")]
public int32 max;
}
[CCode (cname="OMX_BU32")]
public struct ubounded {
[CCode (cname="nValue")]
public uint32 value;
[CCode (cname="nMin")]
public uint32 min;
[CCode (cname="nMax")]
public uint32 max;
}
[CCode (cname="OMX_INDEXTYPE", cprefix="OMX_Index", has_type_id=false)]
public enum Index {
ComponentStartUnused,
ParamPriorityMgmt,
ParamAudioInit,
ParamImageInit,
ParamVideoInit,
ParamOtherInit,
ParamNumAvailableStreams,
ParamActiveStream,
ParamSuspensionPolicy,
ParamComponentSuspended,
ConfigCapturing,
ConfigCaptureMode,
AutoPauseAfterCapture,
ParamContentURI,
ParamCustomContentPipe,
ParamDisableResourceConcealment,
ConfigMetadataItemCount,
ConfigContainerNodeCount,
ConfigMetadataItem,
ConfigCounterNodeID,
ParamMetadataFilterType,
ParamMetadataKeyFilter,
ConfigPriorityMgmt,
ParamStandardComponentRole,
PortStartUnused,
ParamPortDefinition,
ParamCompBufferSupplier,
ReservedStartUnused,
AudioStartUnused,
ParamAudioPortFormat,
ParamAudioPcm,
ParamAudioAac,
ParamAudioRa,
ParamAudioMp3,
ParamAudioAdpcm,
ParamAudioG723,
ParamAudioG729,
ParamAudioAmr,
ParamAudioWma,
ParamAudioSbc,
ParamAudioMidi,
ParamAudioGsm_FR,
ParamAudioMidiLoadUserSound,
ParamAudioG726,
ParamAudioGsm_EFR,
ParamAudioGsm_HR,
ParamAudioPdc_FR,
ParamAudioPdc_EFR,
ParamAudioPdc_HR,
ParamAudioTdma_FR,
ParamAudioTdma_EFR,
ParamAudioQcelp8,
ParamAudioQcelp13,
ParamAudioEvrc,
ParamAudioSmv,
ParamAudioVorbis,
ConfigAudioMidiImmediateEvent,
ConfigAudioMidiControl,
ConfigAudioMidiSoundBankProgram,
ConfigAudioMidiStatus,
ConfigAudioMidiMetaEvent,
ConfigAudioMidiMetaEventData,
ConfigAudioVolume,
ConfigAudioBalance,
ConfigAudioChannelMute,
ConfigAudioMute,
ConfigAudioLoudness,
ConfigAudioEchoCancelation,
ConfigAudioNoiseReduction,
ConfigAudioBass,
ConfigAudioTreble,
ConfigAudioStereoWidening,
ConfigAudioChorus,
ConfigAudioEqualizer,
ConfigAudioReverberation,
ConfigAudioChannelVolume,
ImageStartUnused,
ParamImagePortFormat,
ParamFlashControl,
ConfigFocusControl,
ParamQFactor,
ParamQuantizationTable,
ParamHuffmanTable,
ConfigFlashControl,
VideoStartUnused,
ParamVideoPortFormat,
ParamVideoQuantization,
ParamVideoFastUpdate,
ParamVideoBitrate,
ParamVideoMotionVector,
ParamVideoIntraRefresh,
ParamVideoErrorCorrection,
ParamVideoVBSMC,
ParamVideoMpeg2,
ParamVideoMpeg4,
ParamVideoWmv,
ParamVideoRv,
ParamVideoAvc,
ParamVideoH263,
ParamVideoProfileLevelQuerySupported,
ParamVideoProfileLevelCurrent,
ConfigVideoBitrate,
ConfigVideoFramerate,
ConfigVideoIntraVOPRefresh,
ConfigVideoIntraMBRefresh,
ConfigVideoMBErrorReporting,
ParamVideoMacroblocksPerFrame,
ConfigVideoMacroBlockErrorMap,
ParamVideoSliceFMO,
ConfigVideoAVCIntraPeriod,
ConfigVideoNalSize,
CommonStartUnused,
ParamCommonDeblocking,
ParamCommonSensorMode,
ParamCommonInterleave,
ConfigCommonColorFormatConversion,
ConfigCommonScale,
ConfigCommonImageFilter,
ConfigCommonColorEnhancement,
ConfigCommonColorKey,
ConfigCommonColorBlend,
ConfigCommonFrameStabilisation,
ConfigCommonRotate,
ConfigCommonMirror,
ConfigCommonOutputPosition,
ConfigCommonInputCrop,
ConfigCommonOutputCrop,
ConfigCommonDigitalZoom,
ConfigCommonOpticalZoom,
ConfigCommonWhiteBalance,
ConfigCommonExposure,
ConfigCommonContrast,
ConfigCommonBrightness,
ConfigCommonBacklight,
ConfigCommonGamma,
ConfigCommonSaturation,
ConfigCommonLightness,
ConfigCommonExclusionRect,
ConfigCommonDithering,
ConfigCommonPlaneBlend,
ConfigCommonExposureValue,
ConfigCommonOutputSize,
ParamCommonExtraQuantData,
ConfigCommonFocusRegion,
ConfigCommonFocusStatus,
ConfigCommonTransitionEffect,
OtherStartUnused,
ParamOtherPortFormat,
ConfigOtherPower,
ConfigOtherStats,
TimeStartUnused,
ConfigTimeScale,
ConfigTimeClockState,
ConfigTimeActiveRefClock,
ConfigTimeCurrentMediaTime,
ConfigTimeCurrentWallTime,
ConfigTimeCurrentAudioReference,
ConfigTimeCurrentVideoReference,
ConfigTimeMediaTimeRequest,
ConfigTimeClientStartTime,
ConfigTimePosition,
ConfigTimeSeekMode
}
namespace Native {
[SimpleType]
[CCode (cname="OMX_NATIVE_DEVICETYPE", default_value="NULL")]
public struct Device {
}
[SimpleType]
[CCode (cname="OMX_NATIVE_WINDOWTYPE", default_value="NULL")]
public struct Window {
}
}
namespace Param {
[CCode (cname="OMX_PARAM_BUFFERSUPPLIERTYPE")]
public struct BufferSupplier: PortStructure {
[CCode (cname="eBufferSupplier")]
public Omx.BufferSupplier buffer_supplier;
}
public struct FormatDetail {
public Audio.PortDefinition audio;
public Video.PortDefinition video;
public Image.PortDefinition image;
public Other.PortDefinition other;
}
[CCode (cname="OMX_PARAM_PORTDEFINITIONTYPE")]
public struct PortDefinition : PortStructure {
[CCode (cname="eDir")]
public Dir dir;
[CCode (cname="nBufferCountActual")]
public uint32 buffer_count_actual;
[CCode (cname="nBufferCountMin")]
public uint32 buffer_count_min;
[CCode (cname="nBufferSize")]
public uint32 buffer_size;
[CCode (cname="bEnabled")]
public bool enabled;
[CCode (cname="bPopulated")]
public bool populated;
[CCode (cname="eDomain")]
public PortDomain domain;
public FormatDetail format;
[CCode (cname="bBuffersContiguous")]
public bool buffers_contiguous;
[CCode (cname="nBufferAlignment")]
public uint32 buffer_alignment;
}
[CCode (cname="OMX_PARAM_SENSORMODETYPE")]
public struct SensorMode: PortStructure {
[CCode (cname="nFrameRate")]
public uint32 frame_rate;
[CCode (cname="bOneShot")]
public bool one_shot;
[CCode (cname="sFrameSize")]
public FrameSize frame_size;
}
[CCode (cname="OMX_PARAM_COMPONENTROLETYPE")]
public struct ComponentRole: PortStructure {
[CCode (cname="cRole")]
public weak string role;
}
} //ns Param
namespace Config {
[CCode (cname="OMX_CONFIG_BRIGHTNESSTYPE")]
public struct Brightness: PortStructure {
[CCode (cname="nBrightness")]
public uint32 brightness;
}
[CCode (cname="OMX_CONFIG_COLORBLENDTYPE")]
public struct ColorBlend: PortStructure {
[CCode (cname="nRGBAlphaConstant")]
public uint32 rgb_alpha_constant;
[CCode (cname="eColorBlend")]
public Omx.ColorBlend color_blend;
}
[CCode (cname="OMX_CONFIG_CONTRASTTYPE")]
public struct Constrast: PortStructure {
[CCode (cname="nContrast")]
public uint32 constrast;
}
[CCode (cname="OMX_CONFIG_EXPOSURECONTROLTYPE")]
public struct ExposureControl: PortStructure {
[CCode (cname="eExposureControl")]
public Omx.ExposureControl exposure_control;
}
[CCode (cname="OMX_CONFIG_FRAMESTABTYPE")]
public struct FrameStab: PortStructure {
[CCode (cname="bStab")]
public bool stab;
}
[CCode (cname="OMX_CONFIG_MIRRORTYPE")]
public struct Mirror: PortStructure {
[CCode (cname="eMirror")]
public Omx.Mirror mirror;
}
[CCode (cname="OMX_CONFIG_POINTTYPE")]
public struct Point: PortStructure {
[CCode (cname="nX")]
public int32 x;
[CCode (cname="nY")]
public int32 y;
}
[CCode (cname="OMX_CONFIG_RECTTYPE")]
public struct Rect: PortStructure {
[CCode (cname="nLeft")]
public uint32 left;
[CCode (cname="nTop")]
public uint32 top;
[CCode (cname="nWidth")]
public uint32 width;
[CCode (cname="nHeight")]
public uint32 height;
}
[CCode (cname="OMX_CONFIG_ROTATIONTYPE")]
public struct Rotation: PortStructure {
[CCode (cname="nRotation")]
public int32 rotation;
}
[CCode (cname="OMX_CONFIG_SCALEFACTORTYPE")]
public struct ScaleFactor: PortStructure {
[CCode (cname="xWidth")]
public int32 width;
[CCode (cname="xHeight")]
public int32 height;
}
[CCode (cname="OMX_CONFIG_WHITEBALCONTROLTYPE")]
public struct WhiteBalControl: PortStructure {
[CCode (cname="eWhiteBalControl")]
public Omx.WhiteBalControl white_bal_control;
}
} //ns Config
[CCode (cname="OMX_COLORBLENDTYPE", cprefix="OMX_ColorBlend", has_type_id=false)]
public enum ColorBlend {
None,
AlphaConstant,
AlphaPerPixel,
Alternate,
And,
Or,
Invert,
}
[CCode (cname="OMX_EXPOSURECONTROLTYPE", cprefix="OMX_ExposureControl", has_type_id=false)]
public enum ExposureControl {
Off,
Auto,
Night,
BackLight,
SpotLight,
Sports,
Snow,
Beach,
LargeAperture,
SmallApperture
}
[CCode (cname="OMX_MIRRORTYPE", cprefix="OMX_Mirror", has_type_id=false)]
public enum Mirror {
None,
Vertical,
Horizontal,
Both,
}
[CCode (cname="OMX_WHITEBALCONTROLTYPE", cprefix="OMX_WhiteBalControl", has_type_id=false)]
public enum WhiteBalControl {
Off,
Auto,
SunLight,
Cloudy,
Shade,
Tungsten,
Fluorescent,
Incandescent,
Flash,
Horizon
}
[CCode (cname="OMX_FRAMESIZETYPE")]
public struct FrameSize: PortStructure {
[CCode (cname="nWidth")]
public uint32 width;
[CCode (cname="nHeight")]
public uint32 height;
}
namespace Audio {
[CCode (cname="OMX_AUDIO_CODINGTYPE", cprefix="OMX_AUDIO_Coding", has_type_id=false)]
public enum Coding {
Unused,
AutoDetect,
PCM,
ADPCM,
AMR,
GSMFR,
GSMEFR,
GSMHR,
PDCFR,
PDCEFR,
PDCHR,
TDMAFR,
TDMAEFR,
QCELP8,
QCELP13,
EVRC,
SMV,
G711,
G723,
G726,
G729,
AAC,
MP3,
SBC,
VORBIS,
WMA,
RA,
MIDI;
public string to_string() {
switch(this) {
case Unused:
return "Unused";
case AutoDetect:
return "AutoDetect";
case PCM:
return "PCM";
case ADPCM:
return "ADPCM";
case AMR:
return "AMR";
case GSMFR:
return "GSMFR";
case GSMEFR:
return "GSMEFR";
case GSMHR:
return "GSMHR";
case PDCFR:
return "PDCFR";
case PDCEFR:
return "PDCEFR";
case PDCHR:
return "PDCHR";
case TDMAFR:
return "TDMAFR";
case TDMAEFR:
return "TDMAEFR";
case QCELP8:
return "QCELP8";
case QCELP13:
return "QCELP13";
case EVRC:
return "EVRC";
case SMV:
return "SMV";
case G711:
return "G711";
case G723:
return "G723";
case G726:
return "G726";
case G729:
return "G729";
case AAC:
return "AAC";
case MP3:
return "MP3";
case SBC:
return "SBC";
case VORBIS:
return "VORBIS";
case WMA:
return "WMA";
case RA:
return "RA";
case MIDI:
return "MIDI";
default:
return "(unknown)";
}
}
}
[CCode (cname="OMX_AUDIO_PORTDEFINITIONTYPE", has_type_id="false")]
public struct PortDefinition {
[CCode (cname="cMIMEType")]
public weak string mime_type;
[CCode (cname="pNativeRender")]
public Native.Device native_render;
[CCode (cname="bFlagErrorConcealment")]
public bool flag_error_concealment;
[CCode (cname="eEncoding")]
public Coding encoding;
}
namespace Param {
[CCode (cname="OMX_AUDIO_PARAM_PORTFORMATTYPE")]
public struct PortFormat: PortStructure {
[CCode (cname="Index")]
public uint32 index;
[CCode (cname="eEncoding")]
public Coding encoding;
}
[CCode (cname="OMX_AUDIO_PARAM_PCMMODETYPE")]
public struct PcmMode: PortStructure {