Skip to content

Commit

Permalink
Getting RTSP authentication on the tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Oct 26, 2024
1 parent d326690 commit ea11584
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
15 changes: 11 additions & 4 deletions src/app_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,19 @@ enum ConfigError parse_app_config(void) {
goto RET_ERR;
parse_int(&ini, "isp", "antiflicker", -1, 60, &app_config.antiflicker);

parse_bool(&ini, "rtsp", "enable", &app_config.rtsp_enable);

parse_bool(&ini, "mdns", "enable", &app_config.mdns_enable);

parse_bool(&ini, "osd", "enable", &app_config.osd_enable);

parse_bool(&ini, "rtsp", "enable", &app_config.rtsp_enable);
if (app_config.rtsp_enable) {
parse_bool(&ini, "rtsp", "enable_auth", &app_config.rtsp_enable_auth);
parse_param_value(
&ini, "rtsp", "auth_user", app_config.rtsp_auth_user);
parse_param_value(
&ini, "rtsp", "auth_pass", app_config.rtsp_auth_pass);
}

parse_bool(&ini, "audio", "enable", &app_config.audio_enable);
if (app_config.audio_enable) {
parse_int(&ini, "audio", "bitrate", 32, 320, &app_config.audio_bitrate);
Expand Down Expand Up @@ -316,8 +325,6 @@ enum ConfigError parse_app_config(void) {
goto RET_ERR;
}

parse_bool(&ini, "osd", "enable", &app_config.osd_enable);

err = parse_bool(&ini, "jpeg", "enable", &app_config.jpeg_enable);
if (err != CONFIG_OK)
goto RET_ERR;
Expand Down
7 changes: 6 additions & 1 deletion src/app_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ struct AppConfig {
int antiflicker;

bool osd_enable;
bool rtsp_enable;
bool mdns_enable;

// [rtsp]
bool rtsp_enable;
bool rtsp_enable_auth;
char rtsp_auth_user[32];
char rtsp_auth_pass[32];

// [audio]
bool audio_enable;
unsigned int audio_bitrate;
Expand Down

0 comments on commit ea11584

Please sign in to comment.