feat: update code to support antd 2.0.0 new plugin interface
Some checks failed
gitea-sync/antd-wvnc-plugin/pipeline/head There was a failure building this commit

This commit is contained in:
DanyLE 2024-03-13 18:17:36 +01:00
parent 6c1df8e4d5
commit d08ae89c82
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# initialise autoconf and set up some basic information about the program were packaging # initialise autoconf and set up some basic information about the program were packaging
AC_INIT([wvnc], [0.2.5a], [xsang.le@gmail.com]) AC_INIT([wvnc], [0.3.0], [xsang.le@gmail.com])
# Were going to use automake for this project # Were going to use automake for this project
# [subdir-objects] if needed # [subdir-objects] if needed

11
wvnc.c
View File

@ -1,4 +1,3 @@
#define PLUGIN_IMPLEMENT 1
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
@ -6,6 +5,7 @@
#include <pthread.h> #include <pthread.h>
#include <jpeglib.h> #include <jpeglib.h>
#include <antd/plugin.h> #include <antd/plugin.h>
#include <antd/handle.h>
#include <antd/scheduler.h> #include <antd/scheduler.h>
#include <antd/ws.h> #include <antd/ws.h>
#include <sys/time.h> #include <sys/time.h>
@ -770,9 +770,14 @@ void *handle(void *data)
return task; return task;
//LOG("%s\n", "EXIT Streaming.."); //LOG("%s\n", "EXIT Streaming..");
} }
void init() void* create(antd_plugin_ctx_t* ctx)
{ {
UNUSED(ctx);
LOG("Initialize WVNC context");
return NULL;
} }
void destroy() void drop(antd_plugin_ctx_t* ctx)
{ {
UNUSED(ctx);
LOG("Drop WVNC context");
} }