From cd1513d6a30908f0c947843c34a896b310e8dcbe Mon Sep 17 00:00:00 2001 From: xfalcon Date: Mon, 30 Mar 2020 10:37:16 +0800 Subject: [PATCH 1/4] fix fs not close,when dvr error (#1672) --- trunk/src/app/srs_app_dvr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/trunk/src/app/srs_app_dvr.cpp b/trunk/src/app/srs_app_dvr.cpp index cb281e7bd..48453091a 100644 --- a/trunk/src/app/srs_app_dvr.cpp +++ b/trunk/src/app/srs_app_dvr.cpp @@ -180,6 +180,7 @@ srs_error_t SrsDvrSegmenter::close() // Close the encoder, then close the fs object. if ((err = close_encoder()) != srs_success) { + fs->close(); return srs_error_wrap(err, "close encoder"); } From 57604a9c659215979c02e696562a3d4c1c3c0240 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 30 Mar 2020 10:44:11 +0800 Subject: [PATCH 2/4] For #1672, fix dvr close file failed bug. 3.0.140 --- AUTHORS.txt | 4 +++- README.md | 1 + trunk/scripts/new_authors.sh | 1 - trunk/src/app/srs_app_dvr.cpp | 7 +++---- trunk/src/core/srs_core_version3.hpp | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 89d65917f..3c50cd4ca 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -52,4 +52,6 @@ CONTRIBUTORS ordered by first contribution. * xialixin * alphonsetai * Michael.Ma -* lam2003 \ No newline at end of file +* lam2003 +* l<22312935+lam2003@users.noreply.github.com> +* xfalcon diff --git a/README.md b/README.md index 7624868ea..2ee8a3011 100755 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-03-30, For [#1672][bug #1672], fix dvr close file failed bug. 3.0.140 * v3.0, 2020-03-29, [3.0 beta4(3.0.139)][r3.0b4] released. 122674 lines. * v3.0, 2020-03-28, Support multiple OS/Platform build cache. 3.0.139 * v3.0, 2020-03-28, For [#1250][bug #1250], support macOS, OSX, MacbookPro, Apple Darwin. 3.0.138 diff --git a/trunk/scripts/new_authors.sh b/trunk/scripts/new_authors.sh index 7bc0dadd0..f0a94123c 100755 --- a/trunk/scripts/new_authors.sh +++ b/trunk/scripts/new_authors.sh @@ -11,7 +11,6 @@ for author in $authors; do echo $author| grep 'winterserver' >/dev/null 2>&1 && continue; echo $author| grep 'wenjie.zhao' >/dev/null 2>&1 && continue; echo $author| grep 'zhaowenjie' >/dev/null 2>&1 && continue; - echo $author| grep 'noreply' >/dev/null 2>&1 && continue; grep $author $AFILE 1>/dev/null 2>/dev/null && continue; diff --git a/trunk/src/app/srs_app_dvr.cpp b/trunk/src/app/srs_app_dvr.cpp index 48453091a..453ba1dbc 100644 --- a/trunk/src/app/srs_app_dvr.cpp +++ b/trunk/src/app/srs_app_dvr.cpp @@ -179,13 +179,12 @@ srs_error_t SrsDvrSegmenter::close() } // Close the encoder, then close the fs object. - if ((err = close_encoder()) != srs_success) { - fs->close(); + err = close_encoder(); + fs->close(); // Always close the file. + if (err != srs_success) { return srs_error_wrap(err, "close encoder"); } - fs->close(); - // when tmp flv file exists, reap it. if ((err = fragment->rename()) != srs_success) { return srs_error_wrap(err, "rename fragment"); diff --git a/trunk/src/core/srs_core_version3.hpp b/trunk/src/core/srs_core_version3.hpp index c732e77be..d6bf63b98 100644 --- a/trunk/src/core/srs_core_version3.hpp +++ b/trunk/src/core/srs_core_version3.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION3_HPP #define SRS_CORE_VERSION3_HPP -#define SRS_VERSION3_REVISION 139 +#define SRS_VERSION3_REVISION 140 #endif From f3d708c2b59715596f1329c31648a0d21fef020b Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 30 Mar 2020 12:46:53 +0800 Subject: [PATCH 3/4] Fix utest build warnings --- trunk/src/service/srs_service_http_conn.cpp | 2 +- trunk/src/utest/srs_utest_avc.cpp | 10 +++---- trunk/src/utest/srs_utest_kernel.cpp | 10 +++---- trunk/src/utest/srs_utest_mp4.cpp | 22 +++++++------- trunk/src/utest/srs_utest_protocol.cpp | 32 ++++++++++----------- trunk/src/utest/srs_utest_rtmp.cpp | 2 +- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/trunk/src/service/srs_service_http_conn.cpp b/trunk/src/service/srs_service_http_conn.cpp index cff5b26a3..47fba1caa 100644 --- a/trunk/src/service/srs_service_http_conn.cpp +++ b/trunk/src/service/srs_service_http_conn.cpp @@ -124,7 +124,7 @@ srs_error_t SrsHttpParser::parse_message_imp(ISrsReader* reader) enum http_errno code; if ((code = HTTP_PARSER_ERRNO(&parser)) != HPE_OK) { return srs_error_new(ERROR_HTTP_PARSE_HEADER, "parse %dB, nparsed=%d, err=%d/%s %s", - buffer->size(), consumed, http_errno_name(code), http_errno_description(code)); + buffer->size(), consumed, code, http_errno_name(code), http_errno_description(code)); } // When buffer consumed these bytes, it's dropped so the new ptr is actually the HTTP body. But http-parser diff --git a/trunk/src/utest/srs_utest_avc.cpp b/trunk/src/utest/srs_utest_avc.cpp index 15b34f590..550981a6e 100644 --- a/trunk/src/utest/srs_utest_avc.cpp +++ b/trunk/src/utest/srs_utest_avc.cpp @@ -246,7 +246,7 @@ VOID TEST(SrsAVCTest, H264IPBFrame) if (true) { SrsRawH264Stream h; string frame; HELPER_ASSERT_SUCCESS(h.mux_ipb_frame((char*)"Hello", 5, frame)); - EXPECT_EQ(4+5, frame.length()); + EXPECT_EQ(4+5, (int)frame.length()); EXPECT_EQ(0, (uint8_t)frame.at(0)); EXPECT_EQ(0, (uint8_t)frame.at(1)); EXPECT_EQ(0, (uint8_t)frame.at(2)); EXPECT_EQ(5, (uint8_t)frame.at(3)); EXPECT_STREQ("Hello", frame.substr(4).c_str()); @@ -406,7 +406,7 @@ VOID TEST(SrsAVCTest, AACMuxSequenceHeader) codec.channel_configuration = 1; codec.sound_rate = SrsAudioSampleRate22050; HELPER_ASSERT_SUCCESS(h.mux_sequence_header(&codec, sh)); - EXPECT_EQ(2, sh.length()); + EXPECT_EQ(2, (int)sh.length()); EXPECT_EQ(0x0b, (uint8_t)sh.at(0)); EXPECT_EQ(0x88, (uint8_t)sh.at(1)); } @@ -418,7 +418,7 @@ VOID TEST(SrsAVCTest, AACMuxSequenceHeader) codec.channel_configuration = 1; codec.sound_rate = SrsAudioSampleRate11025; HELPER_ASSERT_SUCCESS(h.mux_sequence_header(&codec, sh)); - EXPECT_EQ(2, sh.length()); + EXPECT_EQ(2, (int)sh.length()); EXPECT_EQ(0x0d, (uint8_t)sh.at(0)); EXPECT_EQ(0x08, (uint8_t)sh.at(1)); } @@ -439,7 +439,7 @@ VOID TEST(SrsAVCTest, AACMuxSequenceHeader) codec.sampling_frequency_index = 4; codec.sound_rate = SrsAudioSampleRateReserved; HELPER_ASSERT_SUCCESS(h.mux_sequence_header(&codec, sh)); - EXPECT_EQ(2, sh.length()); + EXPECT_EQ(2, (int)sh.length()); EXPECT_EQ(0x0a, (uint8_t)sh.at(0)); EXPECT_EQ(0x08, (uint8_t)sh.at(1)); } @@ -458,7 +458,7 @@ VOID TEST(SrsAVCTest, AACMuxSequenceHeader) codec.channel_configuration = 1; codec.sound_rate = SrsAudioSampleRate44100; HELPER_ASSERT_SUCCESS(h.mux_sequence_header(&codec, sh)); - EXPECT_EQ(2, sh.length()); + EXPECT_EQ(2, (int)sh.length()); EXPECT_EQ(0x0a, (uint8_t)sh.at(0)); EXPECT_EQ(0x08, (uint8_t)sh.at(1)); } diff --git a/trunk/src/utest/srs_utest_kernel.cpp b/trunk/src/utest/srs_utest_kernel.cpp index 9f1c6cf18..7e602b129 100644 --- a/trunk/src/utest/srs_utest_kernel.cpp +++ b/trunk/src/utest/srs_utest_kernel.cpp @@ -4823,7 +4823,7 @@ VOID TEST(KernelMP4Test, CoverMP4CodecSingleFrame) HELPER_EXPECT_SUCCESS(enc.write_sample( &fmt, SrsMp4HandlerTypeVIDE, fmt.video->frame_type, fmt.video->avc_packet_type, 0, 0, (uint8_t*)fmt.raw, fmt.nb_raw )); - EXPECT_EQ(768, enc.width); EXPECT_EQ(320, enc.height); + EXPECT_EQ(768, (int)enc.width); EXPECT_EQ(320, (int)enc.height); } if (true) { @@ -4936,7 +4936,7 @@ VOID TEST(KernelMP4Test, CoverMP4MultipleVideos) HELPER_EXPECT_SUCCESS(enc.write_sample( &fmt, SrsMp4HandlerTypeVIDE, fmt.video->frame_type, fmt.video->avc_packet_type, 0, 0, (uint8_t*)fmt.raw, fmt.nb_raw )); - EXPECT_EQ(768, enc.width); EXPECT_EQ(320, enc.height); + EXPECT_EQ(768, (int)enc.width); EXPECT_EQ(320, (int)enc.height); } if (true) { @@ -5024,7 +5024,7 @@ VOID TEST(KernelMP4Test, CoverMP4MultipleCTTs) HELPER_EXPECT_SUCCESS(enc.write_sample( &fmt, SrsMp4HandlerTypeVIDE, fmt.video->frame_type, fmt.video->avc_packet_type, 0, 0, (uint8_t*)fmt.raw, fmt.nb_raw )); - EXPECT_EQ(768, enc.width); EXPECT_EQ(320, enc.height); + EXPECT_EQ(768, (int)enc.width); EXPECT_EQ(320, (int)enc.height); } if (true) { @@ -5126,7 +5126,7 @@ VOID TEST(KernelMP4Test, CoverMP4MultipleAVs) HELPER_EXPECT_SUCCESS(enc.write_sample( &fmt, SrsMp4HandlerTypeVIDE, fmt.video->frame_type, fmt.video->avc_packet_type, 0, 0, (uint8_t*)fmt.raw, fmt.nb_raw )); - EXPECT_EQ(768, enc.width); EXPECT_EQ(320, enc.height); + EXPECT_EQ(768, (int)enc.width); EXPECT_EQ(320, (int)enc.height); } if (true) { @@ -5240,7 +5240,7 @@ VOID TEST(KernelMP4Test, CoverMP4CodecErrorNoFrames) HELPER_EXPECT_SUCCESS(enc.write_sample( &fmt, SrsMp4HandlerTypeVIDE, fmt.video->frame_type, fmt.video->avc_packet_type, 0, 0, (uint8_t*)fmt.raw, fmt.nb_raw )); - EXPECT_EQ(768, enc.width); EXPECT_EQ(320, enc.height); + EXPECT_EQ(768, (int)enc.width); EXPECT_EQ(320, (int)enc.height); } if (true) { diff --git a/trunk/src/utest/srs_utest_mp4.cpp b/trunk/src/utest/srs_utest_mp4.cpp index c5e4d8d43..8779f8672 100644 --- a/trunk/src/utest/srs_utest_mp4.cpp +++ b/trunk/src/utest/srs_utest_mp4.cpp @@ -611,7 +611,7 @@ VOID TEST(KernelMp4Test, TFHDBox) b.skip(-1 * b.pos()); SrsMp4TrackFragmentHeaderBox box; HELPER_EXPECT_SUCCESS(box.decode(&b)); - EXPECT_EQ(100, box.track_id); + EXPECT_EQ(100, (int)box.track_id); } } @@ -769,10 +769,10 @@ VOID TEST(KernelMp4Test, TRUNBox) b.skip(-1 * b.pos()); SrsMp4TrackFragmentRunBox box; HELPER_EXPECT_SUCCESS(box.decode(&b)); - ASSERT_EQ(1, box.entries.size()); + ASSERT_EQ(1, (int)box.entries.size()); SrsMp4TrunEntry* entry = box.entries.at(0); - EXPECT_EQ(1000, entry->sample_duration); + EXPECT_EQ(1000, (int)entry->sample_duration); } } } @@ -803,7 +803,7 @@ VOID TEST(KernelMp4Test, FreeBox) b.skip(-1 * b.pos()); SrsMp4FreeSpaceBox box(SrsMp4BoxTypeSKIP); HELPER_EXPECT_SUCCESS(box.decode(&b)); - EXPECT_EQ(4, box.data.size()); + EXPECT_EQ(4, (int)box.data.size()); } } } @@ -906,11 +906,11 @@ VOID TEST(KernelMp4Test, TREXBox) b.skip(-1 * b.pos()); SrsMp4TrackExtendsBox box; HELPER_EXPECT_SUCCESS(box.decode(&b)); - EXPECT_EQ(box.track_ID, 1); - EXPECT_EQ(box.default_sample_description_index, 2); - EXPECT_EQ(box.default_sample_size, 3); - EXPECT_EQ(box.default_sample_duration, 4); - EXPECT_EQ(box.default_sample_flags, 5); + EXPECT_EQ((int)box.track_ID, 1); + EXPECT_EQ((int)box.default_sample_description_index, 2); + EXPECT_EQ((int)box.default_sample_size, 3); + EXPECT_EQ((int)box.default_sample_duration, 4); + EXPECT_EQ((int)box.default_sample_flags, 5); } } @@ -948,7 +948,7 @@ VOID TEST(KernelMp4Test, TKHDBox) b.skip(-1 * b.pos()); SrsMp4TrackHeaderBox box; HELPER_EXPECT_SUCCESS(box.decode(&b)); - EXPECT_EQ(box.track_ID, 1); + EXPECT_EQ((int)box.track_ID, 1); } } @@ -975,7 +975,7 @@ VOID TEST(KernelMp4Test, TKHDBox) b.skip(-1 * b.pos()); SrsMp4TrackHeaderBox box; HELPER_EXPECT_SUCCESS(box.decode(&b)); - EXPECT_EQ(box.track_ID, 1); + EXPECT_EQ((int)box.track_ID, 1); } } } diff --git a/trunk/src/utest/srs_utest_protocol.cpp b/trunk/src/utest/srs_utest_protocol.cpp index 2535b6fd2..2b13b2835 100644 --- a/trunk/src/utest/srs_utest_protocol.cpp +++ b/trunk/src/utest/srs_utest_protocol.cpp @@ -5814,7 +5814,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 75, nparsed = 75, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("GET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nHello")); EXPECT_EQ(75, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); EXPECT_TRUE(parser.body && 5 == parser.body->length); EXPECT_TRUE(parser.headers_complete); EXPECT_TRUE(parser.message_complete); @@ -5825,7 +5825,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 150, nparsed = 150, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("GET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nHelloGET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nWorld")); EXPECT_EQ(150, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); } if (true) { @@ -5833,13 +5833,13 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 70, nparsed = 70, nread = 0, content_length = 5, Header("Content-Length", 5) HELPER_EXPECT_SUCCESS(parser.parse("GET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\n")); EXPECT_EQ(70, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); - EXPECT_EQ(5, parser.parser->content_length); + EXPECT_EQ(0, (int)parser.parser->nread); + EXPECT_EQ(5, (int)parser.parser->content_length); // size = 79, nparsed = 5, nread = 1, content_length = -1, Header("Content-Length", 5) HELPER_EXPECT_FAILED(parser.parse("elloGET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nHello")); EXPECT_EQ(5, (int)parser.parsed); - EXPECT_EQ(1, parser.parser->nread); + EXPECT_EQ(1, (int)parser.parser->nread); EXPECT_EQ(-1, (int64_t)parser.parser->content_length); } @@ -5848,13 +5848,13 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 70, nparsed = 70, nread = 0, content_length = 5, Header("Content-Length", 5) HELPER_EXPECT_SUCCESS(parser.parse("GET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\n")); EXPECT_EQ(70, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); - EXPECT_EQ(5, parser.parser->content_length); + EXPECT_EQ(0, (int)parser.parser->nread); + EXPECT_EQ(5, (int)parser.parser->content_length); // size = 80, nparsed = 70, nread = 0, content_length = 0, Header("Content-Length", 5) HELPER_EXPECT_SUCCESS(parser.parse("HelloGET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nWorld")); EXPECT_EQ(80, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); EXPECT_EQ(0, parser.parser->content_length); } @@ -5863,7 +5863,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 73, nparsed = 73, nread = 0, content_length = 2, Header("Content-Length", 5) HELPER_EXPECT_SUCCESS(parser.parse("GET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nHel")); EXPECT_EQ(73, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); EXPECT_EQ(2, parser.parser->content_length); } @@ -5872,7 +5872,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 82, nparsed = 75, nread = 1, content_length = -1, Header("Content-Length", 5) HELPER_EXPECT_FAILED(parser.parse("GET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nHello World!")); EXPECT_EQ(75, (int)parser.parsed); - EXPECT_EQ(1, parser.parser->nread); + EXPECT_EQ(1, (int)parser.parser->nread); EXPECT_EQ(-1, (int64_t)parser.parser->content_length); } @@ -5886,7 +5886,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 41, nparsed = 41, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("st: ossrs.net\r\nContent-Length: 5\r\n\r\nHello")); EXPECT_EQ(41, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); } if (true) { @@ -5899,7 +5899,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 34, nparsed = 34, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("rs.net\r\nContent-Length: 5\r\n\r\nHello")); EXPECT_EQ(34, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); } if (true) { @@ -5912,7 +5912,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 27, nparsed = 27, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("\nContent-Length: 5\r\n\r\nHello")); EXPECT_EQ(27, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); } if (true) { @@ -5925,7 +5925,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 7, nparsed = 7, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("\r\nHello")); EXPECT_EQ(7, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); } if (true) { @@ -5938,7 +5938,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 6, nparsed = 6, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("\nHello")); EXPECT_EQ(6, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); } if (true) { @@ -5946,7 +5946,7 @@ VOID TEST(ProtocolHTTPTest, HTTPParser) // size = 75, nparsed = 75, nread = 0 HELPER_EXPECT_SUCCESS(parser.parse("GET /gslb/v1/versions HTTP/1.1\r\nHost: ossrs.net\r\nContent-Length: 5\r\n\r\nHello")); EXPECT_EQ(75, (int)parser.parsed); - EXPECT_EQ(0, parser.parser->nread); + EXPECT_EQ(0, (int)parser.parser->nread); } if (true) { diff --git a/trunk/src/utest/srs_utest_rtmp.cpp b/trunk/src/utest/srs_utest_rtmp.cpp index 7acc3d4c2..a365673c1 100644 --- a/trunk/src/utest/srs_utest_rtmp.cpp +++ b/trunk/src/utest/srs_utest_rtmp.cpp @@ -2495,7 +2495,7 @@ VOID TEST(ProtocolRTMPTest, CoverAll) SrsCommonMessage* msg = NULL; SrsAcknowledgementPacket* pkt = NULL; HELPER_ASSERT_SUCCESS(r.expect_message(&msg, &pkt)); - EXPECT_EQ(1024, pkt->sequence_number); + EXPECT_EQ(1024, (int)pkt->sequence_number); srs_freep(msg); srs_freep(pkt); } } From c2657bf672a99e910948f24a37734444440b3a3c Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 7 Apr 2020 20:11:56 +0800 Subject: [PATCH 4/4] Use isolate cache for different SRS version. --- trunk/auto/setup_variables.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trunk/auto/setup_variables.sh b/trunk/auto/setup_variables.sh index 7a39fd166..73c5793f7 100755 --- a/trunk/auto/setup_variables.sh +++ b/trunk/auto/setup_variables.sh @@ -4,10 +4,15 @@ OS_KERNEL_NAME=$(uname -s) OS_KERNRL_RELEASE=$(uname -r|awk -F '-' '{print $1}') OS_PREFIX="Platform" + +# Build platform cache. SRS_PLATFORM="${OS_PREFIX}-${OS_KERNEL_NAME}-${OS_KERNRL_RELEASE}" if [[ ${SRS_BUILD_TAG} != "" ]]; then SRS_PLATFORM="${SRS_PLATFORM}-${SRS_BUILD_TAG}" fi +# Use isolate cache for different SRS version. +SRS_PLATFORM="${SRS_PLATFORM}-SRS3" + echo "SRS_WORKDIR: ${SRS_WORKDIR}, SRS_OBJS_DIR: ${SRS_OBJS_DIR}, SRS_OBJS: ${SRS_OBJS}, SRS_PLATFORM: ${SRS_PLATFORM}" # For src object files on each platform.