AI: Update conf description for multiple ep for callback. #4421

This commit is contained in:
OSSRS-AI
2025-10-24 22:21:34 -04:00
committed by winlin
parent 8f1578e0e3
commit d9ea25b441
3 changed files with 14 additions and 6 deletions

View File

@@ -1123,6 +1123,8 @@ vhost hooks.callback.srs.com {
# @remark For SRS4, the HTTPS url is supported, for example:
# on_publish https://xxx/api0 https://xxx/api1 https://xxx/apiN
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_PUBLISH for all vhosts.
# @remark When using environment variables, use space-separated URLs with proper quoting:
# SRS_VHOST_HTTP_HOOKS_ON_PUBLISH="https://xxx/api0 https://xxx/api1"
on_publish http://127.0.0.1:8085/api/v1/streams http://localhost:8085/api/v1/streams;
# when client(encoder) stop publish to vhost/app/stream, call the hook,
# the request in the POST data string is a object encode by json:
@@ -1160,6 +1162,8 @@ vhost hooks.callback.srs.com {
# @remark For SRS4, the HTTPS url is supported, for example:
# on_play https://xxx/api0 https://xxx/api1 https://xxx/apiN
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_PLAY for all vhosts.
# @remark When using environment variables, use space-separated URLs with proper quoting:
# SRS_VHOST_HTTP_HOOKS_ON_PLAY="https://xxx/api0 https://xxx/api1"
on_play http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions;
# when client stop to play vhost/app/stream, call the hook,
# the request in the POST data string is a object encode by json:

View File

@@ -1,5 +1,9 @@
# http-hooks or http-callbacks config for srs.
# @see full.conf for detail config.
#
# Multiple URLs can be specified for each hook (space-separated).
# When using environment variables, use space-separated URLs with proper quoting:
# SRS_VHOST_HTTP_HOOKS_ON_PLAY="http://url1 http://url2"
max_connections 1000;
daemon off;

View File

@@ -85,8 +85,8 @@ VOID TEST(StTest, StUtimePerformance)
// Calculate absolute difference between the two elapsed times
int time_diff = gettimeofday_elapsed_time > st_utime_elapsed_time
? gettimeofday_elapsed_time - st_utime_elapsed_time
: st_utime_elapsed_time - gettimeofday_elapsed_time;
? gettimeofday_elapsed_time - st_utime_elapsed_time
: st_utime_elapsed_time - gettimeofday_elapsed_time;
// The difference should be less than N clock ticks (microseconds)
EXPECT_LT(time_diff, 100);
@@ -111,8 +111,8 @@ VOID TEST(StTest, StUtimePerformance)
// Calculate absolute difference between the two elapsed times
int time_diff = gettimeofday_elapsed_time > st_utime_elapsed_time
? gettimeofday_elapsed_time - st_utime_elapsed_time
: st_utime_elapsed_time - gettimeofday_elapsed_time;
? gettimeofday_elapsed_time - st_utime_elapsed_time
: st_utime_elapsed_time - gettimeofday_elapsed_time;
// The difference should be less than N clock ticks (microseconds)
EXPECT_LT(time_diff, 100);
@@ -139,8 +139,8 @@ VOID TEST(StTest, StUtimePerformance)
// Calculate absolute difference between the two elapsed times
int time_diff = gettimeofday_elapsed_time > st_utime_elapsed_time
? gettimeofday_elapsed_time - st_utime_elapsed_time
: st_utime_elapsed_time - gettimeofday_elapsed_time;
? gettimeofday_elapsed_time - st_utime_elapsed_time
: st_utime_elapsed_time - gettimeofday_elapsed_time;
// The difference should be less than N clock ticks (microseconds)
EXPECT_LT(time_diff, 100);