Dafang-Hacks / Main

138 stars 63 forks source link

Onvif #40

Closed Sian-Lee-SA closed 4 years ago

Sian-Lee-SA commented 4 years ago

This is a follow up to https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/pull/1296 in regards to adding onvif support. The following source code will generate the binary needed to run an Onvif service on the cameras.

nik0 commented 4 years ago

Hi, nice job !! I wanted to do that but I give up ...

Thanks !!!

Sian-Lee-SA commented 4 years ago

Yh will do, This commit was after I restructured the folders to make more compatible with this repo so it's a bit unbalanced atm. I'm thinking I might remove the regex lib requirement and find another way to achieve what I need as the library seems a bit overkill for just 2 lines.

I wasn't sure if gsoap-2.8 would be needed as the files it generates is in the generated folder path and working with gsoap to generate those files can sometimes be a nightmare. I will add the folder for clarity though.

Sian-Lee-SA commented 4 years ago

After trying to compile with the new folder structure, I released the gsoap source is needed for their global includes. I apologise for the premature pull request and will commit again once I have compiled the app successfully.

nik0 commented 4 years ago

No problem !!

nik0 commented 4 years ago

This is strange, I can not compile: [build] /src/tmp/Main/onvif/src/onvif_srvd_debug.o: /src/tmp/Main/onvif/../toolchain/bin/mips-linux-uclibc-gnu-g++ -c /src/tmp/Main/onvif/src/onvif_srvd.c -o /src/tmp/Main/onvif/src/onvif_srvd_debug.o -DDEBUG -g -DDAEMON_NAME='"onvif_srvd"' -DDAEMON_MAJOR_VERSION=1 -DDAEMON_MINOR_VERSION=1 -DDAEMON_PATCH_VERSION=0 -DDAEMON_PID_FILE_NAME='"onvif_srvd.pid"' -DDAEMON_LOG_FILE_NAME='"onvif_srvd.log"' -DDAEMON_NO_CHDIR=1 -DDAEMON_NO_CLOSE_STDIO=1 -I/src/tmp/Main/onvif/src -I/src/tmp/Main/onvif/generated -I/root/boost -I/src/tmp/Main/onvif/libs -I/src/tmp/Main/onvif/gsoap-2.8/gsoap -I/src/tmp/Main/onvif/gsoap-2.8/gsoap/custom -I/src/tmp/Main/onvif/gsoap-2.8/gsoap/plugin -I/src/tmp/Main/onvif/gsoap-2.8/gsoap/import -L../lib -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=1 -lboost_regex-mt-d-m32 -O2 -Wall -pipe /src/tmp/Main/onvif/src/onvif_srvd.c: In function 'void init(void*)': /src/tmp/Main/onvif/src/onvif_srvd.c:282:36: error: 'service_ctx->ServiceContext::get_net_interfaces' does not have class type /src/tmp/Main/onvif/src/onvif_srvd.c: In function 'int main(int, char**)': /src/tmp/Main/onvif/src/onvif_srvd.c:296:2: error: 'wsddService' was not declared in this scope /src/tmp/Main/onvif/src/onvif_srvd.c:296:1: error: expected ';' before 'wsddService_inst' /src/tmp/Main/onvif/src/onvif_srvd.c:312:1: error: 'wsddService_inst' was not declared in this scope Makefile:155: recipe for target '/src/tmp/Main/onvif/src/onvif_srvd_debug

Sian-Lee-SA commented 4 years ago

I'm closing this pull request as it has become very unstable. I will initiate a new pull request with a differnet branch that compiles