0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

obs-outputs/librtmp: Add custom connect data callback

Allows the ability to add custom connect data to the connect signal
encoding
This commit is contained in:
jp9000 2021-11-08 05:17:59 -08:00
parent 6a72cd64e7
commit b4fb1db460
2 changed files with 9 additions and 0 deletions

View File

@ -1684,6 +1684,11 @@ SendConnectPacket(RTMP *r, RTMPPacket *cp)
enc = AMF_EncodeNamedString(enc, pend, &av_type, &av_nonprivate);
if (!enc)
return FALSE;
if (r->Link.customConnectEncode)
{
r->Link.customConnectEncode(&enc, pend);
}
}
if (r->Link.flashVer.av_len)
{

View File

@ -285,6 +285,8 @@ extern "C"
AVal playpath;
} RTMP_Stream;
typedef void (*CUSTOMCONNECTENCODING)(char **penc, char *ppend);
typedef struct RTMP_LNK
{
#define RTMP_MAX_STREAMS 8
@ -296,6 +298,8 @@ extern "C"
AVal hostname;
AVal sockshost;
CUSTOMCONNECTENCODING customConnectEncode;
AVal tcUrl;
AVal swfUrl;
AVal pageUrl;