Skip to content

Commit

Permalink
Fix #820, extract service for modules. 3.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Mar 26, 2017
1 parent b75a3fa commit 609605a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 26 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Please select your language:

### V3 changes

* v3.0, 2017-03-26, Fix [#820][bug #820], extract service for modules. 3.0.21
* v3.0, 2017-03-02, Fix [#786][bug #786], simply don't reuse object. 3.0.20
* v3.0, 2017-03-01, For [#110][bug #110], refine thread object. 3.0.19
* v3.0, 2017-02-12, Fix [#301][bug #301], User must config the codec in right way for HLS. 3.0.18
Expand Down Expand Up @@ -1388,6 +1389,7 @@ Winlin
[bug #742]: https://github.com/ossrs/srs/issues/742
[bug #738]: https://github.com/ossrs/srs/issues/738
[bug #786]: https://github.com/ossrs/srs/issues/786
[bug #820]: https://github.com/ossrs/srs/issues/820
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx

[exo #828]: https://github.com/google/ExoPlayer/pull/828
Expand Down
18 changes: 9 additions & 9 deletions trunk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,19 @@ MODULE_FILES=("srs_librtmp" "srs_lib_simple_socket" "srs_lib_bandwidth")
LIBS_INCS="src/libs"; MODULE_DIR=${LIBS_INCS} . auto/modules.sh
LIBS_OBJS="${MODULE_OBJS[@]}"
#
#Main Module, for SRS.
#Server Module, for SRS only.
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
MODULE_ID="MAIN"
MODULE_ID="SERVER"
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "SERVICE" "APP")
ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS_DIR} ${LibGperfRoot})
MODULE_FILES=("srs_main_server")
MAIN_INCS="src/main"; MODULE_DIR=${MAIN_INCS} . auto/modules.sh
MAIN_OBJS="${MODULE_OBJS[@]}"
SERVER_INCS="src/main"; MODULE_DIR=${SERVER_INCS} . auto/modules.sh
SERVER_OBJS="${MODULE_OBJS[@]}"
fi
#
#Main Module, for app from modules.
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
MODULE_ID="MAIN2"
MODULE_ID="MAIN"
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "SERVICE")
ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS_DIR} ${LibGperfRoot})
MODULE_FILES=()
Expand All @@ -243,8 +243,8 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
MODULE_FILES+=("${SRS_MODULE_MAIN[*]}")
DEFINES="${DEFINES} ${SRS_MODULE_DEFINES}"
done
MAIN2_INCS="src/main"; MODULE_DIR=${MAIN2_INCS} . auto/modules.sh
MAIN2_OBJS="${MODULE_OBJS[@]}"
MAIN_INCS="src/main"; MODULE_DIR=${MAIN_INCS} . auto/modules.sh
MAIN_OBJS="${MODULE_OBJS[@]}"
fi

#####################################################################################
Expand All @@ -263,14 +263,14 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
# all depends libraries
ModuleLibFiles=(${LibSTfile} ${LibSSLfile} ${LibGperfFile})
# all depends objects
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${SERVICE_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}"
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${SERVICE_OBJS[@]} ${APP_OBJS[@]} ${SERVER_OBJS[@]}"
LINK_OPTIONS="${SrsLinkOptions}${SrsGprofLink}${SrsGperfLink}"
#
# srs: srs(simple rtmp server) over st(state-threads)
BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh
#
# For modules, without the app module.
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${SERVICE_OBJS[@]} ${MAIN2_OBJS[@]}"
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${SERVICE_OBJS[@]} ${MAIN_OBJS[@]}"
#
for SRS_MODULE in ${SRS_MODULES[*]}; do
. $SRS_MODULE/config
Expand Down
23 changes: 7 additions & 16 deletions trunk/research/librtmp/srs_bandwidth_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,14 @@ int main(int argc, char** argv)
goto rtmp_destroy;
}

srs_human_trace("\n%s, %s, %s\n"
"%s, %d.%d.%d.%d, srs_pid=%d, srs_id=%d\n"
"duration: %dms(%d+%d)\n"
"play: %dkbps\n"
"publish: %dkbps",
(char*)sig, NULL, NULL,
(char*)ip, major, minor, revision, build, pid, cid,
(int)(end_time - start_time), play_duration, publish_duration,
play_kbps,
publish_kbps);
srs_human_trace("\n%s, %s, %d.%d.%d.%d, srs_pid=%d, srs_id=%d\n"
"duration: %dms(%d+%d), play: %dkbps, publish: %dkbps",
(char*)sig, (char*)ip, major, minor, revision, build, pid, cid,
(int)(end_time - start_time), play_duration, publish_duration, play_kbps, publish_kbps);

rtmp_destroy:
fprintf(stderr, "{\"code\":%d,"
"\"srs_server\":\"%s\", "
"\"srs_primary\":\"%s\", "
"\"srs_authors\":\"%s\", "
"\"srs_server_ip\":\"%s\", "
"\"srs_server\":\"%s\", \"srs_primary\":\"\", \"srs_authors\":\"\", \"srs_server_ip\":\"%s\", "
"\"srs_version\":\"%d.%d.%d.%d\", "
"\"srs_pid\":%d, "
"\"srs_id\":%d, "
Expand All @@ -139,8 +130,8 @@ int main(int argc, char** argv)
"\"publish_kbps\":%d"
"}",
ret,
(char*)sig, NULL, NULL,
(char*)ip, major, minor, revision, build, pid, cid,
(char*)sig, (char*)ip,
major, minor, revision, build, pid, cid,
(int)(end_time - start_time), play_duration, publish_duration,
play_kbps, publish_kbps);
srs_rtmp_destroy(rtmp);
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// current release version
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#define VERSION_REVISION 20
#define VERSION_REVISION 21

// generated by configure, only macros.
#include <srs_auto_headers.hpp>
Expand Down

0 comments on commit 609605a

Please sign in to comment.