-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
135 additions
and
2,322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="srs" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c conf/clion.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs"> | ||
<method v="2"> | ||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,3 @@ bug | |
/research/thread-model/thread-local | ||
*.gcp | ||
*.svg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
listen 1935; | ||
max_connections 1000; | ||
daemon off; | ||
srs_log_tank console; | ||
|
||
http_server { | ||
enabled on; | ||
listen 8080; | ||
dir ./objs/nginx/html; | ||
} | ||
|
||
http_api { | ||
enabled on; | ||
listen 1985; | ||
} | ||
stats { | ||
network 0; | ||
} | ||
rtc_server { | ||
enabled on; | ||
# Listen at udp://8000 | ||
listen 8000; | ||
# | ||
# The $CANDIDATE means fetch from env, if not configed, use * as default. | ||
# | ||
# The * means retrieving server IP automatically, from all network interfaces, | ||
# @see https://github.com/ossrs/srs/wiki/v4_CN_RTCWiki#config-candidate | ||
candidate $CANDIDATE; | ||
} | ||
|
||
vhost __defaultVhost__ { | ||
rtc { | ||
enabled on; | ||
} | ||
http_remux { | ||
enabled on; | ||
mount [vhost]/[app]/[stream].flv; | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,66 @@ | ||
cmake_minimum_required(VERSION 2.6.4) | ||
cmake_minimum_required(VERSION 2.8.12) | ||
project(srs CXX) | ||
|
||
INCLUDE_DIRECTORIES(../../objs | ||
../../objs/st | ||
../../objs/hp | ||
../../objs/openssl/include | ||
../../src/core | ||
../../src/kernel | ||
../../src/protocol | ||
../../src/app | ||
../../src/service | ||
../../objs/srtp2/include | ||
../../objs/opus/include | ||
../../objs/ffmpeg/include) | ||
|
||
set(SOURCE_FILES ../../src/main/srs_main_server.cpp) | ||
AUX_SOURCE_DIRECTORY(../../src/core SOURCE_FILES) | ||
AUX_SOURCE_DIRECTORY(../../src/kernel SOURCE_FILES) | ||
AUX_SOURCE_DIRECTORY(../../src/protocol SOURCE_FILES) | ||
AUX_SOURCE_DIRECTORY(../../src/app SOURCE_FILES) | ||
AUX_SOURCE_DIRECTORY(../../src/service SOURCE_FILES) | ||
########################################################### | ||
execute_process( | ||
COMMAND bash -c "cd ${PROJECT_SOURCE_DIR}/../../ && pwd" | ||
OUTPUT_VARIABLE SRS_DIR | ||
) | ||
string(STRIP ${SRS_DIR} SRS_DIR) | ||
message("SRS home is ${SRS_DIR}") | ||
|
||
########################################################### | ||
# Start to configure SRS with jobs of number of CPUs. | ||
include(ProcessorCount) | ||
ProcessorCount(JOBS) | ||
|
||
set(DEPS_LIBS ${SRS_DIR}/objs/st/libst.a | ||
${SRS_DIR}/objs/openssl/lib/libssl.a | ||
${SRS_DIR}/objs/openssl/lib/libcrypto.a | ||
${SRS_DIR}/objs/srtp2/lib/libsrtp2.a | ||
${SRS_DIR}/objs/opus/lib/libopus.a | ||
${SRS_DIR}/objs/ffmpeg/lib/libavutil.a | ||
${SRS_DIR}/objs/ffmpeg/lib/libavcodec.a | ||
${SRS_DIR}/objs/ffmpeg/lib/libswresample.a) | ||
foreach(DEPS_LIB ${DEPS_LIBS}) | ||
IF (NOT EXISTS ${DEPS_LIB}) | ||
MESSAGE("${DEPS_LIB} not found") | ||
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
EXEC_PROGRAM("cd ${SRS_DIR} && ./configure --osx --jobs=${JOBS}") | ||
ELSE () | ||
EXEC_PROGRAM("cd ${SRS_DIR} && ./configure --jobs=${JOBS}") | ||
ENDIF () | ||
ELSE () | ||
MESSAGE("${DEPS_LIB} is ok") | ||
ENDIF () | ||
endforeach() | ||
|
||
########################################################### | ||
# Setup SRS project | ||
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}/src/core | ||
${SRS_DIR}/src/kernel | ||
${SRS_DIR}/src/protocol | ||
${SRS_DIR}/src/app | ||
${SRS_DIR}/src/service) | ||
|
||
set(SOURCE_FILES ${SRS_DIR}/src/main/srs_main_server.cpp) | ||
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/core SOURCE_FILES) | ||
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/kernel SOURCE_FILES) | ||
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/protocol SOURCE_FILES) | ||
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/app SOURCE_FILES) | ||
|
||
ADD_DEFINITIONS("-g -O0") | ||
|
||
ADD_EXECUTABLE(srs ${SOURCE_FILES}) | ||
TARGET_LINK_LIBRARIES(srs dl) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/st/libst.a) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/openssl/lib/libssl.a) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/openssl/lib/libcrypto.a) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/srtp2/lib/libsrtp2.a) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/opus/lib/libopus.a) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/ffmpeg/lib/libavutil.a) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/ffmpeg/lib/libavcodec.a) | ||
TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/../../objs/ffmpeg/lib/libswresample.a) | ||
TARGET_LINK_LIBRARIES(srs ${DEPS_LIBS}) | ||
TARGET_LINK_LIBRARIES(srs -ldl) | ||
|
||
IF (NOT EXISTS ${PROJECT_SOURCE_DIR}/../../objs/st/libst.a) | ||
MESSAGE("srs_libs not found") | ||
EXEC_PROGRAM("cd .. && ./configure") | ||
ELSE (NOT EXISTS ${PROJECT_SOURCE_DIR}/../../objs/st/libst.a) | ||
MESSAGE("srs_libs is ok") | ||
ENDIF (NOT EXISTS ${PROJECT_SOURCE_DIR}/../../objs/st/libst.a) | ||
|
||
MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/ossrs/srs/wiki/v1_CN_IDE#jetbrains") | ||
MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/ossrs/srs/wiki/v1_CN_IDE#jetbrains") | ||
MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/ossrs/srs/wiki/v1_CN_IDE#jetbrains") | ||
MESSAGE(STATUS "use ./configure && make, @see https://github.com/ossrs/srs#usage") | ||
MESSAGE(STATUS "@see https://github.com/ossrs/srs/wiki/v4_CN_IDE") | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.