FFmpeg.avdevice.g.cs 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. #if UNITY_EDITOR || UNITY_STANDALONE
  2. using System;
  3. using System.Runtime.InteropServices;
  4. namespace FFmpeg.AutoGen
  5. {
  6. public unsafe partial struct AVDictionary
  7. {
  8. }
  9. public unsafe partial struct AVBuffer
  10. {
  11. }
  12. public unsafe partial struct AVBufferPool
  13. {
  14. }
  15. public unsafe partial struct AVBPrint
  16. {
  17. }
  18. public unsafe partial struct AVCodecInternal
  19. {
  20. }
  21. public unsafe partial struct AVCodecDefault
  22. {
  23. }
  24. public unsafe partial struct MpegEncContext
  25. {
  26. }
  27. public unsafe partial struct ReSampleContext
  28. {
  29. }
  30. public unsafe partial struct AVResampleContext
  31. {
  32. }
  33. public unsafe partial struct AVBPrint
  34. {
  35. }
  36. public unsafe partial struct AVDeviceInfoList
  37. {
  38. }
  39. public unsafe partial struct AVDeviceCapabilitiesQuery
  40. {
  41. }
  42. public unsafe partial struct AVCodecTag
  43. {
  44. }
  45. public unsafe partial struct AVStreamInternal
  46. {
  47. }
  48. public unsafe partial struct AVFormatInternal
  49. {
  50. }
  51. public unsafe partial struct AVDeviceRect
  52. {
  53. public int @x;
  54. public int @y;
  55. public int @width;
  56. public int @height;
  57. }
  58. public unsafe partial struct AVDeviceCapabilitiesQuery
  59. {
  60. public AVClass* @av_class;
  61. public AVFormatContext* @device_context;
  62. public AVCodecID @codec;
  63. public AVSampleFormat @sample_format;
  64. public AVPixelFormat @pixel_format;
  65. public int @sample_rate;
  66. public int @channels;
  67. public long @channel_layout;
  68. public int @window_width;
  69. public int @window_height;
  70. public int @frame_width;
  71. public int @frame_height;
  72. public AVRational @fps;
  73. }
  74. public unsafe partial struct AVDeviceInfo
  75. {
  76. public sbyte* @device_name;
  77. public sbyte* @device_description;
  78. }
  79. public unsafe partial struct AVDeviceInfoList
  80. {
  81. public AVDeviceInfo** @devices;
  82. public int @nb_devices;
  83. public int @default_device;
  84. }
  85. public enum AVAppToDevMessageType : int
  86. {
  87. @AV_APP_TO_DEV_NONE = 1313820229,
  88. @AV_APP_TO_DEV_WINDOW_SIZE = 1195724621,
  89. @AV_APP_TO_DEV_WINDOW_REPAINT = 1380274241,
  90. @AV_APP_TO_DEV_PAUSE = 1346458912,
  91. @AV_APP_TO_DEV_PLAY = 1347174745,
  92. @AV_APP_TO_DEV_TOGGLE_PAUSE = 1346458964,
  93. @AV_APP_TO_DEV_SET_VOLUME = 1398165324,
  94. @AV_APP_TO_DEV_MUTE = 541939028,
  95. @AV_APP_TO_DEV_UNMUTE = 1431131476,
  96. @AV_APP_TO_DEV_TOGGLE_MUTE = 1414354260,
  97. @AV_APP_TO_DEV_GET_VOLUME = 1196838732,
  98. @AV_APP_TO_DEV_GET_MUTE = 1196250452,
  99. }
  100. public enum AVDevToAppMessageType : int
  101. {
  102. @AV_DEV_TO_APP_NONE = 1313820229,
  103. @AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = 1111708229,
  104. @AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = 1112560197,
  105. @AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = 1111771475,
  106. @AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = 1111770451,
  107. @AV_DEV_TO_APP_BUFFER_OVERFLOW = 1112491596,
  108. @AV_DEV_TO_APP_BUFFER_UNDERFLOW = 1112884812,
  109. @AV_DEV_TO_APP_BUFFER_READABLE = 1112687648,
  110. @AV_DEV_TO_APP_BUFFER_WRITABLE = 1113018912,
  111. @AV_DEV_TO_APP_MUTE_STATE_CHANGED = 1129141588,
  112. @AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED = 1129729868,
  113. }
  114. public unsafe static partial class ffmpeg
  115. {
  116. public const int LIBAVDEVICE_VERSION_MAJOR = 57;
  117. public const int LIBAVDEVICE_VERSION_MINOR = 0;
  118. public const int LIBAVDEVICE_VERSION_MICRO = 101;
  119. private const string libavdevice = "avdevice-57";
  120. [DllImport(libavdevice, EntryPoint = "avdevice_version", CallingConvention = CallingConvention.Cdecl)]
  121. public static extern uint avdevice_version();
  122. [DllImport(libavdevice, EntryPoint = "avdevice_configuration", CallingConvention = CallingConvention.Cdecl)]
  123. public static extern string avdevice_configuration();
  124. [DllImport(libavdevice, EntryPoint = "avdevice_license", CallingConvention = CallingConvention.Cdecl)]
  125. public static extern string avdevice_license();
  126. [DllImport(libavdevice, EntryPoint = "avdevice_register_all", CallingConvention = CallingConvention.Cdecl)]
  127. public static extern void avdevice_register_all();
  128. [DllImport(libavdevice, EntryPoint = "av_input_audio_device_next", CallingConvention = CallingConvention.Cdecl)]
  129. public static extern AVInputFormat* av_input_audio_device_next(AVInputFormat* @d);
  130. [DllImport(libavdevice, EntryPoint = "av_input_video_device_next", CallingConvention = CallingConvention.Cdecl)]
  131. public static extern AVInputFormat* av_input_video_device_next(AVInputFormat* @d);
  132. [DllImport(libavdevice, EntryPoint = "av_output_audio_device_next", CallingConvention = CallingConvention.Cdecl)]
  133. public static extern AVOutputFormat* av_output_audio_device_next(AVOutputFormat* @d);
  134. [DllImport(libavdevice, EntryPoint = "av_output_video_device_next", CallingConvention = CallingConvention.Cdecl)]
  135. public static extern AVOutputFormat* av_output_video_device_next(AVOutputFormat* @d);
  136. [DllImport(libavdevice, EntryPoint = "avdevice_app_to_dev_control_message", CallingConvention = CallingConvention.Cdecl)]
  137. public static extern int avdevice_app_to_dev_control_message(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size);
  138. [DllImport(libavdevice, EntryPoint = "avdevice_dev_to_app_control_message", CallingConvention = CallingConvention.Cdecl)]
  139. public static extern int avdevice_dev_to_app_control_message(AVFormatContext* @s, AVDevToAppMessageType @type, void* @data, ulong @data_size);
  140. [DllImport(libavdevice, EntryPoint = "avdevice_capabilities_create", CallingConvention = CallingConvention.Cdecl)]
  141. public static extern int avdevice_capabilities_create(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options);
  142. [DllImport(libavdevice, EntryPoint = "avdevice_capabilities_free", CallingConvention = CallingConvention.Cdecl)]
  143. public static extern void avdevice_capabilities_free(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s);
  144. [DllImport(libavdevice, EntryPoint = "avdevice_list_devices", CallingConvention = CallingConvention.Cdecl)]
  145. public static extern int avdevice_list_devices(AVFormatContext* @s, AVDeviceInfoList** @device_list);
  146. [DllImport(libavdevice, EntryPoint = "avdevice_free_list_devices", CallingConvention = CallingConvention.Cdecl)]
  147. public static extern void avdevice_free_list_devices(AVDeviceInfoList** @device_list);
  148. [DllImport(libavdevice, EntryPoint = "avdevice_list_input_sources", CallingConvention = CallingConvention.Cdecl)]
  149. public static extern int avdevice_list_input_sources(AVInputFormat* @device, [MarshalAs(UnmanagedType.LPStr)] string @device_name, AVDictionary* @device_options, AVDeviceInfoList** @device_list);
  150. [DllImport(libavdevice, EntryPoint = "avdevice_list_output_sinks", CallingConvention = CallingConvention.Cdecl)]
  151. public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, [MarshalAs(UnmanagedType.LPStr)] string @device_name, AVDictionary* @device_options, AVDeviceInfoList** @device_list);
  152. }
  153. }
  154. #endif