func AvGuessCodec(fmt *OutputFormat, sn, f, mt string, t MediaType) CodecId {
	Cshort_name := C.CString(sn)
	defer C.free(unsafe.Pointer(Cshort_name))
	Cfilename := C.CString(f)
	defer C.free(unsafe.Pointer(Cfilename))
	Cmime_type := C.CString(mt)
	defer C.free(unsafe.Pointer(Cmime_type))
	return (CodecId)(C.av_guess_codec((*C.struct_AVOutputFormat)(fmt), Cshort_name, Cfilename, Cmime_type, (C.enum_AVMediaType)(t)))
}
Guess the codec ID based upon muxer and filename.
package avformat
import "C"
import (
	"unsafe"
	"github.com/giorgisio/goav/avcodec"
	"github.com/giorgisio/goav/avutil"
)
type (
	AvProbeData                C.struct_AVProbeData
	InputFormat                C.struct_AVInputFormat
	OutputFormat               C.struct_AVOutputFormat
	Context                    C.struct_AVFormatContext
	Frame                      C.struct_AVFrame
	CodecContext               C.struct_AVCodecContext
	AvIndexEntry               C.struct_AVIndexEntry
	Stream                     C.struct_AVStream
	AvProgram                  C.struct_AVProgram
	AvChapter                  C.struct_AVChapter
	AvPacketList               C.struct_AVPacketList
	CodecParserContext         C.struct_AVCodecParserContext
	AvIOContext                C.struct_AVIOContext
	AvCodec                    C.struct_AVCodec
	AvCodecTag                 C.struct_AVCodecTag
	Class                      C.struct_AVClass
	AvFormatInternal           C.struct_AVFormatInternal
	AvIOInterruptCB            C.struct_AVIOInterruptCB
	AvPacketSideData           C.struct_AVPacketSideData
	FFFrac                     C.struct_FFFrac
	AvStreamParseType          C.enum_AVStreamParseType
	AvDiscard                  C.enum_AVDiscard
	MediaType                  C.enum_AVMediaType
	AvDurationEstimationMethod C.enum_AVDurationEstimationMethod
	AvPacketSideDataType       C.enum_AVPacketSideDataType
	CodecId                    C.enum_AVCodecID
)
type File C.FILE
func (ctxt *AvIOContext) AvGetPacket(pkt *avcodec.Packet, s int) int {
	return int(C.av_get_packet((*C.struct_AVIOContext)(ctxt), toCPacket(pkt), C.int(s)))
}
func (ctxt *AvIOContext) AvAppendPacket(pkt *avcodec.Packet, s int) int {
	return int(C.av_append_packet((*C.struct_AVIOContext)(ctxt), toCPacket(pkt), C.int(s)))
}
func (ctxt *AvIOContext) Close() error {
	return avutil.ErrorFromCode(int(C.avio_close((*C.AVIOContext)(unsafe.Pointer(ctxt)))))
}
func (f *InputFormat) AvRegisterInputFormat() {
	C.av_register_input_format((*C.struct_AVInputFormat)(f))
}
func (f *OutputFormat) AvRegisterOutputFormat() {
	C.av_register_output_format((*C.struct_AVOutputFormat)(f))
}
func (f *InputFormat) AvIformatNext() *InputFormat {
	return (*InputFormat)(C.av_iformat_next((*C.struct_AVInputFormat)(f)))
}
func (f *OutputFormat) AvOformatNext() *OutputFormat {
	return (*OutputFormat)(C.av_oformat_next((*C.struct_AVOutputFormat)(f)))
}
func AvformatVersion() uint {
	return uint(C.avformat_version())
}
func AvformatConfiguration() string {
	return C.GoString(C.avformat_configuration())
}
func AvformatLicense() string {
	return C.GoString(C.avformat_license())
}
func AvRegisterAll() {
	C.av_register_all()
}
func AvformatNetworkInit() int {
	return int(C.avformat_network_init())
}
func AvformatNetworkDeinit() int {
	return int(C.avformat_network_deinit())
}
func AvformatAllocContext() *Context {
	return (*Context)(C.avformat_alloc_context())
}
func AvformatGetClass() *Class {
	return (*Class)(C.avformat_get_class())
}
func (s *Stream) AvStreamGetSideData(t AvPacketSideDataType, z int) *uint8 {
	return (*uint8)(C.av_stream_get_side_data((*C.struct_AVStream)(s), (C.enum_AVPacketSideDataType)(t), (*C.int)(unsafe.Pointer(&z))))
}
func AvformatAllocOutputContext2(ctx **Context, o *OutputFormat, fo, fi string) int {
	Cformat_name := C.CString(fo)
	defer C.free(unsafe.Pointer(Cformat_name))
	Cfilename := C.CString(fi)
	defer C.free(unsafe.Pointer(Cfilename))
	return int(C.avformat_alloc_output_context2((**C.struct_AVFormatContext)(unsafe.Pointer(ctx)), (*C.struct_AVOutputFormat)(o), Cformat_name, Cfilename))
}
func AvFindInputFormat(s string) *InputFormat {
	Cshort_name := C.CString(s)
	defer C.free(unsafe.Pointer(Cshort_name))
	return (*InputFormat)(C.av_find_input_format(Cshort_name))
}
func AvProbeInputFormat(pd *AvProbeData, i int) *InputFormat {
	return (*InputFormat)(C.av_probe_input_format((*C.struct_AVProbeData)(pd), C.int(i)))
}
func AvProbeInputFormat2(pd *AvProbeData, o int, sm *int) *InputFormat {
	return (*InputFormat)(C.av_probe_input_format2((*C.struct_AVProbeData)(pd), C.int(o), (*C.int)(unsafe.Pointer(sm))))
}
func AvProbeInputFormat3(pd *AvProbeData, o int, sl *int) *InputFormat {
	return (*InputFormat)(C.av_probe_input_format3((*C.struct_AVProbeData)(pd), C.int(o), (*C.int)(unsafe.Pointer(sl))))
}
func AvProbeInputBuffer2(pb *AvIOContext, f **InputFormat, fi string, l int, o, m uint) int {
	Curl := C.CString(fi)
	defer C.free(unsafe.Pointer(Curl))
	return int(C.av_probe_input_buffer2((*C.struct_AVIOContext)(pb), (**C.struct_AVInputFormat)(unsafe.Pointer(f)), Curl, unsafe.Pointer(&l), C.uint(o), C.uint(m)))
}
func AvProbeInputBuffer(pb *AvIOContext, f **InputFormat, fi string, l int, o, m uint) int {
	Curl := C.CString(fi)
	defer C.free(unsafe.Pointer(Curl))
	return int(C.av_probe_input_buffer((*C.struct_AVIOContext)(pb), (**C.struct_AVInputFormat)(unsafe.Pointer(f)), Curl, unsafe.Pointer(&l), C.uint(o), C.uint(m)))
}
func AvformatOpenInput(ps **Context, fi string, fmt *InputFormat, d **avutil.Dictionary) int {
	Cfi := C.CString(fi)
	defer C.free(unsafe.Pointer(Cfi))
	return int(C.avformat_open_input((**C.struct_AVFormatContext)(unsafe.Pointer(ps)), Cfi, (*C.struct_AVInputFormat)(fmt), (**C.struct_AVDictionary)(unsafe.Pointer(d))))
}
func AvGuessFormat(sn, f, mt string) *OutputFormat {
	Cshort_name := C.CString(sn)
	defer C.free(unsafe.Pointer(Cshort_name))
	Cfilename := C.CString(f)
	defer C.free(unsafe.Pointer(Cfilename))
	Cmime_type := C.CString(mt)
	defer C.free(unsafe.Pointer(Cmime_type))
	return (*OutputFormat)(C.av_guess_format(Cshort_name, Cfilename, Cmime_type))
}