obs-outputs: Use name and version for encoder
My fault; should have realized that this would be better to do. Uses "obs-studio" as the name, and includes the version (same format as the others)
This commit is contained in:
@@ -56,6 +56,7 @@ struct rtmp_stream {
|
||||
|
||||
struct dstr path, key;
|
||||
struct dstr username, password;
|
||||
struct dstr encoder_name;
|
||||
|
||||
/* frame drop variables */
|
||||
int64_t drop_threshold_usec;
|
||||
@@ -107,6 +108,7 @@ static void rtmp_stream_destroy(void *data)
|
||||
dstr_free(&stream->key);
|
||||
dstr_free(&stream->username);
|
||||
dstr_free(&stream->password);
|
||||
dstr_free(&stream->encoder_name);
|
||||
os_event_destroy(stream->stop_event);
|
||||
os_sem_destroy(stream->send_sem);
|
||||
pthread_mutex_destroy(&stream->packets_mutex);
|
||||
@@ -400,11 +402,23 @@ static int try_connect(struct rtmp_stream *stream)
|
||||
|
||||
RTMP_EnableWrite(&stream->rtmp);
|
||||
|
||||
dstr_copy(&stream->encoder_name, "FMLE/3.0 (compatible; obs-studio/");
|
||||
|
||||
#ifdef HAVE_OBSCONFIG_H
|
||||
dstr_cat(&stream->encoder_name, OBS_VERSION);
|
||||
#else
|
||||
dstr_catf(&stream->encoder_name, "%d.%d.%d",
|
||||
LIBOBS_API_MAJOR_VER,
|
||||
LIBOBS_API_MINOR_VER,
|
||||
LIBOBS_API_PATCH_VER);
|
||||
#endif
|
||||
|
||||
dstr_cat(&stream->encoder_name, "; FMSc/1.0)");
|
||||
|
||||
set_rtmp_dstr(&stream->rtmp.Link.pubUser, &stream->username);
|
||||
set_rtmp_dstr(&stream->rtmp.Link.pubPasswd, &stream->password);
|
||||
set_rtmp_dstr(&stream->rtmp.Link.flashVer, &stream->encoder_name);
|
||||
stream->rtmp.Link.swfUrl = stream->rtmp.Link.tcUrl;
|
||||
set_rtmp_str(&stream->rtmp.Link.flashVer,
|
||||
"FMLE/3.0 (compatible; OBS Studio; FMSc/1.0)");
|
||||
|
||||
RTMP_AddStream(&stream->rtmp, stream->key.array);
|
||||
|
||||
|
Reference in New Issue
Block a user