go dll 返回ffmpeg avpacket

MYLIBDLL int byte_url(char* url, ByteFunc tcallback(unsigned char*, int size)); int byte_url(char* url, ByteFunc tcallback(unsigned char*, int si...

2019-03-19 15:36:32

阅读数 34

评论数 0

go语言的defer语句

go语言defer语句的用法 参考:https://www.jianshu.com/p/5b0b36f398a2 defer的语法 defer后面必须是函数调用语句,不能是其他语句,否则编译器会出错。 package main import "log&quot...

2019-03-12 13:34:27

阅读数 20

评论数 0

go 程序执行时间

package main import ( "fmt" "time" ) func StartCac() { t1 := time.Now() // get current time //l...

2019-03-12 13:20:15

阅读数 16

评论数 0

could not determine kind of name for C.memcpy

could not determine kind of name for C.memcpy ok: package main //#include <string.h> import "C" error: ...

2019-03-12 11:03:47

阅读数 55

评论数 0

go dll char* memcpy

dll := syscall.MustLoadDLL("hik_client.dll") callback := syscall.NewCallback(func(r uintptr, size int) (ret uintptr) { ...

2019-03-12 11:00:22

阅读数 17

评论数 0

go memcpy

来源:https://github.com/jsgilmore/shm callback := syscall.NewCallback(func(r uintptr, size int) (ret uintptr) { // 定义一个[]byte切片,用来存储C返回的字符串 ...

2019-03-12 10:55:12

阅读数 22

评论数 0

Go []byte to a C *char

https://stackoverflow.com/questions/35673161/convert-go-byte-to-a-c-char ok b := buf.Bytes() rc := C.the_function(unsafe.Pointer(&b[0...

2019-03-12 00:16:43

阅读数 21

评论数 0

goland os.Open 路径错误

os.Open 报错原因:Open不是当前目录下查找, 项目取的是项目根目录,不是执行目录:证明如下: exPath,_ := os.Getwd() fmt.Println("expath",exPath) file, err := os.Open(ex...

2019-03-11 20:27:08

阅读数 33

评论数 0

goland 调试运行路径

设置output directory 和Working directory: 都为run目录,打开文件就会冲这里找:

2019-03-11 19:42:04

阅读数 112

评论数 0

copy of an AVPacket structure

a copy of an AVPacket structure 参考:https://stackoverflow.com/questions/12929330/create-a-copy-of-an-avpacket-structure ok: AVPacket newPacket(old...

2019-03-11 16:31:38

阅读数 25

评论数 0

go dll char[]

这个会返回4,是错的: tcallback((unsigned char*)pFrameRGB->data func callDll() { dll := syscall.MustLoadDLL("hik_client.dll&qu...

2019-03-11 16:03:39

阅读数 23

评论数 0

runtime error: invalid memory address or nil pointer dereference

runtime error: invalid memory address or nil pointer dereference 解决方法: tcallback((unsigned char*)packet->data,packet->size)...

2019-03-11 14:55:14

阅读数 35

评论数 0

windows exec: "gcc": executable file not found in %PATH%

exec: "gcc": executable file not found in %PATH% 原因分析 通过提示可知;cc1.exe版本不是64位的,在64位环境下无法编译 解决办法 需要将mingw32换成mingw64. 下载安装包 下载地址:...

2019-03-11 10:10:36

阅读数 176

评论数 0

go cannot find package "github.com/gorilla/websocket"

go cannot find package "github.com/gorilla/websocket" wfs_server_lite.go:9:5: cannot find package "github.com/gorilla/web...

2019-03-11 09:39:48

阅读数 137

评论数 0

go 多线程队列

线程安全队列 https://blog.csdn.net/tigerisland45/article/details/77417738 超时队列 https://blog.csdn.net/fwhezfwhez/article/details/82884692 https://blog...

2019-03-10 23:16:59

阅读数 19

评论数 0

go 调用dll char*传输

参考:http://www.voidcn.com/article/p-ofnbgvoa-bpv.html https://stackoverflow.com/questions/53721215/syscall-mustloaddll-mustfindproc-throws-the-specif...

2019-03-10 17:58:17

阅读数 39

评论数 0

go dll 传char*

go调用dll中方法参数为*char类型 tiger11032017-12-25 10:58发布1224浏览问与答 我有一个dll库,里面有一个C实现的方法: int GetPeopleName(char *strTmp, int *strLen) 现要在go里面调用这个方法,参数应...

2019-03-10 17:13:10

阅读数 40

评论数 0

GO程序调用C及C++库的实现方式

还有这个: https://blog.csdn.net/zdy0_2004/article/details/79124269 https://blog.csdn.net/boshuzhang/article/details/83503147 GO程序调用C及C++库的实现方式 2017...

2019-03-10 15:01:02

阅读数 21

评论数 0

Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

2019-03-10 11:08:25

阅读数 43

评论数 0

package main: read unexpected NUL in input

package main: read unexpected NUL in input 我的问题: go build -o wfs_server wfs_server_lite.go wfs_websockets_hub.go 解决方法: go build -o wfs_server.e...

2019-03-10 09:53:45

阅读数 201

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭