From e7c92c0115d3780bcbac06affcd9044f472538ca Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Thu, 5 Sep 2024 10:26:52 +0200 Subject: [PATCH] Moved #cgo directives to a unique file --- astiav.go | 4 ++++ bit_stream_filter.go | 1 - bit_stream_filter_context.go | 1 - buffersink_flag.go | 1 - buffersrc_flag.go | 1 - bytes.go | 1 - channel_layout.go | 1 - chroma_location.go | 1 - class.go | 1 - class_category.go | 1 - codec.go | 1 - codec_context.go | 1 - codec_context_flag.go | 1 - codec_hardware_config.go | 1 - codec_hardware_config_method_flag.go | 1 - codec_id.go | 1 - codec_parameters.go | 1 - color_primaries.go | 1 - color_range.go | 1 - color_space.go | 1 - color_transfer_characteristic.go | 1 - device.go | 1 - dictionary.go | 1 - dictionary_entry.go | 1 - dictionary_flag.go | 1 - display_matrix.go | 1 - error.go | 1 - filter.go | 1 - filter_command_flag.go | 1 - filter_context.go | 1 - filter_graph.go | 1 - filter_in_out.go | 1 - filter_link.go | 1 - format_context.go | 1 - format_context_ctx_flag.go | 1 - format_context_flag.go | 1 - format_event_flag.go | 1 - frame.go | 1 - frame_data.go | 1 - frame_side_data.go | 1 - frame_side_data_type.go | 1 - hardware_device_context.go | 1 - hardware_device_type.go | 1 - input_format.go | 1 - int_read_write.go | 1 - io_context.go | 1 - io_context_flag.go | 1 - io_format_flag.go | 1 - io_interrupter.go | 1 - level.go | 1 - log.go | 1 - mathematics.go | 1 - media_type.go | 1 - output_format.go | 1 - packet.go | 1 - packet_flag.go | 1 - packet_side_data.go | 1 - packet_side_data_type.go | 1 - picture_type.go | 1 - pixel_format.go | 1 - profile.go | 1 - program.go | 1 - rational.go | 1 - rounding.go | 1 - sample_format.go | 1 - seek_flag.go | 1 - software_scale_context.go | 1 - software_scale_context_flag.go | 1 - stream.go | 1 - stream_event_flag.go | 1 - strict_std_compliance.go | 1 - thread_type.go | 1 - time.go | 1 - 73 files changed, 4 insertions(+), 72 deletions(-) create mode 100644 astiav.go diff --git a/astiav.go b/astiav.go new file mode 100644 index 0000000..d780006 --- /dev/null +++ b/astiav.go @@ -0,0 +1,4 @@ +package astiav + +//#cgo pkg-config: libavcodec libavdevice libavfilter libavformat libswscale libavutil +import "C" diff --git a/bit_stream_filter.go b/bit_stream_filter.go index 2627764..dccdd0c 100644 --- a/bit_stream_filter.go +++ b/bit_stream_filter.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include //#include import "C" diff --git a/bit_stream_filter_context.go b/bit_stream_filter_context.go index ebbc503..65aeda1 100644 --- a/bit_stream_filter_context.go +++ b/bit_stream_filter_context.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" import ( diff --git a/buffersink_flag.go b/buffersink_flag.go index 0565e45..ba61f40 100644 --- a/buffersink_flag.go +++ b/buffersink_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter //#include import "C" diff --git a/buffersrc_flag.go b/buffersrc_flag.go index 4b059d0..7cf9db2 100644 --- a/buffersrc_flag.go +++ b/buffersrc_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter //#include import "C" diff --git a/bytes.go b/bytes.go index 83a6cbe..e5e06ee 100644 --- a/bytes.go +++ b/bytes.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include //#include //#include diff --git a/channel_layout.go b/channel_layout.go index 8386b91..13181f3 100644 --- a/channel_layout.go +++ b/channel_layout.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include /* diff --git a/chroma_location.go b/chroma_location.go index 0e86084..286b61f 100644 --- a/chroma_location.go +++ b/chroma_location.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/class.go b/class.go index 36623a1..6c2a984 100644 --- a/class.go +++ b/class.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include //#include /* diff --git a/class_category.go b/class_category.go index 70ae789..faf9b05 100644 --- a/class_category.go +++ b/class_category.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/codec.go b/codec.go index 85462e5..13cb3ff 100644 --- a/codec.go +++ b/codec.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavutil //#include //#include import "C" diff --git a/codec_context.go b/codec_context.go index d2f4e27..b5c330a 100644 --- a/codec_context.go +++ b/codec_context.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavutil //#include //#include /* diff --git a/codec_context_flag.go b/codec_context_flag.go index 51c888e..bf87994 100644 --- a/codec_context_flag.go +++ b/codec_context_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/codec_hardware_config.go b/codec_hardware_config.go index 613c556..e6349be 100644 --- a/codec_hardware_config.go +++ b/codec_hardware_config.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/codec_hardware_config_method_flag.go b/codec_hardware_config_method_flag.go index 5c5bc0f..9023780 100644 --- a/codec_hardware_config_method_flag.go +++ b/codec_hardware_config_method_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/codec_id.go b/codec_id.go index 21057e3..a36c029 100644 --- a/codec_id.go +++ b/codec_id.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavformat //#include //#include import "C" diff --git a/codec_parameters.go b/codec_parameters.go index 74879a7..d6f6316 100644 --- a/codec_parameters.go +++ b/codec_parameters.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/color_primaries.go b/color_primaries.go index 45cf852..12993fd 100644 --- a/color_primaries.go +++ b/color_primaries.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/color_range.go b/color_range.go index 43ec7d3..17faec3 100644 --- a/color_range.go +++ b/color_range.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/color_space.go b/color_space.go index 69a8eb3..22d0b91 100644 --- a/color_space.go +++ b/color_space.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/color_transfer_characteristic.go b/color_transfer_characteristic.go index f81a6c3..9f7c8c6 100644 --- a/color_transfer_characteristic.go +++ b/color_transfer_characteristic.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/device.go b/device.go index 7fc9152..00dab69 100644 --- a/device.go +++ b/device.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavdevice //#include import "C" diff --git a/dictionary.go b/dictionary.go index f559b0b..d7d2dea 100644 --- a/dictionary.go +++ b/dictionary.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavutil //#include //#include //#include diff --git a/dictionary_entry.go b/dictionary_entry.go index 6b571b2..361964c 100644 --- a/dictionary_entry.go +++ b/dictionary_entry.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/dictionary_flag.go b/dictionary_flag.go index 080a0da..8851272 100644 --- a/dictionary_flag.go +++ b/dictionary_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/display_matrix.go b/display_matrix.go index 5d5ebb8..301554e 100644 --- a/display_matrix.go +++ b/display_matrix.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" import ( diff --git a/error.go b/error.go index 6e422b9..3e93e1e 100644 --- a/error.go +++ b/error.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include //#include import "C" diff --git a/filter.go b/filter.go index fce10e6..736594e 100644 --- a/filter.go +++ b/filter.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter //#include import "C" import "unsafe" diff --git a/filter_command_flag.go b/filter_command_flag.go index cfe7c1a..e5fd0b5 100644 --- a/filter_command_flag.go +++ b/filter_command_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter //#include import "C" diff --git a/filter_context.go b/filter_context.go index f48f969..25e02ac 100644 --- a/filter_context.go +++ b/filter_context.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter libavutil //#include //#include //#include diff --git a/filter_graph.go b/filter_graph.go index b9dcc06..267b456 100644 --- a/filter_graph.go +++ b/filter_graph.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter //#include import "C" import ( diff --git a/filter_in_out.go b/filter_in_out.go index 0ed474f..ae4077b 100644 --- a/filter_in_out.go +++ b/filter_in_out.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter //#include import "C" diff --git a/filter_link.go b/filter_link.go index c3608b3..1f5a37b 100644 --- a/filter_link.go +++ b/filter_link.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavfilter //#include import "C" diff --git a/format_context.go b/format_context.go index 007cb43..2978947 100644 --- a/format_context.go +++ b/format_context.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavformat //#include //#include import "C" diff --git a/format_context_ctx_flag.go b/format_context_ctx_flag.go index 4d38ef9..29ea605 100644 --- a/format_context_ctx_flag.go +++ b/format_context_ctx_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/format_context_flag.go b/format_context_flag.go index 7f5b0e9..8ecfb51 100644 --- a/format_context_flag.go +++ b/format_context_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/format_event_flag.go b/format_event_flag.go index 12772f2..aed65e4 100644 --- a/format_event_flag.go +++ b/format_event_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/frame.go b/frame.go index 685f79f..7414406 100644 --- a/frame.go +++ b/frame.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include //#include //#include diff --git a/frame_data.go b/frame_data.go index 85a087a..5f86cb5 100644 --- a/frame_data.go +++ b/frame_data.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include //#include /* diff --git a/frame_side_data.go b/frame_side_data.go index dea078f..6316a45 100644 --- a/frame_side_data.go +++ b/frame_side_data.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" import ( diff --git a/frame_side_data_type.go b/frame_side_data_type.go index fa18995..c7522d7 100644 --- a/frame_side_data_type.go +++ b/frame_side_data_type.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/hardware_device_context.go b/hardware_device_context.go index ee97fe0..6f3999f 100644 --- a/hardware_device_context.go +++ b/hardware_device_context.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil libavcodec //#include //#include import "C" diff --git a/hardware_device_type.go b/hardware_device_type.go index 9a422a1..5b8dba7 100644 --- a/hardware_device_type.go +++ b/hardware_device_type.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" import ( diff --git a/input_format.go b/input_format.go index f524ab2..6959df2 100644 --- a/input_format.go +++ b/input_format.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" import "unsafe" diff --git a/int_read_write.go b/int_read_write.go index ddefd3c..5ca03c5 100644 --- a/int_read_write.go +++ b/int_read_write.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include /* uint32_t astiavRL32(uint8_t *i) { diff --git a/io_context.go b/io_context.go index ff2654f..c0dd134 100644 --- a/io_context.go +++ b/io_context.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include //#include "io_context.h" import "C" diff --git a/io_context_flag.go b/io_context_flag.go index c2c5a7f..d42422d 100644 --- a/io_context_flag.go +++ b/io_context_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/io_format_flag.go b/io_format_flag.go index 7162cce..dcaf1ac 100644 --- a/io_format_flag.go +++ b/io_format_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/io_interrupter.go b/io_interrupter.go index 611ca9b..a6c7432 100644 --- a/io_interrupter.go +++ b/io_interrupter.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include /* int astiavInterruptCallback(void *ret) diff --git a/level.go b/level.go index 5e2a943..5f79a32 100644 --- a/level.go +++ b/level.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/log.go b/log.go index 9441788..4fccf04 100644 --- a/log.go +++ b/log.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include //#include //#include diff --git a/mathematics.go b/mathematics.go index 0ba801c..5d5deea 100644 --- a/mathematics.go +++ b/mathematics.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/media_type.go b/media_type.go index b842454..1291e1a 100644 --- a/media_type.go +++ b/media_type.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavutil //#include //#include import "C" diff --git a/output_format.go b/output_format.go index 721149b..a947bdc 100644 --- a/output_format.go +++ b/output_format.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" import "unsafe" diff --git a/packet.go b/packet.go index a5c8e93..c58586d 100644 --- a/packet.go +++ b/packet.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" import ( diff --git a/packet_flag.go b/packet_flag.go index 9b02b2a..fa2fdb2 100644 --- a/packet_flag.go +++ b/packet_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/packet_side_data.go b/packet_side_data.go index a2c269b..df43bd0 100644 --- a/packet_side_data.go +++ b/packet_side_data.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" import ( diff --git a/packet_side_data_type.go b/packet_side_data_type.go index a4db4ea..c33cacc 100644 --- a/packet_side_data_type.go +++ b/packet_side_data_type.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/picture_type.go b/picture_type.go index 7a7eeb0..70ec697 100644 --- a/picture_type.go +++ b/picture_type.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/pixel_format.go b/pixel_format.go index e00409d..41409a3 100644 --- a/pixel_format.go +++ b/pixel_format.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavutil //#include //#include //#include diff --git a/profile.go b/profile.go index 6825dee..8327e62 100644 --- a/profile.go +++ b/profile.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/program.go b/program.go index 0e7b2ce..0d8c6c2 100644 --- a/program.go +++ b/program.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" import ( diff --git a/rational.go b/rational.go index 7f8ed23..d4fe70a 100644 --- a/rational.go +++ b/rational.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" import "strconv" diff --git a/rounding.go b/rounding.go index f166bb2..92ed467 100644 --- a/rounding.go +++ b/rounding.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec libavutil //#include import "C" diff --git a/sample_format.go b/sample_format.go index ce0963b..4b80302 100644 --- a/sample_format.go +++ b/sample_format.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include import "C" diff --git a/seek_flag.go b/seek_flag.go index a40b52c..488def4 100644 --- a/seek_flag.go +++ b/seek_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/software_scale_context.go b/software_scale_context.go index a40cffb..9f4f178 100644 --- a/software_scale_context.go +++ b/software_scale_context.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libswscale //#include import "C" import ( diff --git a/software_scale_context_flag.go b/software_scale_context_flag.go index ec49fbc..c7ce473 100644 --- a/software_scale_context_flag.go +++ b/software_scale_context_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libswscale //#include import "C" diff --git a/stream.go b/stream.go index e86fa70..61b1f00 100644 --- a/stream.go +++ b/stream.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/stream_event_flag.go b/stream_event_flag.go index 61bb2aa..405cbea 100644 --- a/stream_event_flag.go +++ b/stream_event_flag.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavformat //#include import "C" diff --git a/strict_std_compliance.go b/strict_std_compliance.go index ec314a3..0f3f06d 100644 --- a/strict_std_compliance.go +++ b/strict_std_compliance.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/thread_type.go b/thread_type.go index 0db36d0..4fa0ecc 100644 --- a/thread_type.go +++ b/thread_type.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavcodec //#include import "C" diff --git a/time.go b/time.go index dc6d081..52ea5f8 100644 --- a/time.go +++ b/time.go @@ -1,6 +1,5 @@ package astiav -//#cgo pkg-config: libavutil //#include //#include import "C"