Git Product home page Git Product logo

sdk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdk's Issues

build error under Linux

Hi, I've just found the following compilation error under Linux (Ubuntu under WSL).

gcc -I. -I./include -I../include -DOS_LINUX -DDEBUG -D_DEBUG -Wall -fPIC -g -Wall -fvisibility=hidden -fvisibility=default -c -MMD -MP -MF debug.linux/aio-connect.d -o src/aio-connect.o src/aio-connect.c
In file included from ../include/sockutil.h:4,
                 from src/aio-connect.c:6:
../include/sys/sock.h: In function ‘socket_multicast_join’:
../include/sys/sock.h:1268:5: error: ‘struct ip_mreq’ has no member named ‘imr_ifindex’
 1268 |  imr.imr_ifindex = 0; // any interface
      |     ^
../include/sys/sock.h:1269:32: error: ‘struct ip_mreq’ has no member named ‘imr_address’
 1269 |  inet_pton(AF_INET, local, &imr.imr_address);
      |                                ^
make[1]: *** [../gcc.mk:84: src/aio-connect.o] Error 1

Very small change of the following should resolve the issue.

diff --git a/include/sys/sock.h b/include/sys/sock.h
index 3db2fbf..d4e6f7a 100644
--- a/include/sys/sock.h
+++ b/include/sys/sock.h
@@ -1263,7 +1263,7 @@ static inline int socket_multicast_join(IN socket_t sock, IN const char* group,
 	inet_pton(AF_INET, local, &imr.imr_interface);
 	return setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&imr, sizeof(imr));
 #else
-	struct ip_mreq imr;
+	struct ip_mreqn imr;
 	memset(&imr, 0, sizeof(imr));
 	imr.imr_ifindex = 0; // any interface
 	inet_pton(AF_INET, local, &imr.imr_address);

Hope the above may be of your help

Best regards,
smg31

libice has 2 Memory leak

in case,i want to realization a keepalive stun request,so i call ice_agent_start every 2 second with same ice_agent*.
in ice-checklist.c#157
darray_clear(&l->valids);
darray_clear(&l->trigger);
ice_candidate_components_clear(&l->components); // reset components
this code will reset darray->count = 0; but never free darry. so i change this code
darray_free(&l->valids);
darray_free(&l->trigger);
ice_candidate_components_free(&l->components);

another memory leak in ice-checklist.c #530 ice_checklist_ontimer
l->timer = stun_timer_start(ICE_TIMER_INTERVAL * ice_agent_active_checklist_count(l->ice), ice_checklist_ontimer, l);
checklist* l will obtain timer but never free,so i free this code in ice_checklist_ontimer#466
l = (struct ice_checklist_t*)param;
locker_lock(&l->locker);
assert(ICE_CHECKLIST_FROZEN != l->state);
if(l->timer){
free(l->timer);
l->timer = NULL;
}

求大佬实现以下aio的poll版本

目前移植libaio到liteos系统,但是liteos不支持epoll系统调用,不知大佬是否有时间实现一下aio的poll版本,或者能否给一些建议吗?
感谢!

network_getmac linux

linux下的network_getmac返回的mac地址,是否可以更改冒号作为分隔符而非"-",这样可以跟windows保持一致

test failed

after successfully make, run:

make test
make -C test
(normal)
make[1]: 进入目录“/home/lzhx/video/sdk/test”
../source/port/linux-async-pipe.c:61:24: error: unknown type name ‘sigval_t’; did you mean ‘__sigval_t’?
 static void aio_onread(sigval_t sigval)
                        ^~~~~~~~
                        __sigval_t
../source/port/linux-async-pipe.c:95:25: error: unknown type name ‘sigval_t’; did you mean ‘__sigval_t’?
 static void aio_onwrite(sigval_t sigval)
                         ^~~~~~~~
                         __sigval_t
../source/port/linux-async-pipe.c: In function ‘async_pipe_read’:
../source/port/linux-async-pipe.c:140:46: error: ‘aio_onread’ undeclared (first use in this function); did you mean ‘aio_read’?
  o->aio.aio_sigevent.sigev_notify_function = aio_onread;
                                              ^~~~~~~~~~
                                              aio_read
../source/port/linux-async-pipe.c:140:46: note: each undeclared identifier is reported only once for each function it appears in
../source/port/linux-async-pipe.c: In function ‘async_pipe_write’:
../source/port/linux-async-pipe.c:164:46: error: ‘aio_onwrite’ undeclared (first use in this function); did you mean ‘aio_write’?
  o->aio.aio_sigevent.sigev_notify_function = aio_onwrite;
                                              ^~~~~~~~~~~
                                              aio_write
../gcc.mk:89: recipe for target 'debug.linux/objs/../source/port/linux-async-pipe.o' failed
make[1]: *** [debug.linux/objs/../source/port/linux-async-pipe.o] Error 1
make[1]: 离开目录“/home/lzhx/video/sdk/test”
Makefile:36: recipe for target 'test' failed
make: *** [test] Error 2

I just wanna build this dependency for media_server, how can I pass the test? Or it doesn't matter if I do not run this test?
thanks a lot!

平台问题 OS_WINDOWS?

在代码里面使用OS_WINDOWS区分linux和windows,windows平台定义的宏是_WIN32,OS_WINDOWS是在哪里定义的,使用者自己定义吗?

qq群不能使用了?

我想增加rtos的代码,比如freertos rtthread或者其他pr,提交前想先交流下,有群或者联系方式吗?

libhttp重定向

在http_client.c http_client_onread_header函数里面对重定向进行了判断
if(300 <= code && code < 400) { if(http_client_redirect_handler(http)) { code = http_client_request(http, http->parameters.method, http->parameters.uri, http->parameters.headers, http->parameters.n, http->parameters.msg, http->parameters.bytes, http->onreply, http->cbparam); if(0 != code) http_client_handle(http, code > 0 ? -code : code); return; } }
重定向这里没有使用Location指定的url,http_client_redirect_handler含就仅仅是把Location指向的url写入http->redirect.urls中,应该进行如下修改
http->redirect.urls[http->redirect.n++] = strdup(uri);; http->parameters.uri=http->redirect.urls[http->redirect.n];

gdb挂载跑下来出现twtimer.c段错误

[09:27:09]Thread 40 received signal SIGSEGV, Segmentation fault.
[09:27:09][Switching to Thread 0xaa3824b0 (LWP 29466)]
[09:27:09]0xb5c3c880 in twtimer_cascade (tm=0x1886240, tv=0x1886658, index=11)
[09:27:09] at ../source/twtimer.c:155
[09:27:09]155 ../source/twtimer.c: No such file or directory.
09:27:09
09:27:09
09:27:09
09:27:09
09:29:54 bt
[09:29:54]#0 0xb5c3c880 in twtimer_cascade (tm=0x1886240, tv=0x1886658, index=11)
[09:29:54] at ../source/twtimer.c:155
[09:29:54]#1 0xb5c3c5d4 in twtimer_process (tm=0x1886240, clock=222451756)
[09:29:54] at ../source/twtimer.c:107
[09:29:54]#2 0xb5c3c1f4 in aio_timeout_process () at src/aio-timeout.c:28
[09:29:54]#3 0xb5c37e1c in aio_worker (param=0x0) at src/aio-worker.c:23
[09:29:54]#4 0xb4ed8f6c in start_thread () from /lib/libpthread.so.0
[09:29:54]#5 0xb4d40134 in clone () from /lib/libc.so.0
[09:29:54]Backtrace stopped: previous frame identical to this frame (corrupt stack?)

libice/test下的例子编译问题

请问libice/test下的例子有编译脚本吗?我在linux上make完后得到了一些库,然后尝试编译libice/test下的例子。但是好像缺少一些库,所以一直无法成功编译libice/test。

Incorrect compilation tutorial

在 x264 windows compile.txt 中x64编译命令./configure --host=x86-64-w64-mingw32 --enable-static --enable-shared 中应该要改为
./configure --host=x86_64-w64-mingw32 --enable-static --enable-shared --extra-ldflags=-Wl,--output-def=libx264.def

ice多路流连通检测问题

1702377193827

我在测试sip-uac-test2过程中遇到了问题,我使用了stun(没用中继,和原来的代码一样ice_transport_bind turn参数为0),媒体包含音频流和视频流,在连通检测的时候经常在这里触发断言,这里应该是当前流连通检测成功后,触发下一个流进行连通检测,正常来说不应该走到assert这里,ice_checklist_t初始化的时候状态是ICE_CHECKLIST_FROZEN,请问大佬测试sip-uac-test2的时候遇到过这个问题吗,除了使用了stun其他的和原来的基本一致

ice-agent-test.cpp demo发送数据不成功

host, srflx, relay这些地址都可以获取到了,按照demo做了,数据发送不成功。
demo效果是和libnice是一样的效果吧,libnice双方发送数据都可以通。
这个demo始终想对方发送数据失败,对方收不到数据

sdk/include/sys/system.h编译错误

1、头文件缺少
#include "sys/time.h"

2、位置错误
typedef uint32_t useconds_t;
只在#if defined(OS_WINDOWS)中声明,导致linux下未声明错误。

libice has 2 Memory leak

in case,i want to realization a keepalive stun request,so i call ice_agent_start every 2 second with same ice_agent*.
in ice-checklist.c#157
darray_clear(&l->valids);
darray_clear(&l->trigger);
ice_candidate_components_clear(&l->components); // reset components
this code will reset darray->count = 0; but never free darry. so i change this code
darray_free(&l->valids);
darray_free(&l->trigger);
ice_candidate_components_free(&l->components);

another memory leak in ice-checklist.c #530 ice_checklist_ontimer
l->timer = stun_timer_start(ICE_TIMER_INTERVAL * ice_agent_active_checklist_count(l->ice), ice_checklist_ontimer, l);
checklist* l will obtain timer but never free,so i free this code in ice_checklist_ontimer#466
l = (struct ice_checklist_t*)param;
locker_lock(&l->locker);
assert(ICE_CHECKLIST_FROZEN != l->state);
if(l->timer){
free(l->timer);
l->timer = NULL;
}

交叉编译问题

可以用交叉编译工具链在其他平台上编译 sdk 吗?比如 QNX 和 Android ?

make PLATFORM=${QNX_HOST}/usr/bin/ntoaarch64 -j4

unknown type name ‘IN6_ADDR’

../include/sys/sock.h:196:62: error: unknown type name ‘IN6_ADDR’
static inline int socket_ipv6_netmask(IN uint8_t prefix, OUT IN6_ADDR* addr);

libhttp重定向

http_client.c http_client_onread_header函数里面对重定向进行了判断
'''
if(300 <= code && code < 400)
{
if(http_client_redirect_handler(http))
{
code = http_client_request(http, http->parameters.method, http->parameters.uri, http->parameters.headers, http->parameters.n, http->parameters.msg, http->parameters.bytes, http->onreply, http->cbparam);
if(0 != code)
http_client_handle(http, code > 0 ? -code : code);
return;
}
}
'''
但是这里并没有使用Location指定的url,http_client_redirect_handler函数里面仅仅是把Location指定的url保存到http->redirect.urls,应该进行如下修改
'''
http->redirect.urls[http->redirect.n++] = strdup(uri);
//指向Location指定的url
http->parameters.uri=http->redirect.urls[http->redirect.n-1];
'''

base64解码函数输出不正确

使用base64_decode函数解码,cnRzcDovL2FkbWluOkhLMTIzNDU2QDE5Mi4xNjguMTUwLjg4OjU1NC9oMjY0LzAvbWFpbi9hdl9zdHJlYW0被解码为rtsp://admin:[email protected]:554/h264/0/main/av_stre,缺少两个字节,使用ffmpeg的av_base64_decode函数,解码正确。

ice-transport文件描述符泄漏

ice_transport_bind中创建了socket文件描述符,但是在ice_transport_destroy中并未看到close的代码,造成文件描述符泄漏

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.