Skip to content

Instantly share code, notes, and snippets.

@ihnorton
Forked from timholy/threelibs.jl
Last active December 14, 2015 18:09
Show Gist options
  • Save ihnorton/5126993 to your computer and use it in GitHub Desktop.
Save ihnorton/5126993 to your computer and use it in GitHub Desktop.
recurs_sym_type(ex::Any) =
(ex==None || typeof(ex)==Symbol || length(ex.args)==1) ? eval(ex) : Expr(ex.head, ex.args[1], recurs_sym_type(ex.args[2]))
macro c(ret_type, func, arg_types, lib)
local _arg_types = Expr(:tuple, [recurs_sym_type(a) for a in arg_types.args]...)
local _ret_type = recurs_sym_type(ret_type)
local _args_in = Any[ symbol(string('a',x)) for x in 1:length(_arg_types.args) ]
local _lib = eval(lib)
quote
$(esc(func))($(_args_in...)) = ccall( ($(string(func)), $(Expr(:quote, _lib)) ), $_ret_type, $_arg_types, $(_args_in...) )
end
end
macro ctypedef(fake_t,real_t)
real_t = recurs_sym_type(real_t)
quote
typealias $fake_t $real_t
end
end
# header: /usr/include/libavcodec/avcodec.h
# enum CodecID
@ctypedef CodecID Uint32
const CODEC_ID_NONE = 0
const CODEC_ID_MPEG1VIDEO = 1
const CODEC_ID_MPEG2VIDEO = 2
const CODEC_ID_MPEG2VIDEO_XVMC = 3
const CODEC_ID_H261 = 4
const CODEC_ID_H263 = 5
const CODEC_ID_RV10 = 6
const CODEC_ID_RV20 = 7
const CODEC_ID_MJPEG = 8
const CODEC_ID_MJPEGB = 9
const CODEC_ID_LJPEG = 10
const CODEC_ID_SP5X = 11
const CODEC_ID_JPEGLS = 12
const CODEC_ID_MPEG4 = 13
const CODEC_ID_RAWVIDEO = 14
const CODEC_ID_MSMPEG4V1 = 15
const CODEC_ID_MSMPEG4V2 = 16
const CODEC_ID_MSMPEG4V3 = 17
const CODEC_ID_WMV1 = 18
const CODEC_ID_WMV2 = 19
const CODEC_ID_H263P = 20
const CODEC_ID_H263I = 21
const CODEC_ID_FLV1 = 22
const CODEC_ID_SVQ1 = 23
const CODEC_ID_SVQ3 = 24
const CODEC_ID_DVVIDEO = 25
const CODEC_ID_HUFFYUV = 26
const CODEC_ID_CYUV = 27
const CODEC_ID_H264 = 28
const CODEC_ID_INDEO3 = 29
const CODEC_ID_VP3 = 30
const CODEC_ID_THEORA = 31
const CODEC_ID_ASV1 = 32
const CODEC_ID_ASV2 = 33
const CODEC_ID_FFV1 = 34
const CODEC_ID_4XM = 35
const CODEC_ID_VCR1 = 36
const CODEC_ID_CLJR = 37
const CODEC_ID_MDEC = 38
const CODEC_ID_ROQ = 39
const CODEC_ID_INTERPLAY_VIDEO = 40
const CODEC_ID_XAN_WC3 = 41
const CODEC_ID_XAN_WC4 = 42
const CODEC_ID_RPZA = 43
const CODEC_ID_CINEPAK = 44
const CODEC_ID_WS_VQA = 45
const CODEC_ID_MSRLE = 46
const CODEC_ID_MSVIDEO1 = 47
const CODEC_ID_IDCIN = 48
const CODEC_ID_8BPS = 49
const CODEC_ID_SMC = 50
const CODEC_ID_FLIC = 51
const CODEC_ID_TRUEMOTION1 = 52
const CODEC_ID_VMDVIDEO = 53
const CODEC_ID_MSZH = 54
const CODEC_ID_ZLIB = 55
const CODEC_ID_QTRLE = 56
const CODEC_ID_SNOW = 57
const CODEC_ID_TSCC = 58
const CODEC_ID_ULTI = 59
const CODEC_ID_QDRAW = 60
const CODEC_ID_VIXL = 61
const CODEC_ID_QPEG = 62
const CODEC_ID_PNG = 63
const CODEC_ID_PPM = 64
const CODEC_ID_PBM = 65
const CODEC_ID_PGM = 66
const CODEC_ID_PGMYUV = 67
const CODEC_ID_PAM = 68
const CODEC_ID_FFVHUFF = 69
const CODEC_ID_RV30 = 70
const CODEC_ID_RV40 = 71
const CODEC_ID_VC1 = 72
const CODEC_ID_WMV3 = 73
const CODEC_ID_LOCO = 74
const CODEC_ID_WNV1 = 75
const CODEC_ID_AASC = 76
const CODEC_ID_INDEO2 = 77
const CODEC_ID_FRAPS = 78
const CODEC_ID_TRUEMOTION2 = 79
const CODEC_ID_BMP = 80
const CODEC_ID_CSCD = 81
const CODEC_ID_MMVIDEO = 82
const CODEC_ID_ZMBV = 83
const CODEC_ID_AVS = 84
const CODEC_ID_SMACKVIDEO = 85
const CODEC_ID_NUV = 86
const CODEC_ID_KMVC = 87
const CODEC_ID_FLASHSV = 88
const CODEC_ID_CAVS = 89
const CODEC_ID_JPEG2000 = 90
const CODEC_ID_VMNC = 91
const CODEC_ID_VP5 = 92
const CODEC_ID_VP6 = 93
const CODEC_ID_VP6F = 94
const CODEC_ID_TARGA = 95
const CODEC_ID_DSICINVIDEO = 96
const CODEC_ID_TIERTEXSEQVIDEO = 97
const CODEC_ID_TIFF = 98
const CODEC_ID_GIF = 99
const CODEC_ID_FFH264 = 100
const CODEC_ID_DXA = 101
const CODEC_ID_DNXHD = 102
const CODEC_ID_THP = 103
const CODEC_ID_SGI = 104
const CODEC_ID_C93 = 105
const CODEC_ID_BETHSOFTVID = 106
const CODEC_ID_PTX = 107
const CODEC_ID_TXD = 108
const CODEC_ID_VP6A = 109
const CODEC_ID_AMV = 110
const CODEC_ID_VB = 111
const CODEC_ID_PCX = 112
const CODEC_ID_SUNRAST = 113
const CODEC_ID_INDEO4 = 114
const CODEC_ID_INDEO5 = 115
const CODEC_ID_MIMIC = 116
const CODEC_ID_RL2 = 117
const CODEC_ID_8SVX_EXP = 118
const CODEC_ID_8SVX_FIB = 119
const CODEC_ID_ESCAPE124 = 120
const CODEC_ID_DIRAC = 121
const CODEC_ID_BFI = 122
const CODEC_ID_CMV = 123
const CODEC_ID_MOTIONPIXELS = 124
const CODEC_ID_TGV = 125
const CODEC_ID_TGQ = 126
const CODEC_ID_TQI = 127
const CODEC_ID_AURA = 128
const CODEC_ID_AURA2 = 129
const CODEC_ID_V210X = 130
const CODEC_ID_TMV = 131
const CODEC_ID_V210 = 132
const CODEC_ID_DPX = 133
const CODEC_ID_MAD = 134
const CODEC_ID_FRWU = 135
const CODEC_ID_FLASHSV2 = 136
const CODEC_ID_CDGRAPHICS = 137
const CODEC_ID_R210 = 138
const CODEC_ID_ANM = 139
const CODEC_ID_BINKVIDEO = 140
const CODEC_ID_IFF_ILBM = 141
const CODEC_ID_IFF_BYTERUN1 = 142
const CODEC_ID_KGV1 = 143
const CODEC_ID_YOP = 144
const CODEC_ID_VP8 = 145
const CODEC_ID_PICTOR = 146
const CODEC_ID_ANSI = 147
const CODEC_ID_A64_MULTI = 148
const CODEC_ID_A64_MULTI5 = 149
const CODEC_ID_R10K = 150
const CODEC_ID_MXPEG = 151
const CODEC_ID_LAGARITH = 152
const CODEC_ID_PRORES = 153
const CODEC_ID_JV = 154
const CODEC_ID_DFA = 155
const CODEC_ID_WMV3IMAGE = 156
const CODEC_ID_VC1IMAGE = 157
const CODEC_ID_G723_1 = 158
const CODEC_ID_G729 = 159
const CODEC_ID_UTVIDEO = 160
const CODEC_ID_BMV_VIDEO = 161
const CODEC_ID_VBLE = 162
const CODEC_ID_DXTORY = 163
const CODEC_ID_V410 = 164
const CODEC_ID_FIRST_AUDIO = 65536
const CODEC_ID_PCM_S16LE = 65536
const CODEC_ID_PCM_S16BE = 65537
const CODEC_ID_PCM_U16LE = 65538
const CODEC_ID_PCM_U16BE = 65539
const CODEC_ID_PCM_S8 = 65540
const CODEC_ID_PCM_U8 = 65541
const CODEC_ID_PCM_MULAW = 65542
const CODEC_ID_PCM_ALAW = 65543
const CODEC_ID_PCM_S32LE = 65544
const CODEC_ID_PCM_S32BE = 65545
const CODEC_ID_PCM_U32LE = 65546
const CODEC_ID_PCM_U32BE = 65547
const CODEC_ID_PCM_S24LE = 65548
const CODEC_ID_PCM_S24BE = 65549
const CODEC_ID_PCM_U24LE = 65550
const CODEC_ID_PCM_U24BE = 65551
const CODEC_ID_PCM_S24DAUD = 65552
const CODEC_ID_PCM_ZORK = 65553
const CODEC_ID_PCM_S16LE_PLANAR = 65554
const CODEC_ID_PCM_DVD = 65555
const CODEC_ID_PCM_F32BE = 65556
const CODEC_ID_PCM_F32LE = 65557
const CODEC_ID_PCM_F64BE = 65558
const CODEC_ID_PCM_F64LE = 65559
const CODEC_ID_PCM_BLURAY = 65560
const CODEC_ID_PCM_LXF = 65561
const CODEC_ID_S302M = 65562
const CODEC_ID_PCM_S8_PLANAR = 65563
const CODEC_ID_ADPCM_IMA_QT = 69632
const CODEC_ID_ADPCM_IMA_WAV = 69633
const CODEC_ID_ADPCM_IMA_DK3 = 69634
const CODEC_ID_ADPCM_IMA_DK4 = 69635
const CODEC_ID_ADPCM_IMA_WS = 69636
const CODEC_ID_ADPCM_IMA_SMJPEG = 69637
const CODEC_ID_ADPCM_MS = 69638
const CODEC_ID_ADPCM_4XM = 69639
const CODEC_ID_ADPCM_XA = 69640
const CODEC_ID_ADPCM_ADX = 69641
const CODEC_ID_ADPCM_EA = 69642
const CODEC_ID_ADPCM_G726 = 69643
const CODEC_ID_ADPCM_CT = 69644
const CODEC_ID_ADPCM_SWF = 69645
const CODEC_ID_ADPCM_YAMAHA = 69646
const CODEC_ID_ADPCM_SBPRO_4 = 69647
const CODEC_ID_ADPCM_SBPRO_3 = 69648
const CODEC_ID_ADPCM_SBPRO_2 = 69649
const CODEC_ID_ADPCM_THP = 69650
const CODEC_ID_ADPCM_IMA_AMV = 69651
const CODEC_ID_ADPCM_EA_R1 = 69652
const CODEC_ID_ADPCM_EA_R3 = 69653
const CODEC_ID_ADPCM_EA_R2 = 69654
const CODEC_ID_ADPCM_IMA_EA_SEAD = 69655
const CODEC_ID_ADPCM_IMA_EA_EACS = 69656
const CODEC_ID_ADPCM_EA_XAS = 69657
const CODEC_ID_ADPCM_EA_MAXIS_XA = 69658
const CODEC_ID_ADPCM_IMA_ISS = 69659
const CODEC_ID_ADPCM_G722 = 69660
const CODEC_ID_AMR_NB = 73728
const CODEC_ID_AMR_WB = 73729
const CODEC_ID_RA_144 = 77824
const CODEC_ID_RA_288 = 77825
const CODEC_ID_ROQ_DPCM = 81920
const CODEC_ID_INTERPLAY_DPCM = 81921
const CODEC_ID_XAN_DPCM = 81922
const CODEC_ID_SOL_DPCM = 81923
const CODEC_ID_MP2 = 86016
const CODEC_ID_MP3 = 86017
const CODEC_ID_AAC = 86018
const CODEC_ID_AC3 = 86019
const CODEC_ID_DTS = 86020
const CODEC_ID_VORBIS = 86021
const CODEC_ID_DVAUDIO = 86022
const CODEC_ID_WMAV1 = 86023
const CODEC_ID_WMAV2 = 86024
const CODEC_ID_MACE3 = 86025
const CODEC_ID_MACE6 = 86026
const CODEC_ID_VMDAUDIO = 86027
const CODEC_ID_SONIC = 86028
const CODEC_ID_SONIC_LS = 86029
const CODEC_ID_FLAC = 86030
const CODEC_ID_MP3ADU = 86031
const CODEC_ID_MP3ON4 = 86032
const CODEC_ID_SHORTEN = 86033
const CODEC_ID_ALAC = 86034
const CODEC_ID_WESTWOOD_SND1 = 86035
const CODEC_ID_GSM = 86036
const CODEC_ID_QDM2 = 86037
const CODEC_ID_COOK = 86038
const CODEC_ID_TRUESPEECH = 86039
const CODEC_ID_TTA = 86040
const CODEC_ID_SMACKAUDIO = 86041
const CODEC_ID_QCELP = 86042
const CODEC_ID_WAVPACK = 86043
const CODEC_ID_DSICINAUDIO = 86044
const CODEC_ID_IMC = 86045
const CODEC_ID_MUSEPACK7 = 86046
const CODEC_ID_MLP = 86047
const CODEC_ID_GSM_MS = 86048
const CODEC_ID_ATRAC3 = 86049
const CODEC_ID_VOXWARE = 86050
const CODEC_ID_APE = 86051
const CODEC_ID_NELLYMOSER = 86052
const CODEC_ID_MUSEPACK8 = 86053
const CODEC_ID_SPEEX = 86054
const CODEC_ID_WMAVOICE = 86055
const CODEC_ID_WMAPRO = 86056
const CODEC_ID_WMALOSSLESS = 86057
const CODEC_ID_ATRAC3P = 86058
const CODEC_ID_EAC3 = 86059
const CODEC_ID_SIPR = 86060
const CODEC_ID_MP1 = 86061
const CODEC_ID_TWINVQ = 86062
const CODEC_ID_TRUEHD = 86063
const CODEC_ID_MP4ALS = 86064
const CODEC_ID_ATRAC1 = 86065
const CODEC_ID_BINKAUDIO_RDFT = 86066
const CODEC_ID_BINKAUDIO_DCT = 86067
const CODEC_ID_AAC_LATM = 86068
const CODEC_ID_QDMC = 86069
const CODEC_ID_CELT = 86070
const CODEC_ID_BMV_AUDIO = 86071
const CODEC_ID_FIRST_SUBTITLE = 94208
const CODEC_ID_DVD_SUBTITLE = 94208
const CODEC_ID_DVB_SUBTITLE = 94209
const CODEC_ID_TEXT = 94210
const CODEC_ID_XSUB = 94211
const CODEC_ID_SSA = 94212
const CODEC_ID_MOV_TEXT = 94213
const CODEC_ID_HDMV_PGS_SUBTITLE = 94214
const CODEC_ID_DVB_TELETEXT = 94215
const CODEC_ID_SRT = 94216
const CODEC_ID_FIRST_UNKNOWN = 98304
const CODEC_ID_TTF = 98304
const CODEC_ID_PROBE = 102400
const CODEC_ID_MPEG2TS = 131072
const CODEC_ID_MPEG4SYSTEMS = 131073
const CODEC_ID_FFMETADATA = 135168
# end
# enum Motion_Est_ID
@ctypedef Motion_Est_ID Uint32
const ME_ZERO = 1
const ME_FULL = 2
const ME_LOG = 3
const ME_PHODS = 4
const ME_EPZS = 5
const ME_X1 = 6
const ME_HEX = 7
const ME_UMH = 8
const ME_ITER = 9
const ME_TESA = 10
# end
# enum AVDiscard
@ctypedef AVDiscard Uint32
const AVDISCARD_NONE = -16
const AVDISCARD_DEFAULT = 0
const AVDISCARD_NONREF = 8
const AVDISCARD_BIDIR = 16
const AVDISCARD_NONKEY = 32
const AVDISCARD_ALL = 48
# end
# enum AVColorPrimaries
@ctypedef AVColorPrimaries Uint32
const AVCOL_PRI_BT709 = 1
const AVCOL_PRI_UNSPECIFIED = 2
const AVCOL_PRI_BT470M = 4
const AVCOL_PRI_BT470BG = 5
const AVCOL_PRI_SMPTE170M = 6
const AVCOL_PRI_SMPTE240M = 7
const AVCOL_PRI_FILM = 8
const AVCOL_PRI_NB = 9
# end
# enum AVColorTransferCharacteristic
@ctypedef AVColorTransferCharacteristic Uint32
const AVCOL_TRC_BT709 = 1
const AVCOL_TRC_UNSPECIFIED = 2
const AVCOL_TRC_GAMMA22 = 4
const AVCOL_TRC_GAMMA28 = 5
const AVCOL_TRC_NB = 6
# end
# enum AVColorSpace
@ctypedef AVColorSpace Uint32
const AVCOL_SPC_RGB = 0
const AVCOL_SPC_BT709 = 1
const AVCOL_SPC_UNSPECIFIED = 2
const AVCOL_SPC_FCC = 4
const AVCOL_SPC_BT470BG = 5
const AVCOL_SPC_SMPTE170M = 6
const AVCOL_SPC_SMPTE240M = 7
const AVCOL_SPC_NB = 8
# end
# enum AVColorRange
@ctypedef AVColorRange Uint32
const AVCOL_RANGE_UNSPECIFIED = 0
const AVCOL_RANGE_MPEG = 1
const AVCOL_RANGE_JPEG = 2
const AVCOL_RANGE_NB = 3
# end
# enum AVChromaLocation
@ctypedef AVChromaLocation Uint32
const AVCHROMA_LOC_UNSPECIFIED = 0
const AVCHROMA_LOC_LEFT = 1
const AVCHROMA_LOC_CENTER = 2
const AVCHROMA_LOC_TOPLEFT = 3
const AVCHROMA_LOC_TOP = 4
const AVCHROMA_LOC_BOTTOMLEFT = 5
const AVCHROMA_LOC_BOTTOM = 6
const AVCHROMA_LOC_NB = 7
# end
# enum AVLPCType
@ctypedef AVLPCType Uint32
const AV_LPC_TYPE_DEFAULT = -1
const AV_LPC_TYPE_NONE = 0
const AV_LPC_TYPE_FIXED = 1
const AV_LPC_TYPE_LEVINSON = 2
const AV_LPC_TYPE_CHOLESKY = 3
const AV_LPC_TYPE_NB = 4
# end
# enum AVAudioServiceType
@ctypedef AVAudioServiceType Uint32
const AV_AUDIO_SERVICE_TYPE_MAIN = 0
const AV_AUDIO_SERVICE_TYPE_EFFECTS = 1
const AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2
const AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3
const AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4
const AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5
const AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6
const AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7
const AV_AUDIO_SERVICE_TYPE_KARAOKE = 8
const AV_AUDIO_SERVICE_TYPE_NB = 9
# end
@ctypedef RcOverride Void
@ctypedef AVPanScan Void
# enum AVPacketSideDataType
@ctypedef AVPacketSideDataType Uint32
const AV_PKT_DATA_PALETTE = 0
const AV_PKT_DATA_NEW_EXTRADATA = 1
const AV_PKT_DATA_PARAM_CHANGE = 2
# end
@ctypedef AVPacket Void
# enum AVSideDataParamChangeFlags
@ctypedef AVSideDataParamChangeFlags Uint32
const AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 1
const AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 2
const AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 4
const AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 8
# end
@ctypedef AVFrame Void
# enum AVFieldOrder
@ctypedef AVFieldOrder Uint32
const AV_FIELD_UNKNOWN = 0
const AV_FIELD_PROGRESSIVE = 1
const AV_FIELD_TT = 2
const AV_FIELD_BB = 3
const AV_FIELD_TB = 4
const AV_FIELD_BT = 5
# end
@ctypedef AVCodecContext Void
@ctypedef AVProfile Void
@ctypedef AVCodecDefault Void
@ctypedef AVCodec Void
@ctypedef AVHWAccel Void
@ctypedef AVPicture Void
@ctypedef AVPaletteControl Void
# enum AVSubtitleType
@ctypedef AVSubtitleType Uint32
const SUBTITLE_NONE = 0
const SUBTITLE_BITMAP = 1
const SUBTITLE_TEXT = 2
const SUBTITLE_ASS = 3
# end
@ctypedef AVSubtitleRect Void
@ctypedef AVSubtitle Void
@c None av_destruct_packet_nofree (Ptr{:AVPacket},) shlib
@c None av_destruct_packet (Ptr{:AVPacket},) shlib
@c None av_init_packet (Ptr{:AVPacket},) shlib
@c Int32 av_new_packet (Ptr{:AVPacket},:Int32) shlib
@c None av_shrink_packet (Ptr{:AVPacket},:Int32) shlib
@c Int32 av_grow_packet (Ptr{:AVPacket},:Int32) shlib
@c Int32 av_dup_packet (Ptr{:AVPacket},) shlib
@c None av_free_packet (Ptr{:AVPacket},) shlib
@c Ptr{:uint8_t} av_packet_new_side_data (Ptr{:AVPacket},:Void,:Int32) shlib
@c Ptr{:uint8_t} av_packet_get_side_data (Ptr{:AVPacket},:Void,Ptr{:Int32}) shlib
@ctypedef ReSampleContext Void
@c Ptr{:ReSampleContext} av_audio_resample_init (:Int32,:Int32,:Int32,:Int32,:Void,:Void,:Int32,:Int32,:Int32,:Float64) shlib
@c Int32 audio_resample (Ptr{:ReSampleContext},Ptr{:Int16},Ptr{:Int16},:Int32) shlib
@c None audio_resample_close (Ptr{:ReSampleContext},) shlib
@c Ptr{:Void} av_resample_init (:Int32,:Int32,:Int32,:Int32,:Int32,:Float64) shlib
@c Int32 av_resample (Ptr{:Void},Ptr{:Int16},Ptr{:Int16},Ptr{:Int32},:Int32,:Int32,:Int32) shlib
@c None av_resample_compensate (Ptr{:Void},:Int32,:Int32) shlib
@c None av_resample_close (Ptr{:Void},) shlib
@c Int32 avpicture_alloc (Ptr{:AVPicture},:Void,:Int32,:Int32) shlib
@c None avpicture_free (Ptr{:AVPicture},) shlib
@c Int32 avpicture_fill (Ptr{:AVPicture},Ptr{:uint8_t},:Void,:Int32,:Int32) shlib
@c Int32 avpicture_layout (Ptr{:AVPicture},:Void,:Int32,:Int32,Ptr{:Uint8},:Int32) shlib
@c Int32 avpicture_get_size (:Void,:Int32,:Int32) shlib
@c None avcodec_get_chroma_sub_sample (:Void,Ptr{:Int32},Ptr{:Int32}) shlib
@c Ptr{:Uint8} avcodec_get_pix_fmt_name (:Void,) shlib
@c None avcodec_set_dimensions (Ptr{:AVCodecContext},:Int32,:Int32) shlib
@c Uint32 avcodec_pix_fmt_to_codec_tag (:Void,) shlib
@c size_t av_get_codec_tag_string (Ptr{:Uint8},:size_t,:Uint32) shlib
@c Int32 avcodec_get_pix_fmt_loss (:Void,:Void,:Int32) shlib
@c Int32 avcodec_find_best_pix_fmt (:int64_t,:Void,:Int32,Ptr{:Int32}) shlib
@c Int32 img_get_alpha_info (Ptr{:AVPicture},:Void,:Int32,:Int32) shlib
@c Int32 avpicture_deinterlace (Ptr{:AVPicture},Ptr{:AVPicture},:Void,:Int32,:Int32) shlib
@c Ptr{:AVCodec} av_codec_next (Ptr{:AVCodec},) shlib
@c Uint32 avcodec_version () shlib
@c Ptr{:Uint8} avcodec_configuration () shlib
@c Ptr{:Uint8} avcodec_license () shlib
@c None avcodec_init () shlib
@c None avcodec_register (Ptr{:AVCodec},) shlib
@c Ptr{:AVCodec} avcodec_find_encoder (:Void,) shlib
@c Ptr{:AVCodec} avcodec_find_encoder_by_name (Ptr{:Uint8},) shlib
@c Ptr{:AVCodec} avcodec_find_decoder (:Void,) shlib
@c Ptr{:AVCodec} avcodec_find_decoder_by_name (Ptr{:Uint8},) shlib
@c None avcodec_string (Ptr{:Uint8},:Int32,Ptr{:AVCodecContext},:Int32) shlib
@c Ptr{:Uint8} av_get_profile_name (Ptr{:AVCodec},:Int32) shlib
@c None avcodec_get_context_defaults (Ptr{:AVCodecContext},) shlib
@c None avcodec_get_context_defaults2 (Ptr{:AVCodecContext},:Void) shlib
@c Int32 avcodec_get_context_defaults3 (Ptr{:AVCodecContext},Ptr{:AVCodec}) shlib
@c Ptr{:AVCodecContext} avcodec_alloc_context () shlib
@c Ptr{:AVCodecContext} avcodec_alloc_context2 (:Void,) shlib
@c Ptr{:AVCodecContext} avcodec_alloc_context3 (Ptr{:AVCodec},) shlib
@c Int32 avcodec_copy_context (Ptr{:AVCodecContext},Ptr{:AVCodecContext}) shlib
@c None avcodec_get_frame_defaults (Ptr{:AVFrame},) shlib
@c Ptr{:AVFrame} avcodec_alloc_frame () shlib
@c Int32 avcodec_default_get_buffer (Ptr{:AVCodecContext},Ptr{:AVFrame}) shlib
@c None avcodec_default_release_buffer (Ptr{:AVCodecContext},Ptr{:AVFrame}) shlib
@c Int32 avcodec_default_reget_buffer (Ptr{:AVCodecContext},Ptr{:AVFrame}) shlib
@c Uint32 avcodec_get_edge_width () shlib
@c None avcodec_align_dimensions (Ptr{:AVCodecContext},Ptr{:Int32},Ptr{:Int32}) shlib
@c None avcodec_align_dimensions2 (Ptr{:AVCodecContext},Ptr{:Int32},Ptr{:Int32},Ptr{:Int32}) shlib
@c Int32 avcodec_default_get_format (Ptr{:Void},Ptr{:Void}) shlib
@c Int32 avcodec_thread_init (Ptr{:AVCodecContext},:Int32) shlib
@c Int32 avcodec_default_execute (Ptr{:AVCodecContext},Ptr{:Void},Ptr{:None},Ptr{:Int32},:Int32,:Int32) shlib
@c Int32 avcodec_default_execute2 (Ptr{:AVCodecContext},Ptr{:Void},Ptr{:None},Ptr{:Int32},:Int32) shlib
@c Int32 avcodec_open (Ptr{:AVCodecContext},Ptr{:AVCodec}) shlib
@c Int32 avcodec_open2 (Ptr{:AVCodecContext},Ptr{:AVCodec},Ptr{Ptr{:AVDictionary}}) shlib
@c Int32 avcodec_decode_audio3 (Ptr{:AVCodecContext},Ptr{:int16_t},Ptr{:Int32},Ptr{:AVPacket}) shlib
@c Int32 avcodec_decode_audio4 (Ptr{:AVCodecContext},Ptr{:AVFrame},Ptr{:Int32},Ptr{:AVPacket}) shlib
@c Int32 avcodec_decode_video2 (Ptr{:AVCodecContext},Ptr{:AVFrame},Ptr{:Int32},Ptr{:AVPacket}) shlib
@c Int32 avcodec_decode_subtitle2 (Ptr{:AVCodecContext},Ptr{:AVSubtitle},Ptr{:Int32},Ptr{:AVPacket}) shlib
@c None avsubtitle_free (Ptr{:AVSubtitle},) shlib
@c Int32 avcodec_encode_audio (Ptr{:AVCodecContext},Ptr{:uint8_t},:Int32,Ptr{:Int16}) shlib
@c Int32 avcodec_encode_audio2 (Ptr{:AVCodecContext},Ptr{:AVPacket},Ptr{:AVFrame},Ptr{:Int32}) shlib
@c Int32 avcodec_fill_audio_frame (Ptr{:AVFrame},:Int32,:Void,Ptr{:uint8_t},:Int32,:Int32) shlib
@c Int32 avcodec_encode_video (Ptr{:AVCodecContext},Ptr{:uint8_t},:Int32,Ptr{:AVFrame}) shlib
@c Int32 avcodec_encode_subtitle (Ptr{:AVCodecContext},Ptr{:uint8_t},:Int32,Ptr{:AVSubtitle}) shlib
@c Int32 avcodec_close (Ptr{:AVCodecContext},) shlib
@c None avcodec_register_all () shlib
@c None avcodec_flush_buffers (Ptr{:AVCodecContext},) shlib
@c None avcodec_default_free_buffers (Ptr{:AVCodecContext},) shlib
@c Uint8 av_get_pict_type_char (:Int32,) shlib
@c Int32 av_get_bits_per_sample (:Void,) shlib
@c Int32 av_get_bits_per_sample_format (:Void,) shlib
@ctypedef AVCodecParserContext Void
@ctypedef AVCodecParser Void
@c Ptr{:AVCodecParser} av_parser_next (Ptr{:AVCodecParser},) shlib
@c None av_register_codec_parser (Ptr{:AVCodecParser},) shlib
@c Ptr{:AVCodecParserContext} av_parser_init (:Int32,) shlib
@c Int32 av_parser_parse2 (Ptr{:AVCodecParserContext},Ptr{:AVCodecContext},Ptr{Ptr{:uint8_t}},Ptr{:Int32},Ptr{:uint8_t},:Int32,:int64_t,:int64_t,:int64_t) shlib
@c Int32 av_parser_change (Ptr{:AVCodecParserContext},Ptr{:AVCodecContext},Ptr{Ptr{:uint8_t}},Ptr{:Int32},Ptr{:uint8_t},:Int32,:Int32) shlib
@c None av_parser_close (Ptr{:AVCodecParserContext},) shlib
@ctypedef AVBitStreamFilterContext Void
@ctypedef AVBitStreamFilter Void
@c None av_register_bitstream_filter (Ptr{:AVBitStreamFilter},) shlib
@c Ptr{:AVBitStreamFilterContext} av_bitstream_filter_init (Ptr{:Uint8},) shlib
@c Int32 av_bitstream_filter_filter (Ptr{:AVBitStreamFilterContext},Ptr{:AVCodecContext},Ptr{:Uint8},Ptr{Ptr{:uint8_t}},Ptr{:Int32},Ptr{:uint8_t},:Int32,:Int32) shlib
@c None av_bitstream_filter_close (Ptr{:AVBitStreamFilterContext},) shlib
@c Ptr{:AVBitStreamFilter} av_bitstream_filter_next (Ptr{:AVBitStreamFilter},) shlib
@c Ptr{:None} av_fast_realloc (Ptr{:None},Ptr{:Uint32},:size_t) shlib
@c None av_fast_malloc (Ptr{:None},Ptr{:Uint32},:size_t) shlib
@c None av_picture_copy (Ptr{:AVPicture},Ptr{:AVPicture},:Void,:Int32,:Int32) shlib
@c Int32 av_picture_crop (Ptr{:AVPicture},Ptr{:AVPicture},:Void,:Int32,:Int32) shlib
@c Int32 av_picture_pad (Ptr{:AVPicture},Ptr{:AVPicture},:Int32,:Int32,:Void,:Int32,:Int32,:Int32,:Int32,Ptr{:Int32}) shlib
@c Uint32 av_xiphlacing (Ptr{:Uint8},:Uint32) shlib
@c None av_log_missing_feature (Ptr{:None},Ptr{:Uint8},:Int32) shlib
@c None av_log_ask_for_sample (Ptr{:None},Ptr{:Uint8}) shlib
@c None av_register_hwaccel (Ptr{:AVHWAccel},) shlib
@c Ptr{:AVHWAccel} av_hwaccel_next (Ptr{:AVHWAccel},) shlib
# enum AVLockOp
@ctypedef AVLockOp Uint32
const AV_LOCK_CREATE = 0
const AV_LOCK_OBTAIN = 1
const AV_LOCK_RELEASE = 2
const AV_LOCK_DESTROY = 3
# end
@c Int32 av_lockmgr_register (Ptr{:Void},) shlib
@c Int32 avcodec_get_type (:Void,) shlib
@c Ptr{:AVClass} avcodec_get_class () shlib
@c Int32 avcodec_is_open (Ptr{:AVCodecContext},) shlib
# header: /usr/include/libavcodec/avfft.h
@ctypedef FFTSample Float32
@ctypedef FFTComplex Void
@ctypedef FFTContext Void
@c Ptr{:FFTContext} av_fft_init (:Int32,:Int32) shlib
@c None av_fft_permute (Ptr{:FFTContext},Ptr{:FFTComplex}) shlib
@c None av_fft_calc (Ptr{:FFTContext},Ptr{:FFTComplex}) shlib
@c None av_fft_end (Ptr{:FFTContext},) shlib
@c Ptr{:FFTContext} av_mdct_init (:Int32,:Int32,:Float64) shlib
@c None av_imdct_calc (Ptr{:FFTContext},Ptr{:FFTSample},Ptr{:FFTSample}) shlib
@c None av_imdct_half (Ptr{:FFTContext},Ptr{:FFTSample},Ptr{:FFTSample}) shlib
@c None av_mdct_calc (Ptr{:FFTContext},Ptr{:FFTSample},Ptr{:FFTSample}) shlib
@c None av_mdct_end (Ptr{:FFTContext},) shlib
# enum RDFTransformType
@ctypedef RDFTransformType Uint32
const DFT_R2C = 0
const IDFT_C2R = 1
const IDFT_R2C = 2
const DFT_C2R = 3
# end
@ctypedef RDFTContext Void
@c Ptr{:RDFTContext} av_rdft_init (:Int32,:Void) shlib
@c None av_rdft_calc (Ptr{:RDFTContext},Ptr{:FFTSample}) shlib
@c None av_rdft_end (Ptr{:RDFTContext},) shlib
@ctypedef DCTContext Void
# enum DCTTransformType
@ctypedef DCTTransformType Uint32
const DCT_II = 0
const DCT_III = 1
const DCT_I = 2
const DST_I = 3
# end
@c Ptr{:DCTContext} av_dct_init (:Int32,:Void) shlib
@c None av_dct_calc (Ptr{:DCTContext},Ptr{:FFTSample}) shlib
@c None av_dct_end (Ptr{:DCTContext},) shlib
# header: /usr/include/libavcodec/dxva2.h
# header: /usr/include/libavcodec/opt.h
# header: /usr/include/libavcodec/vaapi.h
# header: /usr/include/libavcodec/vda.h
@ctypedef vda_frame Void
@c Int32 ff_vda_create_decoder (Ptr{:Void},Ptr{:uint8_t},:Int32) shlib
@c Int32 ff_vda_destroy_decoder (Ptr{:Void},) shlib
@c Ptr{:vda_frame} ff_vda_queue_pop (Ptr{:Void},) shlib
@c None ff_vda_release_vda_frame (Ptr{:vda_frame},) shlib
# header: /usr/include/libavcodec/vdpau.h
# header: /usr/include/libavcodec/version.h
# header: /usr/include/libavcodec/xvmc.h
# header: /usr/include/libavformat/avformat.h
@ctypedef AVIOInterruptCB Void
@ctypedef AVIOContext Void
@ctypedef URLContext Void
@ctypedef URLProtocol Void
@ctypedef URLPollEntry Void
@c Int32 url_poll (Ptr{:URLPollEntry},:Int32,:Int32) shlib
@ctypedef URLInterruptCB Void
@c Int32 url_open_protocol (Ptr{Ptr{:URLContext}},Ptr{:Void},Ptr{:Uint8},:Int32) shlib
@c Int32 url_alloc (Ptr{Ptr{:URLContext}},Ptr{:Uint8},:Int32) shlib
@c Int32 url_connect (Ptr{:URLContext},) shlib
@c Int32 url_open (Ptr{Ptr{:URLContext}},Ptr{:Uint8},:Int32) shlib
@c Int32 url_read (Ptr{:URLContext},Ptr{:Uint8},:Int32) shlib
@c Int32 url_read_complete (Ptr{:URLContext},Ptr{:Uint8},:Int32) shlib
@c Int32 url_write (Ptr{:URLContext},Ptr{:Uint8},:Int32) shlib
@c int64_t url_seek (Ptr{:URLContext},:int64_t,:Int32) shlib
@c Int32 url_close (Ptr{:URLContext},) shlib
@c int64_t url_filesize (Ptr{:URLContext},) shlib
@c Int32 url_get_file_handle (Ptr{:URLContext},) shlib
@c Int32 url_get_max_packet_size (Ptr{:URLContext},) shlib
@c None url_get_filename (Ptr{:URLContext},Ptr{:Uint8},:Int32) shlib
@c Int32 av_url_read_pause (Ptr{:URLContext},:Int32) shlib
@c int64_t av_url_read_seek (Ptr{:URLContext},:Int32,:int64_t,:Int32) shlib
@c None url_set_interrupt_cb (Ptr{:Void},) shlib
@c Ptr{:URLProtocol} av_protocol_next (Ptr{:URLProtocol},) shlib
@c Int32 av_register_protocol2 (Ptr{:URLProtocol},:Int32) shlib
@ctypedef ByteIOContext AVIOContext
@c Int32 init_put_byte (Ptr{:AVIOContext},Ptr{:Uint8},:Int32,:Int32,Ptr{:None},Ptr{:Void},Ptr{:Void},Ptr{:Void}) shlib
@c Ptr{:AVIOContext} av_alloc_put_byte (Ptr{:Uint8},:Int32,:Int32,Ptr{:None},Ptr{:Void},Ptr{:Void},Ptr{:Void}) shlib
@c Int32 get_buffer (Ptr{:AVIOContext},Ptr{:Uint8},:Int32) shlib
@c Int32 get_partial_buffer (Ptr{:AVIOContext},Ptr{:Uint8},:Int32) shlib
@c Int32 get_byte (Ptr{:AVIOContext},) shlib
@c Uint32 get_le16 (Ptr{:AVIOContext},) shlib
@c Uint32 get_le24 (Ptr{:AVIOContext},) shlib
@c Uint32 get_le32 (Ptr{:AVIOContext},) shlib
@c uint64_t get_le64 (Ptr{:AVIOContext},) shlib
@c Uint32 get_be16 (Ptr{:AVIOContext},) shlib
@c Uint32 get_be24 (Ptr{:AVIOContext},) shlib
@c Uint32 get_be32 (Ptr{:AVIOContext},) shlib
@c uint64_t get_be64 (Ptr{:AVIOContext},) shlib
@c None put_byte (Ptr{:AVIOContext},:Int32) shlib
@c None put_nbyte (Ptr{:AVIOContext},:Int32,:Int32) shlib
@c None put_buffer (Ptr{:AVIOContext},Ptr{:Uint8},:Int32) shlib
@c None put_le64 (Ptr{:AVIOContext},:uint64_t) shlib
@c None put_be64 (Ptr{:AVIOContext},:uint64_t) shlib
@c None put_le32 (Ptr{:AVIOContext},:Uint32) shlib
@c None put_be32 (Ptr{:AVIOContext},:Uint32) shlib
@c None put_le24 (Ptr{:AVIOContext},:Uint32) shlib
@c None put_be24 (Ptr{:AVIOContext},:Uint32) shlib
@c None put_le16 (Ptr{:AVIOContext},:Uint32) shlib
@c None put_be16 (Ptr{:AVIOContext},:Uint32) shlib
@c None put_tag (Ptr{:AVIOContext},Ptr{:Uint8}) shlib
@c Int32 av_url_read_fpause (Ptr{:AVIOContext},:Int32) shlib
@c int64_t av_url_read_fseek (Ptr{:AVIOContext},:Int32,:int64_t,:Int32) shlib
@c Int32 url_fopen (Ptr{Ptr{:AVIOContext}},Ptr{:Uint8},:Int32) shlib
@c Int32 url_fclose (Ptr{:AVIOContext},) shlib
@c int64_t url_fseek (Ptr{:AVIOContext},:int64_t,:Int32) shlib
@c Int32 url_fskip (Ptr{:AVIOContext},:int64_t) shlib
@c int64_t url_ftell (Ptr{:AVIOContext},) shlib
@c int64_t url_fsize (Ptr{:AVIOContext},) shlib
@c Int32 url_fgetc (Ptr{:AVIOContext},) shlib
@c Int32 url_setbufsize (Ptr{:AVIOContext},:Int32) shlib
@c Int32 url_fprintf (Ptr{:AVIOContext},Ptr{:Uint8}) shlib
@c None put_flush_packet (Ptr{:AVIOContext},) shlib
@c Int32 url_open_dyn_buf (Ptr{Ptr{:AVIOContext}},) shlib
@c Int32 url_open_dyn_packet_buf (Ptr{Ptr{:AVIOContext}},:Int32) shlib
@c Int32 url_close_dyn_buf (Ptr{:AVIOContext},Ptr{Ptr{:uint8_t}}) shlib
@c Int32 url_fdopen (Ptr{Ptr{:AVIOContext}},Ptr{:URLContext}) shlib
@c Int32 url_feof (Ptr{:AVIOContext},) shlib
@c Int32 url_ferror (Ptr{:AVIOContext},) shlib
@c Int32 udp_set_remote_url (Ptr{:URLContext},Ptr{:Uint8}) shlib
@c Int32 udp_get_local_port (Ptr{:URLContext},) shlib
@c None init_checksum (Ptr{:AVIOContext},Ptr{:Void},:Uint64) shlib
@c Uint64 get_checksum (Ptr{:AVIOContext},) shlib
@c None put_strz (Ptr{:AVIOContext},Ptr{:Uint8}) shlib
@c Ptr{:Uint8} url_fgets (Ptr{:AVIOContext},Ptr{:Uint8},:Int32) shlib
@c Ptr{:Uint8} get_strz (Ptr{:AVIOContext},Ptr{:Uint8},:Int32) shlib
@c Int32 url_is_streamed (Ptr{:AVIOContext},) shlib
@c Ptr{:URLContext} url_fileno (Ptr{:AVIOContext},) shlib
@c Int32 url_fget_max_packet_size (Ptr{:AVIOContext},) shlib
@c Int32 url_open_buf (Ptr{Ptr{:AVIOContext}},Ptr{:uint8_t},:Int32,:Int32) shlib
@c Int32 url_close_buf (Ptr{:AVIOContext},) shlib
@c Int32 url_exist (Ptr{:Uint8},) shlib
@c Int32 avio_check (Ptr{:Uint8},:Int32) shlib
@c None avio_set_interrupt_cb (Ptr{:Void},) shlib
@c Ptr{:AVIOContext} avio_alloc_context (Ptr{:Uint8},:Int32,:Int32,Ptr{:None},Ptr{:Void},Ptr{:Void},Ptr{:Void}) shlib
@c None avio_w8 (Ptr{:AVIOContext},:Int32) shlib
@c None avio_write (Ptr{:AVIOContext},Ptr{:Uint8},:Int32) shlib
@c None avio_wl64 (Ptr{:AVIOContext},:uint64_t) shlib
@c None avio_wb64 (Ptr{:AVIOContext},:uint64_t) shlib
@c None avio_wl32 (Ptr{:AVIOContext},:Uint32) shlib
@c None avio_wb32 (Ptr{:AVIOContext},:Uint32) shlib
@c None avio_wl24 (Ptr{:AVIOContext},:Uint32) shlib
@c None avio_wb24 (Ptr{:AVIOContext},:Uint32) shlib
@c None avio_wl16 (Ptr{:AVIOContext},:Uint32) shlib
@c None avio_wb16 (Ptr{:AVIOContext},:Uint32) shlib
@c Int32 avio_put_str (Ptr{:AVIOContext},Ptr{:Uint8}) shlib
@c Int32 avio_put_str16le (Ptr{:AVIOContext},Ptr{:Uint8}) shlib
@c int64_t avio_seek (Ptr{:AVIOContext},:int64_t,:Int32) shlib
@c int64_t avio_skip (Ptr{:AVIOContext},:int64_t) shlib
@c int64_t avio_tell (Ptr{:AVIOContext},) shlib
@c int64_t avio_size (Ptr{:AVIOContext},) shlib
@c Int32 avio_printf (Ptr{:AVIOContext},Ptr{:Uint8}) shlib
@c None avio_flush (Ptr{:AVIOContext},) shlib
@c Int32 avio_read (Ptr{:AVIOContext},Ptr{:Uint8},:Int32) shlib
@c Int32 avio_r8 (Ptr{:AVIOContext},) shlib
@c Uint32 avio_rl16 (Ptr{:AVIOContext},) shlib
@c Uint32 avio_rl24 (Ptr{:AVIOContext},) shlib
@c Uint32 avio_rl32 (Ptr{:AVIOContext},) shlib
@c uint64_t avio_rl64 (Ptr{:AVIOContext},) shlib
@c Uint32 avio_rb16 (Ptr{:AVIOContext},) shlib
@c Uint32 avio_rb24 (Ptr{:AVIOContext},) shlib
@c Uint32 avio_rb32 (Ptr{:AVIOContext},) shlib
@c uint64_t avio_rb64 (Ptr{:AVIOContext},) shlib
@c Int32 avio_get_str (Ptr{:AVIOContext},:Int32,Ptr{:Uint8},:Int32) shlib
@c Int32 avio_get_str16le (Ptr{:AVIOContext},:Int32,Ptr{:Uint8},:Int32) shlib
@c Int32 avio_get_str16be (Ptr{:AVIOContext},:Int32,Ptr{:Uint8},:Int32) shlib
@c Int32 avio_open (Ptr{Ptr{:AVIOContext}},Ptr{:Uint8},:Int32) shlib
@c Int32 avio_open2 (Ptr{Ptr{:AVIOContext}},Ptr{:Uint8},:Int32,Ptr{:AVIOInterruptCB},Ptr{Ptr{:AVDictionary}}) shlib
@c Int32 avio_close (Ptr{:AVIOContext},) shlib
@c Int32 avio_open_dyn_buf (Ptr{Ptr{:AVIOContext}},) shlib
@c Int32 avio_close_dyn_buf (Ptr{:AVIOContext},Ptr{Ptr{:uint8_t}}) shlib
@c Ptr{:Uint8} avio_enum_protocols (Ptr{Ptr{:None}},:Int32) shlib
@c Int32 avio_pause (Ptr{:AVIOContext},:Int32) shlib
@c int64_t avio_seek_time (Ptr{:AVIOContext},:Int32,:int64_t,:Int32) shlib
@ctypedef AVMetadata AVDictionary
@ctypedef AVMetadataTag AVDictionaryEntry
@ctypedef AVMetadataConv Void
@c Ptr{:AVDictionaryEntry} av_metadata_get (Ptr{:AVDictionary},Ptr{:Uint8},Ptr{:AVDictionaryEntry},:Int32) shlib
@c Int32 av_metadata_set2 (Ptr{Ptr{:AVDictionary}},Ptr{:Uint8},Ptr{:Uint8},:Int32) shlib
@c None av_metadata_conv (Ptr{:Void},Ptr{:AVMetadataConv},Ptr{:AVMetadataConv}) shlib
@c None av_metadata_copy (Ptr{Ptr{:AVDictionary}},Ptr{:AVDictionary},:Int32) shlib
@c None av_metadata_free (Ptr{Ptr{:AVDictionary}},) shlib
@c Int32 av_get_packet (Ptr{:AVIOContext},Ptr{:AVPacket},:Int32) shlib
@c Int32 av_append_packet (Ptr{:AVIOContext},Ptr{:AVPacket},:Int32) shlib
@ctypedef AVFrac Void
@ctypedef AVProbeData Void
@ctypedef AVFormatParameters Void
@ctypedef AVOutputFormat Void
@ctypedef AVInputFormat Void
# enum AVStreamParseType
@ctypedef AVStreamParseType Uint32
const AVSTREAM_PARSE_NONE = 0
const AVSTREAM_PARSE_FULL = 1
const AVSTREAM_PARSE_HEADERS = 2
const AVSTREAM_PARSE_TIMESTAMPS = 3
const AVSTREAM_PARSE_FULL_ONCE = 4
# end
@ctypedef AVIndexEntry Void
@ctypedef AVStream Void
@ctypedef AVProgram Void
@ctypedef AVChapter Void
@ctypedef AVFormatContext Void
@ctypedef AVPacketList Void
@c Uint32 avformat_version () shlib
@c Ptr{:Uint8} avformat_configuration () shlib
@c Ptr{:Uint8} avformat_license () shlib
@c None av_register_all () shlib
@c None av_register_input_format (Ptr{:AVInputFormat},) shlib
@c None av_register_output_format (Ptr{:AVOutputFormat},) shlib
@c Int32 avformat_network_init () shlib
@c Int32 avformat_network_deinit () shlib
@c Ptr{:AVInputFormat} av_iformat_next (Ptr{:AVInputFormat},) shlib
@c Ptr{:AVOutputFormat} av_oformat_next (Ptr{:AVOutputFormat},) shlib
@c Ptr{:AVFormatContext} avformat_alloc_context () shlib
@c None avformat_free_context (Ptr{:AVFormatContext},) shlib
@c Ptr{:AVClass} avformat_get_class () shlib
@c Ptr{:AVStream} avformat_new_stream (Ptr{:AVFormatContext},Ptr{:AVCodec}) shlib
@c Ptr{:AVProgram} av_new_program (Ptr{:AVFormatContext},:Int32) shlib
@c Int32 av_guess_image2_codec (Ptr{:Uint8},) shlib
@c None av_pkt_dump (Ptr{:FILE},Ptr{:AVPacket},:Int32) shlib
@c None av_pkt_dump_log (Ptr{:None},:Int32,Ptr{:AVPacket},:Int32) shlib
@c Ptr{:AVInputFormat} av_find_input_format (Ptr{:Uint8},) shlib
@c Ptr{:AVInputFormat} av_probe_input_format (Ptr{:AVProbeData},:Int32) shlib
@c Ptr{:AVInputFormat} av_probe_input_format2 (Ptr{:AVProbeData},:Int32,Ptr{:Int32}) shlib
@c Int32 av_probe_input_buffer (Ptr{:AVIOContext},Ptr{Ptr{:AVInputFormat}},Ptr{:Uint8},Ptr{:None},:Uint32,:Uint32) shlib
@c Int32 av_open_input_stream (Ptr{Ptr{:AVFormatContext}},Ptr{:AVIOContext},Ptr{:Uint8},Ptr{:AVInputFormat},Ptr{:AVFormatParameters}) shlib
@c Int32 av_open_input_file (Ptr{Ptr{:AVFormatContext}},Ptr{:Uint8},Ptr{:AVInputFormat},:Int32,Ptr{:AVFormatParameters}) shlib
@c Int32 avformat_open_input (Ptr{Ptr{:AVFormatContext}},Ptr{:Uint8},Ptr{:AVInputFormat},Ptr{Ptr{:AVDictionary}}) shlib
@c Int32 av_find_stream_info (Ptr{:AVFormatContext},) shlib
@c Int32 avformat_find_stream_info (Ptr{:AVFormatContext},Ptr{Ptr{:AVDictionary}}) shlib
@c Int32 av_find_best_stream (Ptr{:AVFormatContext},:Void,:Int32,:Int32,Ptr{Ptr{:AVCodec}},:Int32) shlib
@c Int32 av_read_packet (Ptr{:AVFormatContext},Ptr{:AVPacket}) shlib
@c Int32 av_read_frame (Ptr{:AVFormatContext},Ptr{:AVPacket}) shlib
@c Int32 av_seek_frame (Ptr{:AVFormatContext},:Int32,:int64_t,:Int32) shlib
@c Int32 avformat_seek_file (Ptr{:AVFormatContext},:Int32,:int64_t,:int64_t,:int64_t,:Int32) shlib
@c Int32 av_read_play (Ptr{:AVFormatContext},) shlib
@c Int32 av_read_pause (Ptr{:AVFormatContext},) shlib
@c None av_close_input_stream (Ptr{:AVFormatContext},) shlib
@c None av_close_input_file (Ptr{:AVFormatContext},) shlib
@c None avformat_close_input (Ptr{Ptr{:AVFormatContext}},) shlib
@c Ptr{:AVStream} av_new_stream (Ptr{:AVFormatContext},:Int32) shlib
@c None av_set_pts_info (Ptr{:AVStream},:Int32,:Uint32,:Uint32) shlib
@c Int32 av_seek_frame_binary (Ptr{:AVFormatContext},:Int32,:int64_t,:Int32) shlib
@c None av_update_cur_dts (Ptr{:AVFormatContext},Ptr{:AVStream},:int64_t) shlib
@c int64_t av_gen_search (Ptr{:AVFormatContext},:Int32,:int64_t,:int64_t,:int64_t,:int64_t,:int64_t,:int64_t,:Int32,Ptr{:int64_t},Ptr{:Void}) shlib
@c Int32 av_set_parameters (Ptr{:AVFormatContext},Ptr{:AVFormatParameters}) shlib
@c Int32 avformat_write_header (Ptr{:AVFormatContext},Ptr{Ptr{:AVDictionary}}) shlib
@c Int32 av_write_header (Ptr{:AVFormatContext},) shlib
@c Int32 av_write_frame (Ptr{:AVFormatContext},Ptr{:AVPacket}) shlib
@c Int32 av_interleaved_write_frame (Ptr{:AVFormatContext},Ptr{:AVPacket}) shlib
@c Int32 av_interleave_packet_per_dts (Ptr{:AVFormatContext},Ptr{:AVPacket},Ptr{:AVPacket},:Int32) shlib
@c Int32 av_write_trailer (Ptr{:AVFormatContext},) shlib
@c Ptr{:AVOutputFormat} av_guess_format (Ptr{:Uint8},Ptr{:Uint8},Ptr{:Uint8}) shlib
@c Int32 av_guess_codec (Ptr{:AVOutputFormat},Ptr{:Uint8},Ptr{:Uint8},Ptr{:Uint8},:Void) shlib
@c None av_hex_dump (Ptr{:FILE},Ptr{:uint8_t},:Int32) shlib
@c None av_hex_dump_log (Ptr{:None},:Int32,Ptr{:uint8_t},:Int32) shlib
@c None av_pkt_dump2 (Ptr{:FILE},Ptr{:AVPacket},:Int32,Ptr{:AVStream}) shlib
@c None av_pkt_dump_log2 (Ptr{:None},:Int32,Ptr{:AVPacket},:Int32,Ptr{:AVStream}) shlib
@c Int32 av_codec_get_id (Ptr{Ptr{:Void}},:Uint32) shlib
@c Uint32 av_codec_get_tag (Ptr{Ptr{:Void}},:Void) shlib
@c Int32 av_find_default_stream_index (Ptr{:AVFormatContext},) shlib
@c Int32 av_index_search_timestamp (Ptr{:AVStream},:int64_t,:Int32) shlib
@c Int32 av_add_index_entry (Ptr{:AVStream},:int64_t,:int64_t,:Int32,:Int32,:Int32) shlib
@c None av_url_split (Ptr{:Uint8},:Int32,Ptr{:Uint8},:Int32,Ptr{:Uint8},:Int32,Ptr{:Int32},Ptr{:Uint8},:Int32,Ptr{:Uint8}) shlib
@c None dump_format (Ptr{:AVFormatContext},:Int32,Ptr{:Uint8},:Int32) shlib
@c None av_dump_format (Ptr{:AVFormatContext},:Int32,Ptr{:Uint8},:Int32) shlib
@c int64_t parse_date (Ptr{:Uint8},:Int32) shlib
@c int64_t av_gettime () shlib
@c Int32 find_info_tag (Ptr{:Uint8},:Int32,Ptr{:Uint8},Ptr{:Uint8}) shlib
@c Int32 av_get_frame_filename (Ptr{:Uint8},:Int32,Ptr{:Uint8},:Int32) shlib
@c Int32 av_filename_number_test (Ptr{:Uint8},) shlib
@c Int32 av_sdp_create (Ptr{Ptr{:AVFormatContext}},:Int32,Ptr{:Uint8},:Int32) shlib
@c Int32 avf_sdp_create (Ptr{Ptr{:AVFormatContext}},:Int32,Ptr{:Uint8},:Int32) shlib
@c Int32 av_match_ext (Ptr{:Uint8},Ptr{:Uint8}) shlib
@c Int32 avformat_query_codec (Ptr{:AVOutputFormat},:Void,:Int32) shlib
@c Ptr{:Void} avformat_get_riff_video_tags () shlib
@c Ptr{:Void} avformat_get_riff_audio_tags () shlib
# header: /usr/include/libavformat/avio.h
# header: /usr/include/libavformat/version.h
# header: /usr/include/libswscale/swscale.h
@c Uint32 swscale_version () shlib
@c Ptr{:Uint8} swscale_configuration () shlib
@c Ptr{:Uint8} swscale_license () shlib
@c Ptr{:Int32} sws_getCoefficients (:Int32,) shlib
@ctypedef SwsVector Void
@ctypedef SwsFilter Void
@c Int32 sws_isSupportedInput (:Void,) shlib
@c Int32 sws_isSupportedOutput (:Void,) shlib
@c Ptr{:Void} sws_alloc_context () shlib
@c Int32 sws_init_context (Ptr{:Void},Ptr{:SwsFilter},Ptr{:SwsFilter}) shlib
@c None sws_freeContext (Ptr{:Void},) shlib
@c Ptr{:Void} sws_getContext (:Int32,:Int32,:Void,:Int32,:Int32,:Void,:Int32,Ptr{:SwsFilter},Ptr{:SwsFilter},Ptr{:Float64}) shlib
@c Int32 sws_scale (Ptr{:Void},Ptr{Ptr{:uint8_t}},Ptr{:Int32},:Int32,:Int32,Ptr{Ptr{:uint8_t}},Ptr{:Int32}) shlib
@c Int32 sws_setColorspaceDetails (Ptr{:Void},Ptr{:Int32},:Int32,Ptr{:Int32},:Int32,:Int32,:Int32,:Int32) shlib
@c Int32 sws_getColorspaceDetails (Ptr{:Void},Ptr{Ptr{:Int32}},Ptr{:Int32},Ptr{Ptr{:Int32}},Ptr{:Int32},Ptr{:Int32},Ptr{:Int32},Ptr{:Int32}) shlib
@c Ptr{:SwsVector} sws_allocVec (:Int32,) shlib
@c Ptr{:SwsVector} sws_getGaussianVec (:Float64,:Float64) shlib
@c Ptr{:SwsVector} sws_getConstVec (:Float64,:Int32) shlib
@c Ptr{:SwsVector} sws_getIdentityVec () shlib
@c None sws_scaleVec (Ptr{:SwsVector},:Float64) shlib
@c None sws_normalizeVec (Ptr{:SwsVector},:Float64) shlib
@c None sws_convVec (Ptr{:SwsVector},Ptr{:SwsVector}) shlib
@c None sws_addVec (Ptr{:SwsVector},Ptr{:SwsVector}) shlib
@c None sws_subVec (Ptr{:SwsVector},Ptr{:SwsVector}) shlib
@c None sws_shiftVec (Ptr{:SwsVector},:Int32) shlib
@c Ptr{:SwsVector} sws_cloneVec (Ptr{:SwsVector},) shlib
@c None sws_printVec2 (Ptr{:SwsVector},Ptr{:AVClass},:Int32) shlib
@c None sws_freeVec (Ptr{:SwsVector},) shlib
@c Ptr{:SwsFilter} sws_getDefaultFilter (:Float32,:Float32,:Float32,:Float32,:Float32,:Float32,:Int32) shlib
@c None sws_freeFilter (Ptr{:SwsFilter},) shlib
@c Ptr{:Void} sws_getCachedContext (Ptr{:Void},:Int32,:Int32,:Void,:Int32,:Int32,:Void,:Int32,Ptr{:SwsFilter},Ptr{:SwsFilter},Ptr{:Float64}) shlib
@c None sws_convertPalette8ToPacked32 (Ptr{:uint8_t},Ptr{:uint8_t},:Int32,Ptr{:uint8_t}) shlib
@c None sws_convertPalette8ToPacked24 (Ptr{:uint8_t},Ptr{:uint8_t},:Int32,Ptr{:uint8_t}) shlib
@c Ptr{:AVClass} sws_get_class () shlib
import Clang.wrap_c
if (!has(ENV, "JULIAHOME"))
error("Please set JULIAHOME variable to the root of your julia install")
end
clang_includes = map(x->joinpath(ENV["JULIAHOME"], x), [
"deps/llvm-3.2/build/Release/lib/clang/3.2/include",
"deps/llvm-3.2/include",
"deps/llvm-3.2/include",
"deps/llvm-3.2/build/include/",
"deps/llvm-3.2/include/"
])
av_hpath = ["/usr/include/libavcodec/","/usr/include/libavformat/","/usr/include/libswscale/"]
append!(clang_includes, av_hpath)
av_headers = Array(ASCIIString, 0)
for path in av_hpath
tmp = map(x->joinpath(path, x),split(readall(`ls $path` | `sort`)) )
append!(av_headers, tmp)
end
println(av_headers)
# called to determine if cursor should be included
check_use_header(hpath) = begin
hbase = av_hpath
ret = false
for d in hbase
l = min(length(hpath), length(d))
ret = ret | (hpath[1:l] == d[1:l])
end
println(hpath, " ", ret)
ret
end
wrap_c.wrap_c_headers(av_headers, clang_includes, ASCIIString[], check_use_header, "/home/tim/src/julia-modules/libav/src/libav.jl")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment