rpicamera: support libcamera 0.0.4 (#1548)

This commit is contained in:
Alessandro Ros
2023-03-09 19:18:49 +01:00
committed by GitHub
parent 4580fb4f4b
commit 695da99e22
2 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -40,5 +40,5 @@ all: exe
exe: $(OBJS)
$(CXX) $^ $(LDFLAGS) -o $@
patchelf --replace-needed libcamera.so.0.0.2 libcamera.so.x.x.x $@
patchelf --replace-needed libcamera-base.so.0.0.2 libcamera-base.so.x.x.x $@
patchelf --replace-needed $$(basename /usr/lib/*-linux-*/libcamera.so.0*) libcamera.so.x.x.x $@
patchelf --replace-needed $$(basename /usr/lib/*-linux-*/libcamera-base.so.0*) libcamera-base.so.x.x.x $@
+1 -3
View File
@@ -176,6 +176,7 @@ func New(
if err != nil {
return nil, err
}
defer removeSymlinks()
c := &RPICamera{
onData: onData,
@@ -200,14 +201,11 @@ func New(
c.cmd, err = startEmbeddedExe(exeContent, env)
if err != nil {
removeSymlinks()
c.pipeConf.close()
c.pipeVideo.close()
return nil, err
}
removeSymlinks()
c.pipeConf.write(append([]byte{'c'}, serializeParams(params)...))
c.waitDone = make(chan error)