Esempio 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
}
Esempio n. 2
0
File: context.go Progetto: 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)))
}
Esempio 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)))
}