diff --git a/source/image.png.MEM b/source/image.png.MEM index 469105a..2bf78bd 100644 --- a/source/image.png.MEM +++ b/source/image.png.MEM @@ -1,5 +1,5 @@ 'SCREEN _NEWIMAGE(720, 460, 32) -'_PUTIMAGE (0, 0), __imageMEM&("tick_warning.png") +'_PUTIMAGE (0, 0), __imageMEM&("tick.png") FUNCTION __imageMEM& (caseImage$) DIM v& @@ -329,204 +329,6 @@ FUNCTION __imageMEM& (caseImage$) btemp$ = _INFLATE$(btemp$) _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m __imageMEM& = _COPYIMAGE(v&): _FREEIMAGE v& - CASE "srt_logo_16.png" - v& = _NEWIMAGE(75, 16, 32) - m = _MEMIMAGE(v&) - A$ = "" - A$ = A$ + "haIcK]7RFE45gEgMeMMGM]G#YAU59DDI2mdLR0OTiJf3B8T#1CYb2\Wm\cmi:P>kAW4X;Z[am[8BKdXK468QY#hI9\12kP`" - A$ = A$ + "?#hG8LH2o8QMChm8\D2CS``9LRATMaHOM9POFUg>inRoF3Q:5]Y[NDQ#>eTQ" - A$ = A$ + "oOV46;QGdkKoGARSBh=9<92W_B75SmQkG]:6E;QN8nO8fdCOkT]Y>U\K`7gT" - A$ = A$ + "fdH8\ifPo63kd7;ZGYgD\_jm]A>>XJooW7?`nN=1R?bneCAO`eG7Q]F6mK=f" - A$ = A$ + ";QaAXGNK#bE\m9mm^[lm:mG;7KT5_G_Bf=8^N84njfAoFS3AHl:oZGAhmZmn" - A$ = A$ + "#8OgRg[D4;PbRge?G`SG\hm:5aV1AhK>6`Weh?9L[2K^79" - A$ = A$ + "`kEjKW5_SHEGmoND5Y]M42KS`j8=_;_oSF4fbJ9gVYT3" - A$ = A$ + "Mo[4JR#o=l]jM]L<7\AiJ:Jd72?1Q_;7f1be2[7F]cNn`\NN_Fo_O\LXC`EW" - A$ = A$ + "PBfjHO3^FolF?5G7JM8ILJfi`NN7AO[`kSeZnOQVWWS?GKRj1lb=5`FUL:[O" - A$ = A$ + ";N?UeQ0^H2OBRffdmmYK^F_F#EZh1_F0[SDiLmh9N^FihiRQg3UoQ\?c8AKl" - A$ = A$ + "n2HOeY\?FfL>T7:1inl:iF>im#ie1lP963J83McbFVgdCUPl^KAoiHFiTg3U" - A$ = A$ + "G7gWQWPmna2oGJOEZR[3<1I]T>HNGWG7`3TPM?3EOdnN:SkGaa0l^>_^^kom" - A$ = A$ + "m4afo7E<\BG;GKJ4AjoQ5]Wmm>BNWc[C63gM4OH>2KB?6N?Ajke[JO7=_[c]" - A$ = A$ + "00iJ6;OaN;J?cSgLTn\BUN>FPgea7N]lK;R_\05OPo^]8mA>NYmVgkN0M[cW" - A$ = A$ + "GV73`OHh;oTZ]m>7LOk=_[O6EbIQN^PiY97aW^DAOR=fo\jPhM^ocT`69\62" - A$ = A$ + "3fPgIkS_nk=lYWFd^UKd^=jKCEM#lNXW;_S0];DNMcb`_fW_=hm2nMSfeX_M" - A$ = A$ + "JIG^hmNhJnIkgf`^>^0l^nmW_#Sn3PLm6Ram?Z[imH]mRgiac?C4KO`IXKfn" - A$ = A$ + "hhbAShk03#H?FS;G]Q<`I[lL6gOm2idN]nNS9h" - A$ = A$ + "kkC8;[aU0ca#>O8Qgehn?Lk4_cnnITP_3LA2iIIOaRWkbEHfhBlkce#FhLTf_am7UG6Fl^N?I2QDbWo;B`gWG0I7KL9NO" - A$ = A$ + "Po=3iM0GQcP>VoKaklhknAh99\M2KR`=:jG\liG#2nNC:K9UiS0#^]I]60On" - A$ = A$ + "kIYcQI4Gk\#GWB6mOI1h;=_Wbn;_mRPgiH`akbN?=hJ?8;m>23N7GcW?PenU" - A$ = A$ + "=E3NoZC`gakZdgLbk\mQOSlTbjmQ?8Q_b#gSeelhG[iiob8n`2m]CNFCGF2n" - A$ = A$ + ">`YE4l^dnjWQ\ak7HE_2ceebaBQFO7H39h7gUXmHM1[g?Ua4:BNGf6[m65ci" - A$ = A$ + "^_6kET8GbaP?=WnNa`k`N2K]_YOT#>ab[;Uia`n?^U4Jg[D" - A$ = A$ + "2hMNmVGf#?8oF[cd6[?`?cJUG7SlL>YIQEG2hmJM=G;H7`#GhikCR`OIdV[A" - A$ = A$ + "I?IUG7OmRK3nnnL]MNGJOWN4ma[__>SflZ6lNXlj0VGAhkH=ZcX4`kBkK26j" - A$ = A$ + "3i4aS]]NOCTk8_G3iIOKFA>mo1E2iM6OVQnF^XMm?R]]HUL]bWGFKQ;:AOOB" - A$ = A$ + "UHN7HPeIiLDG[?oWK?RM" - A$ = A$ + ">KQ=Vbib8S1=UQo^HFkg7`;XjW\noP>b" - A$ = A$ + "J_2H0GOFQZo?PaWPimbei6al7nm#C`^G" - A$ = A$ + "T#>QZo?FG[91Iai5FG4N_LMNQBNgJ?nH\OGce2HFeo7[ojB#N0CgeBnZmTgU" - A$ = A$ + "encOWP]f?GcSkIi4ZnohaaCX\>?^B5_;7[Ubck0ln_8SYIEoOmBH?a" - A$ = A$ + "ZW66XF4kSb_:7l^dfOm4]]V4bGF_Bjjo;D]#1Hm^ABlK^2W;[NNUBInl0hK=" - A$ = A$ + "I79JCkDI7Qd=kkbe_TWQ8`BBDO0H?eVB0k>?lNXJCJL^d[iENnUei4[[3" - A$ = A$ + "<^^YU]Kmi#g0H?AaI_M9^hi142`V>7GQaDO#>emFM]^NHbRgSI7bf?eLJ7K2\ol8WTccEH^LLVdhK0L_5Y^FJ0nEckPOijo;5oGf" - A$ = A$ + ">43\>CmD1fc9KRDf;hD`S;\cHeWXNNZD0?o4h]g_4IcU2P_79ig7INZ;" - A$ = A$ + "eDAXliak47kM6;W0_[2>cA>_3ilVYToQnKU=42mMC8WK4caVB]7GZ1ZO;in5" - A$ = A$ + "6Z61]hmZMQo6C2mlO:O[>hMJW_;NmgfF0FKmU8Li2mbOk[iQgkZ?NU2o[G3A" - A$ = A$ + "??:^F>G2bQh:M5NG[ME2lIlMRSidKdejj<#?^<;k;DNWiegigeD_6B=ZfXkg" - A$ = A$ + "Ei:lmWPJ8McnH2f[A^f3`N;Ri#`g#46kPc72kIh3i:l>VQVWVe]N_WRIOEYJ" - A$ = A$ + "CWnO[?8;%%%0" - btemp$ = "" - FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4) - IF INSTR(1, B$, "%") THEN - FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1) - IF F$ <> "%" THEN C$ = C$ + F$ - NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$) - IF MID$(B$, j, 1) = "#" THEN - MID$(B$, j) = "@": END IF: NEXT - FOR t% = LEN(B$) TO 1 STEP -1 - B& = B& * 64 + ASC(MID$(B$, t%)) - 48 - NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1 - X$ = X$ + CHR$(B& AND 255): B& = B& \ 256 - NEXT: btemp$ = btemp$ + X$: NEXT - btemp$ = _INFLATE$(btemp$) - _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m - __imageMEM& = _COPYIMAGE(v&): _FREEIMAGE v& - CASE "srt_logo_17.png" - v& = _NEWIMAGE(85, 17, 32) - m = _MEMIMAGE(v&) - A$ = "" - A$ = A$ + "haIWH]6REE55NUQ196Z#4EPUm2:99a41CZdODBQ2JFAiS09XT\R4RXSV>Z=JSiSVd:M:=;=[dkcN_Nl]G?fk3UUV45#iXi1d1=FlGRn71ZOoG0K2h]1F_0eog<=>:=V" - A$ = A$ + "Q;#F\^V`H:d8#F3hC]CNH>NdOF2L6:3VCSdc#[ATSB7o0`Q0n2jVPNjTeG0m" - A$ = A$ + ":dKQaZ7`U^=\fCbf_7m4D:X1CUC7C\[WRF:;;2bI<#^iP" - A$ = A$ + "=W3?77?V_8[b0nM3I\KP5:_gW65TCG`OcQi>9bQ>8c;NR\JPN40RAFii:1F5" - A$ = A$ + "#;2F=?n^`J3GW;]MFo>0NRoVU]a9[UMgQ<\^oNJMHMKTgc8JnRMG1VQWf6oK" - A$ = A$ + "H?G5;O7<;?IOeU>2nmU`jgC\U0Pg3h30NOP]`oNhH?[;`oiHk?;hFElB=0;V" - A$ = A$ + "f1c1AbdSVJ9id5ali3T`G>8`aelYb_Z6X6J:\>DXJPjTmnD2ZS]im[e_7]Gf" - A$ = A$ + "?L5o8;c[m2ooQ>dP4^[=Sa?5dAOUhV#k8#lkb" - A$ = A$ + "1F0SARmY;`lIDlX3MFX_[Pf?J;hg7[8n" - A$ = A$ + "g=N^kQ7cEhkDlkW3KcnR^ZVnDHo_0TaLaHU9HfH_Ja0M9nW" - A$ = A$ + "bVn#>g^93Mk1Oef?ShdeI=0jk`L>2WG\E[L;" - A$ = A$ + "EMUZXIA_1Ng9=hd?VV6fOBV[]GTidK;>eE7c7QGBc[ALEahddBMRfimk1Qoo" - A$ = A$ + "LJIj`ie3V[94HPjUJ:=SgjHXoe#g=7gdTTOlOUCcX[m4I[?D9b=>;b770_?n" - A$ = A$ + "9Jm]f4i>iPooj[gVieOIPF6]c[Y#L" - A$ = A$ + "JF\Z6PdCfG90AiZjAOT`1Y:0WZTWZFoJYkQeW[F_MRn2m5Id4]L9>`g0aaog" - A$ = A$ + "8Tc8`l7>noA0=f;^oDhNhPP\69nm`acQQMX;UeG#2>e5LZZ6lGci::M=mlZg" - A$ = A$ + "i3^Z1h5>6LZ3hdGhmo<7Mk#NCTkG6fcLL2^El^1b`Q^5H3c0m66" - A$ = A$ + ":ZfZRGk?6Cm^[5hJHOg]0aY;2LjGRa?7cg?_>G96]caS^#cn9hD7]mAJ>:4c" - A$ = A$ + "[4e=L]VK69^a^7e>e5LJ=dUQCbXRCW=j[T;A=\fTJ1Ze]B3iIcY>DLMHG" - A$ = A$ + "=7_o2HW75X?FLJdiNBbYNFb\L3o87h6El_?G?e7W?=V3f3K;Ec[i0JNC]?\<" - A$ = A$ + "L6_U;e6K2E?Lbcf:6WjZ[OkgSjAe9[SJ#liR>eWR>ojm[mUXcD_AD?M]\=od5h>0G4hlFlIM" - A$ = A$ + "8k]:jjek_m\nn7Pc5co\;=V8V[`LJ63NYN=WfZUMiScfF1PM=e]Ia[Y;1W68" - A$ = A$ + "kIQggKFjkMDhLg#>eAjihQCV4=?EOZE26BECM9\L726OR0S5cAQ1RO_N]\Dc" - A$ = A$ + "_5=nEeCFg2hhkGVm_XiD5m]POZ3cC" - A$ = A$ + "M7m8D;`WWPC:cjKPDjLog9?OGMgb=PKmX>WL70Zc1dZD[_HLZ?hd#n_GX;l^" - A$ = A$ + ";Po=MV[DlnY4iVR6ONm6laMaCScXh;gg?4kDGg9j<`Vg7kGhml9`iWfj6lIM\mkXmIO4YX^GJ3LnifB`ASW" - A$ = A$ + "R>SDB>=55m=565Noi=lU_1i4S6fm9PFn9ll>hJN=I`?Z_cg5mG5knh2Debn:D__JnKb5fg9ZgZj>JNhV=Qe" - A$ = A$ + "3_GMm\BaYQmc7:NnShi9`cal_L]S%%h1" - btemp$ = "" - FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4) - IF INSTR(1, B$, "%") THEN - FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1) - IF F$ <> "%" THEN C$ = C$ + F$ - NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$) - IF MID$(B$, j, 1) = "#" THEN - MID$(B$, j) = "@": END IF: NEXT - FOR t% = LEN(B$) TO 1 STEP -1 - B& = B& * 64 + ASC(MID$(B$, t%)) - 48 - NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1 - X$ = X$ + CHR$(B& AND 255): B& = B& \ 256 - NEXT: btemp$ = btemp$ + X$: NEXT - btemp$ = _INFLATE$(btemp$) - _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m - __imageMEM& = _COPYIMAGE(v&): _FREEIMAGE v& - CASE "srt_logo_18.png" - v& = _NEWIMAGE(85, 18, 32) - m = _MEMIMAGE(v&) - A$ = "" - A$ = A$ + "haISHM5SEE55Mc7J<892ZH8::5A498UHR9R:A\RA8H2OXOa7nQJd_m3Cd?##" - A$ = A$ + "Y<=VfkfN_Q1#::838P:5AP8XAJ:5;DTF<1d5k4d1U3cI>dK9Wcl1nBPm3L#PM#g?>WfUc;RNGimA0nd" - A$ = A$ + "3QeNFAn3X9C=QaJFA]0i0^TZ7fHcd#YYCWDU[GWJEf;N?7;U7S52T7jW_8oV" - A$ = A$ + "mJJ0WcJ?f6`fW[1m]8VkT8?jG5N9#g[FXG4P4D#O^8P?1Ha:nDIl_" - A$ = A$ + "3[e\>OJSbik14XjKNiiTBfk^26>MOd:ajF3`20n8E^[2kB#RH" - A$ = A$ + "53DkZ?MDi\SA>E>F;`60F?`G3l=d#`Zj0lOAAn;0KeB`h\mX>J;274_WQd;;" - A$ = A$ + "kAUhdI9liCVAGn=PCW`W\N=KPjQOGmHno0JWRNh[fQi" - A$ = A$ + "Z?mYOj6R?]ASd4XZ5mc\OVmMa>c9Tj_bM[`JlcSakQjgHhc8E_IKc<0V>=Hl" - A$ = A$ + "k;:lI\oX7MIXWmPn<9nH527hNFCTZYRnY?QcL=fQ]ROOb:XO?G2?iK9SabL0" - A$ = A$ + "hddi^MI4#_Y5Wcf[3QWc1kaB`h;Ea7Se\:PoeBVJCR]WK2Ob?GH6I" - A$ = A$ + ";VCG^eHW5[]kFbGZlJVkP0^#9jY?hdYCmR>0VcaXK3ld1MR]RThi9#O#6>mk" - A$ = A$ + "YA3kCfH]C3i^OM2WbhYCd[VeWERCmdhM>Oh2YK1koacH_O^4kB\^6AVLW]PX" - A$ = A$ + "MO=FTWkBQodZ9BS_;UCCmCK[4>=BUcl>Lj01>G5da;3oPN1?DRfU4Kf;\nOg" - A$ = A$ + "j\hHWRH>SW>3Noa1f:mH#f::nkfWO>J0RnHcYn:L]S?U8GcFc[4KocbYLn1>" - A$ = A$ + "_k>0F>mn9WGCBNbfTLJ;e:?GVSOf2n5Wc^Eeg?K\O18kQbh^L" - A$ = A$ + "J4hdLZ<^P4k?coWYTHDK>e7lHSDJMe0jf1>\cliL5O?=28?g=mNdoUTo8n\I" - A$ = A$ + "k6OfccRC=e_g=`>BlGB]ESAhcUAVJF1UQCKBhB^V#O`j=eamDklJYAAO;IZc" - A$ = A$ + "eTU_NXno=;kgD0F6hUUSaZFbOEWNNQ8?B>\;n`ZaeUZ5j\WUfWAJNl0dGBLMa\L:WS[" - A$ = A$ + "EjVaJ>F9iDV2b7ciLf9aeQ;UC3dHe88Iab[W\f#Q;GX6CjUQC][E7GC:W`cg" - A$ = A$ + "4j_kFUjE]XSi[?[AOJcYQPC[5LJKJN_iAm5fVCi43k;nGm1bDE>nYNPCmXdn" - A$ = A$ + "FBaM2Ld:hO7cW3:InNJ^[J0Wf>6_3jN`jJ_TJhnX^RG9iWMidHKN:_f=PO>3GbXMPNBIkO[ej14NgXoa[cDSZAjAM>gL#?K1Wk2XhnaFUC_0E2Vn" - A$ = A$ + "j>2bQg=Eobf;e0X\eXlUJD4]>9GjA`iEdi\lYaUdoB0bQD>>=WbYiE>`dcC_" - A$ = A$ + "LlEC1g3a0chG7W7c^^oFBZMHfCgjUN2^4N7OoUEk`Yli?KI==TT_Q_gclAD8" - A$ = A$ + "W7ncTha_B6[[hD3V\U\feem3aMGH^NF`FG7IGoPOgCWdCH#G`YamHKdoARgo" - A$ = A$ + "G>WMYboch`Y=E1>eegWcGLneHkBod#MOigG]ToL`hYin7AU8c^LJMbcg9INVJOK#jQ" - A$ = A$ + "?^6P_UnIh\Ejh7\8jeTnCWKR7R6:6obUI_fNR?7WCU" - A$ = A$ + "eU6XGa9WFC#Jl#\N8jL881L=odna=m?n6J=`:UocVCG>UUC[5HCd;9eoi_Ye" - A$ = A$ + "99COced9LJ0hDFVW9lKb3oAgmlJ#>6^`EZ5Wf^ho><9>`mL=O3U8blmEVYjOT3FdbW[Xl87HQVYdj_YeE:mK" - A$ = A$ + "XHN_;WbWe7PkV_K;I^3M_ZBU=Co7;fZWP;3NlFEOYekh_4:iC7Q\NK>MCJ<^" - A$ = A$ + "7j=_#Wkl5ACDnF7fL:ommV6UfOT" - A$ = A$ + "1e[m`DD^OcRdca7MRU:?G7cKD9a;IidVXhkYg?AVBcS_;4[>:`Q76k?O_d1:" - A$ = A$ + "jClgGVg;nlnG7oD3:0N]0ROSXO1Lg3BC5S=Eeg>>gUa7[6=obfj4L8Ln[3jM" - A$ = A$ + "g5kBlge>mk`fM9>?2kS7=Ni>7L^_JA_oi5oR[:mObc=;WN15GRBondk5gk\>" - A$ = A$ + "j7`jnK\^a;lC3RNm0Jn8>_d8CjoYchd0A678Vk^PlMHP7io1JYh[%%%0" - btemp$ = "" - FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4) - IF INSTR(1, B$, "%") THEN - FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1) - IF F$ <> "%" THEN C$ = C$ + F$ - NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$) - IF MID$(B$, j, 1) = "#" THEN - MID$(B$, j) = "@": END IF: NEXT - FOR t% = LEN(B$) TO 1 STEP -1 - B& = B& * 64 + ASC(MID$(B$, t%)) - 48 - NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1 - X$ = X$ + CHR$(B& AND 255): B& = B& \ 256 - NEXT: btemp$ = btemp$ + X$: NEXT - btemp$ = _INFLATE$(btemp$) - _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m - __imageMEM& = _COPYIMAGE(v&): _FREEIMAGE v& CASE "srt_logo_bottom.png" v& = _NEWIMAGE(401, 30, 32) m = _MEMIMAGE(v&) @@ -665,4 +467,3 @@ SUB LoadImageMEM (This AS __UI_ControlTYPE, FileMEM$) END IF This.Redraw = True END SUB - diff --git a/source/loopy_srt_monitor.bas b/source/loopy_srt_monitor.bas index 9fbe04f..4ea02f3 100644 --- a/source/loopy_srt_monitor.bas +++ b/source/loopy_srt_monitor.bas @@ -6,11 +6,11 @@ ': Controls' IDs: ------------------------------------------------------------------ OPTION _EXPLICIT +DIM SHARED LoopySRTMonitor2 AS LONG DIM SHARED LoopySRTMonitor AS LONG DIM SHARED FileMenu AS LONG DIM SHARED OptionsMenu AS LONG DIM SHARED HelpMenu AS LONG -DIM SHARED SRT AS LONG DIM SHARED Status AS LONG DIM SHARED Settings AS LONG DIM SHARED CurrentScene AS LONG @@ -19,38 +19,16 @@ DIM SHARED Stream1 AS LONG DIM SHARED Stream2 AS LONG DIM SHARED versionFrame AS LONG DIM SHARED FileMenuExit AS LONG -DIM SHARED RMTPLB AS LONG -DIM SHARED clientsLB AS LONG -DIM SHARED VideoLB AS LONG -DIM SHARED AudioLB AS LONG -DIM SHARED InBytesLB AS LONG -DIM SHARED OutBytesLB AS LONG -DIM SHARED InBitssLB AS LONG -DIM SHARED OutBitssLB AS LONG -DIM SHARED TimeLB AS LONG -DIM SHARED rtmp_nacceptedLB AS LONG -DIM SHARED rtmp_codec_nclientsLB AS LONG -DIM SHARED rtmp_codec_videoLB AS LONG -DIM SHARED rtmp_codec_audioLB AS LONG -DIM SHARED rtmp_bytes_inLB AS LONG -DIM SHARED rtmp_bytes_outLB AS LONG -DIM SHARED rtmp_bw_inLB AS LONG -DIM SHARED rtmp_bw_outLB AS LONG -DIM SHARED rtmp_uptimeLB AS LONG -DIM SHARED InBytesDifferenceLB AS LONG DIM SHARED StreamFailTimerLB AS LONG DIM SHARED FailCountLB AS LONG DIM SHARED ServerPingLB AS LONG DIM SHARED UpdateIntervalLB AS LONG -DIM SHARED Kb_DiffLB AS LONG DIM SHARED Timer_FailLB AS LONG DIM SHARED Timer_Fail_CountLB AS LONG DIM SHARED tPingOutLB AS LONG DIM SHARED td_updateLB AS LONG -DIM SHARED BandwidthThresholdLB AS LONG DIM SHARED StreamFailDelayLB AS LONG DIM SHARED MultiCameraSwitchLB AS LONG -DIM SHARED Bandwidth_ThresholdLB AS LONG DIM SHARED Stream_Fail_DelayLB AS LONG DIM SHARED MultiCameraSwitchStatusLB AS LONG DIM SHARED TimerLB AS LONG @@ -65,19 +43,15 @@ DIM SHARED td_displayLB AS LONG DIM SHARED mouseXLB AS LONG DIM SHARED mouseYLB AS LONG DIM SHARED __ERRORLINELB AS LONG -DIM SHARED InBytesLB2 AS LONG -DIM SHARED InBytesDifferenceLB2 AS LONG +DIM SHARED StreamUptimeLB AS LONG DIM SHARED failLB AS LONG -DIM SHARED multiStream1LB AS LONG -DIM SHARED Kb_Diff_stream1LB AS LONG +DIM SHARED Uptime_Stream_1LB AS LONG DIM SHARED Timer_Fail_Stream1LB AS LONG DIM SHARED Scene_CurrentLB AS LONG DIM SHARED PictureBox1 AS LONG -DIM SHARED InBytesLB3 AS LONG -DIM SHARED InBytesDifferenceLB3 AS LONG +DIM SHARED StreamUptimeLB2 AS LONG DIM SHARED failLB2 AS LONG -DIM SHARED multiStream2LB AS LONG -DIM SHARED Kb_Diff_stream2LB AS LONG +DIM SHARED Uptime_Stream_2LB AS LONG DIM SHARED Timer_Fail_Stream2LB AS LONG DIM SHARED OptionsMenuDebug AS LONG DIM SHARED HelpMenuVisitWebsite AS LONG @@ -87,13 +61,12 @@ DIM SHARED IndicatorLB AS LONG DIM SHARED HelpMenuAbout AS LONG DIM SHARED StatusLB AS LONG DIM SHARED PictureBoxLogoBottom AS LONG -DIM SHARED OBSRemoteLB AS LONG -DIM SHARED OBS_RemoteLB AS LONG 'InForm v1.3 or newer required else this section gets removed (InForm_Deleted.bas) DEFINT A-Z COMMON SHARED Error_Display AS STRING COMMON SHARED Error_msg AS STRING +COMMON SHARED Error_msg_2 AS STRING COMMON SHARED Ver AS STRING COMMON SHARED VerDate AS STRING COMMON SHARED bout AS STRING @@ -102,7 +75,6 @@ COMMON SHARED BG_Count AS LONG COMMON SHARED ConnErr COMMON SHARED Refresh_Request COMMON SHARED RefreshDisplayRequest -COMMON SHARED rtmp_uptime# COMMON SHARED ba& COMMON SHARED winstyle& COMMON SHARED timerFree @@ -126,7 +98,6 @@ COMMON SHARED iniFeatures AS _BYTE COMMON SHARED Debug AS _BYTE COMMON SHARED q COMMON SHARED Timer_Failed AS _BYTE -COMMON SHARED WebsocketMethod AS STRING COMMON SHARED MediaSource1 AS STRING COMMON SHARED MediaSource2 AS STRING COMMON SHARED MediaSource1Time AS LONG @@ -137,8 +108,6 @@ COMMON SHARED image_data() AS _UNSIGNED LONG COMMON SHARED Scene_OK AS STRING COMMON SHARED Scene_Fail AS STRING COMMON SHARED Scene_Intro AS STRING -COMMON SHARED URL AS STRING -COMMON SHARED Port AS STRING COMMON SHARED OBS_URL AS STRING COMMON SHARED OBS_PW AS STRING COMMON SHARED urlStream1 AS STRING @@ -147,13 +116,10 @@ COMMON SHARED titleScene1 AS STRING COMMON SHARED titleScene2 AS STRING COMMON SHARED titleScene12 AS STRING COMMON SHARED returnPreviousScene AS STRING -COMMON SHARED shell_obscommand_1 AS STRING -COMMON SHARED shell_obscommand_2 AS STRING COMMON SHARED shell_nodejs_1 AS STRING COMMON SHARED shell_nodejs_2 AS STRING COMMON SHARED config_dir AS STRING -COMMON SHARED obscommand_dir AS STRING COMMON SHARED nodejs_dir AS STRING COMMON SHARED temp_dir AS STRING COMMON SHARED config_main AS STRING @@ -162,9 +128,8 @@ COMMON SHARED obs_get_scene AS STRING COMMON SHARED obs_get_media1 AS STRING COMMON SHARED obs_get_media2 AS STRING COMMON SHARED filePrevious AS STRING -COMMON SHARED fileStat AS STRING +COMMON SHARED filePrevious_ms AS STRING COMMON SHARED fileCheckVersion AS STRING -COMMON SHARED obscommand_file AS STRING COMMON SHARED Exe_OK AS _BYTE COMMON SHARED Exe_Fail AS _BYTE @@ -175,16 +140,6 @@ COMMON SHARED Exe_Fail_First_Stream2 AS _BYTE COMMON SHARED __MultiCameraSwitch AS _BYTE 'Tooltips -COMMON SHARED rtmp_codec_video_level$ -COMMON SHARED rtmp_codec_video_profile$ -COMMON SHARED rtmp_codec_audio_channels$ -COMMON SHARED rtmp_codec_audio_samplerate$ -COMMON SHARED rtmp_codec_audio_profile$ -COMMON SHARED rtmp_codec_video_width$ -COMMON SHARED rtmp_codec_video_height$ -COMMON SHARED rtmp_codec_video_resolution$ -COMMON SHARED rtmp_codec_version$ -COMMON SHARED rtmp_codec_rtmp_version$ 'Timer01 COMMON SHARED mouseX @@ -213,23 +168,12 @@ COMMON SHARED findSceneName2 COMMON SHARED streamsUp$ COMMON SHARED previousScene$ COMMON SHARED previousSceneDisplay$ -COMMON SHARED rtmp_naccepted$ -COMMON SHARED rtmp_bytes_in$ -COMMON SHARED rtmp_bytes_out$ -COMMON SHARED rtmp_bw_in$ -COMMON SHARED rtmp_bw_out$ -COMMON SHARED rtmp_codec_video$ -COMMON SHARED rtmp_codec_audio$ -COMMON SHARED rtmp_codec_nclients$ -COMMON SHARED rtmp_codec_nclients# -COMMON SHARED rtmp_codec_nclients_temp# COMMON SHARED a$ COMMON SHARED a2$ COMMON SHARED d$ COMMON SHARED I COMMON SHARED i2 COMMON SHARED i3 -COMMON SHARED stats_rtmp.xml$ COMMON SHARED tPing1# COMMON SHARED client COMMON SHARED tPing2# @@ -242,10 +186,6 @@ COMMON SHARED multiStream1# COMMON SHARED multiStream2# COMMON SHARED pos_xml_m& COMMON SHARED Kb_Diff# -COMMON SHARED Bandwidth_Threshold -COMMON SHARED rtmp_bytes_in# -COMMON SHARED rtmp_bytes_in_temp1# -COMMON SHARED rtmp_bytes_in_temp2# COMMON SHARED Stream_Fail_Delay COMMON SHARED SD COMMON SHARED Kb_Diff_stream1# @@ -309,10 +249,6 @@ COMMON SHARED xHeader8 AS STRING COMMON SHARED xHeader9 AS STRING COMMON SHARED x AS STRING COMMON SHARED l AS INTEGER -COMMON SHARED rtmp_naccepted AS DOUBLE -COMMON SHARED rtmp_bytes_out AS DOUBLE -COMMON SHARED rtmp_bw_in AS DOUBLE -COMMON SHARED rtmp_bw_out AS DOUBLE 'OnLoad COMMON SHARED config_dir @@ -330,7 +266,6 @@ COMMON SHARED urlStream2 COMMON SHARED returnPreviousScene COMMON SHARED returnPreviousSceneRemember$ - 'SUB Indicators COMMON SHARED AliveIndicator! COMMON SHARED __BGA @@ -385,7 +320,6 @@ IF ERR THEN CLS: _PRINTSTRING (20, 30), "ERR, _ERRORLINE:" + STR$(ERR) + "," + S ': Event procedures: --------------------------------------------------------------- ': External modules: --------------------------------------------------------------- -'$INCLUDE:'loopy_srt_monitor_light.frm' '$INCLUDE:'image.png.MEM' ': --------------------------------------------------------------------------------- SUB __UI_BeforeInit @@ -393,15 +327,15 @@ SUB __UI_BeforeInit $VERSIONINFO:ProductName=Loopy SRT Monitor $VERSIONINFO:Comments=Monitor SRT Streams $VERSIONINFO:FileDescription=Loopy SRT Monitor - $VERSIONINFO:FILEVERSION#=0,9,0,0 - $VERSIONINFO:PRODUCTVERSION#=0,9,0,0 + $VERSIONINFO:FILEVERSION#=0,9,1,0 + $VERSIONINFO:PRODUCTVERSION#=0,9,1,0 $CHECKING:ON $RESIZE:OFF IF ERR = 0 THEN $EXEICON:'.\icon.ico' _TITLE "Loopy SRT Monitor - loopy750" END IF - Ver = "0.9.0" + Ver = "0.9.1" VerDate = "05/21" 'Always on top : ------------------------------------------------------------------ @@ -423,34 +357,18 @@ SUB __UI_BeforeInit END SUB SUB __UI_OnLoad - 'SRT - SetCaption rtmp_nacceptedLB, "-" - SetCaption rtmp_codec_nclientsLB, "-" - SetCaption rtmp_codec_videoLB, "-" - SetCaption rtmp_codec_audioLB, "-" - SetCaption rtmp_bytes_inLB, "-" - SetCaption rtmp_bytes_outLB, "-" - SetCaption rtmp_bw_inLB, "-" - SetCaption rtmp_bw_outLB, "-" - SetCaption rtmp_uptimeLB, "-" - 'Status - SetCaption Kb_DiffLB, "-" SetCaption Timer_FailLB, "-" SetCaption Timer_Fail_CountLB, "-" SetCaption tPingOutLB, "-" SetCaption td_updateLB, "-" 'Settings - SetCaption Bandwidth_ThresholdLB, "-" SetCaption Stream_Fail_DelayLB, "-" SetCaption MultiCameraSwitchStatusLB, "-" - SetCaption OBS_RemoteLB, "-" 'Stream #1 - SetCaption multiStream1LB, "-" - SetCaption Kb_Diff_stream1LB, "-" + SetCaption Uptime_Stream_1LB, "-" SetCaption Timer_Fail_Stream1LB, "-" 'Stream #2 - SetCaption multiStream2LB, "-" - SetCaption Kb_Diff_stream2LB, "-" + SetCaption Uptime_Stream_2LB, "-" SetCaption Timer_Fail_Stream2LB, "-" 'Current Scene SetCaption Scene_CurrentLB, "-" @@ -473,13 +391,9 @@ SUB __UI_OnLoad c34 = CHR$(34) BG = _RGB(32, 32, 32) Exe_OK = 1 - URL = "127.0.0.1" - Port = "8080" - fileStat = "stat" 'File variables config_dir = _DIR$("documents") + "Loopy SRT Monitor" - obscommand_dir = _DIR$("documents") + "Loopy SRT Monitor\OBSCommand" nodejs_dir = _DIR$("documents") + "Loopy SRT Monitor\js" temp_dir = _DIR$("documents") + "Loopy SRT Monitor\Temp" config_main = config_dir + "\config.ini" @@ -487,52 +401,49 @@ SUB __UI_OnLoad obs_get_scene = config_dir + "\js\obs_get_scene.js" obs_get_media1 = config_dir + "\js\obs_get_media1.js" obs_get_media2 = config_dir + "\js\obs_get_media2.js" - obscommand_file = obscommand_dir + "\OBSCommand.exe" filePrevious = temp_dir + "\returnPreviousScene.tmp" + filePrevious_ms = temp_dir + "\returnPreviousSource.tmp" fileCheckVersion = temp_dir + "\checkversion.txt" outputBitrateFile = temp_dir + "\outputBitrate.txt" outputStatusFile = temp_dir + "\outputStatus.txt" + ON ERROR GOTO PUT_Fail IF _DIREXISTS(config_dir) THEN IF NOT _DIREXISTS(temp_dir) THEN MKDIR temp_dir IF _FILEEXISTS(filePrevious) THEN KILL filePrevious + IF _FILEEXISTS(filePrevious_ms) THEN KILL filePrevious_ms + ON ERROR GOTO 0 _ALLOWFULLSCREEN OFF RANDOMIZE TIMER 'Check config - Bandwidth_Threshold = 25 Stream_Fail_Delay = 10 Desktop_Width_Position = 160 Desktop_Height_Position = 100 IF NOT _FILEEXISTS(config_main) THEN RefreshDisplayRequest = 1: Error_msg$ = "- Unable to read config file in the " + c34 + "Documents\Loopy SRT Monitor" + c34 + " folder" + CHR$(10) + "- File " + c34 + config_main + c34 + " cannot be accessed, check if it exists. (#1)": _DELAY 3 IF _FILEEXISTS(config_main) THEN OPEN config_main FOR INPUT AS #4 'Basic INI management, nothing fancy needed + IF EOF(4) THEN RefreshDisplayRequest = 1: Error_msg$ = "- Unable to read config file in the " + c34 + "Documents\Loopy SRT Monitor" + c34 + " folder" + CHR$(10) + "- File " + c34 + config_main + c34 + " cannot be accessed, check if it exists. (#10)": _DELAY 3 DO - LINE INPUT #4, file4$ + IF NOT EOF(4) THEN LINE INPUT #4, file4$ IF LEFT$(file4$, 1) <> "#" AND LEFT$(file4$, 1) <> ";" AND LEFT$(file4$, 1) <> "" THEN EqualFound = INSTR(file4$, "=") IF EqualFound THEN file4_var$ = LEFT$(file4$, INSTR(file4$, "=") - 1) file4_val$ = MID$(file4$, INSTR(file4$, "=") + 1) file4_var$ = LCASE$(file4_var$) - 'IF file4_var$ = "bandwidththreshold" THEN Bandwidth_Threshold = VAL(file4_val$) IF file4_var$ = "streamfaildelay" THEN Stream_Fail_Delay = VAL(file4_val$) IF file4_var$ = "xwindow" THEN Desktop_Width_Position = VAL(file4_val$) IF file4_var$ = "ywindow" THEN Desktop_Height_Position = VAL(file4_val$) IF file4_var$ = "sceneok" THEN Scene_OK = file4_val$ IF file4_var$ = "scenefail" THEN Scene_Fail = file4_val$ IF file4_var$ = "sceneintro" THEN Scene_Intro = file4_val$ - 'IF file4_var$ = "serverip" THEN URL = file4_val$ - 'IF file4_var$ = "serverport" THEN Port = file4_val$ IF file4_var$ = "mediasource1" THEN MediaSource1 = file4_val$ IF file4_var$ = "mediasource2" THEN MediaSource2 = file4_val$ IF file4_var$ = "websocketaddress" THEN OBS_URL = file4_val$ IF file4_var$ = "websocketpassword" THEN OBS_PW = file4_val$ - 'IF file4_var$ = "websocketmethod" THEN WebsocketMethod = file4_val$ IF file4_var$ = "filestatusoutput" THEN FileStatusOutput = file4_val$ IF file4_var$ = "checkupdateonstartup" THEN CheckUpdateOnStartup = file4_val$ IF file4_var$ = "multicameraswitch" THEN MultiCameraSwitch$ = file4_val$ - 'IF file4_var$ = "urlstream1" THEN urlStream1 = file4_val$ - 'IF file4_var$ = "urlstream2" THEN urlStream2 = file4_val$ IF file4_var$ = "titlescene1" THEN titleScene1 = file4_val$ IF file4_var$ = "titlescene2" THEN titleScene2 = file4_val$ IF file4_var$ = "titlescene12" THEN titleScene12 = file4_val$ @@ -545,11 +456,6 @@ SUB __UI_OnLoad IF Scene_OK = "" OR Scene_Fail = "" OR Scene_Intro = "" OR OBS_URL = "" OR OBS_PW = "" OR FileStatusOutput = "" OR CheckUpdateOnStartup = "" OR MultiCameraSwitch$ = "" OR titleScene1 = "" OR titleScene2 = "" OR titleScene12 = "" OR returnPreviousScene = "" OR returnPreviousSceneRemember$ = "" THEN verCheck$ = "Settings missing in 'config.ini' file, check 'readme.txt'...": iniFeatures = 1 - IF Bandwidth_Threshold < 0 THEN - Bandwidth_Threshold = 0 - ELSEIF Bandwidth_Threshold > 9999 THEN Bandwidth_Threshold = 9999 - END IF - IF Stream_Fail_Delay < 3 THEN Stream_Fail_Delay = 3 ELSEIF Stream_Fail_Delay > 99 THEN Stream_Fail_Delay = 99 @@ -573,14 +479,8 @@ SUB __UI_OnLoad IF FileStatusOutput = "true" THEN __FileStatusOutput = 1 ELSE __FileStatusOutput = 0 IF returnPreviousSceneRemember$ = "true" THEN returnPreviousSceneRemember = 1 ELSE returnPreviousSceneRemember = 0 IF __MultiCameraSwitch = 0 THEN __returnPreviousScene = 0: returnPreviousSceneRemember = 0 - WebsocketMethod = "nodejs" - IF WebsocketMethod <> "nodejs" THEN WebsocketMethod = "obscommand" - IF WebsocketMethod = "nodejs" AND NOT _DIREXISTS(nodejs_dir) THEN - Error_msg$ = "- Folder " + c34 + nodejs_dir + c34 + " cannot be accessed, check if it exists. (#2)" - ELSEIF WebsocketMethod = "obscommand" AND NOT _DIREXISTS(obscommand_dir) THEN - Error_msg$ = "- Folder " + c34 + obscommand_dir + c34 + " cannot be accessed, check if it exists. (#2)" - END IF + IF NOT _DIREXISTS(nodejs_dir) THEN Error_msg$ = "- Folder " + c34 + nodejs_dir + c34 + " cannot be accessed, check if it exists. (#2)" IF Error_msg$ <> "" THEN _DELAY 1 CLS , _RGB(1, 120, 220) @@ -601,120 +501,118 @@ SUB __UI_OnLoad SYSTEM END IF - shell_obscommand_1 = "%ComSpec% /C " + c34 + c34 + obscommand_file + c34 + " /server=" + OBS_URL + " /password=" + OBS_PW + " /scene=" + c34 - shell_obscommand_2 = c34 + c34 shell_nodejs_1 = "%ComSpec% /C node.exe " + c34 + obs_change_scene + c34 + " " shell_nodejs_2 = "" - IF WebsocketMethod = "nodejs" THEN - OPEN obs_change_scene FOR OUTPUT AS #64 - PRINT #64, "// This file has been automatically generated" - PRINT #64, "// Any changes made will be lost" - PRINT #64, "// https://github.com/loopy750/SRT-Stats-Monitor" - PRINT #64, "const OBSWebSocket = require('obs-websocket-js');" - PRINT #64, "const obs = new OBSWebSocket();" - PRINT #64, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" - PRINT #64, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" - PRINT #64, "var sceneName_1 = process.argv[2];" - PRINT #64, "var sceneName_2 = process.argv[3];" - PRINT #64, "var sceneName_3 = process.argv[4];" - PRINT #64, "var sceneName_4 = process.argv[5];" - PRINT #64, "var sceneName_5 = process.argv[6];" - PRINT #64, "var sceneName_6 = process.argv[7];" - PRINT #64, "var sceneName_7 = process.argv[8];" - PRINT #64, "var sceneName_8 = process.argv[9];" - PRINT #64, "if (sceneName_2 === undefined) { var sceneName_2 = '' } else { var sceneName_1 = sceneName_1 + " + c34 + " " + c34 + " }" - PRINT #64, "if (sceneName_3 === undefined) { var sceneName_3 = '' } else { var sceneName_2 = sceneName_2 + " + c34 + " " + c34 + " }" - PRINT #64, "if (sceneName_4 === undefined) { var sceneName_4 = '' } else { var sceneName_3 = sceneName_3 + " + c34 + " " + c34 + " }" - PRINT #64, "if (sceneName_5 === undefined) { var sceneName_5 = '' } else { var sceneName_4 = sceneName_4 + " + c34 + " " + c34 + " }" - PRINT #64, "if (sceneName_6 === undefined) { var sceneName_6 = '' } else { var sceneName_5 = sceneName_5 + " + c34 + " " + c34 + " }" - PRINT #64, "if (sceneName_7 === undefined) { var sceneName_7 = '' } else { var sceneName_6 = sceneName_6 + " + c34 + " " + c34 + " }" - PRINT #64, "if (sceneName_8 === undefined) { var sceneName_8 = '' } else { var sceneName_7 = sceneName_7 + " + c34 + " " + c34 + " }" - PRINT #64, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" - PRINT #64, ".then(() => { return obs.send('GetSceneList'); })" - PRINT #64, ".then(data => { data.scenes.forEach(scene => {" - PRINT #64, " if (scene.name !== data.currentScene) {" - PRINT #64, " // console.log(`${scene.name}`);" - PRINT #64, " obs.send('SetCurrentScene', {" - PRINT #64, " 'scene-name': sceneName_1 + sceneName_2 + sceneName_3 + sceneName_4 + sceneName_5 + sceneName_6 + sceneName_7 + sceneName_8" - PRINT #64, " });" - PRINT #64, " }" - PRINT #64, " });" - PRINT #64, "})" - PRINT #64, ".then(() => { obs.disconnect(); });" - CLOSE #64 - - OPEN obs_get_scene FOR OUTPUT AS #72 - PRINT #72, "// This file has been automatically generated" - PRINT #72, "// Any changes made will be lost" - PRINT #72, "// https://github.com/loopy750/SRT-Stats-Monitor" - PRINT #72, "const OBSWebSocket = require('obs-websocket-js');" - PRINT #72, "const obs = new OBSWebSocket();" - PRINT #72, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" - PRINT #72, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" - PRINT #72, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" - PRINT #72, ".then(() => { return obs.send('GetCurrentScene'); })" - PRINT #72, ".then(data => { data.sources.forEach(sources => {" - PRINT #72, " console.log(`${data.name}`);" - PRINT #72, " });" - PRINT #72, "})" - PRINT #72, ".then(() => { obs.disconnect(); });" - CLOSE #72 - - OPEN obs_get_media1 FOR OUTPUT AS #72 - PRINT #72, "// This file has been automatically generated" - PRINT #72, "// Any changes made will be lost" - PRINT #72, "// https://github.com/loopy750/SRT-Stats-Monitor" - PRINT #72, "const OBSWebSocket = require('obs-websocket-js');" - PRINT #72, "const obs = new OBSWebSocket();" - PRINT #72, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" - PRINT #72, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" - PRINT #72, "var timer1 = setTimeout(function() { obs.disconnect(); }, 3000);" - PRINT #72, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" - - PRINT #72, ".then(() => {" - PRINT #72, " return obs.send('GetMediaTime', {" - PRINT #72, " 'sourceName': " + c34 + MediaSource1 + c34 - PRINT #72, " })" - PRINT #72, " })" - PRINT #72, ".then((data) => {" - PRINT #72, " console.log(`${data.timestamp}`);" - PRINT #72, "})" - - PRINT #72, ".then(() => { obs.disconnect(); clearTimeout(timer1); });" - CLOSE #72 - - OPEN obs_get_media2 FOR OUTPUT AS #72 - PRINT #72, "// This file has been automatically generated" - PRINT #72, "// Any changes made will be lost" - PRINT #72, "// https://github.com/loopy750/SRT-Stats-Monitor" - PRINT #72, "const OBSWebSocket = require('obs-websocket-js');" - PRINT #72, "const obs = new OBSWebSocket();" - PRINT #72, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" - PRINT #72, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" - PRINT #72, "var timer1 = setTimeout(function() { obs.disconnect(); }, 3000);" - PRINT #72, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" - - PRINT #72, ".then(() => {" - PRINT #72, " return obs.send('GetMediaTime', {" - PRINT #72, " 'sourceName': " + c34 + MediaSource1 + c34 - PRINT #72, " })" - PRINT #72, " })" - PRINT #72, ".then((data) => {" - PRINT #72, " console.log(`${data.timestamp}`);" - PRINT #72, "})" - PRINT #72, ".then(() => {" - PRINT #72, " return obs.send('GetMediaTime', {" - PRINT #72, " 'sourceName': " + c34 + MediaSource2 + c34 - PRINT #72, " })" - PRINT #72, "})" - PRINT #72, ".then((data) => {" - PRINT #72, " console.log(`${data.timestamp}`);" - PRINT #72, "})" - - PRINT #72, ".then(() => { obs.disconnect(); clearTimeout(timer1); });" - CLOSE #72 - END IF + OPEN obs_change_scene FOR OUTPUT AS #64 + PRINT #64, "// This file has been automatically generated" + PRINT #64, "// Any changes made will be lost" + PRINT #64, "// https://github.com/loopy750/SRT-Stats-Monitor" + PRINT #64, "const OBSWebSocket = require('obs-websocket-js');" + PRINT #64, "const obs = new OBSWebSocket();" + PRINT #64, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" + PRINT #64, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" + PRINT #64, "var timer1 = setTimeout(function() { obs.disconnect(); }, 3000);" + PRINT #64, "var sceneName_1 = process.argv[2];" + PRINT #64, "var sceneName_2 = process.argv[3];" + PRINT #64, "var sceneName_3 = process.argv[4];" + PRINT #64, "var sceneName_4 = process.argv[5];" + PRINT #64, "var sceneName_5 = process.argv[6];" + PRINT #64, "var sceneName_6 = process.argv[7];" + PRINT #64, "var sceneName_7 = process.argv[8];" + PRINT #64, "var sceneName_8 = process.argv[9];" + PRINT #64, "if (sceneName_2 === undefined) { var sceneName_2 = '' } else { var sceneName_1 = sceneName_1 + " + c34 + " " + c34 + " }" + PRINT #64, "if (sceneName_3 === undefined) { var sceneName_3 = '' } else { var sceneName_2 = sceneName_2 + " + c34 + " " + c34 + " }" + PRINT #64, "if (sceneName_4 === undefined) { var sceneName_4 = '' } else { var sceneName_3 = sceneName_3 + " + c34 + " " + c34 + " }" + PRINT #64, "if (sceneName_5 === undefined) { var sceneName_5 = '' } else { var sceneName_4 = sceneName_4 + " + c34 + " " + c34 + " }" + PRINT #64, "if (sceneName_6 === undefined) { var sceneName_6 = '' } else { var sceneName_5 = sceneName_5 + " + c34 + " " + c34 + " }" + PRINT #64, "if (sceneName_7 === undefined) { var sceneName_7 = '' } else { var sceneName_6 = sceneName_6 + " + c34 + " " + c34 + " }" + PRINT #64, "if (sceneName_8 === undefined) { var sceneName_8 = '' } else { var sceneName_7 = sceneName_7 + " + c34 + " " + c34 + " }" + PRINT #64, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" + PRINT #64, ".then(() => { return obs.send('GetSceneList'); })" + PRINT #64, ".then(data => { data.scenes.forEach(scene => {" + PRINT #64, " if (scene.name !== data.currentScene) {" + PRINT #64, " // console.log(`${scene.name}`);" + PRINT #64, " obs.send('SetCurrentScene', {" + PRINT #64, " 'scene-name': sceneName_1 + sceneName_2 + sceneName_3 + sceneName_4 + sceneName_5 + sceneName_6 + sceneName_7 + sceneName_8" + PRINT #64, " });" + PRINT #64, " }" + PRINT #64, " });" + PRINT #64, "})" + PRINT #64, ".then(() => { obs.disconnect(); clearTimeout(timer1); });" + CLOSE #64 + + OPEN obs_get_scene FOR OUTPUT AS #72 + PRINT #72, "// This file has been automatically generated" + PRINT #72, "// Any changes made will be lost" + PRINT #72, "// https://github.com/loopy750/SRT-Stats-Monitor" + PRINT #72, "const OBSWebSocket = require('obs-websocket-js');" + PRINT #72, "const obs = new OBSWebSocket();" + PRINT #72, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" + PRINT #72, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" + PRINT #72, "var timer2 = setTimeout(function() { obs.disconnect(); }, 3000);" + PRINT #72, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" + PRINT #72, ".then(() => { return obs.send('GetCurrentScene'); })" + PRINT #72, ".then(data => { data.sources.forEach(sources => {" + PRINT #72, " console.log(`${data.name}`);" + PRINT #72, " });" + PRINT #72, "})" + PRINT #72, ".then(() => { obs.disconnect(); clearTimeout(timer2); });" + CLOSE #72 + + OPEN obs_get_media1 FOR OUTPUT AS #76 + PRINT #76, "// This file has been automatically generated" + PRINT #76, "// Any changes made will be lost" + PRINT #76, "// https://github.com/loopy750/SRT-Stats-Monitor" + PRINT #76, "const OBSWebSocket = require('obs-websocket-js');" + PRINT #76, "const obs = new OBSWebSocket();" + PRINT #76, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" + PRINT #76, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" + PRINT #76, "var timer3 = setTimeout(function() { obs.disconnect(); }, 3000);" + PRINT #76, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" + + PRINT #76, ".then(() => {" + PRINT #76, " return obs.send('GetMediaTime', {" + PRINT #76, " 'sourceName': " + c34 + MediaSource1 + c34 + PRINT #76, " })" + PRINT #76, " })" + PRINT #76, ".then((data) => {" + PRINT #76, " console.log(`${data.timestamp}`);" + PRINT #76, "})" + + PRINT #76, ".then(() => { obs.disconnect(); clearTimeout(timer3); });" + CLOSE #76 + + OPEN obs_get_media2 FOR OUTPUT AS #80 + PRINT #80, "// This file has been automatically generated" + PRINT #80, "// Any changes made will be lost" + PRINT #80, "// https://github.com/loopy750/SRT-Stats-Monitor" + PRINT #80, "const OBSWebSocket = require('obs-websocket-js');" + PRINT #80, "const obs = new OBSWebSocket();" + PRINT #80, "const WebsocketAddress = " + c34 + OBS_URL + c34 + ";" + PRINT #80, "const WebsocketPassword = " + c34 + OBS_PW + c34 + ";" + PRINT #80, "var timer4 = setTimeout(function() { obs.disconnect(); }, 3000);" + PRINT #80, "obs.connect({ address: WebsocketAddress, password: WebsocketPassword })" + + PRINT #80, ".then(() => {" + PRINT #80, " return obs.send('GetMediaTime', {" + PRINT #80, " 'sourceName': " + c34 + MediaSource1 + c34 + PRINT #80, " })" + PRINT #80, " })" + PRINT #80, ".then((data) => {" + PRINT #80, " console.log(`${data.timestamp}`);" + PRINT #80, "})" + PRINT #80, ".then(() => {" + PRINT #80, " return obs.send('GetMediaTime', {" + PRINT #80, " 'sourceName': " + c34 + MediaSource2 + c34 + PRINT #80, " })" + PRINT #80, "})" + PRINT #80, ".then((data) => {" + PRINT #80, " console.log(`${data.timestamp}`);" + PRINT #80, "})" + + PRINT #80, ".then(() => { obs.disconnect(); clearTimeout(timer4); });" + CLOSE #80 IF CheckUpdateOnStartup = "true" AND iniFeatures = 0 THEN file224$ = "" @@ -740,28 +638,16 @@ SUB __UI_OnLoad iniFeatures = 0 - 'Port_Client$ = "TCP/IP:" + Port + ":" - - IF Scene_OK = "" OR Scene_Fail = "" OR Scene_Intro = "" OR URL = "" OR Port = "" OR OBS_URL = "" THEN RefreshDisplayRequest = 1: Error_msg$ = "- Variable/s for scenes empty, check if " + c34 + config_main + c34 + " exists. (#3)": _DELAY 3 + IF Scene_OK = "" OR Scene_Fail = "" OR Scene_Intro = "" OR OBS_URL = "" THEN RefreshDisplayRequest = 1: Error_msg$ = "- Variable/s for scenes empty, check if " + c34 + config_main + c34 + " exists. (#3)": _DELAY 3 IF __MultiCameraSwitch = 0 THEN Scene_Current$ = Scene_OK - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_OK - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + Scene_OK + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_OK END IF IF __MultiCameraSwitch = 1 THEN Scene_Current$ = titleScene12 - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene12 - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + titleScene12 + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene12 END IF _DELAY .25 @@ -770,17 +656,13 @@ SUB __UI_OnLoad IF __MultiCameraSwitch = 0 THEN Control(Stream1).Hidden = True Control(Stream2).Hidden = True - Control(InBytesLB2).Hidden = True - Control(InBytesDifferenceLB2).Hidden = True + Control(StreamUptimeLB).Hidden = True Control(failLB).Hidden = True - Control(multiStream1LB).Hidden = True - Control(Kb_Diff_stream1LB).Hidden = True + Control(Uptime_Stream_1LB).Hidden = True Control(Timer_Fail_Stream1LB).Hidden = True - Control(InBytesLB3).Hidden = True - Control(InBytesDifferenceLB3).Hidden = True + Control(StreamUptimeLB2).Hidden = True Control(failLB2).Hidden = True - Control(multiStream2LB).Hidden = True - Control(Kb_Diff_stream2LB).Hidden = True + Control(Uptime_Stream_2LB).Hidden = True Control(Timer_Fail_Stream2LB).Hidden = True END IF @@ -828,9 +710,17 @@ SUB __UI_BeforeUpdateDisplay ELSE _PRINTSTRING (37, 14 * 18), Error_msg$ END IF + IF INSTR(Error_msg_2$, CHR$(10)) >= 1 THEN + _PRINTSTRING (37, 16 * 18), LEFT$(Error_msg_2$, INSTR(Error_msg_2$, CHR$(10)) - 1) + _PRINTSTRING (37, 17 * 18), MID$(Error_msg_2$, INSTR(Error_msg_2$, CHR$(10)) + 1) + ELSE + _PRINTSTRING (37, 16 * 18), Error_msg_2$ + END IF _PRINTSTRING (37, 22 * 18), "Program will resume shortly" _DISPLAY _DELAY 10 + Error_msg$ = "" + Error_msg_2$ = "" CLS , BG TIMER ON END IF @@ -862,6 +752,7 @@ SUB __UI_BeforeUpdateDisplay IF _EXIT THEN IF _FILEEXISTS(filePrevious) THEN KILL filePrevious + IF _FILEEXISTS(filePrevious_ms) THEN KILL filePrevious_ms IF _FILEEXISTS(outputBitrateFile) THEN KILL outputBitrateFile IF _FILEEXISTS(outputStatusFile) THEN KILL outputStatusFile SYSTEM @@ -900,6 +791,8 @@ END SUB SUB __UI_Click (id AS LONG) SELECT CASE id + CASE LoopySRTMonitor2 + CASE LoopySRTMonitor CASE FileMenu @@ -908,8 +801,6 @@ SUB __UI_Click (id AS LONG) CASE HelpMenu - CASE SRT - CASE Status CASE Settings @@ -926,48 +817,11 @@ SUB __UI_Click (id AS LONG) CASE FileMenuExit IF _FILEEXISTS(filePrevious) THEN KILL filePrevious + IF _FILEEXISTS(filePrevious_ms) THEN KILL filePrevious_ms IF _FILEEXISTS(outputBitrateFile) THEN KILL outputBitrateFile IF _FILEEXISTS(outputStatusFile) THEN KILL outputStatusFile SYSTEM - CASE RMTPLB - - CASE clientsLB - - CASE VideoLB - - CASE AudioLB - - CASE InBytesLB - - CASE OutBytesLB - - CASE InBitssLB - - CASE OutBitssLB - - CASE TimeLB - - CASE rtmp_nacceptedLB - - CASE rtmp_codec_nclientsLB - - CASE rtmp_codec_videoLB - - CASE rtmp_codec_audioLB - - CASE rtmp_bytes_inLB - - CASE rtmp_bytes_outLB - - CASE rtmp_bw_inLB - - CASE rtmp_bw_outLB - - CASE rtmp_uptimeLB - - CASE InBytesDifferenceLB - CASE StreamFailTimerLB CASE FailCountLB @@ -976,8 +830,6 @@ SUB __UI_Click (id AS LONG) CASE UpdateIntervalLB - CASE Kb_DiffLB - CASE Timer_FailLB CASE Timer_Fail_CountLB @@ -986,14 +838,10 @@ SUB __UI_Click (id AS LONG) CASE td_updateLB - CASE BandwidthThresholdLB - CASE StreamFailDelayLB CASE MultiCameraSwitchLB - CASE Bandwidth_ThresholdLB - CASE Stream_Fail_DelayLB CASE MultiCameraSwitchStatusLB @@ -1022,15 +870,11 @@ SUB __UI_Click (id AS LONG) CASE __ERRORLINELB - CASE InBytesLB2 - - CASE InBytesDifferenceLB2 + CASE StreamUptimeLB CASE failLB - CASE multiStream1LB - - CASE Kb_Diff_stream1LB + CASE Uptime_Stream_1LB CASE Timer_Fail_Stream1LB @@ -1038,15 +882,11 @@ SUB __UI_Click (id AS LONG) CASE PictureBox1 - CASE InBytesLB3 - - CASE InBytesDifferenceLB3 + CASE StreamUptimeLB2 CASE failLB2 - CASE multiStream2LB - - CASE Kb_Diff_stream2LB + CASE Uptime_Stream_2LB CASE Timer_Fail_Stream2LB @@ -1118,15 +958,13 @@ SUB __UI_Click (id AS LONG) CASE PictureBoxLogoBottom - CASE OBSRemoteLB - - CASE OBS_RemoteLB - END SELECT END SUB SUB __UI_MouseEnter (id AS LONG) SELECT CASE id + CASE LoopySRTMonitor2 + CASE LoopySRTMonitor CASE FileMenu @@ -1135,8 +973,6 @@ SUB __UI_MouseEnter (id AS LONG) CASE HelpMenu - CASE SRT - CASE Status CASE Settings @@ -1153,44 +989,6 @@ SUB __UI_MouseEnter (id AS LONG) CASE FileMenuExit - CASE RMTPLB - - CASE clientsLB - - CASE VideoLB - - CASE AudioLB - - CASE InBytesLB - - CASE OutBytesLB - - CASE InBitssLB - - CASE OutBitssLB - - CASE TimeLB - - CASE rtmp_nacceptedLB - - CASE rtmp_codec_nclientsLB - - CASE rtmp_codec_videoLB - - CASE rtmp_codec_audioLB - - CASE rtmp_bytes_inLB - - CASE rtmp_bytes_outLB - - CASE rtmp_bw_inLB - - CASE rtmp_bw_outLB - - CASE rtmp_uptimeLB - - CASE InBytesDifferenceLB - CASE StreamFailTimerLB CASE FailCountLB @@ -1199,8 +997,6 @@ SUB __UI_MouseEnter (id AS LONG) CASE UpdateIntervalLB - CASE Kb_DiffLB - CASE Timer_FailLB CASE Timer_Fail_CountLB @@ -1209,14 +1005,10 @@ SUB __UI_MouseEnter (id AS LONG) CASE td_updateLB - CASE BandwidthThresholdLB - CASE StreamFailDelayLB CASE MultiCameraSwitchLB - CASE Bandwidth_ThresholdLB - CASE Stream_Fail_DelayLB CASE MultiCameraSwitchStatusLB @@ -1245,15 +1037,11 @@ SUB __UI_MouseEnter (id AS LONG) CASE __ERRORLINELB - CASE InBytesLB2 - - CASE InBytesDifferenceLB2 + CASE StreamUptimeLB CASE failLB - CASE multiStream1LB - - CASE Kb_Diff_stream1LB + CASE Uptime_Stream_1LB CASE Timer_Fail_Stream1LB @@ -1261,15 +1049,11 @@ SUB __UI_MouseEnter (id AS LONG) CASE PictureBox1 - CASE InBytesLB3 - - CASE InBytesDifferenceLB3 + CASE StreamUptimeLB2 CASE failLB2 - CASE multiStream2LB - - CASE Kb_Diff_stream2LB + CASE Uptime_Stream_2LB CASE Timer_Fail_Stream2LB @@ -1289,15 +1073,13 @@ SUB __UI_MouseEnter (id AS LONG) CASE PictureBoxLogoBottom - CASE OBSRemoteLB - - CASE OBS_RemoteLB - END SELECT END SUB SUB __UI_MouseLeave (id AS LONG) SELECT CASE id + CASE LoopySRTMonitor2 + CASE LoopySRTMonitor CASE FileMenu @@ -1306,8 +1088,6 @@ SUB __UI_MouseLeave (id AS LONG) CASE HelpMenu - CASE SRT - CASE Status CASE Settings @@ -1324,44 +1104,6 @@ SUB __UI_MouseLeave (id AS LONG) CASE FileMenuExit - CASE RMTPLB - - CASE clientsLB - - CASE VideoLB - - CASE AudioLB - - CASE InBytesLB - - CASE OutBytesLB - - CASE InBitssLB - - CASE OutBitssLB - - CASE TimeLB - - CASE rtmp_nacceptedLB - - CASE rtmp_codec_nclientsLB - - CASE rtmp_codec_videoLB - - CASE rtmp_codec_audioLB - - CASE rtmp_bytes_inLB - - CASE rtmp_bytes_outLB - - CASE rtmp_bw_inLB - - CASE rtmp_bw_outLB - - CASE rtmp_uptimeLB - - CASE InBytesDifferenceLB - CASE StreamFailTimerLB CASE FailCountLB @@ -1370,8 +1112,6 @@ SUB __UI_MouseLeave (id AS LONG) CASE UpdateIntervalLB - CASE Kb_DiffLB - CASE Timer_FailLB CASE Timer_Fail_CountLB @@ -1380,14 +1120,10 @@ SUB __UI_MouseLeave (id AS LONG) CASE td_updateLB - CASE BandwidthThresholdLB - CASE StreamFailDelayLB CASE MultiCameraSwitchLB - CASE Bandwidth_ThresholdLB - CASE Stream_Fail_DelayLB CASE MultiCameraSwitchStatusLB @@ -1416,15 +1152,11 @@ SUB __UI_MouseLeave (id AS LONG) CASE __ERRORLINELB - CASE InBytesLB2 - - CASE InBytesDifferenceLB2 + CASE StreamUptimeLB CASE failLB - CASE multiStream1LB - - CASE Kb_Diff_stream1LB + CASE Uptime_Stream_1LB CASE Timer_Fail_Stream1LB @@ -1432,15 +1164,11 @@ SUB __UI_MouseLeave (id AS LONG) CASE PictureBox1 - CASE InBytesLB3 - - CASE InBytesDifferenceLB3 + CASE StreamUptimeLB2 CASE failLB2 - CASE multiStream2LB - - CASE Kb_Diff_stream2LB + CASE Uptime_Stream_2LB CASE Timer_Fail_Stream2LB @@ -1460,10 +1188,6 @@ SUB __UI_MouseLeave (id AS LONG) CASE PictureBoxLogoBottom - CASE OBSRemoteLB - - CASE OBS_RemoteLB - END SELECT END SUB @@ -1483,6 +1207,8 @@ END SUB SUB __UI_MouseDown (id AS LONG) SELECT CASE id + CASE LoopySRTMonitor2 + CASE LoopySRTMonitor CASE FileMenu @@ -1491,8 +1217,6 @@ SUB __UI_MouseDown (id AS LONG) CASE HelpMenu - CASE SRT - CASE Status CASE Settings @@ -1509,44 +1233,6 @@ SUB __UI_MouseDown (id AS LONG) CASE FileMenuExit - CASE RMTPLB - - CASE clientsLB - - CASE VideoLB - - CASE AudioLB - - CASE InBytesLB - - CASE OutBytesLB - - CASE InBitssLB - - CASE OutBitssLB - - CASE TimeLB - - CASE rtmp_nacceptedLB - - CASE rtmp_codec_nclientsLB - - CASE rtmp_codec_videoLB - - CASE rtmp_codec_audioLB - - CASE rtmp_bytes_inLB - - CASE rtmp_bytes_outLB - - CASE rtmp_bw_inLB - - CASE rtmp_bw_outLB - - CASE rtmp_uptimeLB - - CASE InBytesDifferenceLB - CASE StreamFailTimerLB CASE FailCountLB @@ -1555,8 +1241,6 @@ SUB __UI_MouseDown (id AS LONG) CASE UpdateIntervalLB - CASE Kb_DiffLB - CASE Timer_FailLB CASE Timer_Fail_CountLB @@ -1565,14 +1249,10 @@ SUB __UI_MouseDown (id AS LONG) CASE td_updateLB - CASE BandwidthThresholdLB - CASE StreamFailDelayLB CASE MultiCameraSwitchLB - CASE Bandwidth_ThresholdLB - CASE Stream_Fail_DelayLB CASE MultiCameraSwitchStatusLB @@ -1601,15 +1281,11 @@ SUB __UI_MouseDown (id AS LONG) CASE __ERRORLINELB - CASE InBytesLB2 - - CASE InBytesDifferenceLB2 + CASE StreamUptimeLB CASE failLB - CASE multiStream1LB - - CASE Kb_Diff_stream1LB + CASE Uptime_Stream_1LB CASE Timer_Fail_Stream1LB @@ -1617,15 +1293,11 @@ SUB __UI_MouseDown (id AS LONG) CASE PictureBox1 - CASE InBytesLB3 - - CASE InBytesDifferenceLB3 + CASE StreamUptimeLB2 CASE failLB2 - CASE multiStream2LB - - CASE Kb_Diff_stream2LB + CASE Uptime_Stream_2LB CASE Timer_Fail_Stream2LB @@ -1645,15 +1317,13 @@ SUB __UI_MouseDown (id AS LONG) CASE PictureBoxLogoBottom - CASE OBSRemoteLB - - CASE OBS_RemoteLB - END SELECT END SUB SUB __UI_MouseUp (id AS LONG) SELECT CASE id + CASE LoopySRTMonitor2 + CASE LoopySRTMonitor CASE FileMenu @@ -1662,8 +1332,6 @@ SUB __UI_MouseUp (id AS LONG) CASE HelpMenu - CASE SRT - CASE Status CASE Settings @@ -1680,44 +1348,6 @@ SUB __UI_MouseUp (id AS LONG) CASE FileMenuExit - CASE RMTPLB - - CASE clientsLB - - CASE VideoLB - - CASE AudioLB - - CASE InBytesLB - - CASE OutBytesLB - - CASE InBitssLB - - CASE OutBitssLB - - CASE TimeLB - - CASE rtmp_nacceptedLB - - CASE rtmp_codec_nclientsLB - - CASE rtmp_codec_videoLB - - CASE rtmp_codec_audioLB - - CASE rtmp_bytes_inLB - - CASE rtmp_bytes_outLB - - CASE rtmp_bw_inLB - - CASE rtmp_bw_outLB - - CASE rtmp_uptimeLB - - CASE InBytesDifferenceLB - CASE StreamFailTimerLB CASE FailCountLB @@ -1726,8 +1356,6 @@ SUB __UI_MouseUp (id AS LONG) CASE UpdateIntervalLB - CASE Kb_DiffLB - CASE Timer_FailLB CASE Timer_Fail_CountLB @@ -1736,14 +1364,10 @@ SUB __UI_MouseUp (id AS LONG) CASE td_updateLB - CASE BandwidthThresholdLB - CASE StreamFailDelayLB CASE MultiCameraSwitchLB - CASE Bandwidth_ThresholdLB - CASE Stream_Fail_DelayLB CASE MultiCameraSwitchStatusLB @@ -1772,15 +1396,11 @@ SUB __UI_MouseUp (id AS LONG) CASE __ERRORLINELB - CASE InBytesLB2 - - CASE InBytesDifferenceLB2 + CASE StreamUptimeLB CASE failLB - CASE multiStream1LB - - CASE Kb_Diff_stream1LB + CASE Uptime_Stream_1LB CASE Timer_Fail_Stream1LB @@ -1788,15 +1408,11 @@ SUB __UI_MouseUp (id AS LONG) CASE PictureBox1 - CASE InBytesLB3 - - CASE InBytesDifferenceLB3 + CASE StreamUptimeLB2 CASE failLB2 - CASE multiStream2LB - - CASE Kb_Diff_stream2LB + CASE Uptime_Stream_2LB CASE Timer_Fail_Stream2LB @@ -1816,10 +1432,6 @@ SUB __UI_MouseUp (id AS LONG) CASE PictureBoxLogoBottom - CASE OBSRemoteLB - - CASE OBS_RemoteLB - END SELECT END SUB @@ -1973,46 +1585,20 @@ SUB Timer01 td_update# = TIMER(.001) - timer1# timer1# = TIMER(.001) - 'Debug moved down from here --------------------------------------------------------------------------------------------------------------------------------------------------- - 'Get OBS scene moved down from here ------------------------------------------------------------------------------------------------------------------------------------------- - IF _DIREXISTS(config_dir) THEN IF NOT _DIREXISTS(temp_dir) THEN MKDIR temp_dir - SELECT CASE WebsocketMethod - CASE "nodejs" - SetCaption OBS_RemoteLB, "Node.js" - CASE "obscommand" - SetCaption OBS_RemoteLB, "OBSCommand" - CASE ELSE - WebsocketMethod = "obscommand" - END SELECT - - rtmp_naccepted$ = "": rtmp_bytes_in$ = "": rtmp_bytes_out$ = "": rtmp_bw_in$ = "": rtmp_bw_out$ = "": rtmp_codec_video$ = "": rtmp_codec_audio$ = "": rtmp_codec_nclients$ = "" - rtmp_codec_nclients# = 0: rtmp_codec_nclients_temp# = 0 - a$ = "": a2$ = "": d$ = "": I = 0: i2 = 0: i3 = 0: stats_rtmp.xml$ = "" - tPing1# = TIMER(.001) - 'client = _OPENCLIENT(Port_Client$ + URL) - - - - - IF __MultiCameraSwitch = 0 THEN - 'Get Media Source times ------------------------- - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _HIDE "%ComSpec% /C node.exe " + c34 + obs_get_media1 + c34 + " > " + c34 + filePrevious + c34 - CASE "obscommand" - SHELL _HIDE "%ComSpec% /C " + c34 + c34 + obscommand_file + c34 + " /server=" + OBS_URL + " /password=" + OBS_PW + " /command=GetCurrentScene > " + c34 + filePrevious + c34 + c34 - END SELECT + 'Get Media Source times (1 stream) ------------------------------------------------------------------------------------------------------------- + SHELL _HIDE "%ComSpec% /C node.exe " + c34 + obs_get_media1 + c34 + " > " + c34 + filePrevious_ms + c34 _DELAY .01 ON ERROR GOTO PUT_Fail PUT_Refresh = 1 - IF _FILEEXISTS(filePrevious) THEN - OPEN filePrevious FOR INPUT AS #92 + IF _FILEEXISTS(filePrevious_ms) THEN + OPEN filePrevious_ms FOR INPUT AS #92 + IF EOF(92) THEN RefreshDisplayRequest = 1: Error_msg$ = "- Unable to read " + c34 + "SceneOK" + c34 + ", check " + c34 + "config.ini" + c34 + " & OBS to confirm it's correct." + CHR$(10) + "- If OBS is open, check communication is available via Node.js & obs-websocket-js.": Error_msg_2$ = "- If Node.js is installed, check " + c34 + "Restart playback" + c34 + " is disabled in OBS " + c34 + "Media Source" + c34 + "." + CHR$(10) + "- If " + c34 + "Restart playback" + c34 + " is disabled, check OBS Websockets options are correctly set. (#9)": _DELAY 3: GOTO LOF92 IF LOF(92) = 0 THEN NoKill = 1: GOTO LOF92 'Overkill with EOF checking, but just being safe IF EOF(92) THEN GOTO LOF92 LINE INPUT #92, file92$ @@ -2021,166 +1607,48 @@ SUB Timer01 END IF CLOSE #92 - IF NoKill = 1 THEN NoKill = 0 ELSE IF _FILEEXISTS(filePrevious) THEN KILL filePrevious + IF NoKill = 1 THEN NoKill = 0 ELSE IF _FILEEXISTS(filePrevious_ms) THEN KILL filePrevious_ms ON ERROR GOTO 0 PUT_Refresh = 0 END IF - - IF __MultiCameraSwitch = 1 THEN - 'Get Media Source times ------------------------- - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _HIDE "%ComSpec% /C node.exe " + c34 + obs_get_media2 + c34 + " > " + c34 + filePrevious + c34 - CASE "obscommand" - SHELL _HIDE "%ComSpec% /C " + c34 + c34 + obscommand_file + c34 + " /server=" + OBS_URL + " /password=" + OBS_PW + " /command=GetCurrentScene > " + c34 + filePrevious + c34 + c34 - END SELECT + 'Get Media Source times (2 streams) ------------------------------------------------------------------------------------------------------------- + SHELL _HIDE "%ComSpec% /C node.exe " + c34 + obs_get_media2 + c34 + " > " + c34 + filePrevious_ms + c34 _DELAY .01 ON ERROR GOTO PUT_Fail PUT_Refresh = 1 - IF _FILEEXISTS(filePrevious) THEN - OPEN filePrevious FOR INPUT AS #92 + IF _FILEEXISTS(filePrevious_ms) THEN + OPEN filePrevious_ms FOR INPUT AS #92 + IF EOF(92) THEN RefreshDisplayRequest = 1: Error_msg$ = "- Unable to read " + c34 + "MediaSource1" + c34 + ", check " + c34 + "config.ini" + c34 + " & OBS to confirm it's correct." + CHR$(10) + "- If OBS is open, check communication is available via Node.js & obs-websocket-js.": Error_msg_2$ = "- If Node.js is installed, check " + c34 + "Restart playback" + c34 + " is disabled in OBS " + c34 + "Media Source" + c34 + "." + CHR$(10) + "- If " + c34 + "Restart playback" + c34 + " is disabled, check OBS Websockets options are correctly set. (#7)": _DELAY 3: GOTO LOF922 IF LOF(92) = 0 THEN NoKill = 1: GOTO LOF922 'Overkill with EOF checking, but just being safe - IF EOF(92) THEN GOTO LOF922 LINE INPUT #92, file92$ MediaSource1Time = VAL(file92$) / 1000 - IF EOF(92) THEN GOTO LOF922 + IF EOF(92) THEN RefreshDisplayRequest = 1: Error_msg$ = "- Unable to read " + c34 + "MediaSource2" + c34 + ", check " + c34 + "config.ini" + c34 + " & OBS to confirm it's correct." + CHR$(10) + "- If OBS is open, check communication is available via Node.js & obs-websocket-js.": Error_msg_2$ = "- If Node.js is installed, check " + c34 + "Restart playback" + c34 + " is disabled in OBS " + c34 + "Media Source" + c34 + "." + CHR$(10) + "- If " + c34 + "Restart playback" + c34 + " is disabled, check OBS Websockets options are correctly set. (#8)": _DELAY 3: GOTO LOF922 LINE INPUT #92, file92$ MediaSource2Time = VAL(file92$) / 1000 LOF922: END IF CLOSE #92 - IF NoKill = 1 THEN NoKill = 0 ELSE IF _FILEEXISTS(filePrevious) THEN KILL filePrevious + IF NoKill = 1 THEN NoKill = 0 ELSE IF _FILEEXISTS(filePrevious_ms) THEN KILL filePrevious_ms ON ERROR GOTO 0 PUT_Refresh = 0 END IF - - - tPing2# = TIMER(.001) tPingOut# = (tPing2# - tPing1#) - - - - - - - - - - - - 'PUT_Fail moved from here ---------- - - URL_OK: - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_uptime# = VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 8, 16)) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_naccepted# = VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 11, 16)) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_bytes_in# = VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 10, 16)) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_bytes_out# = VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 11, 16)) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_bw_in# = VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 7, 16)) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_bw_out# = VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 8, 16)) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_codec_video$ = MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 20, 4) - IF INSTR(stats_rtmp.xml$, "") + 1), stats_rtmp.xml$, "") THEN rtmp_codec_audio_profile$ = MID$(stats_rtmp.xml$, INSTR((INSTR(stats_rtmp.xml$, "") + 1), stats_rtmp.xml$, "") + 17, 10) - rtmp_codec_audio_profile$ = LEFT$(rtmp_codec_audio_profile$, INSTR(rtmp_codec_audio_profile$, "<") - 1) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_codec_audio_channels$ = STR$(VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 20, 1))) - IF INSTR(stats_rtmp.xml$, "") THEN rtmp_codec_audio_samplerate$ = STR$(VAL(MID$(stats_rtmp.xml$, INSTR(stats_rtmp.xml$, "") + 24, 6))) - - 'Dirty fix - IF rtmp_codec_video_profile$ = "LC" OR rtmp_codec_video_profile$ = "MP3" THEN rtmp_codec_audio_profile$ = rtmp_codec_video_profile$: rtmp_codec_video_profile$ = "" - IF rtmp_codec_audio_profile$ = "Baseline" OR rtmp_codec_audio_profile$ = "Main" OR rtmp_codec_audio_profile$ = "High" THEN rtmp_codec_video_profile$ = rtmp_codec_audio_profile$: rtmp_codec_audio_profile$ = "" - - 'ToolTip(rtmp_codec_audioLB) = "Profile: " + rtmp_codec_audio_profile$ + "\nChannels: " + _TRIM$(rtmp_codec_audio_channels$) + "\nSample rate: " + _TRIM$(rtmp_codec_audio_samplerate$) + "\n" - 'ToolTip(rtmp_codec_videoLB) = "Resolution: " + rtmp_codec_video_resolution$ + "\nProfile: " + rtmp_codec_video_profile$ + "\nLevel: " + _TRIM$(rtmp_codec_video_level$) + "\n" - 'ToolTip(tPingOutLB) = "URL: " + URL + "\nPort: " + Port$ + "\n" - - 'ToolTip(RMTPLB) = "SRT Version: " + rtmp_codec_version$ + "\nSRT Version: " + rtmp_codec_rtmp_version$ + "\n" - 'ToolTip(rtmp_nacceptedLB) = "SRT Version: " + rtmp_codec_version$ + "\nSRT Version: " + rtmp_codec_rtmp_version$ + "\n" IF Timer_Failed = 1 THEN Timer_Failed = 0: ToolTip(Timer_Fail_CountLB) = "Last Failed: " + TIME$ - IF __MultiCameraSwitch = 1 THEN - Stream% = 0 - Stream% = INSTR(Stream% + 1, stats_rtmp.xml$, "" + urlStream1 + "") - Stream% = INSTR(Stream% + 1, stats_rtmp.xml$, CHR$(13) + CHR$(10)) - Stream% = INSTR(Stream% + 1, stats_rtmp.xml$, CHR$(13) + CHR$(10)) - multiStream1# = VAL(MID$(stats_rtmp.xml$, Stream% + 12, 16)) - Stream% = INSTR(Stream% + 1, stats_rtmp.xml$, "" + urlStream2 + "") - Stream% = INSTR(Stream% + 1, stats_rtmp.xml$, CHR$(13) + CHR$(10)) - Stream% = INSTR(Stream% + 1, stats_rtmp.xml$, CHR$(13) + CHR$(10)) - multiStream2# = VAL(MID$(stats_rtmp.xml$, Stream% + 12, 16)) - END IF - - rtmp_codec_nclients# = 0 - rtmp_codec_nclients_temp# = 0 - DO - pos_xml_m& = INSTR(pos_xml_m& + 1, stats_rtmp.xml$, "") - rtmp_codec_nclients_temp# = VAL(MID$(stats_rtmp.xml$, pos_xml_m& + 10, 16)) - IF rtmp_codec_nclients_temp# > rtmp_codec_nclients# THEN rtmp_codec_nclients# = rtmp_codec_nclients_temp# - LOOP UNTIL pos_xml_m& = 0 - - 'temp1 variables - IF srt_warmup = 0 THEN Kb_Diff# = (Bandwidth_Threshold + 1) - IF rtmp_bytes_in# = 0 THEN rtmp_bytes_in# = 1 - rtmp_bytes_in_temp1# = rtmp_bytes_in# - IF rtmp_bytes_in_temp1# >= 1 AND rtmp_bytes_in_temp2# >= 1 THEN - Kb_Diff# = INT((rtmp_bytes_in_temp1# - rtmp_bytes_in_temp2#) / 128) - END IF - - 'IF Kb_Diff# >= Bandwidth_Threshold THEN Timer_Fail = 0 IF MediaSource1Time <> 0 OR MediaSource2Time <> 0 THEN Timer_Fail = 0 'SRT IF MediaSource1Time = 0 AND MediaSource2Time = 0 AND srt_warmup = 1 THEN Timer_Fail = Timer_Fail + 1 'SRT - 'IF Kb_Diff# <= Bandwidth_Threshold AND srt_warmup = 1 THEN Timer_Fail = Timer_Fail + 1 IF Timer_Fail > 20999 THEN Timer_Fail = 20999 - SetCaption (rtmp_nacceptedLB), "Acc:" + STR$(rtmp_naccepted#) - SetCaption (rtmp_codec_nclientsLB), LTRIM$(STR$(rtmp_codec_nclients#)) - IF rtmp_codec_video$ <> "" THEN SetCaption (rtmp_codec_videoLB), rtmp_codec_video$ ELSE SetCaption rtmp_codec_videoLB, "-" - IF rtmp_codec_audio$ <> "" THEN SetCaption (rtmp_codec_audioLB), rtmp_codec_audio$ ELSE SetCaption rtmp_codec_audioLB, "-" - calcbw rtmp_bytes_in#, 0 - SetCaption (rtmp_bytes_inLB), LTRIM$(bout) - calcbw rtmp_bytes_out#, 0 - SetCaption (rtmp_bytes_outLB), LTRIM$(bout) - calcbw rtmp_bw_in#, 1 - SetCaption (rtmp_bw_inLB), LTRIM$(bout) - calcbw rtmp_bw_out#, 1 - SetCaption (rtmp_bw_outLB), LTRIM$(bout) - SetCaption (rtmp_uptimeLB), calc_srt$(rtmp_uptime#, 0) - - IF Timer_Fail >= Stream_Fail_Delay THEN Control(Kb_DiffLB).ForeColor = RED_FAIL ELSE IF Kb_Diff# <= Bandwidth_Threshold THEN Control(Kb_DiffLB).ForeColor = RED_WARNING ELSE Control(Kb_DiffLB).ForeColor = GREEN_OK - SetCaption (Kb_DiffLB), LTRIM$(STR$(Kb_Diff#)) + " Kb/s" - IF Timer_Fail >= Stream_Fail_Delay THEN Control(Timer_FailLB).ForeColor = RED_FAIL ELSE IF Timer_Fail >= 1 THEN Control(Timer_FailLB).ForeColor = RED_WARNING: SD = 1: _TITLE "Stream Down!" ELSE Control(Timer_FailLB).ForeColor = GREEN_OK SetCaption (Timer_FailLB), calc_srt$(Timer_Fail, 1) @@ -2190,7 +1658,7 @@ SUB Timer01 IF Timer_Fail_Count <> 1 THEN SetCaption (Timer_Fail_CountLB), LTRIM$(STR$(Timer_Fail_Count)) + " times" ELSE SetCaption (Timer_Fail_CountLB), LTRIM$(STR$(Timer_Fail_Count)) + " time" TIMEms tPingOut#, 0 - IF VAL(tout) >= .25 THEN Control(tPingOutLB).ForeColor = RED_WARNING ELSE Control(tPingOutLB).ForeColor = GREEN_OK + IF VAL(tout) >= .3 THEN Control(tPingOutLB).ForeColor = RED_WARNING ELSE Control(tPingOutLB).ForeColor = GREEN_OK SetCaption (tPingOutLB), LTRIM$(STR$(VAL(tout) * 1000)) + "ms" IF srt_warmup = 1 THEN @@ -2201,59 +1669,31 @@ SUB Timer01 SetCaption (td_updateLB), tout + " sec " END IF - SetCaption (Bandwidth_ThresholdLB), LTRIM$(STR$(Bandwidth_Threshold)) + " Kb/s" SetCaption (Stream_Fail_DelayLB), calc_srt$(Stream_Fail_Delay, 1) IF __MultiCameraSwitch = 0 THEN SetCaption (MultiCameraSwitchStatusLB), "Disabled" ELSE SetCaption (MultiCameraSwitchStatusLB), "Enabled" IF __returnPreviousScene = 1 THEN SetCaption (Scene_CurrentLB), LEFT$(previousSceneDisplay$, 20) ELSE SetCaption (Scene_CurrentLB), LEFT$(Scene_Current$, 20) IF __MultiCameraSwitch = 1 THEN 'temp1_stream1 variables - IF srt_warmup = 0 THEN Kb_Diff_stream1# = (Bandwidth_Threshold + 1) - IF multiStream1# = 0 THEN multiStream1# = 1 - multiStream1_temp1# = multiStream1# - IF multiStream1_temp1# >= 1 AND multiStream1_temp2# >= 1 THEN - Kb_Diff_stream1# = INT((multiStream1_temp1# - multiStream1_temp2#) / 128) - END IF - - IF Kb_Diff_stream1# >= Bandwidth_Threshold THEN Timer_Fail_Stream1 = 0 - IF Kb_Diff_stream1# <= Bandwidth_Threshold AND srt_warmup = 1 THEN Timer_Fail_Stream1 = Timer_Fail_Stream1 + 1 + IF srt_warmup = 1 THEN Timer_Fail_Stream1 = Timer_Fail_Stream1 + 1 IF MediaSource1Time <> 0 THEN Timer_Fail_Stream1 = 0: Timer_Fail = 0 'SRT IF Timer_Fail_Stream1 > 19999 THEN Timer_Fail_Stream1 = 19999 'temp1_stream2 variables - IF srt_warmup = 0 THEN Kb_Diff_stream2# = (Bandwidth_Threshold + 1) - IF multiStream2# = 0 THEN multiStream2# = 1 - multiStream2_temp1# = multiStream2# - IF multiStream2_temp1# >= 1 AND rtmp_bytes_in_temp2# >= 1 THEN - Kb_Diff_stream2# = INT((multiStream2_temp1# - multiStream2_temp2#) / 128) - END IF - - IF Kb_Diff_stream2# >= Bandwidth_Threshold THEN Timer_Fail_Stream2 = 0 - IF Kb_Diff_stream2# <= Bandwidth_Threshold AND srt_warmup = 1 THEN Timer_Fail_Stream2 = Timer_Fail_Stream2 + 1 + IF srt_warmup = 1 THEN Timer_Fail_Stream2 = Timer_Fail_Stream2 + 1 IF MediaSource2Time <> 0 THEN Timer_Fail_Stream2 = 0: Timer_Fail = 0 'SRT IF Timer_Fail_Stream2 > 19999 THEN Timer_Fail_Stream2 = 19999 - calcbw multiStream1#, 0 - SetCaption (multiStream1LB), LTRIM$(bout) - - IF Kb_Diff_stream1# < 0 THEN Kb_Diff_stream1# = 0 'Dirty fix for now - - IF Timer_Fail_Stream1 >= Stream_Fail_Delay THEN Control(Kb_Diff_stream1LB).ForeColor = RED_FAIL ELSE IF Kb_Diff_stream1# <= Bandwidth_Threshold THEN Control(Kb_Diff_stream1LB).ForeColor = RED_WARNING ELSE Control(Kb_Diff_stream1LB).ForeColor = GREEN_OK - SetCaption (Kb_Diff_stream1LB), LTRIM$(STR$(Kb_Diff_stream1#)) + " Kb/s" - IF Timer_Fail_Stream1 >= Stream_Fail_Delay THEN Control(Timer_Fail_Stream1LB).ForeColor = RED_FAIL ELSE IF Timer_Fail_Stream1 >= 1 THEN Control(Timer_Fail_Stream1LB).ForeColor = RED_WARNING ELSE Control(Timer_Fail_Stream1LB).ForeColor = GREEN_OK SetCaption (Timer_Fail_Stream1LB), calc_srt$(Timer_Fail_Stream1, 1) - calcbw multiStream2#, 0 - SetCaption (multiStream2LB), LTRIM$(bout) - - IF Kb_Diff_stream2# < 0 THEN Kb_Diff_stream2# = 0 'Dirty fix for now - - IF Timer_Fail_Stream2 >= Stream_Fail_Delay THEN Control(Kb_Diff_stream2LB).ForeColor = RED_FAIL ELSE IF Kb_Diff_stream2# <= Bandwidth_Threshold THEN Control(Kb_Diff_stream2LB).ForeColor = RED_WARNING ELSE Control(Kb_Diff_stream2LB).ForeColor = GREEN_OK - SetCaption (Kb_Diff_stream2LB), LTRIM$(STR$(Kb_Diff_stream2#)) + " Kb/s" - IF Timer_Fail_Stream2 >= Stream_Fail_Delay THEN Control(Timer_Fail_Stream2LB).ForeColor = RED_FAIL ELSE IF Timer_Fail_Stream2 >= 1 THEN Control(Timer_Fail_Stream2LB).ForeColor = RED_WARNING ELSE Control(Timer_Fail_Stream2LB).ForeColor = GREEN_OK SetCaption (Timer_Fail_Stream2LB), calc_srt$(Timer_Fail_Stream2, 1) + + IF MediaSource1Time <= 2 THEN Control(Uptime_Stream_1LB).ForeColor = RED_FAIL ELSE IF MediaSource1Time >= 3 AND MediaSource1Time <= 10 THEN Control(Uptime_Stream_1LB).ForeColor = RED_WARNING ELSE Control(Uptime_Stream_1LB).ForeColor = GREEN_OK + SetCaption (Uptime_Stream_1LB), calc_srt$(MediaSource1Time, 1) 'SRT + IF MediaSource2Time <= 2 THEN Control(Uptime_Stream_2LB).ForeColor = RED_FAIL ELSE IF MediaSource2Time >= 3 AND MediaSource2Time <= 10 THEN Control(Uptime_Stream_2LB).ForeColor = RED_WARNING ELSE Control(Uptime_Stream_2LB).ForeColor = GREEN_OK + SetCaption (Uptime_Stream_2LB), calc_srt$(MediaSource2Time, 1) 'SRT END IF IF Scene_OK = "" OR Scene_Fail = "" OR Scene_Intro = "" THEN RefreshDisplayRequest = 1: Error_msg$ = "- Variable/s for scenes empty, check if " + c34 + config_main + c34 + " exists. (#5)": _DELAY 3 @@ -2319,46 +1759,6 @@ SUB Timer01 SetCaption (Debug_Timer_SnapshotLB), tout + " sec " END IF - - - 'Remove RTMP stats - 'SRT - Control(rtmp_nacceptedLB).Hidden = True - Control(rtmp_codec_nclientsLB).Hidden = True - Control(rtmp_codec_videoLB).Hidden = True - Control(rtmp_codec_audioLB).Hidden = True - Control(rtmp_bytes_inLB).Hidden = True - Control(rtmp_bytes_outLB).Hidden = True - Control(rtmp_bw_inLB).Hidden = True - Control(rtmp_bw_outLB).Hidden = True - Control(rtmp_uptimeLB).Hidden = True - Control(Kb_DiffLB).Hidden = True - Control(Bandwidth_ThresholdLB).Hidden = True - Control(OBS_RemoteLB).Hidden = True - Control(multiStream1LB).Hidden = True - Control(Kb_Diff_stream1LB).Hidden = True - Control(multiStream2LB).Hidden = True - Control(Kb_Diff_stream2LB).Hidden = True - SetCaption (ServerPingLB), "MS ping" - SetCaption (RMTPLB), "" - SetCaption (clientsLB), "" - SetCaption (VideoLB), "" - SetCaption (AudioLB), "" - SetCaption (InBytesLB), "" - SetCaption (OutBytesLB), "" - SetCaption (InBitssLB), "" - SetCaption (OutBitssLB), "" - SetCaption (TimeLB), "" - SetCaption (InBytesDifferenceLB), "" - SetCaption (BandwidthThresholdLB), "" - SetCaption (OBSRemoteLB), "" - SetCaption (InBytesLB2), "" - SetCaption (InBytesDifferenceLB2), "" - SetCaption (InBytesLB3), "" - SetCaption (InBytesDifferenceLB3), "" - - - IF verCheck$ <> "" THEN SetCaption StatusLB, verCheck$ updateDisplay = 1 @@ -2370,12 +1770,7 @@ SUB Timer01 returnPreviousSceneTime = returnPreviousSceneTime + 1 IF returnPreviousSceneTime > 2 THEN returnPreviousSceneTime = 1 ELSE GOTO Exit_returnPreviousSceneCheck returnFirstCheck = 1 - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _HIDE "%ComSpec% /C node.exe " + c34 + obs_get_scene + c34 + " > " + c34 + filePrevious + c34 - CASE "obscommand" - SHELL _HIDE "%ComSpec% /C " + c34 + c34 + obscommand_file + c34 + " /server=" + OBS_URL + " /password=" + OBS_PW + " /command=GetCurrentScene > " + c34 + filePrevious + c34 + c34 - END SELECT + SHELL _HIDE "%ComSpec% /C node.exe " + c34 + obs_get_scene + c34 + " > " + c34 + filePrevious + c34 _DELAY .01 ON ERROR GOTO PUT_Fail PUT_Refresh = 1 @@ -2386,20 +1781,9 @@ SUB Timer01 IF LOF(96) = 0 THEN NoKill = 1: EXIT DO 'Overkill with EOF checking, but just being safe IF EOF(96) THEN EXIT DO LINE INPUT #96, file96$ - SELECT CASE WebsocketMethod - CASE "nodejs" - IF streamsUp$ <> "0" THEN previousScene$ = file96$ - previousSceneDisplay$ = file96$ - EXIT DO 'Output to previousScene$ - CASE "obscommand" - findSceneName = INSTR(file96$, " " + c34 + "name" + c34 + ": " + c34) - IF findSceneName THEN - findSceneName2 = INSTR(findSceneName + 11, file96$, c34) - IF streamsUp$ <> "0" THEN previousScene$ = MID$(file96$, findSceneName + 11, findSceneName2 - 12) - previousSceneDisplay$ = MID$(file96$, findSceneName + 11, findSceneName2 - 12) - EXIT DO 'Output to previousScene$ - END IF - END SELECT + IF streamsUp$ <> "0" THEN previousScene$ = file96$ + previousSceneDisplay$ = file96$ + EXIT DO 'Output to previousScene$ LOOP END IF END IF @@ -2409,31 +1793,19 @@ SUB Timer01 ON ERROR GOTO 0 PUT_Refresh = 0 - - - - - Exit_returnPreviousSceneCheck: '--------------------------------------- - 'IF __FileStatusOutput = 1 THEN statusBitrateToFile "Bitrate: (#1: " + _TRIM$(STR$(Kb_Diff_stream1#)) + " Kb/s) (#2: " + _TRIM$(STR$(Kb_Diff_stream2#)) + " Kb/s)" 'Execute Stream OK IF __MultiCameraSwitch = 0 THEN IF MediaSource1Time <> 0 THEN 'SRT - 'IF Kb_Diff# >= Bandwidth_Threshold THEN Timer_Fail = 0 Scene_Current$ = Scene_OK IF Exe_Fail = 1 THEN Exe_Fail = 0 Exe_OK = 1 LoadImageMEM Control(PictureBox1), "tick.png" - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_OK - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + Scene_OK + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_OK _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM UP]" END IF @@ -2446,21 +1818,11 @@ SUB Timer01 IF Exe_Fail_First = 0 THEN Exe_Fail_First = 1 Scene_Current$ = Scene_Intro - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Intro - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + Scene_Intro + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Intro _DELAY .1 ELSE Scene_Current$ = Scene_Fail - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Fail - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + Scene_Fail + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Fail _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM DOWN]" Timer_Fail_Count = Timer_Fail_Count + 1 @@ -2486,22 +1848,12 @@ SUB Timer01 IF previousScene$ <> titleScene1 AND streamsUp$ = "0" THEN IF lastStreamUp$ <> "1" THEN previousScene$ = titleScene1 Scene_Current$ = previousScene$ - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + previousScene$ - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + previousScene$ + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + previousScene$ _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM UP]:[CAMERA #1 UP]:[CAMERA #2 DOWN]" ELSE Scene_Current$ = titleScene1 - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene1 - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + titleScene1 + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene1 _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM UP]:[CAMERA #1 UP]" END IF @@ -2514,22 +1866,12 @@ SUB Timer01 IF previousScene$ <> titleScene2 AND streamsUp$ = "0" THEN IF lastStreamUp$ <> "2" THEN previousScene$ = titleScene2 Scene_Current$ = previousScene$ - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + previousScene$ - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + previousScene$ + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + previousScene$ _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM UP]:[CAMERA #2 UP]:[CAMERA #1 DOWN]" ELSE Scene_Current$ = titleScene2 - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene2 - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + titleScene2 + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene2 _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM UP]:[CAMERA #2 UP]" END IF @@ -2542,22 +1884,12 @@ SUB Timer01 IF previousScene$ <> titleScene12 AND streamsUp$ = "0" THEN IF lastStreamUp$ <> "12" THEN previousScene$ = titleScene12 Scene_Current$ = previousScene$ - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + previousScene$ - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + previousScene$ + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + previousScene$ _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM UP]:[ALL CAMERAS UP]" ELSE Scene_Current$ = titleScene12 - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene12 - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + titleScene12 + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + titleScene12 _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM UP]:[ALL CAMERAS UP]" END IF @@ -2572,21 +1904,11 @@ SUB Timer01 IF Exe_Fail_First = 0 THEN Exe_Fail_First = 1 Scene_Current$ = Scene_Intro - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Intro - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + Scene_Intro + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Intro _DELAY .1 ELSE Scene_Current$ = Scene_Fail - SELECT CASE WebsocketMethod - CASE "nodejs" - SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Fail - CASE "obscommand" - SHELL _DONTWAIT _HIDE shell_obscommand_1 + Scene_Fail + shell_obscommand_2 - END SELECT + SHELL _DONTWAIT _HIDE shell_nodejs_1 + Scene_Fail _DELAY .1 IF __FileStatusOutput = 1 THEN statusOutputToFile "[STREAM DOWN]:[ALL CAMERAS DOWN]" Timer_Fail_Count = Timer_Fail_Count + 1 @@ -2597,10 +1919,9 @@ SUB Timer01 END IF END IF - IF srt_warmup = 1 AND returnFirstCheck = 1 AND __MultiCameraSwitch = 1 AND previousSceneDisplay$ = "" THEN RefreshDisplayRequest = 1: Error_msg$ = "- Variable/s for scenes empty, check if OBS is open." + CHR$(10) + "- If OBS is open, check communication is available via Node.js. (#6)": _DELAY 3 + IF srt_warmup = 1 AND returnFirstCheck = 1 AND __MultiCameraSwitch = 1 AND previousSceneDisplay$ = "" THEN RefreshDisplayRequest = 1: Error_msg$ = "- Variable/s for scenes empty, check if OBS is open." + CHR$(10) + "- If OBS is open, check communication is available via Node.js.": Error_msg_2$ = "- If Node.js is installed, check OBS Websockets options are correctly set. (#6)": _DELAY 3 'temp2 variables - rtmp_bytes_in_temp2# = rtmp_bytes_in# 'temp_stream1 & temp_stream2 variables multiStream1_temp2# = multiStream1# diff --git a/source/loopy_srt_monitor.frm b/source/loopy_srt_monitor.frm index a435c4d..bdeb2b5 100644 --- a/source/loopy_srt_monitor.frm +++ b/source/loopy_srt_monitor.frm @@ -31,48 +31,44 @@ SUB __UI_LoadForm SetCaption __UI_NewID, "Help" Control(__UI_NewID).ForeColor = _RGB32(255, 255, 255) - __UI_NewID = __UI_NewControl(__UI_Type_Label, "SRT", 753, 64, 24, 34, 0) - __UI_RegisterResult = 0 - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).HasBorder = True - Control(__UI_NewID).BorderSize = 1 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Status", 753, 64, 24, 111, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Status", 753, 64, 24, 46, 0) __UI_RegisterResult = 0 Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) Control(__UI_NewID).HasBorder = True + Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Settings", 753, 64, 24, 187, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Settings", 753, 64, 24, 143, 0) __UI_RegisterResult = 0 Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) Control(__UI_NewID).HasBorder = True + Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "CurrentScene", 199, 106, 301, 264, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "CurrentScene", 199, 106, 301, 237, 0) __UI_RegisterResult = 0 Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) Control(__UI_NewID).HasBorder = True + Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "DebugFrame", 753, 59, 24, 382, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "DebugFrame", 753, 59, 24, 371, 0) __UI_RegisterResult = 0 Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(33, 4, 4) Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) Control(__UI_NewID).HasBorder = True + Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Stream1", 245, 106, 24, 264, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Stream1", 245, 106, 24, 237, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Stream #1" Control(__UI_NewID).Font = SetFont("phagspa.ttf?seguisb.ttf?segoeui.ttf", 12) @@ -82,7 +78,7 @@ SUB __UI_LoadForm Control(__UI_NewID).HasBorder = True Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Stream2", 245, 106, 532, 264, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Stream2", 245, 106, 532, 237, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Stream #2" Control(__UI_NewID).Font = SetFont("phagspa.ttf?seguisb.ttf?segoeui.ttf", 12) @@ -92,7 +88,7 @@ SUB __UI_LoadForm Control(__UI_NewID).HasBorder = True Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "versionFrame", 753, 59, 24, 382, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "versionFrame", 753, 59, 24, 371, 0) __UI_RegisterResult = 0 Control(__UI_NewID).Font = SetFont("phagspa.ttf?seguisb.ttf?segoeui.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(32, 128, 16) @@ -109,197 +105,7 @@ SUB __UI_LoadForm Control(__UI_NewID).BackColor = _RGB32(254, 254, 255) Control(__UI_NewID).BorderColor = _RGB32(170, 166, 170) - __UI_NewID = __UI_NewControl(__UI_Type_Label, "RMTPLB", 65, 21, 42, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "RMTP" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "clientsLB", 62, 21, 98, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "#clients" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "VideoLB", 69, 21, 157, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Video" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "AudioLB", 57, 21, 210, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Audio" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "InBytesLB", 114, 21, 266, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "In bytes" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "OutBytesLB", 108, 21, 370, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Out Bytes" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "InBitssLB", 110, 21, 472, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "In bits/s" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "OutBitssLB", 109, 21, 576, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Out bits/s" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "TimeLB", 83, 21, 677, 47, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Time" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_nacceptedLB", 65, 21, 42, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_naccepted" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_codec_nclientsLB", 62, 21, 98, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_codec_nclients" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_codec_videoLB", 69, 21, 157, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_codec_video" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_codec_audioLB", 57, 21, 210, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_codec_audio" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_bytes_inLB", 114, 21, 266, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_bytes_in" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_bytes_outLB", 108, 21, 370, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_bytes_out" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_bw_inLB", 110, 21, 472, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_bw_in" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_bw_outLB", 109, 21, 576, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_bw_out" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "rtmp_uptimeLB", 83, 21, 677, 69, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "rtmp_uptime" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(125, 187, 154) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "InBytesDifferenceLB", 189, 21, 42, 124, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "In bytes difference" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "StreamFailTimerLB", 191, 21, 230, 124, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "StreamFailTimerLB", 208, 21, 43, 59, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Stream fail timer" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -309,7 +115,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "FailCountLB", 111, 21, 418, 124, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "FailCountLB", 180, 21, 251, 59, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Fail count" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -319,9 +125,9 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "ServerPingLB", 104, 21, 528, 124, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "ServerPingLB", 200, 21, 431, 59, 0) __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Server ping" + SetCaption __UI_NewID, "WebSocket ping" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) @@ -329,7 +135,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "UpdateIntervalLB", 129, 21, 631, 124, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "UpdateIntervalLB", 129, 21, 631, 59, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Update interval" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -339,17 +145,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Kb_DiffLB", 189, 21, 42, 146, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Kb_Diff" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(131, 151, 163) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_FailLB", 190, 21, 231, 146, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_FailLB", 190, 21, 43, 81, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Timer_Fail" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -359,7 +155,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_Fail_CountLB", 111, 21, 418, 146, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_Fail_CountLB", 111, 21, 252, 81, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Timer_Fail_Count" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -369,7 +165,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "tPingOutLB", 104, 21, 528, 146, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "tPingOutLB", 104, 21, 434, 81, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "tPingOut#" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -379,7 +175,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "td_updateLB", 128, 21, 632, 146, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "td_updateLB", 128, 21, 633, 81, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "td_update" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -389,17 +185,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "BandwidthThresholdLB", 190, 21, 42, 200, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Bandwidth threshold" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "StreamFailDelayLB", 190, 21, 232, 200, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "StreamFailDelayLB", 560, 21, 43, 156, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Stream fail delay" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -409,7 +195,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "MultiCameraSwitchLB", 225, 21, 420, 200, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "MultiCameraSwitchLB", 155, 21, 603, 156, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Multi Camera Switch" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -419,17 +205,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Bandwidth_ThresholdLB", 190, 21, 42, 222, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Bandwidth_Threshold" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(142, 166, 143) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Stream_Fail_DelayLB", 190, 21, 232, 222, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Stream_Fail_DelayLB", 190, 21, 44, 178, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Stream_Fail_Delay" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -439,7 +215,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "MultiCameraSwitchStatusLB", 225, 21, 420, 222, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "MultiCameraSwitchStatusLB", 156, 21, 604, 178, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "MultiCameraSwitchStatus" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -449,7 +225,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "TimerLB", 146, 21, 42, 393, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "TimerLB", 146, 21, 42, 382, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Timer" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -459,7 +235,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "TimerSnapshotLB", 175, 21, 185, 393, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "TimerSnapshotLB", 175, 21, 185, 382, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Timer (snapshot)" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -469,7 +245,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "td_displayVarLB", 125, 21, 350, 393, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "td_displayVarLB", 125, 21, 350, 382, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "td_display var" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -479,7 +255,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseXVarLB", 80, 21, 460, 393, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseXVarLB", 80, 21, 460, 382, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "mouseX var" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -489,7 +265,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseYVarLB", 90, 21, 540, 393, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseYVarLB", 90, 21, 540, 382, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "mouseY var" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -499,7 +275,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "__ERRORLINEVarLB", 130, 21, 622, 393, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "__ERRORLINEVarLB", 130, 21, 622, 382, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "_ERRORLINE var" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -509,7 +285,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Debug_TimerLB", 146, 21, 42, 415, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Debug_TimerLB", 146, 21, 42, 404, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Debug_Timer" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -519,7 +295,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Debug_Timer_SnapshotLB", 175, 21, 185, 415, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Debug_Timer_SnapshotLB", 175, 21, 185, 404, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Debug_Timer_Snapshot" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -529,7 +305,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "td_displayLB", 125, 21, 350, 415, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "td_displayLB", 125, 21, 350, 404, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "td_display" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -539,7 +315,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseXLB", 80, 21, 460, 415, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseXLB", 80, 21, 460, 404, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "mouseX" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -549,7 +325,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseYLB", 90, 21, 540, 415, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "mouseYLB", 90, 21, 540, 404, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "mouseY" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -559,7 +335,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "__ERRORLINELB", 130, 21, 622, 415, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "__ERRORLINELB", 130, 21, 622, 404, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "_ERRORLINE" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -569,19 +345,9 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "InBytesLB2", 65, 21, 89, 278, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "In bytes" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(185, 221, 200) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 35) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "InBytesDifferenceLB2", 121, 21, 33, 306, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "StreamUptimeLB", 98, 21, 51, 271, 0) __UI_RegisterResult = 0 - SetCaption __UI_NewID, "In bytes difference" + SetCaption __UI_NewID, "Stream uptime" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(185, 221, 200) Control(__UI_NewID).BackColor = _RGB32(25, 28, 35) @@ -589,7 +355,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "failLB", 107, 21, 42, 334, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "failLB", 107, 21, 42, 302, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Stream fail timer" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -599,25 +365,16 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "multiStream1LB", 77, 21, 153, 278, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "multiStream1" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(185, 181, 211) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Kb_Diff_stream1LB", 90, 21, 153, 306, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Uptime_Stream_1LB", 90, 21, 153, 271, 0) __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Kb_Diff_stream1" + SetCaption __UI_NewID, "Uptime_Stream_1" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(185, 181, 211) Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) Control(__UI_NewID).VAlign = __UI_Middle - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_Fail_Stream1LB", 108, 21, 153, 334, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_Fail_Stream1LB", 108, 21, 153, 302, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Timer_Fail_Stream1" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -626,7 +383,7 @@ SUB __UI_LoadForm Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) Control(__UI_NewID).VAlign = __UI_Middle - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Scene_CurrentLB", 187, 29, 307, 265, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Scene_CurrentLB", 187, 29, 307, 238, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Scene_Current" Control(__UI_NewID).Font = SetFont("seguisb.ttf?ebrimabd.ttf?phagspa.ttf?segoeui.ttf", 18) @@ -637,7 +394,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox1", 64, 64, 369, 296, 0) + __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox1", 64, 64, 369, 269, 0) __UI_RegisterResult = 0 Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) @@ -647,19 +404,9 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "InBytesLB3", 65, 21, 597, 278, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "In bytes" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(185, 221, 200) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 35) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "InBytesDifferenceLB3", 121, 21, 541, 306, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "StreamUptimeLB2", 98, 21, 559, 271, 0) __UI_RegisterResult = 0 - SetCaption __UI_NewID, "In bytes difference" + SetCaption __UI_NewID, "Stream uptime" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(185, 221, 200) Control(__UI_NewID).BackColor = _RGB32(25, 28, 35) @@ -667,7 +414,7 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "failLB2", 107, 21, 549, 334, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "failLB2", 107, 21, 549, 302, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Stream fail timer" Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) @@ -677,25 +424,16 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).Padding = 10 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "multiStream2LB", 77, 21, 661, 278, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "multiStream2" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(185, 181, 211) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Kb_Diff_stream2LB", 90, 21, 661, 306, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Uptime_Stream_2LB", 90, 21, 661, 271, 0) __UI_RegisterResult = 0 - SetCaption __UI_NewID, "Kb_Diff_stream2" + SetCaption __UI_NewID, "Uptime_Stream_2" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(185, 181, 211) Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) Control(__UI_NewID).VAlign = __UI_Middle - __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_Fail_Stream2LB", 108, 21, 661, 334, 0) + __UI_NewID = __UI_NewControl(__UI_Type_Label, "Timer_Fail_Stream2LB", 108, 21, 661, 302, 0) __UI_RegisterResult = 0 SetCaption __UI_NewID, "Timer_Fail_Stream2" Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) @@ -747,7 +485,7 @@ SUB __UI_LoadForm Control(__UI_NewID).Align = __UI_Right Control(__UI_NewID).VAlign = __UI_Middle - __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBoxLogoBottom", 401, 30, 200, 396, 0) + __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBoxLogoBottom", 401, 30, 200, 385, 0) __UI_RegisterResult = 0 Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) Control(__UI_NewID).ForeColor = _RGB32(33, 4, 4) @@ -757,26 +495,6 @@ SUB __UI_LoadForm Control(__UI_NewID).VAlign = __UI_Middle Control(__UI_NewID).BorderSize = 1 - __UI_NewID = __UI_NewControl(__UI_Type_Label, "OBSRemoteLB", 118, 21, 642, 200, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "OBS Remote" - Control(__UI_NewID).Font = SetFont("segoeui.ttf?phagspa.ttf?seguisb.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(3, 4, 4) - Control(__UI_NewID).BackColor = _RGB32(164, 168, 172) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - - __UI_NewID = __UI_NewControl(__UI_Type_Label, "OBS_RemoteLB", 118, 21, 642, 222, 0) - __UI_RegisterResult = 0 - SetCaption __UI_NewID, "OBS_Remote" - Control(__UI_NewID).Font = SetFont("seguisb.ttf?phagspa.ttf?segoeui.ttf", 12) - Control(__UI_NewID).ForeColor = _RGB32(142, 166, 143) - Control(__UI_NewID).BackColor = _RGB32(25, 28, 33) - Control(__UI_NewID).BorderColor = _RGB32(10, 12, 15) - Control(__UI_NewID).VAlign = __UI_Middle - Control(__UI_NewID).Padding = 10 - END SUB SUB __UI_AssignIDs @@ -784,7 +502,6 @@ SUB __UI_AssignIDs FileMenu = __UI_GetID("FileMenu") OptionsMenu = __UI_GetID("OptionsMenu") HelpMenu = __UI_GetID("HelpMenu") - SRT = __UI_GetID("SRT") Status = __UI_GetID("Status") Settings = __UI_GetID("Settings") CurrentScene = __UI_GetID("CurrentScene") @@ -793,38 +510,16 @@ SUB __UI_AssignIDs Stream2 = __UI_GetID("Stream2") versionFrame = __UI_GetID("versionFrame") FileMenuExit = __UI_GetID("FileMenuExit") - RMTPLB = __UI_GetID("RMTPLB") - clientsLB = __UI_GetID("clientsLB") - VideoLB = __UI_GetID("VideoLB") - AudioLB = __UI_GetID("AudioLB") - InBytesLB = __UI_GetID("InBytesLB") - OutBytesLB = __UI_GetID("OutBytesLB") - InBitssLB = __UI_GetID("InBitssLB") - OutBitssLB = __UI_GetID("OutBitssLB") - TimeLB = __UI_GetID("TimeLB") - rtmp_nacceptedLB = __UI_GetID("rtmp_nacceptedLB") - rtmp_codec_nclientsLB = __UI_GetID("rtmp_codec_nclientsLB") - rtmp_codec_videoLB = __UI_GetID("rtmp_codec_videoLB") - rtmp_codec_audioLB = __UI_GetID("rtmp_codec_audioLB") - rtmp_bytes_inLB = __UI_GetID("rtmp_bytes_inLB") - rtmp_bytes_outLB = __UI_GetID("rtmp_bytes_outLB") - rtmp_bw_inLB = __UI_GetID("rtmp_bw_inLB") - rtmp_bw_outLB = __UI_GetID("rtmp_bw_outLB") - rtmp_uptimeLB = __UI_GetID("rtmp_uptimeLB") - InBytesDifferenceLB = __UI_GetID("InBytesDifferenceLB") StreamFailTimerLB = __UI_GetID("StreamFailTimerLB") FailCountLB = __UI_GetID("FailCountLB") ServerPingLB = __UI_GetID("ServerPingLB") UpdateIntervalLB = __UI_GetID("UpdateIntervalLB") - Kb_DiffLB = __UI_GetID("Kb_DiffLB") Timer_FailLB = __UI_GetID("Timer_FailLB") Timer_Fail_CountLB = __UI_GetID("Timer_Fail_CountLB") tPingOutLB = __UI_GetID("tPingOutLB") td_updateLB = __UI_GetID("td_updateLB") - BandwidthThresholdLB = __UI_GetID("BandwidthThresholdLB") StreamFailDelayLB = __UI_GetID("StreamFailDelayLB") MultiCameraSwitchLB = __UI_GetID("MultiCameraSwitchLB") - Bandwidth_ThresholdLB = __UI_GetID("Bandwidth_ThresholdLB") Stream_Fail_DelayLB = __UI_GetID("Stream_Fail_DelayLB") MultiCameraSwitchStatusLB = __UI_GetID("MultiCameraSwitchStatusLB") TimerLB = __UI_GetID("TimerLB") @@ -839,19 +534,15 @@ SUB __UI_AssignIDs mouseXLB = __UI_GetID("mouseXLB") mouseYLB = __UI_GetID("mouseYLB") __ERRORLINELB = __UI_GetID("__ERRORLINELB") - InBytesLB2 = __UI_GetID("InBytesLB2") - InBytesDifferenceLB2 = __UI_GetID("InBytesDifferenceLB2") + StreamUptimeLB = __UI_GetID("StreamUptimeLB") failLB = __UI_GetID("failLB") - multiStream1LB = __UI_GetID("multiStream1LB") - Kb_Diff_stream1LB = __UI_GetID("Kb_Diff_stream1LB") + Uptime_Stream_1LB = __UI_GetID("Uptime_Stream_1LB") Timer_Fail_Stream1LB = __UI_GetID("Timer_Fail_Stream1LB") Scene_CurrentLB = __UI_GetID("Scene_CurrentLB") PictureBox1 = __UI_GetID("PictureBox1") - InBytesLB3 = __UI_GetID("InBytesLB3") - InBytesDifferenceLB3 = __UI_GetID("InBytesDifferenceLB3") + StreamUptimeLB2 = __UI_GetID("StreamUptimeLB2") failLB2 = __UI_GetID("failLB2") - multiStream2LB = __UI_GetID("multiStream2LB") - Kb_Diff_stream2LB = __UI_GetID("Kb_Diff_stream2LB") + Uptime_Stream_2LB = __UI_GetID("Uptime_Stream_2LB") Timer_Fail_Stream2LB = __UI_GetID("Timer_Fail_Stream2LB") OptionsMenuDebug = __UI_GetID("OptionsMenuDebug") HelpMenuVisitWebsite = __UI_GetID("HelpMenuVisitWebsite") @@ -861,6 +552,4 @@ SUB __UI_AssignIDs HelpMenuAbout = __UI_GetID("HelpMenuAbout") StatusLB = __UI_GetID("StatusLB") PictureBoxLogoBottom = __UI_GetID("PictureBoxLogoBottom") - OBSRemoteLB = __UI_GetID("OBSRemoteLB") - OBS_RemoteLB = __UI_GetID("OBS_RemoteLB") END SUB diff --git a/source/readme_InForm.txt b/source/readme_InForm.txt index e43837e..e1e9392 100644 --- a/source/readme_InForm.txt +++ b/source/readme_InForm.txt @@ -12,8 +12,5 @@ ADD BEFORE: COLOR _RGB32(254,254,255) FIND: 'This.Canvas holds the children controls' images ADD BEFORE: _SETALPHA 16, _RGB(0, 0, 0) TO _RGB(255, 255, 255), ControlImage -FIND: __UI_LoadForm -REPLACE W/: IF INSTR(COMMAND$, "-light") THEN __UI_LoadForm_Light ELSE __UI_LoadForm - FIND: IF FPS >= 30 THEN REPLACE W/: IF FPS >= 15 THEN