From c01ea8323c1a5e3e1f4f26a9d14f43f7710f08b0 Mon Sep 17 00:00:00 2001 From: saxon Date: Fri, 20 Jul 2018 21:25:02 +0930 Subject: [PATCH] Implemented rtmp close func, but need to do more testing - also changed rtmp.c and rtmp.h to remove static funcs --- rtmp/rtmp_c/librtmp/rtmp.c | 10 +++++----- rtmp/rtmp_c/librtmp/rtmp.h | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/rtmp/rtmp_c/librtmp/rtmp.c b/rtmp/rtmp_c/librtmp/rtmp.c index da46fd25..465496ad 100644 --- a/rtmp/rtmp_c/librtmp/rtmp.c +++ b/rtmp/rtmp_c/librtmp/rtmp.c @@ -115,7 +115,7 @@ static int SocksNegotiate(RTMP *r); static int SendConnectPacket(RTMP *r, RTMPPacket *cp); static int SendCheckBW(RTMP *r); static int SendCheckBWResult(RTMP *r, double txn); -static int SendDeleteStream(RTMP *r, double dStreamId); +int SendDeleteStream(RTMP *r, double dStreamId); static int SendFCSubscribe(RTMP *r, AVal *subscribepath); static int SendPlay(RTMP *r); static int SendBytesReceived(RTMP *r); @@ -406,7 +406,7 @@ static const char DEFAULT_FLASH_VER[] = DEF_VERSTR; const AVal RTMP_DefaultFlashVer = { (char *)DEFAULT_FLASH_VER, sizeof(DEFAULT_FLASH_VER) - 1 }; -static void +void SocksSetup(RTMP *r, AVal *sockshost) { if (sockshost->av_len) @@ -1872,7 +1872,7 @@ SendFCPublish(RTMP *r) SAVC(FCUnpublish); -static int +int SendFCUnpublish(RTMP *r) { RTMPPacket packet; @@ -1939,7 +1939,7 @@ SendPublish(RTMP *r) SAVC(deleteStream); -static int +int SendDeleteStream(RTMP *r, double dStreamId) { RTMPPacket packet; @@ -2424,7 +2424,7 @@ AV_queue(RTMP_METHOD **vals, int *num, AVal *av, int txn) (*vals)[(*num)++].name.av_val = tmp; } -static void +void AV_clear(RTMP_METHOD *vals, int num) { int i; diff --git a/rtmp/rtmp_c/librtmp/rtmp.h b/rtmp/rtmp_c/librtmp/rtmp.h index 6d7dd896..ca9fafd1 100644 --- a/rtmp/rtmp_c/librtmp/rtmp.h +++ b/rtmp/rtmp_c/librtmp/rtmp.h @@ -289,6 +289,14 @@ extern "C" void RTMP_SetBufferMS(RTMP *r, int size); void RTMP_UpdateBufferMS(RTMP *r); + void AV_clear(RTMP_METHOD *vals, int num); + + void SocksSetup(RTMP *r, AVal *sockshost); + + int SendFCUnpublish(RTMP *r); + + int SendDeleteStream(RTMP *r, double dStreamId); + int RTMP_SetOpt(RTMP *r, const AVal *opt, AVal *arg); int RTMP_SetupURL(RTMP *r, char *url); void RTMP_SetupStream(RTMP *r, int protocol,