mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
Merge branch 'develop' into feature/rtc
This commit is contained in:
commit
1a9d4c7d87
3 changed files with 38 additions and 2 deletions
|
@ -678,7 +678,10 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then
|
|||
if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/ffmpeg/bin/ffmpeg ]]; then
|
||||
echo "ffmpeg-4.1 is ok.";
|
||||
else
|
||||
echo "no ffmpeg found, please use srs-docker or --without-ffmpeg";
|
||||
echo "Error: no FFmpeg found at /usr/local/bin/ffmpeg";
|
||||
echo " please copy it from srs-docker";
|
||||
echo " or download from http://ffmpeg.org/download.html";
|
||||
echo " or disable it by --without-ffmpeg";
|
||||
exit -1;
|
||||
fi
|
||||
# Always update the links.
|
||||
|
|
|
@ -3843,7 +3843,11 @@ VOID TEST(KernelFileWriterTest, WriteSpecialCase)
|
|||
|
||||
off_t seeked = 0;
|
||||
HELPER_EXPECT_SUCCESS(f.lseek(0, SEEK_CUR, &seeked));
|
||||
#ifdef SRS_AUTO_OSX
|
||||
EXPECT_EQ(10, seeked);
|
||||
#else
|
||||
EXPECT_EQ(0, seeked);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Always fail.
|
||||
|
|
|
@ -110,6 +110,7 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
SrsTcpClient c(_srs_tmp_host, _srs_tmp_port, _srs_tmp_timeout);
|
||||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
EXPECT_TRUE(h.fd != NULL);
|
||||
}
|
||||
|
||||
|
@ -122,7 +123,10 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
||||
HELPER_EXPECT_SUCCESS(c.write((void*)"Hello", 5, NULL));
|
||||
|
@ -141,7 +145,10 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
||||
HELPER_EXPECT_SUCCESS(c.write((void*)"Hello", 5, NULL));
|
||||
|
@ -149,7 +156,7 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
HELPER_EXPECT_SUCCESS(c.write((void*)"SRS", 3, NULL));
|
||||
|
||||
char buf[16] = {0};
|
||||
HELPER_EXPECT_SUCCESS(skt.read(buf, 9, NULL));
|
||||
HELPER_EXPECT_SUCCESS(skt.read_fully(buf, 9, NULL));
|
||||
EXPECT_STREQ(buf, "Hello SRS");
|
||||
}
|
||||
|
||||
|
@ -162,7 +169,10 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
||||
HELPER_EXPECT_SUCCESS(c.write((void*)"Hello SRS", 9, NULL));
|
||||
|
@ -194,7 +204,10 @@ VOID TEST(TCPServerTest, PingPongWithTimeout)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
skt.set_recv_timeout(1 * SRS_UTIME_MILLISECONDS);
|
||||
|
||||
|
@ -213,7 +226,10 @@ VOID TEST(TCPServerTest, PingPongWithTimeout)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
skt.set_recv_timeout(1 * SRS_UTIME_MILLISECONDS);
|
||||
|
||||
|
@ -232,7 +248,10 @@ VOID TEST(TCPServerTest, PingPongWithTimeout)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
skt.set_recv_timeout(1 * SRS_UTIME_MILLISECONDS);
|
||||
|
||||
|
@ -363,7 +382,9 @@ VOID TEST(TCPServerTest, StringIsHex)
|
|||
char* str = (char*)"!1234567890";
|
||||
char* parsed = str; errno = 0;
|
||||
EXPECT_EQ(0x0, ::strtol(str, &parsed, 16));
|
||||
#ifndef SRS_AUTO_OSX
|
||||
EXPECT_EQ(0, errno);
|
||||
#endif
|
||||
EXPECT_EQ(str, parsed);
|
||||
}
|
||||
|
||||
|
@ -379,7 +400,9 @@ VOID TEST(TCPServerTest, StringIsHex)
|
|||
char* str = (char*)"";
|
||||
char* parsed = str; errno = 0;
|
||||
EXPECT_EQ(0x0, ::strtol(str, &parsed, 16));
|
||||
#ifndef SRS_AUTO_OSX
|
||||
EXPECT_EQ(0, errno);
|
||||
#endif
|
||||
EXPECT_EQ(str, parsed);
|
||||
}
|
||||
|
||||
|
@ -405,7 +428,10 @@ VOID TEST(TCPServerTest, WritevIOVC)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
||||
iovec iovs[3];
|
||||
|
@ -432,7 +458,10 @@ VOID TEST(TCPServerTest, WritevIOVC)
|
|||
HELPER_EXPECT_SUCCESS(c.connect());
|
||||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
||||
iovec iovs[3];
|
||||
|
|
Loading…
Reference in a new issue