コード例 #1
0
func (self *Coder) prepare() {
	if self.Ctx == nil {
		self.Ctx = C.avcodec_alloc_context()
		cid, _ := strconv.Atoui64(self.Parameter["codecid"])
		self.Ctx.codec_id = uint32(cid)
	}
	/**
	 * @TODO: settng the fixed params like width, height, channels...
	 */
}
コード例 #2
0
func avcodec_alloc_context() *CodecContext {
	return &CodecContext{ctx: C.avcodec_alloc_context()}
}