SRS 6.0-b0 源码 + danmaku 后端(排除 objs/3rdparty/测试媒体)

This commit is contained in:
RRRosmontis
2026-08-27 21:46:20 +08:00
commit 41b5da7c7e
578 changed files with 237858 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
/*
Directly compile c++ source and execute:
g++ pthreads.cpp ../../objs/st/libst.a -g -O0 -o pthreads && ./pthreads
*/
#include <stdio.h>
#include <pthread.h>
#include "../../objs/st/st.h"
void* foo(void* arg) {
while (true) {
printf("Hello, child thread\n");
st_sleep(1);
}
return NULL;
}
void* pfn(void* arg) {
st_init();
st_thread_create(foo, NULL, 0, 0);
st_thread_exit(NULL);
return NULL;
}
int main(int argc, char** argv) {
st_init();
pthread_t trd;
pthread_create(&trd, NULL, pfn, NULL);
while (true) {
printf("Hello, main thread\n");
st_sleep(1);
}
return 0;
}