Пример #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
}
Пример #2
0
//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)))
}
Пример #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)))
}