Remove unneccessary depends headers.

pull/3150/head
winlin 3 years ago
parent 50be42a8ed
commit 0a025fc4b6

32
trunk/configure vendored

@ -142,11 +142,11 @@ fi
# FFMPEG for WebRTC transcoding, such as aac to opus.
if [[ $SRS_FFMPEG_FIT == YES ]]; then
LibFfmpegRoot="${SRS_OBJS_DIR}/ffmpeg/include"; LibFfmpegFile="${SRS_OBJS_DIR}/ffmpeg/lib/libavcodec.a ${SRS_OBJS_DIR}/ffmpeg/lib/libswresample.a ${SRS_OBJS_DIR}/ffmpeg/lib/libavutil.a"
if [[ $SRS_CROSS_BUILD == NO ]]; then
LibFfmpegRoot="${LibFfmpegRoot} ${SRS_OBJS_DIR}/opus/include"; LibFfmpegFile="${LibFfmpegFile} ${SRS_OBJS_DIR}/opus/lib/libopus.a"
fi
if [[ $SRS_SHARED_FFMPEG == YES ]]; then LibFfmpegFile="-L${SRS_OBJS_DIR}/ffmpeg/lib -lavcodec -lswresample -lavutil -L${SRS_OBJS_DIR}/opus/lib -lopus"; fi
LibFfmpegRoot="${SRS_OBJS_DIR}/ffmpeg/include"; LibFfmpegFile="${SRS_OBJS_DIR}/ffmpeg/lib/libavcodec.a ${SRS_OBJS_DIR}/ffmpeg/lib/libswresample.a ${SRS_OBJS_DIR}/ffmpeg/lib/libavutil.a"
if [[ $SRS_CROSS_BUILD == NO ]]; then
LibFfmpegFile="${LibFfmpegFile} ${SRS_OBJS_DIR}/opus/lib/libopus.a"
fi
if [[ $SRS_SHARED_FFMPEG == YES ]]; then LibFfmpegFile="-L${SRS_OBJS_DIR}/ffmpeg/lib -lavcodec -lswresample -lavutil -L${SRS_OBJS_DIR}/opus/lib -lopus"; fi
fi
# openssl-1.1.0e, for the RTMP complex handshake.
@ -235,10 +235,6 @@ if [[ $SRS_SRT == YES ]]; then
fi
if [[ $SRS_RTC == YES ]]; then
MODULE_FILES+=("srs_protocol_rtc_stun")
ModuleLibIncs+=(${LibSrtpRoot})
fi
if [[ $SRS_FFMPEG_FIT == YES ]]; then
ModuleLibIncs+=("${LibFfmpegRoot[*]}")
fi
PROTOCOL_INCS="src/protocol"; MODULE_DIR=${PROTOCOL_INCS} . auto/modules.sh
PROTOCOL_OBJS="${MODULE_OBJS[@]}"
@ -247,7 +243,7 @@ PROTOCOL_OBJS="${MODULE_OBJS[@]}"
#App Module, for SRS server only.
MODULE_ID="APP"
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL")
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibSSLRoot})
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSSLRoot})
if [ $SRS_GPERF = YES ]; then
ModuleLibIncs+=(${LibGperfRoot})
fi
@ -257,9 +253,6 @@ fi
if [[ $SRS_FFMPEG_FIT == YES ]]; then
ModuleLibIncs+=("${LibFfmpegRoot[*]}")
fi
if [[ $SRS_SRT == YES ]]; then
ModuleLibIncs+=("${LibSRTRoot[*]}")
fi
MODULE_FILES=("srs_app_server" "srs_app_conn" "srs_app_rtmp_conn" "srs_app_source"
"srs_app_refer" "srs_app_hls" "srs_app_forward" "srs_app_encoder" "srs_app_http_stream"
"srs_app_bandwidth" "srs_app_st" "srs_app_log" "srs_app_config"
@ -295,16 +288,13 @@ APP_OBJS="${MODULE_OBJS[@]}"
#Server Module, for SRS only.
MODULE_ID="SERVER"
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP")
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibGperfRoot} ${LibSSLRoot})
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibGperfRoot} ${LibSSLRoot})
if [[ $SRS_RTC == YES ]]; then
ModuleLibIncs+=(${LibSrtpRoot})
fi
if [[ $SRS_FFMPEG_FIT == YES ]]; then
ModuleLibIncs+=("${LibFfmpegRoot[*]}")
fi
if [[ $SRS_SRT == YES ]]; then
ModuleLibIncs+=(${LibSRTRoot})
fi
MODULE_FILES=("srs_main_server")
SERVER_INCS="src/main"; MODULE_DIR=${SERVER_INCS} . auto/modules.sh
SERVER_OBJS="${MODULE_OBJS[@]}"
@ -312,16 +302,13 @@ SERVER_OBJS="${MODULE_OBJS[@]}"
#Main Module, for app from modules.
MODULE_ID="MAIN"
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP")
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibGperfRoot} ${LibSSLRoot})
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibGperfRoot} ${LibSSLRoot})
if [[ $SRS_RTC == YES ]]; then
ModuleLibIncs+=(${LibSrtpRoot})
fi
if [[ $SRS_FFMPEG_FIT == YES ]]; then
ModuleLibIncs+=("${LibFfmpegRoot[*]}")
fi
if [[ $SRS_SRT == YES ]]; then
ModuleLibIncs+=(${LibSRTRoot})
fi
MODULE_FILES=()
DEFINES=""
# add each modules for main
@ -382,6 +369,9 @@ fi
if [[ $SRS_FFMPEG_FIT == YES ]]; then
ModuleLibFiles+=("${LibFfmpegFile[*]}")
fi
if [[ $SRS_SRT == YES ]]; then
ModuleLibFiles+=("${LibSRTfile[*]}")
fi
#
for SRS_MODULE in ${SRS_MODULES[*]}; do
. auto/reset_module.sh && . $SRS_MODULE/config

@ -61,7 +61,6 @@ INCLUDE_DIRECTORIES(${SRS_DIR}/objs
${SRS_DIR}/objs/st
${SRS_DIR}/objs/openssl/include
${SRS_DIR}/objs/srtp2/include
${SRS_DIR}/objs/opus/include
${SRS_DIR}/objs/ffmpeg/include
${SRS_DIR}/objs/srt/include
${SRS_DIR}/src/core

@ -6,8 +6,6 @@
#include <srs_app_srt_listener.hpp>
#include <st.h>
using namespace std;
#include <srs_app_srt_server.hpp>
@ -64,8 +62,8 @@ srs_error_t SrsSrtListener::listen()
srt_skt_ = new SrsSrtSocket(_srt_eventloop->poller(), lfd_);
// Accept never timeout.
srt_skt_->set_recv_timeout(ST_UTIME_NO_TIMEOUT);
srt_skt_->set_send_timeout(ST_UTIME_NO_TIMEOUT);
srt_skt_->set_recv_timeout(SRS_UTIME_NO_TIMEOUT);
srt_skt_->set_send_timeout(SRS_UTIME_NO_TIMEOUT);
srs_freep(trd_);
trd_ = new SrsSTCoroutine("srt_listener", this);

@ -6,7 +6,6 @@
#include <srs_app_st.hpp>
#include <st.h>
#include <string>
using namespace std;
@ -115,8 +114,6 @@ const SrsContextId& SrsSTCoroutine::cid()
return impl_->cid();
}
_ST_THREAD_CREATE_PFN _pfn_st_thread_create = (_ST_THREAD_CREATE_PFN)st_thread_create;
SrsFastCoroutine::SrsFastCoroutine(string n, ISrsCoroutineHandler* h)
{
// TODO: FIXME: Reduce duplicated code.
@ -208,7 +205,7 @@ void SrsFastCoroutine::stop()
// When not started, the trd is NULL.
if (trd) {
void* res = NULL;
int r0 = st_thread_join((st_thread_t)trd, &res);
int r0 = srs_thread_join(trd, &res);
if (r0) {
// By st_thread_join
if (errno == EINVAL) srs_assert(!r0);
@ -252,7 +249,7 @@ void SrsFastCoroutine::interrupt()
// Note that if another thread is stopping thread and waiting in st_thread_join,
// the interrupt will make the st_thread_join fail.
st_thread_interrupt((st_thread_t)trd);
srs_thread_interrupt(trd);
}
const SrsContextId& SrsFastCoroutine::cid()

@ -142,10 +142,6 @@ public:
virtual const SrsContextId& cid();
};
// For utest to mock the thread create.
typedef void* (*_ST_THREAD_CREATE_PFN)(void *(*start)(void *arg), void *arg, int joinable, int stack_size);
extern _ST_THREAD_CREATE_PFN _pfn_st_thread_create;
// High performance coroutine.
class SrsFastCoroutine
{

@ -20,7 +20,7 @@
// The project informations, may sent to client in HTTP header or RTMP metadata.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_CODE "Leo"
#define RTMP_SIG_SRS_CODE "Bee"
#define RTMP_SIG_SRS_URL "https://github.com/ossrs/srs"
#define RTMP_SIG_SRS_LICENSE "MIT"
#define SRS_CONSTRIBUTORS "https://github.com/ossrs/srs/blob/develop/trunk/AUTHORS.md#contributors"

@ -147,11 +147,23 @@ void srs_thread_exit(void* retval)
st_thread_exit(retval);
}
int srs_thread_join(srs_thread_t thread, void **retvalp)
{
return st_thread_join((st_thread_t)thread, retvalp);
}
void srs_thread_interrupt(srs_thread_t thread)
{
st_thread_interrupt((st_thread_t)thread);
}
void srs_thread_yield()
{
st_thread_yield();
}
_ST_THREAD_CREATE_PFN _pfn_st_thread_create = (_ST_THREAD_CREATE_PFN)st_thread_create;
srs_error_t srs_tcp_connect(string server, int port, srs_utime_t tm, srs_netfd_t* pstfd)
{
st_utime_t timeout = ST_UTIME_NO_TIMEOUT;

@ -41,8 +41,14 @@ extern srs_error_t srs_fd_keepalive(int fd);
// Get current coroutine/thread.
extern srs_thread_t srs_thread_self();
extern void srs_thread_exit(void* retval);
extern int srs_thread_join(srs_thread_t thread, void **retvalp);
extern void srs_thread_interrupt(srs_thread_t thread);
extern void srs_thread_yield();
// For utest to mock the thread create.
typedef void* (*_ST_THREAD_CREATE_PFN)(void *(*start)(void *arg), void *arg, int joinable, int stack_size);
extern _ST_THREAD_CREATE_PFN _pfn_st_thread_create;
// For client, to open socket and connect to server.
// @param tm The timeout in srs_utime_t.
extern srs_error_t srs_tcp_connect(std::string server, int port, srs_utime_t tm, srs_netfd_t* pstfd);

Loading…
Cancel
Save