FFmpeg.avformat.g.cs 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012
  1. #if UNITY_EDITOR || UNITY_STANDALONE
  2. using System;
  3. using System.Runtime.InteropServices;
  4. namespace FFmpeg.AutoGen
  5. {
  6. public unsafe partial struct AVBuffer
  7. {
  8. }
  9. public unsafe partial struct AVBufferPool
  10. {
  11. }
  12. public unsafe partial struct AVBPrint
  13. {
  14. }
  15. public unsafe partial struct AVDictionary
  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 AVIOInterruptCB
  34. {
  35. public IntPtr @callback;
  36. public void* @opaque;
  37. }
  38. public unsafe partial struct AVIODirEntry
  39. {
  40. public sbyte* @name;
  41. public int @type;
  42. public int @utf8;
  43. public long @size;
  44. public long @modification_timestamp;
  45. public long @access_timestamp;
  46. public long @status_change_timestamp;
  47. public long @user_id;
  48. public long @group_id;
  49. public long @filemode;
  50. }
  51. public unsafe partial struct AVIODirContext
  52. {
  53. public URLContext* @url_context;
  54. }
  55. public unsafe partial struct URLContext
  56. {
  57. }
  58. public unsafe partial struct AVIOContext
  59. {
  60. public AVClass* @av_class;
  61. public sbyte* @buffer;
  62. public int @buffer_size;
  63. public sbyte* @buf_ptr;
  64. public sbyte* @buf_end;
  65. public void* @opaque;
  66. public IntPtr @read_packet;
  67. public IntPtr @write_packet;
  68. public IntPtr @seek;
  69. public long @pos;
  70. public int @must_flush;
  71. public int @eof_reached;
  72. public int @write_flag;
  73. public int @max_packet_size;
  74. public int @checksum;
  75. public sbyte* @checksum_ptr;
  76. public IntPtr @update_checksum;
  77. public int @error;
  78. public IntPtr @read_pause;
  79. public IntPtr @read_seek;
  80. public int @seekable;
  81. public long @maxsize;
  82. public int @direct;
  83. public long @bytes_read;
  84. public int @seek_count;
  85. public int @writeout_count;
  86. public int @orig_buffer_size;
  87. public int @short_seek_threshold;
  88. public sbyte* @protocol_whitelist;
  89. }
  90. public unsafe partial struct AVBPrint
  91. {
  92. }
  93. public unsafe partial struct AVFormatContext
  94. {
  95. }
  96. public unsafe partial struct AVDeviceInfoList
  97. {
  98. }
  99. public unsafe partial struct AVDeviceCapabilitiesQuery
  100. {
  101. }
  102. public unsafe partial struct AVFrac
  103. {
  104. public long @val;
  105. public long @num;
  106. public long @den;
  107. }
  108. public unsafe partial struct AVCodecTag
  109. {
  110. }
  111. public unsafe partial struct AVProbeData
  112. {
  113. public sbyte* @filename;
  114. public sbyte* @buf;
  115. public int @buf_size;
  116. public sbyte* @mime_type;
  117. }
  118. public unsafe partial struct AVOutputFormat
  119. {
  120. public sbyte* @name;
  121. public sbyte* @long_name;
  122. public sbyte* @mime_type;
  123. public sbyte* @extensions;
  124. public AVCodecID @audio_codec;
  125. public AVCodecID @video_codec;
  126. public AVCodecID @subtitle_codec;
  127. public int @flags;
  128. public AVCodecTag** @codec_tag;
  129. public AVClass* @priv_class;
  130. public AVOutputFormat* @next;
  131. public int @priv_data_size;
  132. public IntPtr @write_header;
  133. public IntPtr @write_packet;
  134. public IntPtr @write_trailer;
  135. public IntPtr @interleave_packet;
  136. public IntPtr @query_codec;
  137. public IntPtr @get_output_timestamp;
  138. public IntPtr @control_message;
  139. public IntPtr @write_uncoded_frame;
  140. public IntPtr @get_device_list;
  141. public IntPtr @create_device_capabilities;
  142. public IntPtr @free_device_capabilities;
  143. public AVCodecID @data_codec;
  144. public IntPtr @init;
  145. public IntPtr @deinit;
  146. public IntPtr @check_bitstream;
  147. }
  148. public unsafe partial struct AVInputFormat
  149. {
  150. public sbyte* @name;
  151. public sbyte* @long_name;
  152. public int @flags;
  153. public sbyte* @extensions;
  154. public AVCodecTag** @codec_tag;
  155. public AVClass* @priv_class;
  156. public sbyte* @mime_type;
  157. public AVInputFormat* @next;
  158. public int @raw_codec_id;
  159. public int @priv_data_size;
  160. public IntPtr @read_probe;
  161. public IntPtr @read_header;
  162. public IntPtr @read_packet;
  163. public IntPtr @read_close;
  164. public IntPtr @read_seek;
  165. public IntPtr @read_timestamp;
  166. public IntPtr @read_play;
  167. public IntPtr @read_pause;
  168. public IntPtr @read_seek2;
  169. public IntPtr @get_device_list;
  170. public IntPtr @create_device_capabilities;
  171. public IntPtr @free_device_capabilities;
  172. }
  173. public unsafe partial struct AVIndexEntry
  174. {
  175. public long @pos;
  176. public long @timestamp;
  177. public int @flags;
  178. public int @size;
  179. public int @min_distance;
  180. }
  181. public unsafe partial struct AVStreamInternal
  182. {
  183. }
  184. public unsafe partial struct AVStream
  185. {
  186. public int @index;
  187. public int @id;
  188. public AVCodecContext* @codec;
  189. public void* @priv_data;
  190. public AVFrac @pts;
  191. public AVRational @time_base;
  192. public long @start_time;
  193. public long @duration;
  194. public long @nb_frames;
  195. public int @disposition;
  196. public AVDiscard @discard;
  197. public AVRational @sample_aspect_ratio;
  198. public AVDictionary* @metadata;
  199. public AVRational @avg_frame_rate;
  200. public AVPacket @attached_pic;
  201. public AVPacketSideData* @side_data;
  202. public int @nb_side_data;
  203. public int @event_flags;
  204. public info* @info;
  205. public int @pts_wrap_bits;
  206. public long @first_dts;
  207. public long @cur_dts;
  208. public long @last_IP_pts;
  209. public int @last_IP_duration;
  210. public int @probe_packets;
  211. public int @codec_info_nb_frames;
  212. public AVStreamParseType @need_parsing;
  213. public AVCodecParserContext* @parser;
  214. public AVPacketList* @last_in_packet_buffer;
  215. public AVProbeData @probe_data;
  216. public fixed long @pts_buffer[17];
  217. public AVIndexEntry* @index_entries;
  218. public int @nb_index_entries;
  219. public uint @index_entries_allocated_size;
  220. public AVRational @r_frame_rate;
  221. public int @stream_identifier;
  222. public long @interleaver_chunk_size;
  223. public long @interleaver_chunk_duration;
  224. public int @request_probe;
  225. public int @skip_to_keyframe;
  226. public int @skip_samples;
  227. public long @start_skip_samples;
  228. public long @first_discard_sample;
  229. public long @last_discard_sample;
  230. public int @nb_decoded_frames;
  231. public long @mux_ts_offset;
  232. public long @pts_wrap_reference;
  233. public int @pts_wrap_behavior;
  234. public int @update_initial_durations_done;
  235. public fixed long @pts_reorder_error[17];
  236. public fixed sbyte @pts_reorder_error_count[17];
  237. public long @last_dts_for_order_check;
  238. public sbyte @dts_ordered;
  239. public sbyte @dts_misordered;
  240. public int @inject_global_side_data;
  241. public sbyte* @recommended_encoder_configuration;
  242. public AVRational @display_aspect_ratio;
  243. public FFFrac* @priv_pts;
  244. public AVStreamInternal* @internal;
  245. }
  246. public unsafe partial struct FFFrac
  247. {
  248. }
  249. public unsafe partial struct AVPacketList
  250. {
  251. }
  252. public unsafe partial struct info
  253. {
  254. public long @last_dts;
  255. public long @duration_gcd;
  256. public int @duration_count;
  257. public long @rfps_duration_sum;
  258. public IntPtr @duration_error;
  259. public long @codec_info_duration;
  260. public long @codec_info_duration_fields;
  261. public int @found_decoder;
  262. public long @last_duration;
  263. public long @fps_first_dts;
  264. public int @fps_first_dts_idx;
  265. public long @fps_last_dts;
  266. public int @fps_last_dts_idx;
  267. }
  268. public unsafe partial struct AVProgram
  269. {
  270. public int @id;
  271. public int @flags;
  272. public AVDiscard @discard;
  273. public uint* @stream_index;
  274. public uint @nb_stream_indexes;
  275. public AVDictionary* @metadata;
  276. public int @program_num;
  277. public int @pmt_pid;
  278. public int @pcr_pid;
  279. public long @start_time;
  280. public long @end_time;
  281. public long @pts_wrap_reference;
  282. public int @pts_wrap_behavior;
  283. }
  284. public unsafe partial struct AVChapter
  285. {
  286. public int @id;
  287. public AVRational @time_base;
  288. public long @start;
  289. public long @end;
  290. public AVDictionary* @metadata;
  291. }
  292. public unsafe partial struct AVFormatInternal
  293. {
  294. }
  295. public unsafe partial struct AVFormatContext
  296. {
  297. public AVClass* @av_class;
  298. public AVInputFormat* @iformat;
  299. public AVOutputFormat* @oformat;
  300. public void* @priv_data;
  301. public AVIOContext* @pb;
  302. public int @ctx_flags;
  303. public uint @nb_streams;
  304. public AVStream** @streams;
  305. public fixed sbyte @filename[1024];
  306. public long @start_time;
  307. public long @duration;
  308. public long @bit_rate;
  309. public uint @packet_size;
  310. public int @max_delay;
  311. public int @flags;
  312. public long @probesize;
  313. public long @max_analyze_duration;
  314. public sbyte* @key;
  315. public int @keylen;
  316. public uint @nb_programs;
  317. public AVProgram** @programs;
  318. public AVCodecID @video_codec_id;
  319. public AVCodecID @audio_codec_id;
  320. public AVCodecID @subtitle_codec_id;
  321. public uint @max_index_size;
  322. public uint @max_picture_buffer;
  323. public uint @nb_chapters;
  324. public AVChapter** @chapters;
  325. public AVDictionary* @metadata;
  326. public long @start_time_realtime;
  327. public int @fps_probe_size;
  328. public int @error_recognition;
  329. public AVIOInterruptCB @interrupt_callback;
  330. public int @debug;
  331. public long @max_interleave_delta;
  332. public int @strict_std_compliance;
  333. public int @event_flags;
  334. public int @max_ts_probe;
  335. public int @avoid_negative_ts;
  336. public int @ts_id;
  337. public int @audio_preload;
  338. public int @max_chunk_duration;
  339. public int @max_chunk_size;
  340. public int @use_wallclock_as_timestamps;
  341. public int @avio_flags;
  342. public AVDurationEstimationMethod @duration_estimation_method;
  343. public long @skip_initial_bytes;
  344. public uint @correct_ts_overflow;
  345. public int @seek2any;
  346. public int @flush_packets;
  347. public int @probe_score;
  348. public int @format_probesize;
  349. public sbyte* @codec_whitelist;
  350. public sbyte* @format_whitelist;
  351. public AVFormatInternal* @internal;
  352. public int @io_repositioned;
  353. public AVCodec* @video_codec;
  354. public AVCodec* @audio_codec;
  355. public AVCodec* @subtitle_codec;
  356. public AVCodec* @data_codec;
  357. public int @metadata_header_padding;
  358. public void* @opaque;
  359. public IntPtr @control_message_cb;
  360. public long @output_ts_offset;
  361. public sbyte* @dump_separator;
  362. public AVCodecID @data_codec_id;
  363. public IntPtr @open_cb;
  364. public sbyte* @protocol_whitelist;
  365. public IntPtr @io_open;
  366. public IntPtr @io_close;
  367. }
  368. public unsafe partial struct AVPacketList
  369. {
  370. public AVPacket @pkt;
  371. public AVPacketList* @next;
  372. }
  373. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  374. public unsafe delegate int av_format_control_message(AVFormatContext* @s, int @type, void* @data, ulong @data_size);
  375. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  376. public unsafe delegate int AVOpenCallback(AVFormatContext* @s, AVIOContext** @pb, [MarshalAs(UnmanagedType.LPStr)] string @url, int @flags, AVIOInterruptCB* @int_cb, AVDictionary** @options);
  377. public enum AVIODirEntryType : int
  378. {
  379. @AVIO_ENTRY_UNKNOWN = 0,
  380. @AVIO_ENTRY_BLOCK_DEVICE = 1,
  381. @AVIO_ENTRY_CHARACTER_DEVICE = 2,
  382. @AVIO_ENTRY_DIRECTORY = 3,
  383. @AVIO_ENTRY_NAMED_PIPE = 4,
  384. @AVIO_ENTRY_SYMBOLIC_LINK = 5,
  385. @AVIO_ENTRY_SOCKET = 6,
  386. @AVIO_ENTRY_FILE = 7,
  387. @AVIO_ENTRY_SERVER = 8,
  388. @AVIO_ENTRY_SHARE = 9,
  389. @AVIO_ENTRY_WORKGROUP = 10,
  390. }
  391. public enum AVStreamParseType : int
  392. {
  393. @AVSTREAM_PARSE_NONE = 0,
  394. @AVSTREAM_PARSE_FULL = 1,
  395. @AVSTREAM_PARSE_HEADERS = 2,
  396. @AVSTREAM_PARSE_TIMESTAMPS = 3,
  397. @AVSTREAM_PARSE_FULL_ONCE = 4,
  398. @AVSTREAM_PARSE_FULL_RAW = 1463898624,
  399. }
  400. public enum AVDurationEstimationMethod : int
  401. {
  402. @AVFMT_DURATION_FROM_PTS = 0,
  403. @AVFMT_DURATION_FROM_STREAM = 1,
  404. @AVFMT_DURATION_FROM_BITRATE = 2,
  405. }
  406. public unsafe static partial class ffmpeg
  407. {
  408. public const int LIBAVFORMAT_VERSION_MAJOR = 57;
  409. public const int LIBAVFORMAT_VERSION_MINOR = 25;
  410. public const int LIBAVFORMAT_VERSION_MICRO = 100;
  411. public const bool FF_API_LAVF_BITEXACT = (LIBAVFORMAT_VERSION_MAJOR<58);
  412. public const bool FF_API_LAVF_FRAC = (LIBAVFORMAT_VERSION_MAJOR<58);
  413. public const bool FF_API_LAVF_CODEC_TB = (LIBAVFORMAT_VERSION_MAJOR<58);
  414. public const bool FF_API_URL_FEOF = (LIBAVFORMAT_VERSION_MAJOR<58);
  415. public const bool FF_API_LAVF_FMT_RAWPICTURE = (LIBAVFORMAT_VERSION_MAJOR<58);
  416. public const bool FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR<58);
  417. public const bool FF_API_OLD_OPEN_CALLBACKS = (LIBAVFORMAT_VERSION_MAJOR<58);
  418. public const int FF_API_R_FRAME_RATE = 1;
  419. public const int AVIO_SEEKABLE_NORMAL = 0x0001;
  420. public const int AVSEEK_SIZE = 0x10000;
  421. public const int AVSEEK_FORCE = 0x20000;
  422. public const int AVIO_FLAG_READ = 1;
  423. public const int AVIO_FLAG_WRITE = 2;
  424. public const int AVIO_FLAG_READ_WRITE = (AVIO_FLAG_READ|AVIO_FLAG_WRITE);
  425. public const int AVIO_FLAG_NONBLOCK = 8;
  426. public const int AVIO_FLAG_DIRECT = 0x8000;
  427. public const int AVPROBE_SCORE_RETRY = (AVPROBE_SCORE_MAX/4);
  428. public const int AVPROBE_SCORE_STREAM_RETRY = (AVPROBE_SCORE_MAX/4-1);
  429. public const int AVPROBE_SCORE_EXTENSION = 50;
  430. public const int AVPROBE_SCORE_MIME = 75;
  431. public const int AVPROBE_SCORE_MAX = 100;
  432. public const int AVPROBE_PADDING_SIZE = 32;
  433. public const int AVFMT_NOFILE = 0x0001;
  434. public const int AVFMT_NEEDNUMBER = 0x0002;
  435. public const int AVFMT_SHOW_IDS = 0x0008;
  436. public const int AVFMT_RAWPICTURE = 0x0020;
  437. public const int AVFMT_GLOBALHEADER = 0x0040;
  438. public const int AVFMT_NOTIMESTAMPS = 0x0080;
  439. public const int AVFMT_GENERIC_INDEX = 0x0100;
  440. public const int AVFMT_TS_DISCONT = 0x0200;
  441. public const int AVFMT_VARIABLE_FPS = 0x0400;
  442. public const int AVFMT_NODIMENSIONS = 0x0800;
  443. public const int AVFMT_NOSTREAMS = 0x1000;
  444. public const int AVFMT_NOBINSEARCH = 0x2000;
  445. public const int AVFMT_NOGENSEARCH = 0x4000;
  446. public const int AVFMT_NO_BYTE_SEEK = 0x8000;
  447. public const int AVFMT_ALLOW_FLUSH = 0x10000;
  448. public const int AVFMT_TS_NONSTRICT = 0x20000;
  449. public const int AVFMT_TS_NEGATIVE = 0x40000;
  450. public const int AVFMT_SEEK_TO_PTS = 0x4000000;
  451. public const int AVINDEX_KEYFRAME = 0x0001;
  452. public const int AV_DISPOSITION_DEFAULT = 0x0001;
  453. public const int AV_DISPOSITION_DUB = 0x0002;
  454. public const int AV_DISPOSITION_ORIGINAL = 0x0004;
  455. public const int AV_DISPOSITION_COMMENT = 0x0008;
  456. public const int AV_DISPOSITION_LYRICS = 0x0010;
  457. public const int AV_DISPOSITION_KARAOKE = 0x0020;
  458. public const int AV_DISPOSITION_FORCED = 0x0040;
  459. public const int AV_DISPOSITION_HEARING_IMPAIRED = 0x0080;
  460. public const int AV_DISPOSITION_VISUAL_IMPAIRED = 0x0100;
  461. public const int AV_DISPOSITION_CLEAN_EFFECTS = 0x0200;
  462. public const int AV_DISPOSITION_ATTACHED_PIC = 0x0400;
  463. public const int AV_DISPOSITION_CAPTIONS = 0x10000;
  464. public const int AV_DISPOSITION_DESCRIPTIONS = 0x20000;
  465. public const int AV_DISPOSITION_METADATA = 0x40000;
  466. public const int AV_PTS_WRAP_IGNORE = 0;
  467. public const int AV_PTS_WRAP_ADD_OFFSET = 1;
  468. public const int AV_PTS_WRAP_SUB_OFFSET = -1;
  469. public const int AVSTREAM_EVENT_FLAG_METADATA_UPDATED = 0x0001;
  470. public const int MAX_STD_TIMEBASES = (30*12+30+3+6);
  471. public const int MAX_REORDER_DELAY = 16;
  472. public const int AV_PROGRAM_RUNNING = 1;
  473. public const int AVFMTCTX_NOHEADER = 0x0001;
  474. public const int AVFMT_FLAG_GENPTS = 0x0001;
  475. public const int AVFMT_FLAG_IGNIDX = 0x0002;
  476. public const int AVFMT_FLAG_NONBLOCK = 0x0004;
  477. public const int AVFMT_FLAG_IGNDTS = 0x0008;
  478. public const int AVFMT_FLAG_NOFILLIN = 0x0010;
  479. public const int AVFMT_FLAG_NOPARSE = 0x0020;
  480. public const int AVFMT_FLAG_NOBUFFER = 0x0040;
  481. public const int AVFMT_FLAG_CUSTOM_IO = 0x0080;
  482. public const int AVFMT_FLAG_DISCARD_CORRUPT = 0x0100;
  483. public const int AVFMT_FLAG_FLUSH_PACKETS = 0x0200;
  484. public const int AVFMT_FLAG_BITEXACT = 0x0400;
  485. public const int AVFMT_FLAG_MP4A_LATM = 0x8000;
  486. public const int AVFMT_FLAG_SORT_DTS = 0x10000;
  487. public const int AVFMT_FLAG_PRIV_OPT = 0x20000;
  488. public const int AVFMT_FLAG_KEEP_SIDE_DATA = 0x40000;
  489. public const int AVFMT_FLAG_FAST_SEEK = 0x80000;
  490. public const int FF_FDEBUG_TS = 0x0001;
  491. public const int AVFMT_EVENT_FLAG_METADATA_UPDATED = 0x0001;
  492. public const int AVFMT_AVOID_NEG_TS_AUTO = -1;
  493. public const int AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE = 1;
  494. public const int AVFMT_AVOID_NEG_TS_MAKE_ZERO = 2;
  495. public const int AVSEEK_FLAG_BACKWARD = 1;
  496. public const int AVSEEK_FLAG_BYTE = 2;
  497. public const int AVSEEK_FLAG_ANY = 4;
  498. public const int AVSEEK_FLAG_FRAME = 8;
  499. #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
  500. private const string libavformat = "EasyMovieTexture";
  501. #else
  502. private const string libavformat = "avformat-57";
  503. #endif
  504. [DllImport(libavformat, EntryPoint = "avio_find_protocol_name", CallingConvention = CallingConvention.Cdecl)]
  505. public static extern string avio_find_protocol_name([MarshalAs(UnmanagedType.LPStr)] string @url);
  506. [DllImport(libavformat, EntryPoint = "avio_check", CallingConvention = CallingConvention.Cdecl)]
  507. public static extern int avio_check([MarshalAs(UnmanagedType.LPStr)] string @url, int @flags);
  508. [DllImport(libavformat, EntryPoint = "avpriv_io_move", CallingConvention = CallingConvention.Cdecl)]
  509. public static extern int avpriv_io_move([MarshalAs(UnmanagedType.LPStr)] string @url_src, [MarshalAs(UnmanagedType.LPStr)] string @url_dst);
  510. [DllImport(libavformat, EntryPoint = "avpriv_io_delete", CallingConvention = CallingConvention.Cdecl)]
  511. public static extern int avpriv_io_delete([MarshalAs(UnmanagedType.LPStr)] string @url);
  512. [DllImport(libavformat, EntryPoint = "avio_open_dir", CallingConvention = CallingConvention.Cdecl)]
  513. public static extern int avio_open_dir(AVIODirContext** @s, [MarshalAs(UnmanagedType.LPStr)] string @url, AVDictionary** @options);
  514. [DllImport(libavformat, EntryPoint = "avio_read_dir", CallingConvention = CallingConvention.Cdecl)]
  515. public static extern int avio_read_dir(AVIODirContext* @s, AVIODirEntry** @next);
  516. [DllImport(libavformat, EntryPoint = "avio_close_dir", CallingConvention = CallingConvention.Cdecl)]
  517. public static extern int avio_close_dir(AVIODirContext** @s);
  518. [DllImport(libavformat, EntryPoint = "avio_free_directory_entry", CallingConvention = CallingConvention.Cdecl)]
  519. public static extern void avio_free_directory_entry(AVIODirEntry** @entry);
  520. [DllImport(libavformat, EntryPoint = "avio_alloc_context", CallingConvention = CallingConvention.Cdecl)]
  521. public static extern AVIOContext* avio_alloc_context(sbyte* @buffer, int @buffer_size, int @write_flag, void* @opaque, IntPtr* @read_packet, IntPtr* @write_packet, IntPtr* @seek);
  522. [DllImport(libavformat, EntryPoint = "avio_w8", CallingConvention = CallingConvention.Cdecl)]
  523. public static extern void avio_w8(AVIOContext* @s, int @b);
  524. [DllImport(libavformat, EntryPoint = "avio_write", CallingConvention = CallingConvention.Cdecl)]
  525. public static extern void avio_write(AVIOContext* @s, sbyte* @buf, int @size);
  526. [DllImport(libavformat, EntryPoint = "avio_wl64", CallingConvention = CallingConvention.Cdecl)]
  527. public static extern void avio_wl64(AVIOContext* @s, ulong @val);
  528. [DllImport(libavformat, EntryPoint = "avio_wb64", CallingConvention = CallingConvention.Cdecl)]
  529. public static extern void avio_wb64(AVIOContext* @s, ulong @val);
  530. [DllImport(libavformat, EntryPoint = "avio_wl32", CallingConvention = CallingConvention.Cdecl)]
  531. public static extern void avio_wl32(AVIOContext* @s, uint @val);
  532. [DllImport(libavformat, EntryPoint = "avio_wb32", CallingConvention = CallingConvention.Cdecl)]
  533. public static extern void avio_wb32(AVIOContext* @s, uint @val);
  534. [DllImport(libavformat, EntryPoint = "avio_wl24", CallingConvention = CallingConvention.Cdecl)]
  535. public static extern void avio_wl24(AVIOContext* @s, uint @val);
  536. [DllImport(libavformat, EntryPoint = "avio_wb24", CallingConvention = CallingConvention.Cdecl)]
  537. public static extern void avio_wb24(AVIOContext* @s, uint @val);
  538. [DllImport(libavformat, EntryPoint = "avio_wl16", CallingConvention = CallingConvention.Cdecl)]
  539. public static extern void avio_wl16(AVIOContext* @s, uint @val);
  540. [DllImport(libavformat, EntryPoint = "avio_wb16", CallingConvention = CallingConvention.Cdecl)]
  541. public static extern void avio_wb16(AVIOContext* @s, uint @val);
  542. [DllImport(libavformat, EntryPoint = "avio_put_str", CallingConvention = CallingConvention.Cdecl)]
  543. public static extern int avio_put_str(AVIOContext* @s, [MarshalAs(UnmanagedType.LPStr)] string @str);
  544. [DllImport(libavformat, EntryPoint = "avio_put_str16le", CallingConvention = CallingConvention.Cdecl)]
  545. public static extern int avio_put_str16le(AVIOContext* @s, [MarshalAs(UnmanagedType.LPStr)] string @str);
  546. [DllImport(libavformat, EntryPoint = "avio_put_str16be", CallingConvention = CallingConvention.Cdecl)]
  547. public static extern int avio_put_str16be(AVIOContext* @s, [MarshalAs(UnmanagedType.LPStr)] string @str);
  548. [DllImport(libavformat, EntryPoint = "avio_seek", CallingConvention = CallingConvention.Cdecl)]
  549. public static extern long avio_seek(AVIOContext* @s, long @offset, int @whence);
  550. [DllImport(libavformat, EntryPoint = "avio_skip", CallingConvention = CallingConvention.Cdecl)]
  551. public static extern long avio_skip(AVIOContext* @s, long @offset);
  552. [DllImport(libavformat, EntryPoint = "avio_size", CallingConvention = CallingConvention.Cdecl)]
  553. public static extern long avio_size(AVIOContext* @s);
  554. [DllImport(libavformat, EntryPoint = "avio_feof", CallingConvention = CallingConvention.Cdecl)]
  555. public static extern int avio_feof(AVIOContext* @s);
  556. [DllImport(libavformat, EntryPoint = "url_feof", CallingConvention = CallingConvention.Cdecl)]
  557. public static extern int url_feof(AVIOContext* @s);
  558. [DllImport(libavformat, EntryPoint = "avio_printf", CallingConvention = CallingConvention.Cdecl)]
  559. public static extern int avio_printf(AVIOContext* @s, [MarshalAs(UnmanagedType.LPStr)] string @fmt);
  560. [DllImport(libavformat, EntryPoint = "avio_flush", CallingConvention = CallingConvention.Cdecl)]
  561. public static extern void avio_flush(AVIOContext* @s);
  562. [DllImport(libavformat, EntryPoint = "avio_read", CallingConvention = CallingConvention.Cdecl)]
  563. public static extern int avio_read(AVIOContext* @s, sbyte* @buf, int @size);
  564. [DllImport(libavformat, EntryPoint = "avio_r8", CallingConvention = CallingConvention.Cdecl)]
  565. public static extern int avio_r8(AVIOContext* @s);
  566. [DllImport(libavformat, EntryPoint = "avio_rl16", CallingConvention = CallingConvention.Cdecl)]
  567. public static extern uint avio_rl16(AVIOContext* @s);
  568. [DllImport(libavformat, EntryPoint = "avio_rl24", CallingConvention = CallingConvention.Cdecl)]
  569. public static extern uint avio_rl24(AVIOContext* @s);
  570. [DllImport(libavformat, EntryPoint = "avio_rl32", CallingConvention = CallingConvention.Cdecl)]
  571. public static extern uint avio_rl32(AVIOContext* @s);
  572. [DllImport(libavformat, EntryPoint = "avio_rl64", CallingConvention = CallingConvention.Cdecl)]
  573. public static extern ulong avio_rl64(AVIOContext* @s);
  574. [DllImport(libavformat, EntryPoint = "avio_rb16", CallingConvention = CallingConvention.Cdecl)]
  575. public static extern uint avio_rb16(AVIOContext* @s);
  576. [DllImport(libavformat, EntryPoint = "avio_rb24", CallingConvention = CallingConvention.Cdecl)]
  577. public static extern uint avio_rb24(AVIOContext* @s);
  578. [DllImport(libavformat, EntryPoint = "avio_rb32", CallingConvention = CallingConvention.Cdecl)]
  579. public static extern uint avio_rb32(AVIOContext* @s);
  580. [DllImport(libavformat, EntryPoint = "avio_rb64", CallingConvention = CallingConvention.Cdecl)]
  581. public static extern ulong avio_rb64(AVIOContext* @s);
  582. [DllImport(libavformat, EntryPoint = "avio_get_str", CallingConvention = CallingConvention.Cdecl)]
  583. public static extern int avio_get_str(AVIOContext* @pb, int @maxlen, IntPtr @buf, int @buflen);
  584. [DllImport(libavformat, EntryPoint = "avio_get_str16le", CallingConvention = CallingConvention.Cdecl)]
  585. public static extern int avio_get_str16le(AVIOContext* @pb, int @maxlen, IntPtr @buf, int @buflen);
  586. [DllImport(libavformat, EntryPoint = "avio_get_str16be", CallingConvention = CallingConvention.Cdecl)]
  587. public static extern int avio_get_str16be(AVIOContext* @pb, int @maxlen, IntPtr @buf, int @buflen);
  588. [DllImport(libavformat, EntryPoint = "avio_open", CallingConvention = CallingConvention.Cdecl)]
  589. public static extern int avio_open(AVIOContext** @s, [MarshalAs(UnmanagedType.LPStr)] string @url, int @flags);
  590. [DllImport(libavformat, EntryPoint = "avio_open2", CallingConvention = CallingConvention.Cdecl)]
  591. public static extern int avio_open2(AVIOContext** @s, [MarshalAs(UnmanagedType.LPStr)] string @url, int @flags, AVIOInterruptCB* @int_cb, AVDictionary** @options);
  592. [DllImport(libavformat, EntryPoint = "avio_close", CallingConvention = CallingConvention.Cdecl)]
  593. public static extern int avio_close(AVIOContext* @s);
  594. [DllImport(libavformat, EntryPoint = "avio_closep", CallingConvention = CallingConvention.Cdecl)]
  595. public static extern int avio_closep(AVIOContext** @s);
  596. [DllImport(libavformat, EntryPoint = "avio_open_dyn_buf", CallingConvention = CallingConvention.Cdecl)]
  597. public static extern int avio_open_dyn_buf(AVIOContext** @s);
  598. [DllImport(libavformat, EntryPoint = "avio_close_dyn_buf", CallingConvention = CallingConvention.Cdecl)]
  599. public static extern int avio_close_dyn_buf(AVIOContext* @s, sbyte** @pbuffer);
  600. [DllImport(libavformat, EntryPoint = "avio_enum_protocols", CallingConvention = CallingConvention.Cdecl)]
  601. public static extern string avio_enum_protocols(void** @opaque, int @output);
  602. [DllImport(libavformat, EntryPoint = "avio_pause", CallingConvention = CallingConvention.Cdecl)]
  603. public static extern int avio_pause(AVIOContext* @h, int @pause);
  604. [DllImport(libavformat, EntryPoint = "avio_seek_time", CallingConvention = CallingConvention.Cdecl)]
  605. public static extern long avio_seek_time(AVIOContext* @h, int @stream_index, long @timestamp, int @flags);
  606. [DllImport(libavformat, EntryPoint = "avio_read_to_bprint", CallingConvention = CallingConvention.Cdecl)]
  607. public static extern int avio_read_to_bprint(AVIOContext* @h, AVBPrint* @pb, ulong @max_size);
  608. [DllImport(libavformat, EntryPoint = "avio_accept", CallingConvention = CallingConvention.Cdecl)]
  609. public static extern int avio_accept(AVIOContext* @s, AVIOContext** @c);
  610. [DllImport(libavformat, EntryPoint = "avio_handshake", CallingConvention = CallingConvention.Cdecl)]
  611. public static extern int avio_handshake(AVIOContext* @c);
  612. [DllImport(libavformat, EntryPoint = "av_get_packet", CallingConvention = CallingConvention.Cdecl)]
  613. public static extern int av_get_packet(AVIOContext* @s, AVPacket* @pkt, int @size);
  614. [DllImport(libavformat, EntryPoint = "av_append_packet", CallingConvention = CallingConvention.Cdecl)]
  615. public static extern int av_append_packet(AVIOContext* @s, AVPacket* @pkt, int @size);
  616. [DllImport(libavformat, EntryPoint = "av_stream_get_r_frame_rate", CallingConvention = CallingConvention.Cdecl)]
  617. public static extern AVRational av_stream_get_r_frame_rate(AVStream* @s);
  618. [DllImport(libavformat, EntryPoint = "av_stream_set_r_frame_rate", CallingConvention = CallingConvention.Cdecl)]
  619. public static extern void av_stream_set_r_frame_rate(AVStream* @s, AVRational @r);
  620. [DllImport(libavformat, EntryPoint = "av_stream_get_parser", CallingConvention = CallingConvention.Cdecl)]
  621. public static extern AVCodecParserContext* av_stream_get_parser(AVStream* @s);
  622. [DllImport(libavformat, EntryPoint = "av_stream_get_recommended_encoder_configuration", CallingConvention = CallingConvention.Cdecl)]
  623. public static extern sbyte* av_stream_get_recommended_encoder_configuration(AVStream* @s);
  624. [DllImport(libavformat, EntryPoint = "av_stream_set_recommended_encoder_configuration", CallingConvention = CallingConvention.Cdecl)]
  625. public static extern void av_stream_set_recommended_encoder_configuration(AVStream* @s, IntPtr @configuration);
  626. [DllImport(libavformat, EntryPoint = "av_stream_get_end_pts", CallingConvention = CallingConvention.Cdecl)]
  627. public static extern long av_stream_get_end_pts(AVStream* @st);
  628. [DllImport(libavformat, EntryPoint = "av_format_get_probe_score", CallingConvention = CallingConvention.Cdecl)]
  629. public static extern int av_format_get_probe_score(AVFormatContext* @s);
  630. [DllImport(libavformat, EntryPoint = "av_format_get_video_codec", CallingConvention = CallingConvention.Cdecl)]
  631. public static extern AVCodec* av_format_get_video_codec(AVFormatContext* @s);
  632. [DllImport(libavformat, EntryPoint = "av_format_set_video_codec", CallingConvention = CallingConvention.Cdecl)]
  633. public static extern void av_format_set_video_codec(AVFormatContext* @s, AVCodec* @c);
  634. [DllImport(libavformat, EntryPoint = "av_format_get_audio_codec", CallingConvention = CallingConvention.Cdecl)]
  635. public static extern AVCodec* av_format_get_audio_codec(AVFormatContext* @s);
  636. [DllImport(libavformat, EntryPoint = "av_format_set_audio_codec", CallingConvention = CallingConvention.Cdecl)]
  637. public static extern void av_format_set_audio_codec(AVFormatContext* @s, AVCodec* @c);
  638. [DllImport(libavformat, EntryPoint = "av_format_get_subtitle_codec", CallingConvention = CallingConvention.Cdecl)]
  639. public static extern AVCodec* av_format_get_subtitle_codec(AVFormatContext* @s);
  640. [DllImport(libavformat, EntryPoint = "av_format_set_subtitle_codec", CallingConvention = CallingConvention.Cdecl)]
  641. public static extern void av_format_set_subtitle_codec(AVFormatContext* @s, AVCodec* @c);
  642. [DllImport(libavformat, EntryPoint = "av_format_get_data_codec", CallingConvention = CallingConvention.Cdecl)]
  643. public static extern AVCodec* av_format_get_data_codec(AVFormatContext* @s);
  644. [DllImport(libavformat, EntryPoint = "av_format_set_data_codec", CallingConvention = CallingConvention.Cdecl)]
  645. public static extern void av_format_set_data_codec(AVFormatContext* @s, AVCodec* @c);
  646. [DllImport(libavformat, EntryPoint = "av_format_get_metadata_header_padding", CallingConvention = CallingConvention.Cdecl)]
  647. public static extern int av_format_get_metadata_header_padding(AVFormatContext* @s);
  648. [DllImport(libavformat, EntryPoint = "av_format_set_metadata_header_padding", CallingConvention = CallingConvention.Cdecl)]
  649. public static extern void av_format_set_metadata_header_padding(AVFormatContext* @s, int @c);
  650. [DllImport(libavformat, EntryPoint = "av_format_get_opaque", CallingConvention = CallingConvention.Cdecl)]
  651. public static extern void* av_format_get_opaque(AVFormatContext* @s);
  652. [DllImport(libavformat, EntryPoint = "av_format_set_opaque", CallingConvention = CallingConvention.Cdecl)]
  653. public static extern void av_format_set_opaque(AVFormatContext* @s, void* @opaque);
  654. [DllImport(libavformat, EntryPoint = "av_format_get_control_message_cb", CallingConvention = CallingConvention.Cdecl)]
  655. public static extern av_format_control_message av_format_get_control_message_cb(AVFormatContext* @s);
  656. [DllImport(libavformat, EntryPoint = "av_format_set_control_message_cb", CallingConvention = CallingConvention.Cdecl)]
  657. public static extern void av_format_set_control_message_cb(AVFormatContext* @s, av_format_control_message @callback);
  658. [DllImport(libavformat, EntryPoint = "av_format_get_open_cb", CallingConvention = CallingConvention.Cdecl)]
  659. public static extern AVOpenCallback av_format_get_open_cb(AVFormatContext* @s);
  660. [DllImport(libavformat, EntryPoint = "av_format_set_open_cb", CallingConvention = CallingConvention.Cdecl)]
  661. public static extern void av_format_set_open_cb(AVFormatContext* @s, AVOpenCallback @callback);
  662. [DllImport(libavformat, EntryPoint = "av_format_inject_global_side_data", CallingConvention = CallingConvention.Cdecl)]
  663. public static extern void av_format_inject_global_side_data(AVFormatContext* @s);
  664. [DllImport(libavformat, EntryPoint = "av_fmt_ctx_get_duration_estimation_method", CallingConvention = CallingConvention.Cdecl)]
  665. public static extern AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(AVFormatContext* @ctx);
  666. [DllImport(libavformat, EntryPoint = "avformat_version", CallingConvention = CallingConvention.Cdecl)]
  667. public static extern uint avformat_version();
  668. [DllImport(libavformat, EntryPoint = "avformat_configuration", CallingConvention = CallingConvention.Cdecl)]
  669. public static extern string avformat_configuration();
  670. [DllImport(libavformat, EntryPoint = "avformat_license", CallingConvention = CallingConvention.Cdecl)]
  671. public static extern string avformat_license();
  672. [DllImport(libavformat, EntryPoint = "av_register_all", CallingConvention = CallingConvention.Cdecl)]
  673. public static extern void av_register_all();
  674. [DllImport(libavformat, EntryPoint = "av_register_input_format", CallingConvention = CallingConvention.Cdecl)]
  675. public static extern void av_register_input_format(AVInputFormat* @format);
  676. [DllImport(libavformat, EntryPoint = "av_register_output_format", CallingConvention = CallingConvention.Cdecl)]
  677. public static extern void av_register_output_format(AVOutputFormat* @format);
  678. [DllImport(libavformat, EntryPoint = "avformat_network_init", CallingConvention = CallingConvention.Cdecl)]
  679. public static extern int avformat_network_init();
  680. [DllImport(libavformat, EntryPoint = "avformat_network_deinit", CallingConvention = CallingConvention.Cdecl)]
  681. public static extern int avformat_network_deinit();
  682. [DllImport(libavformat, EntryPoint = "av_iformat_next", CallingConvention = CallingConvention.Cdecl)]
  683. public static extern AVInputFormat* av_iformat_next(AVInputFormat* @f);
  684. [DllImport(libavformat, EntryPoint = "av_oformat_next", CallingConvention = CallingConvention.Cdecl)]
  685. public static extern AVOutputFormat* av_oformat_next(AVOutputFormat* @f);
  686. [DllImport(libavformat, EntryPoint = "avformat_alloc_context", CallingConvention = CallingConvention.Cdecl)]
  687. public static extern AVFormatContext* avformat_alloc_context();
  688. [DllImport(libavformat, EntryPoint = "avformat_free_context", CallingConvention = CallingConvention.Cdecl)]
  689. public static extern void avformat_free_context(AVFormatContext* @s);
  690. [DllImport(libavformat, EntryPoint = "avformat_get_class", CallingConvention = CallingConvention.Cdecl)]
  691. public static extern AVClass* avformat_get_class();
  692. [DllImport(libavformat, EntryPoint = "avformat_new_stream", CallingConvention = CallingConvention.Cdecl)]
  693. public static extern AVStream* avformat_new_stream(AVFormatContext* @s, AVCodec* @c);
  694. [DllImport(libavformat, EntryPoint = "av_stream_new_side_data", CallingConvention = CallingConvention.Cdecl)]
  695. public static extern sbyte* av_stream_new_side_data(AVStream* @stream, AVPacketSideDataType @type, int @size);
  696. [DllImport(libavformat, EntryPoint = "av_stream_get_side_data", CallingConvention = CallingConvention.Cdecl)]
  697. public static extern sbyte* av_stream_get_side_data(AVStream* @stream, AVPacketSideDataType @type, int* @size);
  698. [DllImport(libavformat, EntryPoint = "av_new_program", CallingConvention = CallingConvention.Cdecl)]
  699. public static extern AVProgram* av_new_program(AVFormatContext* @s, int @id);
  700. [DllImport(libavformat, EntryPoint = "avformat_alloc_output_context2", CallingConvention = CallingConvention.Cdecl)]
  701. public static extern int avformat_alloc_output_context2(AVFormatContext** @ctx, AVOutputFormat* @oformat, [MarshalAs(UnmanagedType.LPStr)] string @format_name, [MarshalAs(UnmanagedType.LPStr)] string @filename);
  702. [DllImport(libavformat, EntryPoint = "av_find_input_format", CallingConvention = CallingConvention.Cdecl)]
  703. public static extern AVInputFormat* av_find_input_format([MarshalAs(UnmanagedType.LPStr)] string @short_name);
  704. [DllImport(libavformat, EntryPoint = "av_probe_input_format", CallingConvention = CallingConvention.Cdecl)]
  705. public static extern AVInputFormat* av_probe_input_format(AVProbeData* @pd, int @is_opened);
  706. [DllImport(libavformat, EntryPoint = "av_probe_input_format2", CallingConvention = CallingConvention.Cdecl)]
  707. public static extern AVInputFormat* av_probe_input_format2(AVProbeData* @pd, int @is_opened, int* @score_max);
  708. [DllImport(libavformat, EntryPoint = "av_probe_input_format3", CallingConvention = CallingConvention.Cdecl)]
  709. public static extern AVInputFormat* av_probe_input_format3(AVProbeData* @pd, int @is_opened, int* @score_ret);
  710. [DllImport(libavformat, EntryPoint = "av_probe_input_buffer2", CallingConvention = CallingConvention.Cdecl)]
  711. public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat** @fmt, [MarshalAs(UnmanagedType.LPStr)] string @url, void* @logctx, uint @offset, uint @max_probe_size);
  712. [DllImport(libavformat, EntryPoint = "av_probe_input_buffer", CallingConvention = CallingConvention.Cdecl)]
  713. public static extern int av_probe_input_buffer(AVIOContext* @pb, AVInputFormat** @fmt, [MarshalAs(UnmanagedType.LPStr)] string @url, void* @logctx, uint @offset, uint @max_probe_size);
  714. [DllImport(libavformat, EntryPoint = "avformat_open_input", CallingConvention = CallingConvention.Cdecl)]
  715. public static extern int avformat_open_input(AVFormatContext** @ps, [MarshalAs(UnmanagedType.LPStr)] string @url, AVInputFormat* @fmt, AVDictionary** @options);
  716. [DllImport(libavformat, EntryPoint = "av_demuxer_open", CallingConvention = CallingConvention.Cdecl)]
  717. public static extern int av_demuxer_open(AVFormatContext* @ic);
  718. [DllImport(libavformat, EntryPoint = "avformat_find_stream_info", CallingConvention = CallingConvention.Cdecl)]
  719. public static extern int avformat_find_stream_info(AVFormatContext* @ic, AVDictionary** @options);
  720. [DllImport(libavformat, EntryPoint = "av_find_program_from_stream", CallingConvention = CallingConvention.Cdecl)]
  721. public static extern AVProgram* av_find_program_from_stream(AVFormatContext* @ic, AVProgram* @last, int @s);
  722. [DllImport(libavformat, EntryPoint = "av_program_add_stream_index", CallingConvention = CallingConvention.Cdecl)]
  723. public static extern void av_program_add_stream_index(AVFormatContext* @ac, int @progid, uint @idx);
  724. [DllImport(libavformat, EntryPoint = "av_find_best_stream", CallingConvention = CallingConvention.Cdecl)]
  725. public static extern int av_find_best_stream(AVFormatContext* @ic, AVMediaType @type, int @wanted_stream_nb, int @related_stream, AVCodec** @decoder_ret, int @flags);
  726. [DllImport(libavformat, EntryPoint = "av_read_frame", CallingConvention = CallingConvention.Cdecl)]
  727. public static extern int av_read_frame(AVFormatContext* @s, AVPacket* @pkt);
  728. [DllImport(libavformat, EntryPoint = "av_seek_frame", CallingConvention = CallingConvention.Cdecl)]
  729. public static extern int av_seek_frame(AVFormatContext* @s, int @stream_index, long @timestamp, int @flags);
  730. [DllImport(libavformat, EntryPoint = "avformat_seek_file", CallingConvention = CallingConvention.Cdecl)]
  731. public static extern int avformat_seek_file(AVFormatContext* @s, int @stream_index, long @min_ts, long @ts, long @max_ts, int @flags);
  732. [DllImport(libavformat, EntryPoint = "avformat_flush", CallingConvention = CallingConvention.Cdecl)]
  733. public static extern int avformat_flush(AVFormatContext* @s);
  734. [DllImport(libavformat, EntryPoint = "av_read_play", CallingConvention = CallingConvention.Cdecl)]
  735. public static extern int av_read_play(AVFormatContext* @s);
  736. [DllImport(libavformat, EntryPoint = "av_read_pause", CallingConvention = CallingConvention.Cdecl)]
  737. public static extern int av_read_pause(AVFormatContext* @s);
  738. [DllImport(libavformat, EntryPoint = "avformat_close_input", CallingConvention = CallingConvention.Cdecl)]
  739. public static extern void avformat_close_input(AVFormatContext** @s);
  740. [DllImport(libavformat, EntryPoint = "avformat_write_header", CallingConvention = CallingConvention.Cdecl)]
  741. public static extern int avformat_write_header(AVFormatContext* @s, AVDictionary** @options);
  742. [DllImport(libavformat, EntryPoint = "av_write_frame", CallingConvention = CallingConvention.Cdecl)]
  743. public static extern int av_write_frame(AVFormatContext* @s, AVPacket* @pkt);
  744. [DllImport(libavformat, EntryPoint = "av_interleaved_write_frame", CallingConvention = CallingConvention.Cdecl)]
  745. public static extern int av_interleaved_write_frame(AVFormatContext* @s, AVPacket* @pkt);
  746. [DllImport(libavformat, EntryPoint = "av_write_uncoded_frame", CallingConvention = CallingConvention.Cdecl)]
  747. public static extern int av_write_uncoded_frame(AVFormatContext* @s, int @stream_index, AVFrame* @frame);
  748. [DllImport(libavformat, EntryPoint = "av_interleaved_write_uncoded_frame", CallingConvention = CallingConvention.Cdecl)]
  749. public static extern int av_interleaved_write_uncoded_frame(AVFormatContext* @s, int @stream_index, AVFrame* @frame);
  750. [DllImport(libavformat, EntryPoint = "av_write_uncoded_frame_query", CallingConvention = CallingConvention.Cdecl)]
  751. public static extern int av_write_uncoded_frame_query(AVFormatContext* @s, int @stream_index);
  752. [DllImport(libavformat, EntryPoint = "av_write_trailer", CallingConvention = CallingConvention.Cdecl)]
  753. public static extern int av_write_trailer(AVFormatContext* @s);
  754. [DllImport(libavformat, EntryPoint = "av_guess_format", CallingConvention = CallingConvention.Cdecl)]
  755. public static extern AVOutputFormat* av_guess_format([MarshalAs(UnmanagedType.LPStr)] string @short_name, [MarshalAs(UnmanagedType.LPStr)] string @filename, [MarshalAs(UnmanagedType.LPStr)] string @mime_type);
  756. [DllImport(libavformat, EntryPoint = "av_guess_codec", CallingConvention = CallingConvention.Cdecl)]
  757. public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, [MarshalAs(UnmanagedType.LPStr)] string @short_name, [MarshalAs(UnmanagedType.LPStr)] string @filename, [MarshalAs(UnmanagedType.LPStr)] string @mime_type, AVMediaType @type);
  758. [DllImport(libavformat, EntryPoint = "av_get_output_timestamp", CallingConvention = CallingConvention.Cdecl)]
  759. public static extern int av_get_output_timestamp(AVFormatContext* @s, int @stream, long* @dts, long* @wall);
  760. [DllImport(libavformat, EntryPoint = "av_hex_dump", CallingConvention = CallingConvention.Cdecl)]
  761. public static extern void av_hex_dump(_iobuf* @f, sbyte* @buf, int @size);
  762. [DllImport(libavformat, EntryPoint = "av_hex_dump_log", CallingConvention = CallingConvention.Cdecl)]
  763. public static extern void av_hex_dump_log(void* @avcl, int @level, sbyte* @buf, int @size);
  764. [DllImport(libavformat, EntryPoint = "av_pkt_dump2", CallingConvention = CallingConvention.Cdecl)]
  765. public static extern void av_pkt_dump2(_iobuf* @f, AVPacket* @pkt, int @dump_payload, AVStream* @st);
  766. [DllImport(libavformat, EntryPoint = "av_pkt_dump_log2", CallingConvention = CallingConvention.Cdecl)]
  767. public static extern void av_pkt_dump_log2(void* @avcl, int @level, AVPacket* @pkt, int @dump_payload, AVStream* @st);
  768. [DllImport(libavformat, EntryPoint = "av_codec_get_id", CallingConvention = CallingConvention.Cdecl)]
  769. public static extern AVCodecID av_codec_get_id(AVCodecTag** @tags, uint @tag);
  770. [DllImport(libavformat, EntryPoint = "av_codec_get_tag", CallingConvention = CallingConvention.Cdecl)]
  771. public static extern uint av_codec_get_tag(AVCodecTag** @tags, AVCodecID @id);
  772. [DllImport(libavformat, EntryPoint = "av_codec_get_tag2", CallingConvention = CallingConvention.Cdecl)]
  773. public static extern int av_codec_get_tag2(AVCodecTag** @tags, AVCodecID @id, uint* @tag);
  774. [DllImport(libavformat, EntryPoint = "av_find_default_stream_index", CallingConvention = CallingConvention.Cdecl)]
  775. public static extern int av_find_default_stream_index(AVFormatContext* @s);
  776. [DllImport(libavformat, EntryPoint = "av_index_search_timestamp", CallingConvention = CallingConvention.Cdecl)]
  777. public static extern int av_index_search_timestamp(AVStream* @st, long @timestamp, int @flags);
  778. [DllImport(libavformat, EntryPoint = "av_add_index_entry", CallingConvention = CallingConvention.Cdecl)]
  779. public static extern int av_add_index_entry(AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags);
  780. [DllImport(libavformat, EntryPoint = "av_url_split", CallingConvention = CallingConvention.Cdecl)]
  781. public static extern void av_url_split(IntPtr @proto, int @proto_size, IntPtr @authorization, int @authorization_size, IntPtr @hostname, int @hostname_size, int* @port_ptr, IntPtr @path, int @path_size, [MarshalAs(UnmanagedType.LPStr)] string @url);
  782. [DllImport(libavformat, EntryPoint = "av_dump_format", CallingConvention = CallingConvention.Cdecl)]
  783. public static extern void av_dump_format(AVFormatContext* @ic, int @index, [MarshalAs(UnmanagedType.LPStr)] string @url, int @is_output);
  784. [DllImport(libavformat, EntryPoint = "av_get_frame_filename", CallingConvention = CallingConvention.Cdecl)]
  785. public static extern int av_get_frame_filename(IntPtr @buf, int @buf_size, [MarshalAs(UnmanagedType.LPStr)] string @path, int @number);
  786. [DllImport(libavformat, EntryPoint = "av_filename_number_test", CallingConvention = CallingConvention.Cdecl)]
  787. public static extern int av_filename_number_test([MarshalAs(UnmanagedType.LPStr)] string @filename);
  788. [DllImport(libavformat, EntryPoint = "av_sdp_create", CallingConvention = CallingConvention.Cdecl)]
  789. public static extern int av_sdp_create(AVFormatContext** @ac, int @n_files, IntPtr @buf, int @size);
  790. [DllImport(libavformat, EntryPoint = "av_match_ext", CallingConvention = CallingConvention.Cdecl)]
  791. public static extern int av_match_ext([MarshalAs(UnmanagedType.LPStr)] string @filename, [MarshalAs(UnmanagedType.LPStr)] string @extensions);
  792. [DllImport(libavformat, EntryPoint = "avformat_query_codec", CallingConvention = CallingConvention.Cdecl)]
  793. public static extern int avformat_query_codec(AVOutputFormat* @ofmt, AVCodecID @codec_id, int @std_compliance);
  794. [DllImport(libavformat, EntryPoint = "avformat_get_riff_video_tags", CallingConvention = CallingConvention.Cdecl)]
  795. public static extern AVCodecTag* avformat_get_riff_video_tags();
  796. [DllImport(libavformat, EntryPoint = "avformat_get_riff_audio_tags", CallingConvention = CallingConvention.Cdecl)]
  797. public static extern AVCodecTag* avformat_get_riff_audio_tags();
  798. [DllImport(libavformat, EntryPoint = "avformat_get_mov_video_tags", CallingConvention = CallingConvention.Cdecl)]
  799. public static extern AVCodecTag* avformat_get_mov_video_tags();
  800. [DllImport(libavformat, EntryPoint = "avformat_get_mov_audio_tags", CallingConvention = CallingConvention.Cdecl)]
  801. public static extern AVCodecTag* avformat_get_mov_audio_tags();
  802. [DllImport(libavformat, EntryPoint = "av_guess_sample_aspect_ratio", CallingConvention = CallingConvention.Cdecl)]
  803. public static extern AVRational av_guess_sample_aspect_ratio(AVFormatContext* @format, AVStream* @stream, AVFrame* @frame);
  804. [DllImport(libavformat, EntryPoint = "av_guess_frame_rate", CallingConvention = CallingConvention.Cdecl)]
  805. public static extern AVRational av_guess_frame_rate(AVFormatContext* @ctx, AVStream* @stream, AVFrame* @frame);
  806. [DllImport(libavformat, EntryPoint = "avformat_match_stream_specifier", CallingConvention = CallingConvention.Cdecl)]
  807. public static extern int avformat_match_stream_specifier(AVFormatContext* @s, AVStream* @st, [MarshalAs(UnmanagedType.LPStr)] string @spec);
  808. [DllImport(libavformat, EntryPoint = "avformat_queue_attached_pictures", CallingConvention = CallingConvention.Cdecl)]
  809. public static extern int avformat_queue_attached_pictures(AVFormatContext* @s);
  810. [DllImport(libavformat, EntryPoint = "av_apply_bitstream_filters", CallingConvention = CallingConvention.Cdecl)]
  811. public static extern int av_apply_bitstream_filters(AVCodecContext* @codec, AVPacket* @pkt, AVBitStreamFilterContext* @bsfc);
  812. }
  813. }
  814. #endif