mirror of
https://github.com/giorgisio/goav.git
synced 2024-04-21 12:31:56 +00:00
22 lines
501 B
Go
22 lines
501 B
Go
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
|
|
// Giorgis (habtom@giorgis.io)
|
|
|
|
package avformat
|
|
|
|
//#cgo pkg-config: libavformat
|
|
//#include <libavformat/avformat.h>
|
|
import "C"
|
|
import (
|
|
"unsafe"
|
|
|
|
"github.com/giorgisio/goav/avcodec"
|
|
)
|
|
|
|
func toCPacket(pkt *avcodec.Packet) *C.struct_AVPacket {
|
|
return (*C.struct_AVPacket)(unsafe.Pointer(pkt))
|
|
}
|
|
|
|
func fromCPacket(pkt *C.struct_AVPacket) *avcodec.Packet {
|
|
return (*avcodec.Packet)(unsafe.Pointer(pkt))
|
|
}
|