avformat

package
v0.0.0-...-3ef2c16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2015 License: MIT Imports: 4 Imported by: 0

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)

Supported formats (muxers and demuxers) provided by the libavformat library The libavformat library provides some generic global options, which can be set on all the muxers and demuxers. In addition each muxer or demuxer may support so-called private options, which are specific for that component.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Av_add_index_entry

func Av_add_index_entry(st *AVStream, pos, t, int64, s, d, f int) int

int av_add_index_entry (AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags) Add an index entry into a sorted list.

func Av_append_packet

func Av_append_packet(ctxt *AVIOContext, pkt *AVPacket, s int) int

int av_append_packet (AVIOContext *s, AVPacket *pkt, int size) Read data and append it to the current content of the AVPacket.

func Av_codec_get_tag

func Av_codec_get_tag(t **AVCodecTag, id AVCodecID) uint

unsigned int av_codec_get_tag (const struct AVCodecTag *const *tags, enum AVCodecID id) Get the codec tag for the given codec id id.

func Av_codec_get_tag2

func Av_codec_get_tag2(t **AVCodecTag, id AVCodecID, tag *uint) int

int av_codec_get_tag2 (const struct AVCodecTag *const *tags, enum AVCodecID id, unsigned int *tag) Get the codec tag for the given codec id.

func Av_dump_format

func Av_dump_format(ic *AVFormatContext, i int, url string, io int)

void av_dump_format (AVFormatContext *ic, int index, const char *url, int is_output) Print detailed information about the input or output format, such as duration, bitrate, streams, container, programs, metadata, side data, codec and time base.

func Av_filename_number_test

func Av_filename_number_test(f string) int

int av_filename_number_test (const char *filename) Check whether filename actually is a numbered sequence generator.

func Av_find_best_stream

func Av_find_best_stream(ic *AVFormatContext, t AVMediaType, ws, rs int, c **AVCodec, f int) int

int av_find_best_stream (AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, AVCodec **decoder_ret, int flags) Find the "best" stream in the file.

func Av_find_default_stream_index

func Av_find_default_stream_index(s *AVFormatContext) int

int av_find_default_stream_index (AVFormatContext *s)

func Av_format_control_message

func Av_format_control_message(s *AVFormatContext) C.av_format_control_message

av_format_control_message av_format_get_control_message_cb (const AVFormatContext *s)

func Av_format_get_metadata_header_padding

func Av_format_get_metadata_header_padding(s *AVFormatContext) int

int av_format_get_metadata_header_padding (const AVFormatContext *s)

func Av_format_get_opaque

func Av_format_get_opaque(s *AVFormatContext)

void * av_format_get_opaque (const AVFormatContext *s)

func Av_format_get_probe_score

func Av_format_get_probe_score(s *AVFormatContext) int

int av_format_get_probe_score (const AVFormatContext *s)

func Av_format_inject_global_side_data

func Av_format_inject_global_side_data(s *AVFormatContext)

void av_format_inject_global_side_data (AVFormatContext *s) This function will cause global side data to be injected in the next packet of each stream as well as after any subsequent seek.

func Av_format_set_audio_codec

func Av_format_set_audio_codec(s *AVFormatContext, c *AVCodec)

void av_format_set_audio_codec (AVFormatContext *s, AVCodec *c)

func Av_format_set_control_message_cb

func Av_format_set_control_message_cb(s *AVFormatContext, c C.av_format_control_message)

void av_format_set_control_message_cb (AVFormatContext *s, av_format_control_message callback)

func Av_format_set_data_codec

func Av_format_set_data_codec(s *AVFormatContext, c *AVCodec)

void av_format_set_data_codec (AVFormatContext *s, AVCodec *c)

func Av_format_set_metadata_header_padding

func Av_format_set_metadata_header_padding(s *AVFormatContext, c int)

void av_format_set_metadata_header_padding (AVFormatContext *s, int c)

func Av_format_set_opaque

func Av_format_set_opaque(s *AVFormatContext, o int)

void av_format_set_opaque (AVFormatContext *s, void *opaque)

func Av_format_set_subtitle_codec

func Av_format_set_subtitle_codec(s *AVFormatContext, c *AVCodec)

void av_format_set_subtitle_codec (AVFormatContext *s, AVCodec *c)

func Av_format_set_video_codec

func Av_format_set_video_codec(s *AVFormatContext, c *AVCodec)

void av_format_set_video_codec (AVFormatContext *s, AVCodec *c)

func Av_get_frame_filename

func Av_get_frame_filename(b string, bs int, pa string, n int) int

int av_get_frame_filename (char *buf, int buf_size, const char *path, int number) Return in 'buf' the path with 'd' replaced by a number.

func Av_get_output_timestamp

func Av_get_output_timestamp(s *AVFormatContext, st int, dts, wall *C.int64_t) int

int av_get_output_timestamp (struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall) Get timing information for the data currently output.

func Av_get_packet

func Av_get_packet(ctxt *AVIOContext, pkt *AVPacket, s int) int

int av_get_packet (AVIOContext *s, AVPacket *pkt, int size) Allocate and read the payload of a packet and initialize its fields with default values.

func Av_hex_dump

func Av_hex_dump(f *File, b *uint8, s int)

void av_hex_dump (FILE *f, const uint8_t *buf, int size) Send a nice hexadecimal dump of a buffer to the specified file stream.

func Av_hex_dump_log

func Av_hex_dump_log(a, l int, b *uint8, s int)

void av_hex_dump_log (void *avcl, int level, const uint8_t *buf, int size) Send a nice hexadecimal dump of a buffer to the log.

func Av_index_search_timestamp

func Av_index_search_timestamp(st *AVStream, t int64, f int) int

int av_index_search_timestamp (AVStream *st, int64_t timestamp, int flags) Get the index for a specific timestamp.

func Av_interleaved_write_frame

func Av_interleaved_write_frame(s *AVFormatContext, pkt *AVPacket) int

int av_interleaved_write_frame (AVFormatContext *s, AVPacket *pkt) Write a packet to an output media file ensuring correct interleaving.

func Av_interleaved_write_uncoded_frame

func Av_interleaved_write_uncoded_frame(s *AVFormatContext, si int, f *AVFrame) int

int av_interleaved_write_uncoded_frame (AVFormatContext *s, int stream_index, AVFrame *frame) Write a uncoded frame to an output media file.

func Av_match_ext

func Av_match_ext(f, e string) int

int av_match_ext (const char *filename, const char *extensions) Return a positive value if the given filename has one of the given extensions, 0 otherwise.

func Av_pkt_dump2

func Av_pkt_dump2(f *File, pkt *AVPacket, dp int, st *AVStream)

void av_pkt_dump2 (FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st) Send a nice dump of a packet to the specified file stream.

func Av_pkt_dump_log2

func Av_pkt_dump_log2(a int, l int, pkt *AVPacket, dp int, st *AVStream)

void av_pkt_dump_log2 (void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st) Send a nice dump of a packet to the log.

func Av_probe_input_buffer

func Av_probe_input_buffer(pb *AVIOContext, f **AVInputFormat, fi string, l int, o, m uint) int

int av_probe_input_buffer (AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) Like av_probe_input_buffer2() but returns 0 on success.

func Av_probe_input_buffer2

func Av_probe_input_buffer2(pb *AVIOContext, f **AVInputFormat, fi string, l int, o, m uint) int

int av_probe_input_buffer2 (AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) Probe a bytestream to determine the input format.

func Av_read_frame

func Av_read_frame(s *AVFormatContext, pkt *avcodec.AVPacket) int

int av_read_frame (AVFormatContext *s, AVPacket *pkt) Return the next frame of a stream.

func Av_read_pause

func Av_read_pause(s *AVFormatContext) int

int av_read_pause (AVFormatContext *s) Pause a network-based stream (e.g.

func Av_read_play

func Av_read_play(s *AVFormatContext) int

int av_read_play (AVFormatContext *s) Start playing a network-based stream (e.g.

func Av_register_all

func Av_register_all()

void av_register_all (void) Initialize libavformat and register all the muxers, demuxers and protocols.

func Av_register_input_format

func Av_register_input_format(f *AVInputFormat)

void av_register_input_format (AVInputFormat *format)

func Av_register_output_format

func Av_register_output_format(f *AVOutputFormat)

void av_register_output_format (AVOutputFormat *format)

func Av_sdp_create

func Av_sdp_create(ac **AVFormatContext, nf int, b string, s int) int

int av_sdp_create (AVFormatContext *ac[], int n_files, char *buf, int size) Generate an SDP for an RTP session.

func Av_seek_frame

func Av_seek_frame(s *AVFormatContext, st int, t int64, f int) int

int av_seek_frame (AVFormatContext *s, int stream_index, int64_t timestamp, int flags) Seek to the keyframe at timestamp.

func Av_stream_get_end_pts

func Av_stream_get_end_pts(s *AVStream) int64

int64_t av_stream_get_end_pts (const AVStream *st) Returns the pts of the last muxed packet + its duration.

func Av_stream_get_recommended_encoder_configuration(s *AVStream) string

char * av_stream_get_recommended_encoder_configuration (const AVStream *s)

func Av_stream_get_side_data

func Av_stream_get_side_data(s *AVStream, t AVPacketSideDataType, z int) *uint8

uint8_t * av_stream_get_side_data (AVStream *stream, enum AVPacketSideDataType type, int *size) Get side information from stream.

func Av_stream_set_r_frame_rate

func Av_stream_set_r_frame_rate(s *AVStream, r AVRational)

void av_stream_set_r_frame_rate (AVStream *s, AVRational r)

func Av_stream_set_recommended_encoder_configuration(s *AVStream, c string)

void av_stream_set_recommended_encoder_configuration (AVStream *s, char *configuration)

func Av_url_split

func Av_url_split(p string, ps int, a string, as int, h string, hs int, pp *int, path string, psize int, url string)

void av_url_split (char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url) Split a URL string into components.

func Av_write_frame

func Av_write_frame(s *AVFormatContext, pkt *AVPacket) int

int av_write_frame (AVFormatContext *s, AVPacket *pkt) Write a packet to an output media file.

func Av_write_trailer

func Av_write_trailer(s *AVFormatContext) int

int av_write_trailer (AVFormatContext *s) Write the stream trailer to an output media file and free the file private data.

func Av_write_uncoded_frame

func Av_write_uncoded_frame(s *AVFormatContext, si int, f *AVFrame) int

int av_write_uncoded_frame (AVFormatContext *s, int stream_index, AVFrame *frame) Write a uncoded frame to an output media file.

func Av_write_uncoded_frame_query

func Av_write_uncoded_frame_query(s *AVFormatContext, si int) int

int av_write_uncoded_frame_query (AVFormatContext *s, int stream_index) Test whether a muxer supports uncoded frame.

func Avformat_alloc_output_context2

func Avformat_alloc_output_context2(ctx **AVFormatContext, o *AVOutputFormat, fo, fi string) int

int avformat_alloc_output_context2 (AVFormatContext **ctx, AVOutputFormat *oformat, const char *format_name, const char *filename) Allocate an AVFormatContext for an output format.

func Avformat_close_input

func Avformat_close_input(s *AVFormatContext)

void avformat_close_input (AVFormatContext **s) Close an opened input AVFormatContext.

func Avformat_configuration

func Avformat_configuration() string

const char * avformat_configuration (void) Return the libavformat build-time configuration.

func Avformat_find_stream_info

func Avformat_find_stream_info(ic *AVFormatContext, d **AVDictionary) int

int avformat_find_stream_info (AVFormatContext *ic, AVDictionary **options) Read packets of a media file to get stream information.

func Avformat_flush

func Avformat_flush(s *AVFormatContext) int

int avformat_flush (AVFormatContext *s) Discard all internally buffered data.

func Avformat_free_context

func Avformat_free_context(s *AVFormatContext)

void avformat_free_context (AVFormatContext *s) Free an AVFormatContext and all its streams.

func Avformat_license

func Avformat_license() string

const char * avformat_license (void) Return the libavformat license.

func Avformat_match_stream_specifier

func Avformat_match_stream_specifier(s *AVFormatContext, st *AVStream, spec string) int

int avformat_match_stream_specifier (AVFormatContext *s, AVStream *st, const char *spec) Check if the stream st contained in s is matched by the stream specifier spec.

func Avformat_network_deinit

func Avformat_network_deinit() int

int avformat_network_deinit (void) Undo the initialization done by avformat_network_init.

func Avformat_network_init

func Avformat_network_init() int

int avformat_network_init (void) Do global initialization of network components.

func Avformat_open_input

func Avformat_open_input(ps **AVFormatContext, fi string, fmt *AVInputFormat, d **AVDictionary) int

int avformat_open_input (AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options) Open an input stream and read the header.

func Avformat_query_codec

func Avformat_query_codec(o *AVOutputFormat, cd AVCodecID, sc int) int

int avformat_query_codec (const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance) Test if the given container can store a codec.

func Avformat_queue_attached_pictures

func Avformat_queue_attached_pictures(s *AVFormatContext) int

int avformat_queue_attached_pictures (AVFormatContext *s)

func Avformat_seek_file

func Avformat_seek_file(s *AVFormatContext, si int, mit, ts, mat int64, f int) int

int avformat_seek_file (AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags) Seek to timestamp ts.

func Avformat_version

func Avformat_version() uint

unsigned avformat_version (void) Return the LIBAVFORMAT_VERSION_INT constant.

func Avformat_write_header

func Avformat_write_header(s *AVFormatContext, o **AVDictionary) int

int avformat_write_header (AVFormatContext *s, AVDictionary **options) Allocate the stream private data and write the stream header to an output media file.

func Nb_streams

func Nb_streams(n *AVFormatContext) int

Types

type AVChapter

type AVChapter C.struct_AVChapter

type AVClass

type AVClass C.struct_AVClass

func Avformat_get_class

func Avformat_get_class() *AVClass

const AVClass * avformat_get_class (void) Get the AVClass for AVFormatContext.

type AVCodec

type AVCodec C.struct_AVCodec

func Av_format_get_audio_codec

func Av_format_get_audio_codec(s *AVFormatContext) *AVCodec

AVCodec * av_format_get_audio_codec (const AVFormatContext *s)

func Av_format_get_data_codec

func Av_format_get_data_codec(s *AVFormatContext) *AVCodec

AVCodec * av_format_get_data_codec (const AVFormatContext *s)

func Av_format_get_subtitle_codec

func Av_format_get_subtitle_codec(s *AVFormatContext) *AVCodec

AVCodec * av_format_get_subtitle_codec (const AVFormatContext *s)

func Av_format_get_video_codec

func Av_format_get_video_codec(s *AVFormatContext) *AVCodec

AVCodec * av_format_get_video_codec (const AVFormatContext *s)

type AVCodecContext

type AVCodecContext C.struct_AVCodecContext

func Codec

func Codec(s *AVStream) *AVCodecContext

type AVCodecID

type AVCodecID C.enum_AVCodecID

func Av_codec_get_id

func Av_codec_get_id(t **AVCodecTag, tag uint) AVCodecID

enum AVCodecID av_codec_get_id (const struct AVCodecTag *const *tags, unsigned int tag) Get the AVCodecID for the given codec tag tag.

func Av_guess_codec

func Av_guess_codec(fmt *AVOutputFormat, sn, f, mt string, t AVMediaType) AVCodecID

enum AVCodecID av_guess_codec (AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type) Guess the codec ID based upon muxer and filename.

type AVCodecParserContext

type AVCodecParserContext C.struct_AVCodecParserContext

func Av_stream_get_parser

func Av_stream_get_parser(s *AVStream) *AVCodecParserContext

struct AVCodecParserContext * av_stream_get_parser (const AVStream *s)

type AVCodecTag

type AVCodecTag C.struct_AVCodecTag

func Avformat_get_mov_audio_tags

func Avformat_get_mov_audio_tags() *AVCodecTag

struct AVCodecTag * avformat_get_mov_audio_tags (void)

func Avformat_get_mov_video_tags

func Avformat_get_mov_video_tags() *AVCodecTag

struct AVCodecTag * avformat_get_mov_video_tags (void)

func Avformat_get_riff_audio_tags

func Avformat_get_riff_audio_tags() *AVCodecTag

struct AVCodecTag * avformat_get_riff_audio_tags (void)

func Avformat_get_riff_video_tags

func Avformat_get_riff_video_tags() *AVCodecTag

struct AVCodecTag * avformat_get_riff_video_tags (void)

type AVDictionary

type AVDictionary C.struct_AVDictionary

type AVDurationEstimationMethod

type AVDurationEstimationMethod C.enum_AVDurationEstimationMethod

func Av_fmt_ctx_get_duration_estimation_method

func Av_fmt_ctx_get_duration_estimation_method(ctx *AVFormatContext) AVDurationEstimationMethod

enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method (const AVFormatContext *ctx) Returns the method used to set ctx->duration.

type AVFormatContext

type AVFormatContext C.struct_AVFormatContext

func Avformat_alloc_context

func Avformat_alloc_context() *AVFormatContext

AVFormatContext * avformat_alloc_context (void) Allocate an AVFormatContext.

type AVFrame

type AVFrame C.struct_AVFrame

type AVIOContext

type AVIOContext C.struct_AVIOContext

type AVIndexEntry

type AVIndexEntry C.struct_AVIndexEntry

type AVInputFormat

type AVInputFormat C.struct_AVInputFormat

func Av_find_input_format

func Av_find_input_format(s string) *AVInputFormat

AVInputFormat * av_find_input_format (const char *short_name) Find AVInputFormat based on the short name of the input format.

func Av_iformat_next

func Av_iformat_next(f *AVInputFormat) *AVInputFormat

AVInputFormat * av_iformat_next (const AVInputFormat *f) If f is NULL, returns the first registered input format, if f is non-NULL, returns the next registered input format after f or NULL if f is the last one.

func Av_probe_input_format

func Av_probe_input_format(pd *AVProbeData, i int) *AVInputFormat

AVInputFormat * av_probe_input_format (AVProbeData *pd, int is_opened) Guess the file format.

func Av_probe_input_format2

func Av_probe_input_format2(pd *AVProbeData, o int, sm *int) *AVInputFormat

AVInputFormat * av_probe_input_format2 (AVProbeData *pd, int is_opened, int *score_max) Guess the file format.

func Av_probe_input_format3

func Av_probe_input_format3(pd *AVProbeData, o int, sl *int) *AVInputFormat

AVInputFormat * av_probe_input_format3 (AVProbeData *pd, int is_opened, int *score_ret) Guess the file format.

type AVMediaType

type AVMediaType C.enum_AVMediaType

func Codec_type

func Codec_type(s *AVStream, n int) *AVMediaType

type AVOutputFormat

type AVOutputFormat C.struct_AVOutputFormat

func Av_guess_format

func Av_guess_format(sn, f, mt string) *AVOutputFormat

AVOutputFormat * av_guess_format (const char *short_name, const char *filename, const char *mime_type) Return the output format in the list of registered output formats which best matches the provided parameters, or return NULL if there is no match.

func Av_oformat_next

func Av_oformat_next(f *AVOutputFormat) *AVOutputFormat

AVOutputFormat * av_oformat_next (const AVOutputFormat *f) If f is NULL, returns the first registered output format, if f is non-NULL, returns the next registered output format after f or NULL if f is the last one.

type AVPacket

type AVPacket C.struct_AVPacket

type AVPacketList

type AVPacketList C.struct_AVPacketList

type AVPacketSideDataType

type AVPacketSideDataType C.enum_AVPacketSideDataType

type AVProbeData

type AVProbeData C.struct_AVProbeData

type AVProgram

type AVProgram C.struct_AVProgram

func Av_find_program_from_stream

func Av_find_program_from_stream(ic *AVFormatContext, l *AVProgram, s int) *AVProgram

AVProgram * av_find_program_from_stream (AVFormatContext *ic, AVProgram *last, int s) Find the programs which belong to a given stream.

func Av_new_program

func Av_new_program(s *AVFormatContext, id int) *AVProgram

AVProgram * av_new_program (AVFormatContext *s, int id)

type AVRational

type AVRational C.struct_AVRational

func Av_guess_frame_rate

func Av_guess_frame_rate(ctx *AVFormatContext, st *AVStream, fr *AVFrame) AVRational

AVRational av_guess_frame_rate (AVFormatContext *ctx, AVStream *stream, AVFrame *frame) Guess the frame rate, based on both the container and codec information.

func Av_guess_sample_aspect_ratio

func Av_guess_sample_aspect_ratio(f *AVFormatContext, st *AVStream, fr *AVFrame) AVRational

AVRational av_guess_sample_aspect_ratio (AVFormatContext *format, AVStream *stream, AVFrame *frame) Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.

func Av_stream_get_r_frame_rate

func Av_stream_get_r_frame_rate(s *AVStream) AVRational

AVRational av_stream_get_r_frame_rate (const AVStream *s)

type AVStream

type AVStream C.struct_AVStream

func Avformat_new_stream

func Avformat_new_stream(s *AVFormatContext, c *AVCodec) *AVStream

AVStream * avformat_new_stream (AVFormatContext *s, const AVCodec *c) Add a new stream to a media file.

func Streams

func Streams(ctx *AVFormatContext) *AVStream

type File

type File C.FILE

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL