[FFmpeg-cvslog] avformat/librist: increase default loglevel
Marton Balint
git at videolan.org
Sat Mar 13 20:43:47 EET 2021
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Mar 6 22:53:21 2021 +0100| [4217e091fefe540a0aab767e4a0a2454808cb4aa] | committer: Marton Balint
avformat/librist: increase default loglevel
Also remove AV_LOG_SIMULATE from the list as it is not used directly, and do
not use panic level on unknown loglevel, but make them warn. Also fix mapping of
NOTICE/INFO/VERBOSE and add documentation about when the option should actually
be used.
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4217e091fefe540a0aab767e4a0a2454808cb4aa
---
doc/protocols.texi | 4 +++-
libavformat/librist.c | 9 ++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 11005b0849..eaf7b52608 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -718,7 +718,9 @@ Set internal RIST buffer size for retransmission of data.
Set maximum packet size for sending data. 1316 by default.
@item log_level
-Set loglevel for RIST logging messages.
+Set loglevel for RIST logging messages. You only need to set this if you
+explicitly want to enable debug level messages or packet loss simulation,
+otherwise the regular loglevel is respected.
@item secret
Set override of encryption secret, by default is unset.
diff --git a/libavformat/librist.c b/libavformat/librist.c
index 2fb3162f86..2296bfa079 100644
--- a/libavformat/librist.c
+++ b/libavformat/librist.c
@@ -64,7 +64,7 @@ static const AVOption librist_options[] = {
{ "advanced", NULL, 0, AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_ADVANCED}, 0, 0, .flags = D|E, "profile" },
{ "buffer_size", "set buffer_size", OFFSET(buffer_size), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, .flags = D|E },
{ "pkt_size", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.i64=1316}, 1, MAX_PAYLOAD_SIZE, .flags = D|E },
- { "log_level", "set loglevel", OFFSET(log_level), AV_OPT_TYPE_INT, {.i64=-1}, -1, INT_MAX, .flags = D|E },
+ { "log_level", "set loglevel", OFFSET(log_level), AV_OPT_TYPE_INT, {.i64=RIST_LOG_INFO}, -1, INT_MAX, .flags = D|E },
{ "secret", "set encryption secret",OFFSET(secret), AV_OPT_TYPE_STRING,{.str=NULL}, 0, 0, .flags = D|E },
{ "encryption","set encryption type",OFFSET(encryption), AV_OPT_TYPE_INT ,{.i64=0}, 0, INT_MAX, .flags = D|E },
{ NULL }
@@ -87,12 +87,11 @@ static int log_cb(void *arg, enum rist_log_level log_level, const char *msg)
switch (log_level) {
case RIST_LOG_ERROR: level = AV_LOG_ERROR; break;
case RIST_LOG_WARN: level = AV_LOG_WARNING; break;
- case RIST_LOG_NOTICE: level = AV_LOG_VERBOSE; break;
- case RIST_LOG_INFO: level = AV_LOG_INFO; break;
+ case RIST_LOG_NOTICE: level = AV_LOG_INFO; break;
+ case RIST_LOG_INFO: level = AV_LOG_VERBOSE; break;
case RIST_LOG_DEBUG: level = AV_LOG_DEBUG; break;
case RIST_LOG_DISABLE: level = AV_LOG_QUIET; break;
- case RIST_LOG_SIMULATE: level = AV_LOG_TRACE; break;
- default: level = AV_LOG_PANIC;
+ default: level = AV_LOG_WARNING;
}
av_log(arg, level, "%s", msg);
More information about the ffmpeg-cvslog
mailing list