add build script
This commit is contained in:
parent
d2e50cf622
commit
dc585389d6
|
@ -0,0 +1,7 @@
|
|||
g++ -shared -fPIC \
|
||||
-I/usr/include/python3.10 -I./include \
|
||||
-L./lib \
|
||||
rtc_plugins.cpp util/RTCContext.cpp \
|
||||
-lMRTCEngine -lboost_python310 -lpython3.10 \
|
||||
-Wl,-rpath='$ORIGIN/lib' \
|
||||
-o rtc_plugins.so
|
|
@ -5,10 +5,8 @@
|
|||
|
||||
#include "./util/RTCContext.h"
|
||||
|
||||
void setPyCallback(boost::python::object callback) {
|
||||
int init(const char* selfUserId, const char* selfDisplayName, const char* selfRoomId, boost::python::object callback) {
|
||||
RTCContext::instance().setPyCallback(callback);
|
||||
}
|
||||
int init(const char* selfUserId, const char* selfDisplayName, const char* selfRoomId) {
|
||||
bool res = RTCContext::instance().init(selfUserId, selfDisplayName, selfRoomId);
|
||||
if (res) {
|
||||
return 0;
|
||||
|
@ -39,7 +37,6 @@ int sendCustomAudioData(const int16_t channelIndex, void* customData, int32_t sa
|
|||
|
||||
BOOST_PYTHON_MODULE(rtc_plugins) {
|
||||
namespace py = boost::python;
|
||||
py::def("setPyCallback", &setPyCallback);
|
||||
py::def("init", &init);
|
||||
py::def("initRecv", &initRecv);
|
||||
py::def("initSend", &initSend);
|
||||
|
|
Loading…
Reference in New Issue