rpicamera: support libcamera 0.0.4 (#1548)
This commit is contained in:
parent
4580fb4f4b
commit
695da99e22
|
@ -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 $@
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue