mirror of
https://github.com/zergon321/reisen.git
synced 2025-09-26 20:01:14 +08:00
Use pkg-config to determine correct CFLAGS and LDFLAGS for ffmpeg libraries
This fixes build on the recent Mac OS installations where HomeBrew doesn't have libav anymore.
This commit is contained in:
6
audio.go
6
audio.go
@@ -1,6 +1,6 @@
|
||||
package reisen
|
||||
|
||||
// #cgo LDFLAGS: -lavutil -lavformat -lavcodec -lswresample
|
||||
// #cgo pkg-config: libavformat libavcodec libavutil libswresample
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avutil.h>
|
||||
@@ -22,8 +22,8 @@ const (
|
||||
// audio frames consisting of audio samples.
|
||||
type AudioStream struct {
|
||||
baseStream
|
||||
swrCtx *C.SwrContext
|
||||
buffer *C.uint8_t
|
||||
swrCtx *C.SwrContext
|
||||
buffer *C.uint8_t
|
||||
bufferSize C.int
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package reisen
|
||||
|
||||
// #cgo LDFLAGS: -lswscale
|
||||
// #cgo pkg-config: libswscale
|
||||
// #include <libswscale/swscale.h>
|
||||
import "C"
|
||||
|
||||
|
2
media.go
2
media.go
@@ -1,6 +1,6 @@
|
||||
package reisen
|
||||
|
||||
// #cgo LDFLAGS: -lavformat -lavcodec -lavutil -lswscale
|
||||
// #cgo pkg-config: libavformat libavcodec libavutil libswscale
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avconfig.h>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package reisen
|
||||
|
||||
// #cgo LDFLAGS: -lavformat -lavcodec -lavutil -lswscale
|
||||
// #cgo pkg-config: libavformat libavcodec libavutil libswscale
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avconfig.h>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package reisen
|
||||
|
||||
// #cgo LDFLAGS: -lavutil -lavformat -lavcodec
|
||||
// #cgo pkg-config: libavutil libavformat libavcodec
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avconfig.h>
|
||||
|
2
time.go
2
time.go
@@ -1,6 +1,6 @@
|
||||
package reisen
|
||||
|
||||
// #cgo LDFLAGS: -lavutil
|
||||
// #cgo pkg-config: libavutil
|
||||
// #include <libavutil/avutil.h>
|
||||
import "C"
|
||||
|
||||
|
Reference in New Issue
Block a user