Exemplo n.º 1
0
func (ctx *Context) WriteFrame(pkt *avcodec.Packet) error {
	var cPkt *C.AVPacket
	if cPkt != nil {
		cPkt = (*C.AVPacket)(unsafe.Pointer(&pkt.CAVPacket))
	}
	code := C.av_write_frame(ctx.CAVFormatContext, cPkt)
	if code < 0 {
		return avutil.NewErrorFromCode(avutil.ErrorCode(code))
	}
	return nil
}
Exemplo n.º 2
0
Arquivo: context.go Projeto: ovr/goav
//Write a packet to an output media file.
func (s *Context) AvWriteFrame(pkt *Packet) int {
	return int(C.av_write_frame((*C.struct_AVFormatContext)(s), (*C.struct_AVPacket)(pkt)))
}
Exemplo n.º 3
0
//int av_write_frame (AVFormatContext *s, AVPacket *pkt)
//Write a packet to an output media file.
func Av_write_frame(s *AVFormatContext, pkt *AVPacket) int {
	return int(C.av_write_frame((*C.struct_AVFormatContext)(s), (*C.struct_AVPacket)(pkt)))
}