{"id":330471,"date":"2022-03-10T09:00:58","date_gmt":"2022-03-10T09:00:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330471"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330471","title":{"rendered":"<span>\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a IP \u043a\u0430\u043c\u0435\u0440\u0430\u043c. \u0427\u0430\u0441\u0442\u044c 2. \u041c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/if\/e5\/-a\/ife5-az-pqoaz_xuwphyjdsui50.png\" data-src=\"https:\/\/habrastorage.org\/webt\/if\/e5\/-a\/ife5-az-pqoaz_xuwphyjdsui50.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/597363\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c <a href=\"https:\/\/github.com\/vladpen\/python-rtsp-server\" rel=\"nofollow noopener noreferrer\">\u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u043c\u0435\u0440\u0430\u043c\u0438 \u0432\u0438\u0434\u0435\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f, \u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 RTSP \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 VLC, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c. \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 \u0430\u043d\u0434\u0440\u043e\u0438\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043e\u0445\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043c\u0435\u0440. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/vladpen\/cams.git\" rel=\"nofollow noopener noreferrer\">github<\/a>. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c apk \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/vladpen\/cams\/blob\/main\/app\/release\/app-release.apk\" rel=\"nofollow noopener noreferrer\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a> \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043c \u0432\u0441\u0435\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0434\u043e \u043a\u0430\u043c\u0435\u0440, \u043d\u043e \u0425\u0430\u0431\u0440 \u0432\u0435\u0434\u044c \u043d\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438, \u0432\u0435\u0440\u043d\u043e?<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043a\u043e\u0434\u0435\u043a H.265, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u0431\u044b\u043b \u043e\u0447\u0435\u043d\u044c \u043d\u0443\u0436\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443.<\/p>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043c\u043e\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2013 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0441 \u00ab\u0441\u0435\u0440\u044b\u043c\u00bb IP \u0430\u0434\u0435\u0441\u043e\u043c, \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439, \u0441 \u00ab\u0431\u0435\u043b\u044b\u043c\u00bb IP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u0430\u043c\u0435\u0440\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 TCP. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0434\u043d\u043e \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u2013 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044f\u0432\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f TCP\/UDP. \u0422\u0430\u043a\u043e\u0439 \u0440\u043e\u0441\u043a\u043e\u0448\u0438 \u0432 VLC \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u044b\u0432\u0448\u0438\u0441\u044c \u0432 \u043f\u043b\u0435\u0439 \u0441\u0442\u043e\u0440\u0435 \u0438 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0442\u043e\u043b\u043a\u0430, \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u043f\u0438\u0445\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043c\u043d\u0435 \u0440\u0435\u043a\u043b\u0430\u043c\u0443, \u0432\u044b\u043a\u043b\u044f\u043d\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0434\u0435\u043d\u044c\u0433\u0438 \u0437\u0430 \u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0441\u0435\u043c \u043c\u044b\u0441\u043b\u0438\u043c\u044b\u043c \u0438 \u043d\u0435\u043c\u044b\u0441\u043b\u0438\u043c\u044b\u043c \u0430\u043a\u0442\u0438\u0432\u0430\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u0431\u043e\u0434\u0440\u043e \u0441\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043c\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u0434\u0440\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0432 \u043f\u0443\u0447\u0438\u043d\u044b \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"liricheskoe-otstuplenie-o-vybore-platformy\">\u041b\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u044b\u0431\u043e\u0440\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b<\/h3>\n<p>  <\/p>\n<p>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0436\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u0432\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, JetBrains \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 Kotlin Multiplatform Mobile. \u041d\u0430\u0434\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c! \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e \u043f\u043b\u0430\u0433\u0438\u043d KMM \u0432 Android Studio, \u0441\u043e\u0437\u0434\u0430\u044e \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u041b\u0430\u0434\u043d\u043e, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 shared \u0445\u043e\u0442\u044f \u0431\u044b \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b? \u041d\u0435\u0442, \u0431\u0435\u0437 \u0442\u0430\u043d\u0446\u0435\u0432 \u0441 \u0431\u0443\u0431\u043d\u043e\u043c \u043d\u0435\u043b\u044c\u0437\u044f. \u0410 \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 iOS? \u0414\u0430 \u043d\u0438\u043a\u0430\u043a, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u0430 iOS. \u0410 \u0435\u0441\u043b\u0438 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u0442\u0440\u0430\u043d\u0435, \u0433\u0434\u0435 \u044f \u0436\u0438\u0432\u0443, \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u0438 Apple \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0443\u043c\u0430\u043d\u043d\u043e, \u0441\u043c\u044b\u0441\u043b \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0420\u0435\u0448\u0435\u043d\u043e: \u0431\u0443\u0434\u0443 \u0447\u0435\u0441\u0442\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u043d\u0430 \u0435\u0433\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u2014 \u043a\u043e\u0442\u043b\u0438\u043d\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"realizaciya\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u044f (\u043f\u043e\u043a\u0430) \u043d\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0438 \u0433\u0440\u0430\u0444 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438. \u0423 \u043c\u0435\u043d\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u044d\u043a\u0440\u0430\u043d\u0430: \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u043c\u0435\u0440, \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u044d\u043a\u0440\u0430\u043d \u0432\u0438\u0434\u0435\u043e:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/2l\/ft\/ex\/2lftexmyzmn1etpbbbl1ynyyqyu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/2l\/ft\/ex\/2lftexmyzmn1etpbbbl1ynyyqyu.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 libvlc, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 gson. \u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f view binding, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u0435\u0439 viewBinding true \u0432 \u0444\u0430\u0439\u043b\u0435 build.gradle \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">build.gradle<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">plugins {     id 'com.android.application'     id 'org.jetbrains.kotlin.android' }  android {     compileSdk 32      defaultConfig {         applicationId \"com.vladpen.cams\"         minSdk 23         targetSdk 32         versionCode 1         versionName \"1.0\"          testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"     }      buildTypes {         release {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'         }     }     compileOptions {         sourceCompatibility JavaVersion.VERSION_1_8         targetCompatibility JavaVersion.VERSION_1_8     }     kotlinOptions {         jvmTarget = '1.8'     }     buildFeatures {         viewBinding true     }     packagingOptions {         jniLibs {             useLegacyPackaging = true         }     } }  dependencies {      implementation 'androidx.core:core-ktx:1.7.0'     implementation 'androidx.appcompat:appcompat:1.4.1'     implementation 'com.google.android.material:material:1.5.0'      implementation 'com.google.code.gson:gson:2.8.6'     implementation 'org.videolan.android:libvlc-all:3.4.9'      testImplementation 'junit:junit:4.13.2'     androidTestImplementation 'androidx.test.ext:junit:1.1.3'     androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0412 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435, \u043f\u043e\u043c\u0438\u043c\u043e \u0442\u0440\u0435\u0445 activity, \u043d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0442\u0438 android.permission.INTERNET:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">AndroidManifest.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;manifest xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     package=\"com.vladpen.cams\">      &lt;uses-permission android:name=\"android.permission.INTERNET\" \/>      &lt;application         android:allowBackup=\"true\"         android:icon=\"@mipmap\/ic_launcher\"         android:label=\"@string\/app_name\"         android:roundIcon=\"@mipmap\/ic_launcher_round\"         android:supportsRtl=\"true\"         android:theme=\"@style\/AppTheme\">          &lt;activity             android:name=\".MainActivity\"             android:exported=\"true\">             &lt;intent-filter>                 &lt;action android:name=\"android.intent.action.MAIN\" \/>                 &lt;category android:name=\"android.intent.category.LAUNCHER\" \/>             &lt;\/intent-filter>         &lt;\/activity>         &lt;activity             android:name=\".EditActivity\"             android:exported=\"false\" \/>         &lt;activity             android:name=\".VideoActivity\"             android:configChanges=\"orientation|screenSize|screenLayout|keyboardHidden\"             android:exported=\"false\" \/>      &lt;\/application>  &lt;\/manifest><\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (MainActivity) \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u043c\u0435\u0440 recyclerView \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\/\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">MainActivity.kt<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">package com.vladpen.cams  import android.content.Intent import android.os.Bundle import android.view.View import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.LinearLayoutManager import com.vladpen.StreamData import com.vladpen.StreamsAdapter import com.vladpen.cams.databinding.ActivityMainBinding  class MainActivity: AppCompatActivity() {     private val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }     private val streams by lazy { StreamData.getStreams(this) }      override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContentView(binding.root)         initActivity()     }      private fun initActivity() {         binding.recyclerView.layoutManager = LinearLayoutManager(this)         binding.recyclerView.adapter = StreamsAdapter(streams)          binding.toolbar.btnBack.visibility = View.GONE         binding.toolbar.tvToolbarLabel.text = getString(R.string.app_name)         binding.toolbar.tvToolbarLink.text = getString(R.string.add)         binding.toolbar.tvToolbarLink.visibility = View.VISIBLE         binding.toolbar.tvToolbarLink.setOnClickListener {             editScreen()         }     }      private fun editScreen() {         val editIntent = Intent(this, EditActivity::class.java)         editIntent.putExtra(\"id\", -1)         startActivity(editIntent)     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">activity_main.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"     xmlns:tools=\"http:\/\/schemas.android.com\/tools\"     android:layout_width=\"match_parent\"     android:layout_height=\"match_parent\">      &lt;include android:id=\"@+id\/toolbar\" layout=\"@layout\/toolbar\" \/>      &lt;androidx.recyclerview.widget.RecyclerView         android:id=\"@+id\/recyclerView\"         android:layout_width=\"match_parent\"         android:layout_height=\"wrap_content\"         android:textColor=\"@color\/text\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/toolbar\"         tools:listitem=\"@layout\/stream_item\" \/>  &lt;\/androidx.constraintlayout.widget.ConstraintLayout><\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b recyclerView \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0434\u0430\u043f\u0442\u0435\u0440:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">StreamsAdapter.kt<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">package com.vladpen  import android.content.Context import android.content.Intent import android.content.Intent.FLAG_ACTIVITY_NEW_TASK import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.vladpen.cams.VideoActivity import com.vladpen.cams.EditActivity import com.vladpen.cams.databinding.StreamItemBinding  class StreamsAdapter(private val dataSet: List&lt;StreamDataModel>) :     RecyclerView.Adapter&lt;StreamsAdapter.StreamHolder>() {      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StreamHolder {         val binding = StreamItemBinding.inflate(LayoutInflater.from(parent.context), parent, false)         return StreamHolder(parent.context, binding)     }      override fun onBindViewHolder(holder: StreamHolder, position: Int) {         val row: StreamDataModel = dataSet[position]         holder.bind(position, row)     }      override fun getItemCount(): Int = dataSet.size      inner class StreamHolder(private val context: Context, private val binding: StreamItemBinding) :         RecyclerView.ViewHolder(binding.root) {         fun bind(position: Int, row: StreamDataModel) {             with(binding) {                 tvStreamName.text = row.name                 tvStreamName.setOnClickListener {                     val intent = Intent(context, VideoActivity::class.java)                     navigate(context, intent, position)                 }                 btnEdit.setOnClickListener {                     val intent = Intent(context, EditActivity::class.java)                     navigate(context, intent, position)                 }             }         }     }      private fun navigate(context: Context, intent: Intent,  position: Int) {         intent.setFlags(FLAG_ACTIVITY_NEW_TASK).putExtra(\"position\", position)         context.startActivity(intent)     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">stream_item.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;androidx.constraintlayout.widget.ConstraintLayout     xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"     android:layout_width=\"match_parent\"     android:layout_height=\"wrap_content\">      &lt;TextView         android:id=\"@+id\/tvStreamName\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:text=\"\"         android:textSize=\"20sp\"         android:padding=\"16dp\"         android:textColor=\"@color\/text\"         android:background=\"?attr\/selectableItemBackground\"         app:layout_constraintBottom_toBottomOf=\"parent\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintTop_toTopOf=\"parent\" \/>      &lt;ImageButton         android:id=\"@+id\/btnEdit\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:background=\"@color\/background\"         android:foreground=\"?android:attr\/selectableItemBackground\"         android:contentDescription=\"@string\/settings\"         android:padding=\"10dp\"         android:src=\"@drawable\/ic_baseline_settings_24\"         app:tint=\"@color\/hint\"         app:layout_constraintBottom_toBottomOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toTopOf=\"parent\" \/>  &lt;\/androidx.constraintlayout.widget.ConstraintLayout><\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0417\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d StreamData, \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 data class StreamDataModel:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">StreamData.kt<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">package com.vladpen  import android.content.Context import android.util.Log import com.google.gson.Gson import com.google.gson.reflect.TypeToken import java.io.File  data class StreamDataModel(val name: String, val url: String, val tcp: Boolean)  object StreamData {     private const val fileName = \"streams.json\"     private var streams = mutableListOf&lt;StreamDataModel>()      fun save(context: Context, position: Int, stream: StreamDataModel) {         if (position &lt; 0) {             streams.add(stream)         } else {             streams[position] = stream         }         streams.sortBy { it.name }         write(context)     }      fun delete(context: Context, position: Int) {         if (position &lt; 0) {             return         }         streams.removeAt(position)         write(context)     }      private fun write(context: Context) {         val json = Gson().toJson(streams)          context.openFileOutput(fileName, Context.MODE_PRIVATE).use {             it.write(json.toByteArray())         }     }      fun getStreams(context: Context): MutableList&lt;StreamDataModel> {         if (streams.size == 0) {             try {                 val filesDir = context.filesDir                  if (File(filesDir, fileName).exists()) {                     val json: String = File(filesDir, fileName).readText()                     initStreams(json)                 } else {                     Log.i(\"DATA\", \"Data file $fileName does not exist\")                 }             } catch (e: Exception) {                 Log.e(\"Data\", e.localizedMessage ?: \"Can't read data file $fileName\")             }         }         return streams     }      fun getByPosition(position: Int): StreamDataModel? {         if (position &lt; 0 || position >= streams.count()) {             return null         }         return streams[position]     }      private fun initStreams(json: String) {         if (json == \"\") {             return         }         val listType = object : TypeToken&lt;List&lt;StreamDataModel>>() { }.type         streams = Gson().fromJson&lt;List&lt;StreamDataModel>>(json, listType).toMutableList()     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041a\u0430\u043c\u0435\u0440\u044b (streams) \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 mutableList, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u0430\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 (position).<\/p>\n<p>  <\/p>\n<p>\u042d\u043a\u0440\u0430\u043d \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043a\u0430\u043c\u0435\u0440 (EditActivity) \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 streams:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">EditActivity.kt<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">package com.vladpen.cams  import android.content.Intent import android.os.Bundle import android.view.View import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import com.vladpen.StreamData import com.vladpen.StreamDataModel import com.vladpen.cams.databinding.ActivityEditBinding  class EditActivity : AppCompatActivity() {     private val binding by lazy { ActivityEditBinding.inflate(layoutInflater) }     private val streams by lazy { StreamData.getStreams(this) }     private var position: Int = -1      override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContentView(binding.root)         initActivity()     }      private fun initActivity() {         position = intent.getIntExtra(\"position\", -1)          val stream = StreamData.getByPosition(position)         if (stream == null) {             position = -1             binding.toolbar.tvToolbarLabel.text = getString(R.string.cam_add)         } else {             binding.toolbar.tvToolbarLabel.text = stream.name              binding.etEditName.setText(stream.name)             binding.etEditUrl.setText(stream.url)             binding.scEditTcp.isChecked = !stream.tcp              binding.tvDeleteLink.visibility = View.VISIBLE             binding.tvDeleteLink.setOnClickListener {                 delete()             }         }         binding.btnSave.setOnClickListener {             save()         }         binding.toolbar.btnBack.setOnClickListener {             back()         }     }      private fun save() {         if (!validate()) {             return         }         StreamData.save(this, position, StreamDataModel(             binding.etEditName.text.toString().trim(),             binding.etEditUrl.text.toString().trim(),             !binding.scEditTcp.isChecked         ))         back()     }      private fun validate(): Boolean {         val name = binding.etEditName.text.toString().trim()         val url = binding.etEditUrl.text.toString().trim()         var ok = true          if (name.isEmpty() || name.length > 255) {             binding.etEditName.error = getString(R.string.err_invalid)             ok = false         }         if (url.isEmpty() || url.length > 255) {             binding.etEditUrl.error = getString(R.string.err_invalid)             ok = false         }         for (i in streams.indices) {             if (i == position) {                 break             }             if (streams[i].name == name) {                 binding.etEditName.error = getString(R.string.err_cam_exists)                 ok = false             }             if (streams[i].name == url) {                 binding.etEditUrl.error = getString(R.string.err_cam_exists)                 ok = false             }         }         return ok     }      private fun delete() {         AlertDialog.Builder(this)             .setMessage(R.string.cam_delete)             .setPositiveButton(R.string.delete) { _, _ ->                 StreamData.delete(this, position)                 back()             }             .setNegativeButton(R.string.cancel) { dialog, _ ->                 dialog.dismiss()             }             .create().show()     }      private fun back() {         startActivity(Intent(this, MainActivity::class.java))     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">activity_edit.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;androidx.constraintlayout.widget.ConstraintLayout     xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"     android:layout_width=\"match_parent\"     android:layout_height=\"match_parent\">      &lt;include android:id=\"@+id\/toolbar\" layout=\"@layout\/toolbar\"\/>      &lt;TextView         android:id=\"@+id\/tvHintName\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:text=\"@string\/cam_name\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/toolbar\" \/>      &lt;EditText         android:id=\"@+id\/etEditName\"         android:layout_width=\"match_parent\"         android:layout_height=\"wrap_content\"         android:inputType=\"text\"         android:hint=\"@string\/cam_name_hint\"         android:autofillHints=\"\"         android:gravity=\"center\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/tvHintName\" \/>      &lt;TextView         android:id=\"@+id\/tvHintUrl\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:text=\"@string\/cam_url\"         android:layout_marginTop=\"16dp\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/etEditName\" \/>      &lt;EditText         android:id=\"@+id\/etEditUrl\"         android:layout_width=\"match_parent\"         android:layout_height=\"wrap_content\"         android:inputType=\"textUri\"         android:hint=\"@string\/cam_url_hint\"         android:autofillHints=\"\"         android:gravity=\"center\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/tvHintUrl\" \/>      &lt;androidx.appcompat.widget.SwitchCompat         android:id=\"@+id\/scEditTcp\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:layout_marginTop=\"16dp\"         android:text=\"@string\/cam_tcp_udp\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/etEditUrl\" \/>      &lt;Button         android:id=\"@+id\/btnSave\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:layout_marginTop=\"16dp\"         android:padding=\"10dp\"         android:text=\"@string\/save\"         android:background=\"@color\/buttonBackground\"         android:foreground=\"?android:attr\/selectableItemBackground\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/scEditTcp\" \/>      &lt;TextView         android:id=\"@+id\/tvDeleteLink\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:text=\"@string\/delete\"         android:layout_marginTop=\"18dp\"         android:padding=\"10dp\"         android:textColor=\"@color\/error\"         android:clickable=\"true\"         android:focusable=\"true\"         android:background=\"?attr\/selectableItemBackground\"         android:visibility=\"gone\"         app:layout_constraintEnd_toEndOf=\"parent\"         app:layout_constraintTop_toBottomOf=\"@+id\/scEditTcp\" \/>  &lt;\/androidx.constraintlayout.widget.ConstraintLayout><\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u042d\u043a\u0440\u0430\u043d \u0432\u0438\u0434\u0435\u043e (VideoActivity) \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043f\u043b\u0435\u0435\u0440 (MediaPlayer(libVlc)) \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b &#8212;rtsp-tcp \u0438 network-caching. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043e\u043f\u0446\u0438\u0439, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043b\u0435\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u00ab\u0445\u043e\u0440\u043e\u0448\u043e\u00bb. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 network-caching \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043e \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043d\u0438\u0437\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a\u0430, \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u0435\u0440\u0435\u0434 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">VideoActivity.kt<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">package com.vladpen.cams  import android.content.Intent import android.net.Uri import android.os.Bundle import android.view.* import android.view.ScaleGestureDetector.SimpleOnScaleGestureListener import androidx.appcompat.app.AppCompatActivity import com.vladpen.StreamData import com.vladpen.cams.databinding.ActivityVideoBinding import org.videolan.libvlc.LibVLC import org.videolan.libvlc.Media import org.videolan.libvlc.MediaPlayer import org.videolan.libvlc.util.VLCVideoLayout import java.io.IOException import kotlin.math.max import kotlin.math.min  class VideoActivity : AppCompatActivity(), MediaPlayer.EventListener {     private val binding by lazy { ActivityVideoBinding.inflate(layoutInflater) }      private lateinit var libVlc: LibVLC     private lateinit var mediaPlayer: MediaPlayer     private lateinit var videoLayout: VLCVideoLayout     private lateinit var scaleGestureDetector: ScaleGestureDetector     private var scaleFactor = 1.0f      private var position: Int = -1      override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContentView(binding.root)         initActivity()     }      private fun initActivity() {         position = intent.getIntExtra(\"position\", -1)          val stream = StreamData.getByPosition(position)         if (stream == null) {             position = -1             return         }          binding.toolbar.tvToolbarLabel.text = stream.name         binding.toolbar.btnBack.setOnClickListener {             val mainIntent = Intent(this, MainActivity::class.java)             startActivity(mainIntent)         }          videoLayout = binding.videoLayout          libVlc = LibVLC(this, ArrayList&lt;String>().apply {             if (stream.tcp) {                 add(\"--rtsp-tcp\")             }         })         mediaPlayer = MediaPlayer(libVlc)         mediaPlayer.setEventListener(this)          mediaPlayer.attachViews(videoLayout, null, false, false)          try {             val uri = Uri.parse(stream.url)             Media(libVlc, uri).apply {                 setHWDecoderEnabled(true, false)                 addOption(\":network-caching=150\")                 mediaPlayer.media = this             }.release()              mediaPlayer.play()          } catch (e: IOException) {             e.printStackTrace()         }         scaleGestureDetector = ScaleGestureDetector(this, ScaleListener())     }      override fun onStop() {         super.onStop()         mediaPlayer.stop()         mediaPlayer.detachViews()     }      override fun onDestroy() {         super.onDestroy()         mediaPlayer.release()         libVlc.release()     }      override fun onEvent(ev: MediaPlayer.Event) {         if (ev.type == MediaPlayer.Event.Buffering &amp;&amp; ev.buffering == 100f) {             binding.pbLoading.visibility = View.GONE         }     }      override fun onTouchEvent(ev: MotionEvent): Boolean {         \/\/ Let the ScaleGestureDetector inspect all events.         scaleGestureDetector.onTouchEvent(ev)         return true     }      inner class ScaleListener : SimpleOnScaleGestureListener() {         override fun onScale(scaleGestureDetector: ScaleGestureDetector): Boolean {             scaleFactor *= scaleGestureDetector.scaleFactor             scaleFactor = max(1f, min(scaleFactor, 10.0f))             videoLayout.scaleX = scaleFactor             videoLayout.scaleY = scaleFactor             return true         }     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">activity_video.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;androidx.constraintlayout.widget.ConstraintLayout     xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"     xmlns:tools=\"http:\/\/schemas.android.com\/tools\"     android:layout_width=\"match_parent\"     android:layout_height=\"match_parent\"     tools:context=\".VideoActivity\">      &lt;org.videolan.libvlc.util.VLCVideoLayout         android:id=\"@+id\/videoLayout\"         android:layout_width=\"match_parent\"         android:layout_height=\"wrap_content\"         app:layout_constraintTop_toTopOf=\"parent\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintBottom_toBottomOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\" \/>      &lt;ProgressBar         android:id=\"@+id\/pbLoading\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:indeterminate=\"true\"         app:layout_constraintTop_toTopOf=\"parent\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintBottom_toBottomOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\" \/>      &lt;include android:id=\"@+id\/toolbar\" layout=\"@layout\/toolbar\"\/>  &lt;\/androidx.constraintlayout.widget.ConstraintLayout><\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u042d\u043a\u0440\u0430\u043d \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 (implements) \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 MediaPlayer.EventListener, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (pbLoading) \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u0430. \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 ScaleListener \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0436\u0435\u0441\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00abpinch zoom\u00bb.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u044f \u0432\u044b\u043d\u0435\u0441 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0439 \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u043e\u0439 include:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">toolbar.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;androidx.constraintlayout.widget.ConstraintLayout     xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"     android:id=\"@+id\/toolbar\"     android:layout_width=\"match_parent\"     android:layout_height=\"wrap_content\"     android:background=\"@color\/overlay_background\">      &lt;ImageButton         android:id=\"@+id\/btnBack\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:background=\"@color\/transparent_background\"         android:foreground=\"?android:attr\/selectableItemBackground\"         android:padding=\"10dp\"         android:src=\"@drawable\/ic_baseline_arrow_back_24\"         android:contentDescription=\"@string\/back\"         app:layout_constraintStart_toStartOf=\"parent\"         app:layout_constraintTop_toTopOf=\"parent\"         app:layout_constraintBottom_toBottomOf=\"parent\" \/>      &lt;TextView         android:id=\"@+id\/tvToolbarLabel\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:layout_marginStart=\"16dp\"         android:textColor=\"@android:color\/white\"         android:textSize=\"20sp\"         android:textStyle=\"bold\"         app:layout_constraintBottom_toBottomOf=\"parent\"         app:layout_constraintStart_toEndOf=\"@+id\/btnBack\"         app:layout_constraintTop_toTopOf=\"parent\" \/>      &lt;TextView         android:id=\"@+id\/tvToolbarLink\"         android:layout_width=\"wrap_content\"         android:layout_height=\"wrap_content\"         android:padding=\"10dp\"         android:layout_marginEnd=\"6dp\"         android:textColor=\"@color\/hint\"         android:clickable=\"true\"         android:focusable=\"true\"         android:background=\"?attr\/selectableItemBackground\"         android:visibility=\"gone\"         app:layout_constraintTop_toTopOf=\"parent\"         app:layout_constraintBottom_toBottomOf=\"parent\"         app:layout_constraintEnd_toEndOf=\"parent\" \/>  &lt;\/androidx.constraintlayout.widget.ConstraintLayout><\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0435\u0441\u043b\u0438 \u043d\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0442\u043e, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0435\u0440\u0435, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u043c \u043a \u044d\u0442\u043e\u043c\u0443:)<\/p>\n<p>  <\/p>\n<h3 id=\"sborka\">\u0421\u0431\u043e\u0440\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u0425\u043e\u0442\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 (\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libvlc-all \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/xn\/fo\/qa\/xnfoqadey1vl9sxdfrvgfyq0nsa.png\" data-src=\"https:\/\/habrastorage.org\/webt\/xn\/fo\/qa\/xnfoqadey1vl9sxdfrvgfyq0nsa.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 19 \u041c\u0411 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430. \u0422\u0430\u043a\u043e\u0432\u0430 \u0446\u0435\u043d\u0430 \u00ab\u0432\u0441\u0435\u044f\u0434\u043d\u043e\u0441\u0442\u0438\u00bb VLC, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438 \u0432\u0435\u0437\u0434\u0435 \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"todo\">TODO<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0432 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0435 \u0432\u043e\u0448\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0443. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 \u0447\u0435\u0440\u0435\u0437 SFTP.<\/p>\n<p>  <\/p>\n<h3 id=\"vmesto-zaklyucheniya\">\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0437\u0430\u043c\u0435\u0449\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043c\u0438\u043b\u0438\u0442\u0430\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 (\u0447\u0438\u0442\u0430\u0439\u0442\u0435: \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439) \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041e\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u0437\u044f\u043b \u043d\u0430 \u0441\u0435\u0431\u044f \u0441\u043c\u0435\u043b\u043e\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u0434\u0435\u0441\u044c, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043c\u043e\u0436\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>P.S. \u0412\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e, \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e. \u0417\u0430\u0442\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u2013 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/654915\/\"> https:\/\/habr.com\/ru\/post\/654915\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/if\/e5\/-a\/ife5-az-pqoaz_xuwphyjdsui50.png\" data-src=\"https:\/\/habrastorage.org\/webt\/if\/e5\/-a\/ife5-az-pqoaz_xuwphyjdsui50.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/597363\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c <a href=\"https:\/\/github.com\/vladpen\/python-rtsp-server\" rel=\"nofollow noopener noreferrer\">\u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u043c\u0435\u0440\u0430\u043c\u0438 \u0432\u0438\u0434\u0435\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f, \u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 RTSP \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 VLC, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c. \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 \u0430\u043d\u0434\u0440\u043e\u0438\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043e\u0445\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043c\u0435\u0440. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/vladpen\/cams.git\" rel=\"nofollow noopener noreferrer\">github<\/a>. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c apk \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/vladpen\/cams\/blob\/main\/app\/release\/app-release.apk\" rel=\"nofollow noopener noreferrer\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a> \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043c \u0432\u0441\u0435\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0434\u043e \u043a\u0430\u043c\u0435\u0440, \u043d\u043e \u0425\u0430\u0431\u0440 \u0432\u0435\u0434\u044c \u043d\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438, \u0432\u0435\u0440\u043d\u043e?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-330471","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330471"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330471\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}