Skip to content

Commit

Permalink
Fix build fail
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jun 16, 2021
1 parent 68c48e2 commit df20fe6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 16 deletions.
42 changes: 26 additions & 16 deletions trunk/auto/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ function parse_user_option_to_value_and_option() {
esac
}

# For variable values, might be three values: YES, RESERVED, NO(by default).
function value2switch() {
if [[ $1 == YES ]]; then
echo on;
Expand All @@ -358,6 +359,7 @@ function value2switch() {
fi
}

# For user options, only off or on(by default).
function switch2value() {
if [[ $1 == off ]]; then
echo NO;
Expand All @@ -378,12 +380,7 @@ do
parse_user_option
done

if [ $help = yes ]; then
show_help
exit 0
fi

function apply_detail_options() {
function apply_auto_options() {
# set default preset if not specifies
if [[ $SRS_X86_X64 == NO && $SRS_OSX == NO && $SRS_CROSS_BUILD == NO ]]; then
SRS_X86_X64=YES; opt="--x86-x64 $opt";
Expand All @@ -410,6 +407,28 @@ function apply_detail_options() {
if [ $SRS_TRANSCODE = YES ]; then SRS_FFMPEG_STUB=YES; fi
if [ $SRS_INGEST = YES ]; then SRS_FFMPEG_STUB=YES; fi

if [[ $SRS_SRTP_ASM == YES && $SRS_RTC == NO ]]; then
echo "Disable SRTP-ASM, because RTC is disabled."
SRS_SRTP_ASM=NO
fi

if [[ $SRS_SRTP_ASM == YES && $SRS_NASM == NO ]]; then
echo "Disable SRTP-ASM, because NASM is disabled."
SRS_SRTP_ASM=NO
fi
}

if [ $help = yes ]; then
apply_auto_options
show_help
exit 0
fi

#####################################################################################
# apply options
#####################################################################################

function apply_detail_options() {
# Always enable HTTP utilies.
if [ $SRS_HTTP_CORE = NO ]; then SRS_HTTP_CORE=YES; echo -e "${YELLOW}[WARN] Always enable HTTP utilies.${BLACK}"; fi
if [ $SRS_STREAM_CASTER = NO ]; then SRS_STREAM_CASTER=YES; echo -e "${YELLOW}[WARN] Always enable StreamCaster.${BLACK}"; fi
Expand All @@ -429,17 +448,8 @@ function apply_detail_options() {
else
export SRS_JOBS="--jobs=${SRS_JOBS}"
fi

if [[ $SRS_SRTP_ASM == YES && $SRS_RTC == NO ]]; then
echo "Disable SRTP-ASM, because RTC is disabled."
SRS_SRTP_ASM=NO
fi

if [[ $SRS_SRTP_ASM == YES && $SRS_NASM == NO ]]; then
echo "Disable SRTP-ASM, because NASM is disabled."
SRS_SRTP_ASM=NO
fi
}
apply_auto_options
apply_detail_options

function regenerate_options() {
Expand Down
1 change: 1 addition & 0 deletions trunk/src/app/srs_app_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ using namespace std;
#include <srs_app_utility.hpp>
#include <srs_kernel_utility.hpp>
#include <srs_kernel_buffer.hpp>
#include <srs_app_pithy_print.hpp>

#include <srs_protocol_kbps.hpp>

Expand Down
3 changes: 3 additions & 0 deletions trunk/src/app/srs_app_rtc_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ using namespace std;
#include <fcntl.h>
#include <unistd.h>

#include <queue>
#include <sstream>

#include <srs_core_autofree.hpp>
Expand All @@ -41,6 +42,8 @@ using namespace std;
#include <srs_app_rtc_source.hpp>
#include <srs_protocol_utility.hpp>
#include <srs_app_threads.hpp>
#include <srs_service_log.hpp>
#include <srs_app_log.hpp>

#include <srs_protocol_kbps.hpp>

Expand Down
1 change: 1 addition & 0 deletions trunk/src/app/srs_app_rtc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ using namespace std;
#include <srs_app_rtc_source.hpp>
#include <srs_app_rtc_api.hpp>
#include <srs_protocol_utility.hpp>
#include <srs_service_log.hpp>

extern SrsPps* _srs_pps_rpkts;
SrsPps* _srs_pps_rstuns = NULL;
Expand Down
1 change: 1 addition & 0 deletions trunk/src/app/srs_app_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ using namespace std;
#include <srs_app_caster_flv.hpp>
#include <srs_kernel_consts.hpp>
#include <srs_app_coworkers.hpp>
#include <srs_service_log.hpp>

std::string srs_listener_type2string(SrsListenerType type)
{
Expand Down

0 comments on commit df20fe6

Please sign in to comment.