mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support debug
This commit is contained in:
parent
8e4ef98629
commit
a80084289b
4 changed files with 16 additions and 1 deletions
|
@ -171,6 +171,12 @@ else
|
||||||
srs_undefine_macro "SRS_AUTO_HAS_SENDMMSG" $SRS_AUTO_HEADERS_H
|
srs_undefine_macro "SRS_AUTO_HAS_SENDMMSG" $SRS_AUTO_HEADERS_H
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $SRS_DEBUG = YES ]; then
|
||||||
|
srs_define_macro "SRS_AUTO_DEBUG" $SRS_AUTO_HEADERS_H
|
||||||
|
else
|
||||||
|
srs_undefine_macro "SRS_AUTO_DEBUG" $SRS_AUTO_HEADERS_H
|
||||||
|
fi
|
||||||
|
|
||||||
# prefix
|
# prefix
|
||||||
echo "" >> $SRS_AUTO_HEADERS_H
|
echo "" >> $SRS_AUTO_HEADERS_H
|
||||||
echo "#define SRS_AUTO_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H
|
echo "#define SRS_AUTO_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H
|
||||||
|
|
|
@ -122,6 +122,7 @@ SRS_NASM=YES
|
||||||
SRS_SRTP_ASM=YES
|
SRS_SRTP_ASM=YES
|
||||||
SRS_SENDMMSG=YES
|
SRS_SENDMMSG=YES
|
||||||
SRS_HAS_SENDMMSG=YES
|
SRS_HAS_SENDMMSG=YES
|
||||||
|
SRS_DEBUG=NO
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# menu
|
# menu
|
||||||
|
@ -162,6 +163,7 @@ Features:
|
||||||
--prefix=<path> The absolute installation path for srs. Default: $SRS_PREFIX
|
--prefix=<path> The absolute installation path for srs. Default: $SRS_PREFIX
|
||||||
--static Whether add '-static' to link options.
|
--static Whether add '-static' to link options.
|
||||||
--gcov Whether enable the GCOV compiler options.
|
--gcov Whether enable the GCOV compiler options.
|
||||||
|
--debug Whether enable the debug code, may hurt performance.
|
||||||
--jobs[=N] Allow N jobs at once; infinite jobs with no arg.
|
--jobs[=N] Allow N jobs at once; infinite jobs with no arg.
|
||||||
Used for make in the configure, for example, to make ffmpeg.
|
Used for make in the configure, for example, to make ffmpeg.
|
||||||
--log-verbose Whether enable the log verbose level. default: no.
|
--log-verbose Whether enable the log verbose level. default: no.
|
||||||
|
@ -293,6 +295,7 @@ function parse_user_option() {
|
||||||
--log-info) SRS_LOG_INFO=YES ;;
|
--log-info) SRS_LOG_INFO=YES ;;
|
||||||
--log-trace) SRS_LOG_TRACE=YES ;;
|
--log-trace) SRS_LOG_TRACE=YES ;;
|
||||||
--gcov) SRS_GCOV=YES ;;
|
--gcov) SRS_GCOV=YES ;;
|
||||||
|
--debug) SRS_DEBUG=YES ;;
|
||||||
|
|
||||||
--arm) SRS_CROSS_BUILD=YES ;;
|
--arm) SRS_CROSS_BUILD=YES ;;
|
||||||
--mips) SRS_CROSS_BUILD=YES ;;
|
--mips) SRS_CROSS_BUILD=YES ;;
|
||||||
|
@ -623,6 +626,7 @@ function regenerate_options() {
|
||||||
if [ $SRS_LOG_INFO = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info"; fi
|
if [ $SRS_LOG_INFO = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info"; fi
|
||||||
if [ $SRS_LOG_TRACE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace"; fi
|
if [ $SRS_LOG_TRACE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace"; fi
|
||||||
if [ $SRS_GCOV = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcov"; fi
|
if [ $SRS_GCOV = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcov"; fi
|
||||||
|
if [ $SRS_DEBUG = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --debug"; fi
|
||||||
if [[ $SRS_EXTRA_FLAGS != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --extra-flags=\\\"$SRS_EXTRA_FLAGS\\\""; fi
|
if [[ $SRS_EXTRA_FLAGS != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --extra-flags=\\\"$SRS_EXTRA_FLAGS\\\""; fi
|
||||||
if [[ $SRS_BUILD_TAG != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --build-tag=\\\"$SRS_BUILD_TAG\\\""; fi
|
if [[ $SRS_BUILD_TAG != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --build-tag=\\\"$SRS_BUILD_TAG\\\""; fi
|
||||||
if [[ $SRS_TOOL_CC != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cc=$SRS_TOOL_CC"; fi
|
if [[ $SRS_TOOL_CC != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cc=$SRS_TOOL_CC"; fi
|
||||||
|
|
|
@ -35,7 +35,7 @@ f.close()
|
||||||
print "Repsonse %s"%(s)
|
print "Repsonse %s"%(s)
|
||||||
|
|
||||||
obj = json.loads(s)
|
obj = json.loads(s)
|
||||||
keys = [3, 5, 9, 16, 32, 64, 128, 256, 1000]
|
keys = [1, 3, 5, 9, 16, 32, 64, 256, 1000]
|
||||||
|
|
||||||
print ""
|
print ""
|
||||||
print("AV---Frames"),
|
print("AV---Frames"),
|
||||||
|
|
|
@ -33,6 +33,11 @@
|
||||||
// The macros generated by configure script.
|
// The macros generated by configure script.
|
||||||
#include <srs_auto_headers.hpp>
|
#include <srs_auto_headers.hpp>
|
||||||
|
|
||||||
|
// Alias for debug.
|
||||||
|
#ifdef SRS_AUTO_DEBUG
|
||||||
|
#define SRS_DEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
// To convert macro values to string.
|
// To convert macro values to string.
|
||||||
// @see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification
|
// @see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification
|
||||||
#define SRS_INTERNAL_STR(v) #v
|
#define SRS_INTERNAL_STR(v) #v
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue