mirror of
https://github.com/leokinglong/goav
synced 2025-09-26 20:01:11 +08:00
Fix build errors
This commit is contained in:
26
avcodec/mpeg4audio.go
Normal file → Executable file
26
avcodec/mpeg4audio.go
Normal file → Executable file
@@ -14,23 +14,23 @@ package avcodec
|
||||
//#include <string.h>
|
||||
//#include <libavformat/avformat.h>
|
||||
//#include <libavcodec/avcodec.h>
|
||||
//#include <libavcodec/mpeg4audio.h>
|
||||
//#include <libavutil/avutil.h>
|
||||
//#include <libavutil/opt.h>
|
||||
//#include <libavdevice/avdevice.h>
|
||||
import "C"
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type (
|
||||
MPEG4AudioConfig C.struct_MPEG4AudioConfig
|
||||
)
|
||||
// import (
|
||||
// "unsafe"
|
||||
// )
|
||||
|
||||
func AvprivMpeg4AudioGetConfig2(c *MPEG4AudioConfig, buf *uint8, size int, syncExtension int, logctx unsafe.Pointer) int {
|
||||
return int(C.avpriv_mpeg4audio_get_config2((*C.struct_MPEG4AudioConfig)(c), (*C.uint8_t)(buf), C.int(size), C.int(syncExtension), logctx))
|
||||
}
|
||||
// type (
|
||||
// MPEG4AudioConfig C.struct_MPEG4AudioConfig
|
||||
// )
|
||||
|
||||
func (mpeg4 *MPEG4AudioConfig) AvprivMpeg4AudioGetSampleRate() int {
|
||||
return *((*int)(unsafe.Pointer(&mpeg4.sample_rate)))
|
||||
}
|
||||
// func AvprivMpeg4AudioGetConfig2(c *MPEG4AudioConfig, buf *uint8, size int, syncExtension int, logctx unsafe.Pointer) int {
|
||||
// return int(C.avpriv_mpeg4audio_get_config2((*C.struct_MPEG4AudioConfig)(c), (*C.uint8_t)(buf), C.int(size), C.int(syncExtension), logctx))
|
||||
// }
|
||||
|
||||
// func (mpeg4 *MPEG4AudioConfig) AvprivMpeg4AudioGetSampleRate() int {
|
||||
// return *((*int)(unsafe.Pointer(&mpeg4.sample_rate)))
|
||||
// }
|
||||
|
@@ -15,8 +15,9 @@ package avfilter
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"avcodec"
|
||||
"unsafe"
|
||||
|
||||
"github.com/LeoKingLong/goav/avcodec"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@@ -19,8 +19,8 @@ package avformat
|
||||
//#include <libavdevice/avdevice.h>
|
||||
import "C"
|
||||
import (
|
||||
"avcodec"
|
||||
"avutil"
|
||||
"github.com/LeoKingLong/goav/avcodec"
|
||||
"github.com/LeoKingLong/goav/avutil"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@@ -19,7 +19,7 @@ import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
|
||||
"avcodec"
|
||||
"github.com/LeoKingLong/goav/avcodec"
|
||||
)
|
||||
|
||||
func (cctxt *CodecContext) Type() MediaType {
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
|
||||
"avutil"
|
||||
"github.com/LeoKingLong/goav/avutil"
|
||||
)
|
||||
|
||||
func (ctxt *Context) Chapters() **AvChapter {
|
||||
|
7
go.mod
7
go.mod
@@ -1,6 +1,5 @@
|
||||
module github.com/LeoKingLong/goav
|
||||
|
||||
require (
|
||||
github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd // indirect
|
||||
github.com/gosuri/uiprogress v0.0.0-20170224063937-d0567a9d84a1 // indirect
|
||||
)
|
||||
go 1.16
|
||||
|
||||
require github.com/stretchr/testify v1.7.0
|
||||
|
15
go.sum
15
go.sum
@@ -1,4 +1,11 @@
|
||||
github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd h1:1e+0Z+T4t1mKL5xxvxXh5FkjuiToQGKreCobLu7lR3Y=
|
||||
github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8=
|
||||
github.com/gosuri/uiprogress v0.0.0-20170224063937-d0567a9d84a1 h1:4iPLwzjiWGBQnYdtKbg/JNlGlEEvklrrMdjypdA1LKQ=
|
||||
github.com/gosuri/uiprogress v0.0.0-20170224063937-d0567a9d84a1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
Reference in New Issue
Block a user