Documentation
¶
Overview ¶
Use of this source code is governed by a MIT license that can be found in the LICENSE file. by Giorgis (habtom@giorgis.io)
The codecs (decoders and encoders) provided by the libavcodec library libavcodec provides some generic global options, which can be set on all the encoders and decoders.
Use of this source code is governed by a MIT license that can be found in the LICENSE file. by Giorgis (habtom@giorgis.io)
Index ¶
- func Av_bitstream_filter_close(bsctxt *AVBitStreamFilterContext)
- func Av_bitstream_filter_filter(bsctxt *AVBitStreamFilterContext, ctxt *AVCodecContext, a string, p **uint8, ...) int
- func Av_codec_get_chroma_intra_matrix(ctxt *AVCodecContext) *uint16
- func Av_codec_get_lowres(ctxt *AVCodecContext) int
- func Av_codec_get_max_lowres(c *AVCodec) int
- func Av_codec_get_seek_preroll(ctxt *AVCodecContext) int
- func Av_codec_is_decoder(c *AVCodec) int
- func Av_codec_is_encoder(c *AVCodec) int
- func Av_codec_set_chroma_intra_matrix(ctxt *AVCodecContext, t *uint16)
- func Av_codec_set_codec_descriptor(ctxt *AVCodecContext, d *AVCodecDescriptor)
- func Av_codec_set_lowres(ctxt *AVCodecContext, i int)
- func Av_codec_set_pkt_timebase(ctxt *AVCodecContext, r AVRational)
- func Av_codec_set_seek_preroll(ctxt *AVCodecContext, i int)
- func Av_copy_packet(p, r *AVPacket) int
- func Av_copy_packet_side_data(p, r *AVPacket) int
- func Av_dup_packet(p *AVPacket) int
- func Av_fast_padded_malloc(p unsafe.Pointer, s *uint, t uintptr)
- func Av_fast_padded_mallocz(p unsafe.Pointer, s *uint, t uintptr)
- func Av_free_packet(p *AVPacket)
- func Av_get_audio_frame_duration(ctxt *AVCodecContext, f int) int
- func Av_get_bits_per_sample(c AVCodecID) int
- func Av_get_codec_tag_string(b string, bf uintptr, c uint) uintptr
- func Av_get_exact_bits_per_sample(c AVCodecID) int
- func Av_get_profile_name(c *AVCodec, p int) string
- func Av_grow_packet(p *AVPacket, s int) int
- func Av_init_packet(p *AVPacket)
- func Av_new_packet(p *AVPacket, s int) int
- func Av_packet_copy_props(p, s *AVPacket) int
- func Av_packet_free_side_data(p *AVPacket)
- func Av_packet_from_data(p *AVPacket, d *uint8, s int) int
- func Av_packet_get_side_data(p *AVPacket, t AVPacketSideDataType, s *int) *uint8
- func Av_packet_merge_side_data(p *AVPacket) int
- func Av_packet_move_ref(p, s *AVPacket)
- func Av_packet_new_side_data(p *AVPacket, t AVPacketSideDataType, s int) *uint8
- func Av_packet_pack_dictionary(d *AVDictionary, s *int) *uint8
- func Av_packet_ref(p, s *AVPacket) int
- func Av_packet_rescale_ts(p *AVPacket, r, r2 AVRational)
- func Av_packet_shrink_side_data(p *AVPacket, t AVPacketSideDataType, s int) int
- func Av_packet_side_data_name(t AVPacketSideDataType) string
- func Av_packet_split_side_data(p *AVPacket) int
- func Av_packet_unpack_dictionary(d *uint8, s int, dt **AVDictionary) int
- func Av_packet_unref(p *AVPacket)
- func Av_parser_change(ctxtp *AVCodecParserContext, ctxt *AVCodecContext, pb **uint8, pbs *int, ...) int
- func Av_parser_close(ctxtp *AVCodecParserContext)
- func Av_parser_parse2(ctxtp *AVCodecParserContext, ctxt *AVCodecContext, p **uint8, ps *int, ...) int
- func Av_picture_copy(d, s *AVPicture, pf AVPixelFormat, w, h int)
- func Av_picture_crop(d, s *AVPicture, pf AVPixelFormat, t, l int) int
- func Av_picture_pad(p, s *AVPicture, h, w int, pf AVPixelFormat, t, b, l, r int, c *int) int
- func Av_register_bitstream_filter(b *AVBitStreamFilter)
- func Av_register_codec_parser(p *AVCodecParser)
- func Av_shrink_packet(p *AVPacket, s int)
- func Av_xiphlacing(s *string, v uint) uint
- func Avcodec_align_dimensions(ctxt *AVCodecContext, w, h *int)
- func Avcodec_align_dimensions2(ctxt *AVCodecContext, w, h *int, l int)
- func Avcodec_close(ctxt *AVCodecContext) int
- func Avcodec_configuration() string
- func Avcodec_copy_context(ctxt, ctxt2 *AVCodecContext) int
- func Avcodec_decode_audio4(ctxt *AVCodecContext, f *AVFrame, g *int, a *AVPacket) int
- func Avcodec_decode_subtitle2(ctxt *AVCodecContext, s *AVSubtitle, g *int, a *AVPacket) int
- func Avcodec_decode_video2(ctxt *AVCodecContext, p *AVFrame, g *int, a *AVPacket) int
- func Avcodec_default_get_buffer2(s *AVCodecContext, f *AVFrame, l int) int
- func Avcodec_encode_audio2(ctxt *AVCodecContext, p *AVPacket, f *AVFrame, gp *int) int
- func Avcodec_encode_subtitle(ctxt *AVCodecContext, b *uint8, bs int, s *AVSubtitle) int
- func Avcodec_enum_to_chroma_pos(x, y *int, l AVChromaLocation) int
- func Avcodec_fill_audio_frame(f *AVFrame, c int, s AVSampleFormat, b *uint8, bs, a int) int
- func Avcodec_flush_buffers(ctxt *AVCodecContext)
- func Avcodec_free_context(ctxt **AVCodecContext)
- func Avcodec_get_chroma_sub_sample(pf AVPixelFormat, h, v *int)
- func Avcodec_get_context_defaults3(ctxt *AVCodecContext, c *AVCodec) int
- func Avcodec_get_name(d AVCodecID) string
- func Avcodec_get_pix_fmt_loss(p, f AVPixelFormat, a int) int
- func Avcodec_is_open(ctxt *AVCodecContext) int
- func Avcodec_license() string
- func Avcodec_open2(ctxt *AVCodecContext, c *AVCodec, d **AVDictionary) int
- func Avcodec_pix_fmt_to_codec_tag(pf AVPixelFormat) uint
- func Avcodec_register(c *AVCodec)
- func Avcodec_register_all()
- func Avcodec_string(b string, bs int, ctxt *AVCodecContext, e int)
- func Avcodec_version() uint
- func Avpicture_alloc(p *AVPicture, t AVPixelFormat, w, h int) int
- func Avpicture_fill(p *AVPicture, pt *uint8, pf AVPixelFormat, w, h int) int
- func Avpicture_free(p *AVPicture)
- func Avpicture_get_size(pf AVPixelFormat, w, h int) int
- func Avpicture_layout(s *AVPicture, pf AVPixelFormat, w, h int, d *string, ds int) int
- func Avsubtitle_free(s *AVSubtitle)
- func Height(c *AVCodecContext) int
- func Stream_index(p *AVPacket) int
- func Width(c *AVCodecContext) int
- type AVBitStreamFilter
- type AVBitStreamFilterContext
- type AVChromaLocation
- type AVClass
- type AVCodec
- type AVCodecContext
- type AVCodecDescriptor
- type AVCodecID
- type AVCodecParser
- type AVCodecParserContext
- type AVDictionary
- type AVFrame
- type AVHWAccel
- type AVMediaType
- type AVPacket
- type AVPacketSideData
- type AVPacketSideDataType
- type AVPanScan
- type AVPicture
- type AVPixelFormat
- func Avcodec_default_get_format(ctxt *AVCodecContext, f *AVPixelFormat) AVPixelFormat
- func Avcodec_find_best_pix_fmt_of_2(f1, f2, s AVPixelFormat, a int, l *int) AVPixelFormat
- func Avcodec_find_best_pix_fmt_of_list(f *AVPixelFormat, s AVPixelFormat, a int, p *int) AVPixelFormat
- func Pix_fmt(c *AVCodecContext) AVPixelFormat
- type AVProfile
- type AVRational
- type AVSampleFormat
- type AVSubtitle
- type AVSubtitleRect
- type RcOverride
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Av_bitstream_filter_close ¶
func Av_bitstream_filter_close(bsctxt *AVBitStreamFilterContext)
Release bitstream filter context. void av_bitstream_filter_close (AVBitStreamFilterContext *bsf)
func Av_bitstream_filter_filter ¶
func Av_bitstream_filter_filter(bsctxt *AVBitStreamFilterContext, ctxt *AVCodecContext, a string, p **uint8, ps *int, b *uint8, bs, k int) int
Filter bitstream. int av_bitstream_filter_filter (AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
func Av_codec_get_chroma_intra_matrix ¶
func Av_codec_get_chroma_intra_matrix(ctxt *AVCodecContext) *uint16
uint16_t *av_codec_get_chroma_intra_matrix (const AVCodecContext *avctx)
func Av_codec_get_lowres ¶
func Av_codec_get_lowres(ctxt *AVCodecContext) int
int av_codec_get_lowres (const AVCodecContext *avctx)
func Av_codec_get_max_lowres ¶
int av_codec_get_max_lowres (const AVCodec *codec)
func Av_codec_get_seek_preroll ¶
func Av_codec_get_seek_preroll(ctxt *AVCodecContext) int
int av_codec_get_seek_preroll (const AVCodecContext *avctx)
func Av_codec_is_decoder ¶
int av_codec_is_decoder (const AVCodec *codec)
func Av_codec_is_encoder ¶
int av_codec_is_encoder (const AVCodec *codec)
func Av_codec_set_chroma_intra_matrix ¶
func Av_codec_set_chroma_intra_matrix(ctxt *AVCodecContext, t *uint16)
void av_codec_set_chroma_intra_matrix (AVCodecContext *avctx, uint16_t *val)
func Av_codec_set_codec_descriptor ¶
func Av_codec_set_codec_descriptor(ctxt *AVCodecContext, d *AVCodecDescriptor)
void av_codec_set_codec_descriptor (AVCodecContext *avctx, const AVCodecDescriptor *desc)
func Av_codec_set_lowres ¶
func Av_codec_set_lowres(ctxt *AVCodecContext, i int)
void av_codec_set_lowres (AVCodecContext *avctx, int val)
func Av_codec_set_pkt_timebase ¶
func Av_codec_set_pkt_timebase(ctxt *AVCodecContext, r AVRational)
void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val)
func Av_codec_set_seek_preroll ¶
func Av_codec_set_seek_preroll(ctxt *AVCodecContext, i int)
void av_codec_set_seek_preroll (AVCodecContext *avctx, int val)
func Av_copy_packet ¶
Copy packet, including contents. int av_copy_packet (AVPacket *dst, const AVPacket *src)
func Av_copy_packet_side_data ¶
Copy packet side data. int av_copy_packet_side_data (AVPacket *dst, const AVPacket *src)
func Av_fast_padded_malloc ¶
Same behaviour av_fast_malloc but the buffer has additional FF_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0. void av_fast_padded_malloc (void *ptr, unsigned int *size, size_t min_size)
func Av_fast_padded_mallocz ¶
Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call. void av_fast_padded_mallocz (void *ptr, unsigned int *size, size_t min_size)
func Av_free_packet ¶
func Av_free_packet(p *AVPacket)
Free a packet. void av_free_packet (AVPacket *pkt)
func Av_get_audio_frame_duration ¶
func Av_get_audio_frame_duration(ctxt *AVCodecContext, f int) int
Return audio frame duration. int av_get_audio_frame_duration (AVCodecContext *avctx, int frame_bytes)
func Av_get_bits_per_sample ¶
Return codec bits per sample. int av_get_bits_per_sample (enum AVCodecID codec_id)
func Av_get_codec_tag_string ¶
size_t av_get_codec_tag_string (char *buf, size_t buf_size, unsigned int codec_tag) Put a string representing the codec tag codec_tag in buf.
func Av_get_exact_bits_per_sample ¶
Return codec bits per sample. int av_get_exact_bits_per_sample (enum AVCodecID codec_id)
func Av_get_profile_name ¶
Return a name for the specified profile, if available. const char *av_get_profile_name (const AVCodec *codec, int profile)
func Av_grow_packet ¶
Increase packet size, correctly zeroing padding. int av_grow_packet (AVPacket *pkt, int grow_by)
func Av_init_packet ¶
func Av_init_packet(p *AVPacket)
Initialize optional fields of a packet with default values. void av_init_packet (AVPacket *pkt)
func Av_new_packet ¶
Allocate the payload of a packet and initialize its fields with default values. int av_new_packet (AVPacket *pkt, int size)
func Av_packet_copy_props ¶
Copy only "properties" fields from src to dst. int av_packet_copy_props (AVPacket *dst, const AVPacket *src)
func Av_packet_free_side_data ¶
func Av_packet_free_side_data(p *AVPacket)
Convenience function to free all the side data stored. void av_packet_free_side_data (AVPacket *pkt)
func Av_packet_from_data ¶
Initialize a reference-counted packet from av_malloc()ed data. int av_packet_from_data (AVPacket *pkt, uint8_t *data, int size)
func Av_packet_get_side_data ¶
func Av_packet_get_side_data(p *AVPacket, t AVPacketSideDataType, s *int) *uint8
Get side information from packet. uint8_t *av_packet_get_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int *size)
func Av_packet_merge_side_data ¶
int av_packet_merge_side_data (AVPacket *pkt)
func Av_packet_move_ref ¶
func Av_packet_move_ref(p, s *AVPacket)
Move every field in src to dst and reset src. void av_packet_move_ref (AVPacket *dst, AVPacket *src)
func Av_packet_new_side_data ¶
func Av_packet_new_side_data(p *AVPacket, t AVPacketSideDataType, s int) *uint8
Allocate new information of a packet. uint8_t *av_packet_new_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int size)
func Av_packet_pack_dictionary ¶
func Av_packet_pack_dictionary(d *AVDictionary, s *int) *uint8
Pack a dictionary for use in side_data. uint8_t *av_packet_pack_dictionary (AVDictionary *dict, int *size)
func Av_packet_ref ¶
Setup a new reference to the data described by a given packet. int av_packet_ref (AVPacket *dst, const AVPacket *src)
func Av_packet_rescale_ts ¶
func Av_packet_rescale_ts(p *AVPacket, r, r2 AVRational)
Convert valid timing fields (timestamps / durations) in a packet from one timebase to another. void av_packet_rescale_ts (AVPacket *pkt, AVRational tb_src, AVRational tb_dst)
func Av_packet_shrink_side_data ¶
func Av_packet_shrink_side_data(p *AVPacket, t AVPacketSideDataType, s int) int
Shrink the already allocated side data buffer. int av_packet_shrink_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int size)
func Av_packet_side_data_name ¶
func Av_packet_side_data_name(t AVPacketSideDataType) string
const char *av_packet_side_data_name (enum AVPacketSideDataType type)
func Av_packet_split_side_data ¶
int av_packet_split_side_data (AVPacket *pkt)
func Av_packet_unpack_dictionary ¶
func Av_packet_unpack_dictionary(d *uint8, s int, dt **AVDictionary) int
Unpack a dictionary from side_data. int av_packet_unpack_dictionary (const uint8_t *data, int size, AVDictionary **dict)
func Av_packet_unref ¶
func Av_packet_unref(p *AVPacket)
Wipe the packet. void av_packet_unref (AVPacket *pkt)
func Av_parser_change ¶
func Av_parser_change(ctxtp *AVCodecParserContext, ctxt *AVCodecContext, pb **uint8, pbs *int, b *uint8, bs, k int) int
int av_parser_change (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
func Av_parser_close ¶
func Av_parser_close(ctxtp *AVCodecParserContext)
void av_parser_close (AVCodecParserContext *s)
func Av_parser_parse2 ¶
func Av_parser_parse2(ctxtp *AVCodecParserContext, ctxt *AVCodecContext, p **uint8, ps *int, b *uint8, bs int, pt, dt, po int64) int
Parse a packet. int av_parser_parse2 (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts, int64_t pos)
func Av_picture_copy ¶
func Av_picture_copy(d, s *AVPicture, pf AVPixelFormat, w, h int)
Copy image src to dst. void av_picture_copy (AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height)
func Av_picture_crop ¶
func Av_picture_crop(d, s *AVPicture, pf AVPixelFormat, t, l int) int
Crop image top and left side. int av_picture_crop (AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int top_band, int left_band)
func Av_picture_pad ¶
Pad image. int av_picture_pad (AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color)
func Av_register_bitstream_filter ¶
func Av_register_bitstream_filter(b *AVBitStreamFilter)
Register a bitstream filter. void av_register_bitstream_filter (AVBitStreamFilter *bsf)
func Av_register_codec_parser ¶
func Av_register_codec_parser(p *AVCodecParser)
void av_register_codec_parser (AVCodecParser *parser)
func Av_shrink_packet ¶
Reduce packet size, correctly zeroing padding. void av_shrink_packet (AVPacket *pkt, int size)
func Av_xiphlacing ¶
Encode extradata length to a buffer. unsigned int av_xiphlacing (unsigned char *s, unsigned int v)
func Avcodec_align_dimensions ¶
func Avcodec_align_dimensions(ctxt *AVCodecContext, w, h *int)
Modify width and height values so that they will result in a memory buffer that is acceptable for the codec if you do not use any horizontal padding. void avcodec_align_dimensions (AVCodecContext *s, int *width, int *height)
func Avcodec_align_dimensions2 ¶
func Avcodec_align_dimensions2(ctxt *AVCodecContext, w, h *int, l int)
Modify width and height values so that they will result in a memory buffer that is acceptable for the codec if you also ensure that all line sizes are a multiple of the respective linesize_align[i]. void avcodec_align_dimensions2 (AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS])
func Avcodec_close ¶
func Avcodec_close(ctxt *AVCodecContext) int
Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext itself). int avcodec_close (AVCodecContext *avctx)
func Avcodec_configuration ¶
func Avcodec_configuration() string
Return the libavcodec build-time configuration. const char *avcodec_configuration (void)
func Avcodec_copy_context ¶
func Avcodec_copy_context(ctxt, ctxt2 *AVCodecContext) int
Copy the settings of the source AVCodecContext into the destination AVCodecContext. int avcodec_copy_context (AVCodecContext *dest, const AVCodecContext *src)
func Avcodec_decode_audio4 ¶
func Avcodec_decode_audio4(ctxt *AVCodecContext, f *AVFrame, g *int, a *AVPacket) int
Decode the audio frame of size avpkt->size from avpkt->data into frame. int avcodec_decode_audio4 (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt)
func Avcodec_decode_subtitle2 ¶
func Avcodec_decode_subtitle2(ctxt *AVCodecContext, s *AVSubtitle, g *int, a *AVPacket) int
Decode a subtitle message. int avcodec_decode_subtitle2 (AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)
func Avcodec_decode_video2 ¶
func Avcodec_decode_video2(ctxt *AVCodecContext, p *AVFrame, g *int, a *AVPacket) int
Decode the video frame of size avpkt->size from avpkt->data into picture. int avcodec_decode_video2 (AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt)
func Avcodec_default_get_buffer2 ¶
func Avcodec_default_get_buffer2(s *AVCodecContext, f *AVFrame, l int) int
The default callback for AVCodecContext.get_buffer2(). int avcodec_default_get_buffer2 (AVCodecContext *s, AVFrame *frame, int flags)
func Avcodec_encode_audio2 ¶
func Avcodec_encode_audio2(ctxt *AVCodecContext, p *AVPacket, f *AVFrame, gp *int) int
Encode a frame of audio. int avcodec_encode_audio2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
func Avcodec_encode_subtitle ¶
func Avcodec_encode_subtitle(ctxt *AVCodecContext, b *uint8, bs int, s *AVSubtitle) int
int avcodec_encode_subtitle (AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
func Avcodec_enum_to_chroma_pos ¶
func Avcodec_enum_to_chroma_pos(x, y *int, l AVChromaLocation) int
Converts AVChromaLocation to swscale x/y chroma position. int avcodec_enum_to_chroma_pos (int *xpos, int *ypos, enum AVChromaLocation pos)
func Avcodec_fill_audio_frame ¶
Fill AVFrame audio data and linesize pointers. int avcodec_fill_audio_frame (AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align)
func Avcodec_flush_buffers ¶
func Avcodec_flush_buffers(ctxt *AVCodecContext)
Reset the internal decoder state / flush internal buffers. void avcodec_flush_buffers (AVCodecContext *avctx)
func Avcodec_free_context ¶
func Avcodec_free_context(ctxt **AVCodecContext)
Free the codec context and everything associated with it and write NULL to the provided pointer. void avcodec_free_context (AVCodecContext **avctx)
func Avcodec_get_chroma_sub_sample ¶
func Avcodec_get_chroma_sub_sample(pf AVPixelFormat, h, v *int)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor. void avcodec_get_chroma_sub_sample (enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
func Avcodec_get_context_defaults3 ¶
func Avcodec_get_context_defaults3(ctxt *AVCodecContext, c *AVCodec) int
Set the fields of the given AVCodecContext to default values corresponding to the given codec (defaults may be codec-dependent). int avcodec_get_context_defaults3 (AVCodecContext *s, const AVCodec *codec)
func Avcodec_get_name ¶
Get the name of a codec. const char *avcodec_get_name (enum AVCodecID id)
func Avcodec_get_pix_fmt_loss ¶
func Avcodec_get_pix_fmt_loss(p, f AVPixelFormat, a int) int
int avcodec_get_pix_fmt_loss (enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, int has_alpha)
func Avcodec_is_open ¶
func Avcodec_is_open(ctxt *AVCodecContext) int
int avcodec_is_open (AVCodecContext *s)
func Avcodec_license ¶
func Avcodec_license() string
Return the libavcodec license. const char *avcodec_license (void)
func Avcodec_open2 ¶
func Avcodec_open2(ctxt *AVCodecContext, c *AVCodec, d **AVDictionary) int
Initialize the AVCodecContext to use the given AVCodec int avcodec_open2 (AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
func Avcodec_pix_fmt_to_codec_tag ¶
func Avcodec_pix_fmt_to_codec_tag(pf AVPixelFormat) uint
Return a value representing the fourCC code associated to the pixel format pix_fmt, or 0 if no associated fourCC code can be found. unsigned int avcodec_pix_fmt_to_codec_tag (enum AVPixelFormat pix_fmt)
func Avcodec_register ¶
func Avcodec_register(c *AVCodec)
Register the codec codec and initialize libavcodec. void avcodec_register (AVCodec *codec)
func Avcodec_register_all ¶
func Avcodec_register_all()
Register all the codecs, parsers and bitstream filters which were enabled at configuration time. void avcodec_register_all (void)
func Avcodec_string ¶
func Avcodec_string(b string, bs int, ctxt *AVCodecContext, e int)
void avcodec_string (char *buf, int buf_size, AVCodecContext *enc, int encode)
func Avcodec_version ¶
func Avcodec_version() uint
Return the LIBAVCODEC_VERSION_INT constant. unsigned avcodec_version (void)
func Avpicture_alloc ¶
func Avpicture_alloc(p *AVPicture, t AVPixelFormat, w, h int) int
Free a picture previously allocated by avpicture_alloc(). Allocate memory for the pixels of a picture and setup the AVPicture fields for it.
func Avpicture_fill ¶
func Avpicture_fill(p *AVPicture, pt *uint8, pf AVPixelFormat, w, h int) int
Setup the picture fields based on the specified image parameters and the provided image data buffer. int avpicture_fill (AVPicture *picture, const uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height)
func Avpicture_get_size ¶
func Avpicture_get_size(pf AVPixelFormat, w, h int) int
Calculate the size in bytes that a picture of the given width and height would occupy if stored in the given picture format. int avpicture_get_size (enum AVPixelFormat pix_fmt, int width, int height)
func Avpicture_layout ¶
Copy pixel data from an AVPicture into a buffer. int avpicture_layout (const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
func Avsubtitle_free ¶
func Avsubtitle_free(s *AVSubtitle)
Free all allocated data in the given subtitle struct. void avsubtitle_free (AVSubtitle *sub)
func Height ¶
func Height(c *AVCodecContext) int
func Stream_index ¶
func Width ¶
func Width(c *AVCodecContext) int
Types ¶
type AVBitStreamFilter ¶
type AVBitStreamFilter C.struct_AVBitStreamFilter
func Av_bitstream_filter_next ¶
func Av_bitstream_filter_next(f *AVBitStreamFilter) *AVBitStreamFilter
If f is NULL, return the first registered bitstream filter, if f is non-NULL, return the next registered bitstream filter after f, or NULL if f is the last one. AVBitStreamFilter *av_bitstream_filter_next (const AVBitStreamFilter *f)
type AVBitStreamFilterContext ¶
type AVBitStreamFilterContext C.struct_AVBitStreamFilterContext
func Av_bitstream_filter_init ¶
func Av_bitstream_filter_init(n string) *AVBitStreamFilterContext
Create and initialize a bitstream filter context given a bitstream filter name. AVBitStreamFilterContext *av_bitstream_filter_init (const char *name)
type AVChromaLocation ¶
type AVChromaLocation C.enum_AVChromaLocation
func Avcodec_chroma_pos_to_enum ¶
func Avcodec_chroma_pos_to_enum(x, y int) AVChromaLocation
Converts swscale x/y chroma position to AVChromaLocation. enum AVChromaLocation avcodec_chroma_pos_to_enum (int xpos, int ypos)
type AVClass ¶
type AVClass C.struct_AVClass
func Avcodec_get_class ¶
func Avcodec_get_class() *AVClass
Get the AVClass for AVCodecContext. const AVClass *avcodec_get_class (void)
func Avcodec_get_frame_class ¶
func Avcodec_get_frame_class() *AVClass
Get the AVClass for AVFrame. const AVClass *avcodec_get_frame_class (void)
func Avcodec_get_subtitle_rect_class ¶
func Avcodec_get_subtitle_rect_class() *AVClass
Get the AVClass for AVSubtitleRect. const AVClass *avcodec_get_subtitle_rect_class (void)
type AVCodec ¶
type AVCodec C.struct_AVCodec
func Av_codec_next ¶
If c is NULL, returns the first registered codec, if c is non-NULL, returns the next registered codec after c, or NULL if c is the last one. AVCodec *av_codec_next (const AVCodec *c)
func Avcodec_find_decoder ¶
Find a registered decoder with a matching codec ID. AVCodec *avcodec_find_decoder (enum AVCodecID id)
func Avcodec_find_decoder_by_name ¶
Find a registered decoder with the specified name. AVCodec *avcodec_find_decoder_by_name (const char *name)
func Avcodec_find_encoder ¶
Find a registered encoder with a matching codec ID. AVCodec *avcodec_find_encoder (enum AVCodecID id)
func Avcodec_find_encoder_by_name ¶
Find a registered encoder with the specified name. AVCodec *avcodec_find_encoder_by_name (const char *name)
type AVCodecContext ¶
type AVCodecContext C.struct_AVCodecContext
func Avcodec_alloc_context3 ¶
func Avcodec_alloc_context3(c *AVCodec) *AVCodecContext
Allocate an AVCodecContext and set its fields to default values. AVCodecContext *avcodec_alloc_context3 (const AVCodec *codec)
type AVCodecDescriptor ¶
type AVCodecDescriptor C.struct_AVCodecDescriptor
func Av_codec_get_codec_descriptor ¶
func Av_codec_get_codec_descriptor(ctxt *AVCodecContext) *AVCodecDescriptor
const AVCodecDescriptor * av_codec_get_codec_descriptor (const AVCodecContext *avctx)
func Avcodec_descriptor_get ¶
func Avcodec_descriptor_get(id AVCodecID) *AVCodecDescriptor
const AVCodecDescriptor *avcodec_descriptor_get (enum AVCodecID id)
func Avcodec_descriptor_get_by_name ¶
func Avcodec_descriptor_get_by_name(n string) *AVCodecDescriptor
const AVCodecDescriptor *avcodec_descriptor_get_by_name (const char *name)
func Avcodec_descriptor_next ¶
func Avcodec_descriptor_next(d *AVCodecDescriptor) *AVCodecDescriptor
Iterate over all codec descriptors known to libavcodec. const AVCodecDescriptor *avcodec_descriptor_next (const AVCodecDescriptor *prev)
type AVCodecID ¶
type AVCodecID C.enum_AVCodecID
func Av_get_pcm_codec ¶
func Av_get_pcm_codec(f AVSampleFormat, b int) AVCodecID
Return the PCM codec associated with a sample format. enum AVCodecID av_get_pcm_codec (enum AVSampleFormat fmt, int be)
func Codec_id ¶
func Codec_id(c *AVCodecContext) AVCodecID
type AVCodecParser ¶
type AVCodecParser C.struct_AVCodecParser
func Av_parser_next ¶
func Av_parser_next(p *AVCodecParser) *AVCodecParser
AVCodecParser *av_parser_next (const AVCodecParser *c)
type AVCodecParserContext ¶
type AVCodecParserContext C.struct_AVCodecParserContext
func Av_parser_init ¶
func Av_parser_init(c int) *AVCodecParserContext
AVCodecParserContext *av_parser_init (int codec_id)
type AVDictionary ¶
type AVDictionary C.struct_AVDictionary
type AVFrame ¶
type AVFrame C.struct_AVFrame
type AVHWAccel ¶
type AVHWAccel C.struct_AVHWAccel
func Av_hwaccel_next ¶
If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL, returns the next registered hardware accelerator after hwaccel, or NULL if hwaccel is the last one. AVHWAccel *av_hwaccel_next (const AVHWAccel *hwaccel)
type AVMediaType ¶
type AVMediaType C.enum_AVMediaType
func Avcodec_get_type ¶
func Avcodec_get_type(c AVCodecID) AVMediaType
Get the type of the given codec. enum AVMediaType avcodec_get_type (enum AVCodecID codec_id)
type AVPacket ¶
type AVPacket C.struct_AVPacket
type AVPacketSideData ¶
type AVPacketSideData C.struct_AVPacketSideData
type AVPacketSideDataType ¶
type AVPacketSideDataType C.enum_AVPacketSideDataType
type AVPanScan ¶
type AVPanScan C.struct_AVPanScan
type AVPicture ¶
type AVPicture C.struct_AVPicture
type AVPixelFormat ¶
type AVPixelFormat C.enum_AVPixelFormat
func Avcodec_default_get_format ¶
func Avcodec_default_get_format(ctxt *AVCodecContext, f *AVPixelFormat) AVPixelFormat
enum AVPixelFormat avcodec_default_get_format (struct AVCodecContext *s, const enum AVPixelFormat *fmt)
func Avcodec_find_best_pix_fmt_of_2 ¶
func Avcodec_find_best_pix_fmt_of_2(f1, f2, s AVPixelFormat, a int, l *int) AVPixelFormat
enum AVPixelFormat avcodec_find_best_pix_fmt_of_2 (enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
func Avcodec_find_best_pix_fmt_of_list ¶
func Avcodec_find_best_pix_fmt_of_list(f *AVPixelFormat, s AVPixelFormat, a int, p *int) AVPixelFormat
Find the best pixel format to convert to given a certain source pixel format. enum AVPixelFormat avcodec_find_best_pix_fmt_of_list (const enum AVPixelFormat *pix_fmt_list, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
func Pix_fmt ¶
func Pix_fmt(c *AVCodecContext) AVPixelFormat
type AVProfile ¶
type AVProfile C.struct_AVProfile
type AVRational ¶
type AVRational C.struct_AVRational
func Av_codec_get_pkt_timebase ¶
func Av_codec_get_pkt_timebase(ctxt *AVCodecContext) AVRational
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx)
type AVSampleFormat ¶
type AVSampleFormat C.enum_AVSampleFormat
type AVSubtitle ¶
type AVSubtitle C.struct_AVSubtitle
type AVSubtitleRect ¶
type AVSubtitleRect C.struct_AVSubtitleRect
type RcOverride ¶
type RcOverride C.struct_RcOverride