{"id":4882,"date":"2024-08-01T22:48:54","date_gmt":"2024-08-01T14:48:54","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=4882"},"modified":"2024-08-01T22:48:54","modified_gmt":"2024-08-01T14:48:54","slug":"java-%e6%b5%81%e5%aa%92%e4%bd%93%e6%9c%8d%e5%8a%a1%e6%a1%86%e6%9e%b6-zlm4j-%e5%8f%91%e5%b8%83-1-0-8-%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/java\/java-%e6%b5%81%e5%aa%92%e4%bd%93%e6%9c%8d%e5%8a%a1%e6%a1%86%e6%9e%b6-zlm4j-%e5%8f%91%e5%b8%83-1-0-8-%e7%89%88%e6%9c%ac\/","title":{"rendered":"Java \u6d41\u5a92\u4f53\u670d\u52a1\u6846\u67b6 ZLM4J \u53d1\u5e03 1.0.8 \u7248\u672c"},"content":{"rendered":"<div class='wxsyncmain'>\n<h1 style=\"box-sizing: inherit;font-size: 26px;margin-bottom: 16px;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;font-weight: 600;min-height: 1rem;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">\u6d41\u5a92\u4f53\u670d\u52a1\u6846\u67b6 ZLM4J \u53d1\u5e03 1.0.8 \u7248\u672c<\/span><\/h1>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;font-weight: 700;\">\ud83d\udd25\ud83d\udd25\ud83d\udd25ZLM4J \u6253\u9020\u5c5e\u4e8e Java \u7684\u6d41\u5a92\u4f53\u751f\u6001\u6846\u67b6\uff0c\u6253\u901a\u76f4\u64ad\u534f\u8bae\u6808\u3001\u89c6\u9891\u76d1\u63a7\u534f\u8bae\u6808\u3001\u5b9e\u65f6\u97f3\u89c6\u9891\u534f\u8bae\u6808\uff0c\u662f\u60a8\u4e8c\u5f00\u6d41\u5a92\u4f53\u4e0d\u4e8c\u7684\u9009\u62e9\u3002<\/span><\/p>\n<h2 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 24px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">\ud83c\udf1f\u53d1\u5e03 1.0.8\uff08\u5df2\u4e0a\u4f20\u5230\u4e2d\u592e\u4ed3\u5e93\u65e0\u9700\u81ea\u5df1\u7f16\u8bd1\uff01\uff09<\/span><\/h2>\n<ul style=\"box-sizing: inherit;margin-bottom: 20px;padding-left: 20px;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\" class=\"list-paddingleft-1\">\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u5f00\u6e90\u5730\u5740\uff1a<span style=\"box-sizing: inherit;color: rgb(204, 204, 204);\">https:\/\/gitee.com\/aizuda\/zlm4j<\/span><\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u4f7f\u7528\u6587\u6863\uff1a<span style=\"box-sizing: inherit;color: rgb(204, 204, 204);\">https:\/\/ux5phie02ut.feishu.cn\/wiki\/NA2ywJRY2ivALSkPfUycZFM4nUB<\/span><\/p>\n<\/li>\n<\/ul>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;color: rgb(204, 204, 204);\"><\/span><\/p>\n<pre style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13px;word-break: break-word;overflow-wrap: normal;overflow: auto;margin-bottom: 20px;padding: 1em;border-width: initial;border-style: none;border-color: initial;border-radius: 4px;line-height: 1.5;background: rgb(246, 246, 246);color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;\"><code style=\"box-sizing: inherit;font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;border-width: initial;border-style: none;border-color: initial;border-radius: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;overflow: visible;word-break: normal;display: block;line-height: 1.5;\"><span style=\"box-sizing: inherit;\">&lt;<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">dependency<\/span>&gt;<\/span><span style=\"box-sizing: inherit;\">&lt;<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">groupId<\/span>&gt;<\/span>com.aizuda<span style=\"box-sizing: inherit;\">&lt;\/<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">groupId<\/span>&gt;<\/span><span style=\"box-sizing: inherit;\">&lt;<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">artifactId<\/span>&gt;<\/span>zlm4j<span style=\"box-sizing: inherit;\">&lt;\/<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">artifactId<\/span>&gt;<\/span><span style=\"box-sizing: inherit;\">&lt;<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">version<\/span>&gt;<\/span>1.0.8<span style=\"box-sizing: inherit;\">&lt;\/<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">version<\/span>&gt;<\/span><span style=\"box-sizing: inherit;\">&lt;\/<span style=\"box-sizing: inherit;color: rgb(34, 134, 58);\">dependency<\/span>&gt;<\/span><\/code><\/pre>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;font-weight: 700;\">\u7248\u672c 1.0.8 \u66f4\u65b0\u65e5\u5fd7\uff1a<\/span><\/p>\n<ul style=\"box-sizing: inherit;margin-bottom: 20px;padding-left: 20px;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\" class=\"list-paddingleft-1\">\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u62c9\u53d6\u57fa\u4e8e 2024-05-29-master \u5206\u652f\u5f00\u53d1<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u53d1\u5e03 jar \u5230\u4e2d\u592e\u4ed3\u5e93<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u589e\u52a0 mk_proxy_player_create3\uff0cmk_proxy_player_create4 \u51fd\u6570\u914d\u7f6e\u62c9\u6d41\u4ee3\u7406\u91cd\u8bd5\u6b21\u6570<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u5e9f\u5f03<span style=\"box-sizing: inherit;text-decoration:line-through;\"><span style=\"box-sizing: inherit;text-decoration:line-through;\">mk_env_init1<\/span><\/span>\u6539\u4e3a mk_env_init2<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u66f4\u591a\u8bb0\u5f55\u8bf7\u67e5\u770b\uff1a<span style=\"box-sizing: inherit;color: rgb(204, 204, 204);\">\u7248\u672c\u66f4\u65b0\u8bb0\u5f55<\/span><\/p>\n<\/li>\n<\/ul>\n<h2 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 24px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">\u5b9e\u6218\u6253\u901a\u6d77\u5eb7 SDK \u4e0e ZLM4J \u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u5b9e\u65f6\u9884\u89c8\u76d1\u63a7<\/span><\/h2>\n<h3 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 22px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">1. \u9884\u5907\u77e5\u8bc6\u4e0e\u5de5\u5177<\/span><\/h3>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\">\u6d77\u5eb7 SDK\u3001\u6d77\u5eb7 SDK \u5bf9\u63a5\u77e5\u8bc6\u3001\u6d77\u5eb7\u6444\u50cf\u5934 or \u6d77\u5eb7 NVR\u3001ZLM4J\u3001VLC \u64ad\u653e\u5668 \/flv.js \u64ad\u653e\u5668<\/p>\n<h3 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 22px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">2. \u4f7f\u7528\u5230\u7684 ZLM4J \u7684\u529f\u80fd<\/span><\/h3>\n<ul style=\"box-sizing: inherit;margin-bottom: 20px;padding-left: 20px;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\" class=\"list-paddingleft-1\">\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u521b\u5efa\u6d41\u3001\u63a8\u9001\u6d41\u529f\u80fd<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u97f3\u9891\u7f16\u7801\u529f\u80fd<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u62c9\u6d41\u64ad\u653e\u529f\u80fd<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u6309\u9700\u8f6c\u534f\u8bae\u529f\u80fd<\/p>\n<\/li>\n<\/ul>\n<h3 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 22px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">3. \u5bf9\u63a5\u6d41\u7a0b<\/span><\/h3>\n<blockquote style=\"box-sizing: inherit;margin-top: 0px;margin-bottom: 20px;padding: 20px;background-color: rgb(246, 246, 246);border-left-width: 6px;border-left-color: rgb(230, 230, 230);word-break: break-word;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;\">\n<ol style=\"box-sizing: inherit;padding-left: 20px;\" class=\"list-paddingleft-1\">\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u521d\u59cb\u5316\u6d77\u5eb7 SDK \u53ca ZLM4J<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u6d77\u5eb7 SDK \u767b\u5f55\u6444\u50cf\u5934<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u5f00\u542f\u6444\u50cf\u5934\u5b9e\u65f6\u9884\u89c8\u53ca\u914d\u7f6e\u53d6\u6d41\u56de\u8c03<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u521b\u5efa ZLM4J \u5bf9\u5e94\u6d41\u3001\u5e76\u521d\u59cb\u5316\u97f3\u89c6\u9891\u8f68\u9053<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u5728\u56de\u8c03\u7684 ps \u6d41\u4e2d\u53d6\u5230 H264\/H265 \u88f8\u7801\u6d41\u53ca\u97f3\u9891\u6570\u636e\uff0c\u5e76\u5c06\u97f3\u9891\u6570\u636e\u89e3\u7801\u4e3a PCM<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u63a8\u9001\u97f3\u89c6\u9891\u6d41\u5230 ZLM4J \u4e2d<\/p>\n<\/li>\n<li style=\"box-sizing: inherit;line-height: 1.875em;\">\n<p>\u4f7f\u7528 VLC \u64ad\u653e\u5668 \/flv.js \u64ad\u653e\u5668\u64ad\u653e\u5e76\u89c2\u5bdf\u5ef6\u8fdf<\/p>\n<\/li>\n<\/ol>\n<\/blockquote>\n<h3 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 22px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">4. \u76f8\u5173\u4ee3\u7801<\/span><\/h3>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;font-weight: 700;\">1-4 \u6b65\u76f8\u5173\u4ee3\u7801<\/span><\/p>\n<pre style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13px;word-break: break-word;overflow-wrap: normal;overflow: auto;margin-bottom: 20px;padding: 1em;border-width: initial;border-style: none;border-color: initial;border-radius: 4px;line-height: 1.5;background: rgb(246, 246, 246);color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;\"><code style=\"box-sizing: inherit;font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;border-width: initial;border-style: none;border-color: initial;border-radius: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;overflow: visible;word-break: normal;display: block;line-height: 1.5;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">class<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">RealPlayDemo<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">static<\/span> ZLMApi ZLM_API = Native.load(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"mk_api\"<\/span>, ZLMApi<span style=\"box-sizing: inherit;\">.<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">class<\/span>)<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">static<\/span> HCNetSDK hCNetSDK = Native.load(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"HCNetSDK\"<\/span>, HCNetSDK<span style=\"box-sizing: inherit;\">.<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">class<\/span>)<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">static<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> lUserID = <span style=\"box-sizing: inherit;\">0<\/span>;<span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">static<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">main<\/span><span style=\"box-sizing: inherit;\">(String[] args)<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">throws<\/span> InterruptedException <\/span>{<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u521d\u59cb\u5316zmk\u670d\u52a1\u5668<\/span>ZLM_API.mk_env_init2(<span style=\"box-sizing: inherit;\">1<\/span>, <span style=\"box-sizing: inherit;\">1<\/span>, <span style=\"box-sizing: inherit;\">1<\/span>, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">null<\/span>, <span style=\"box-sizing: inherit;\">0<\/span>, <span style=\"box-sizing: inherit;\">0<\/span>, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">null<\/span>, <span style=\"box-sizing: inherit;\">0<\/span>, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">null<\/span>, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">null<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u521b\u5efahttp\u670d\u52a1\u5668 0:\u5931\u8d25,\u975e0:\u7aef\u53e3\u53f7<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span> http_server_port = ZLM_API.mk_http_server_start((<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span>) <span style=\"box-sizing: inherit;\">7788<\/span>, <span style=\"box-sizing: inherit;\">0<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u521b\u5efartsp\u670d\u52a1\u5668 0:\u5931\u8d25,\u975e0:\u7aef\u53e3\u53f7<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span> rtsp_server_port = ZLM_API.mk_rtsp_server_start((<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span>) <span style=\"box-sizing: inherit;\">7554<\/span>, <span style=\"box-sizing: inherit;\">0<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u521b\u5efartmp\u670d\u52a1\u5668 0:\u5931\u8d25,\u975e0:\u7aef\u53e3\u53f7<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span> rtmp_server_port = ZLM_API.mk_rtmp_server_start((<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span>) <span style=\"box-sizing: inherit;\">7935<\/span>, <span style=\"box-sizing: inherit;\">0<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u521d\u59cb\u5316\u6d77\u5eb7SDK<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">boolean<\/span> initSuc = hCNetSDK.NET_DVR_Init();<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (!initSuc) {System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u6d77\u5eb7SDK\u521d\u59cb\u5316\u5931\u8d25\"<\/span>);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">return<\/span>;}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u767b\u5f55\u6d77\u5eb7\u8bbe\u5907<\/span>Login_V40(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"192.168.1.64\"<\/span>, (<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span>) <span style=\"box-sizing: inherit;\">8000<\/span>, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"admin\"<\/span>, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"hk123456\"<\/span>);MK_INI mkIni = ZLM_API.mk_ini_create();ZLM_API.mk_ini_set_option(mkIni, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"enable_rtsp\"<\/span>, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"1\"<\/span>);ZLM_API.mk_ini_set_option(mkIni, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"enable_rtmp\"<\/span>, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"1\"<\/span>);ZLM_API.mk_ini_set_option_int(mkIni, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"auto_close\"<\/span>, <span style=\"box-sizing: inherit;\">1<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u521b\u5efa\u5a92\u4f53<\/span>MK_MEDIA mkMedia = ZLM_API.mk_media_create2(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"defaultVhost\"<\/span>,<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"live\"<\/span>,<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"test\"<\/span>,<span style=\"box-sizing: inherit;\">0<\/span>,mkIni);ZLM_API.mk_ini_release(mkIni);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u8fd9\u91cc\u5206\u8fa8\u7387\u3001\u5e27\u7387\u3001\u7801\u7387\u90fd\u53ef\u968f\u4fbf\u5199 0\u662fH264 1\u662fh265 \u53ef\u4ee5\u4e8b\u5148\u5b9a\u4e49\u597d \u4e5f\u53ef\u4ee5\u653e\u5230\u56de\u8c03\u91cc\u9762\u5224\u65ad\u7f16\u7801\u7c7b\u578b\u8ba9\u540e\u518d\u521d\u59cb\u5316\u8fd9\u4e2a<\/span>ZLM_API.mk_media_init_video(mkMedia, <span style=\"box-sizing: inherit;\">0<\/span>, <span style=\"box-sizing: inherit;\">1<\/span>, <span style=\"box-sizing: inherit;\">1<\/span>, <span style=\"box-sizing: inherit;\">25.0f<\/span>, <span style=\"box-sizing: inherit;\">2500<\/span>);ZLM_API.mk_media_init_audio(mkMedia, <span style=\"box-sizing: inherit;\">2<\/span>, <span style=\"box-sizing: inherit;\">8000<\/span>, <span style=\"box-sizing: inherit;\">1<\/span>, <span style=\"box-sizing: inherit;\">16<\/span>);ZLM_API.mk_media_init_complete(mkMedia);FRealDataCallback fRealDataCallBack = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> FRealDataCallback(mkMedia, <span style=\"box-sizing: inherit;\">25.0<\/span>);HCNetSDK.NET_DVR_PREVIEWINFO netDvrPreviewinfo =<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> HCNetSDK.NET_DVR_PREVIEWINFO();netDvrPreviewinfo.lChannel = <span style=\"box-sizing: inherit;\">1<\/span>;netDvrPreviewinfo.dwStreamType = <span style=\"box-sizing: inherit;\">0<\/span>;netDvrPreviewinfo.bBlocked = <span style=\"box-sizing: inherit;\">0<\/span>;netDvrPreviewinfo.dwLinkMode = <span style=\"box-sizing: inherit;\">0<\/span>;netDvrPreviewinfo.byProtoType = <span style=\"box-sizing: inherit;\">0<\/span>;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u64ad\u653e\u89c6\u9891<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">long<\/span> ret = hCNetSDK.NET_DVR_RealPlay_V40(lUserID,netDvrPreviewinfo,fRealDataCallBack,Pointer.NULL);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (ret == -<span style=\"box-sizing: inherit;\">1<\/span>) {System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u3010\u6d77\u5eb7SDK\u3011\u5f00\u59cbsdk\u64ad\u653e\u89c6\u9891\u5931\u8d25! \u9519\u8bef\u7801\uff1a\"<\/span> +hCNetSDK.NET_DVR_GetLastError());<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">return<\/span>;}ZLM_API.mk_media_set_on_close(mkMedia,pointer -&gt; {fRealDataCallBack.release();hCNetSDK.NET_DVR_StopRealPlay(ret);System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u6d41\u5173\u95ed\u81ea\u52a8\u91ca\u653e\u8d44\u6e90\"<\/span>);},Pointer.NULL);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u4f11\u7720<\/span>Thread.sleep(<span style=\"box-sizing: inherit;\">120000<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ fRealDataCallBack.release();<\/span><span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ hCNetSDK.NET_DVR_StopRealPlay(ret);<\/span>Logout();}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/*** \u767b\u5f55** <span style=\"box-sizing: inherit;\">@param<\/span> m_sDeviceIP \u8bbe\u5907ip\u5730\u5740* <span style=\"box-sizing: inherit;\">@param<\/span> wPort \u7aef\u53e3\u53f7\uff0c\u8bbe\u5907\u7f51\u7edcSDK\u767b\u5f55\u9ed8\u8ba4\u7aef\u53e38000* <span style=\"box-sizing: inherit;\">@param<\/span> m_sUsername \u7528\u6237\u540d* <span style=\"box-sizing: inherit;\">@param<\/span> m_sPassword \u5bc6\u7801*\/<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">static<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">Login_V40<\/span><span style=\"box-sizing: inherit;\">(String m_sDeviceIP,<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">short<\/span> wPort,String m_sUsername,String m_sPassword)<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/* \u6ce8\u518c *\/<\/span><span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ \u8bbe\u5907\u767b\u5f55\u4fe1\u606f<\/span>HCNetSDK.NET_DVR_USER_LOGIN_INFO m_strLoginInfo =<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> HCNetSDK.NET_DVR_USER_LOGIN_INFO();<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ \u8bbe\u5907\u4fe1\u606f<\/span>HCNetSDK.NET_DVR_DEVICEINFO_V40 m_strDeviceInfo =<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> HCNetSDK.NET_DVR_DEVICEINFO_V40();m_strLoginInfo.sDeviceAddress =<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[HCNetSDK.NET_DVR_DEV_ADDRESS_MAX_LEN];System.arraycopy(m_sDeviceIP.getBytes(),<span style=\"box-sizing: inherit;\">0<\/span>,m_strLoginInfo.sDeviceAddress,<span style=\"box-sizing: inherit;\">0<\/span>,m_sDeviceIP.length());m_strLoginInfo.wPort = wPort;m_strLoginInfo.sUserName =<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[HCNetSDK.NET_DVR_LOGIN_USERNAME_MAX_LEN];System.arraycopy(m_sUsername.getBytes(),<span style=\"box-sizing: inherit;\">0<\/span>,m_strLoginInfo.sUserName,<span style=\"box-sizing: inherit;\">0<\/span>,m_sUsername.length());m_strLoginInfo.sPassword = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[HCNetSDK.NET_DVR_LOGIN_PASSWD_MAX_LEN];System.arraycopy(m_sPassword.getBytes(),<span style=\"box-sizing: inherit;\">0<\/span>,m_strLoginInfo.sPassword,<span style=\"box-sizing: inherit;\">0<\/span>,m_sPassword.length());<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ \u662f\u5426\u5f02\u6b65\u767b\u5f55\uff1afalse- \u5426\uff0ctrue- \u662f<\/span>m_strLoginInfo.bUseAsynLogin = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">false<\/span>;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ write()\u8c03\u7528\u540e\u6570\u636e\u624d\u5199\u5165\u5230\u5185\u5b58\u4e2d<\/span>m_strLoginInfo.write();lUserID = hCNetSDK.NET_DVR_Login_V40(m_strLoginInfo, m_strDeviceInfo);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (lUserID == -<span style=\"box-sizing: inherit;\">1<\/span>) {System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u767b\u5f55\u5931\u8d25\uff0c\u9519\u8bef\u7801\u4e3a\"<\/span> + hCNetSDK.NET_DVR_GetLastError());<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">return<\/span>;} <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">else<\/span> {System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u767b\u5f55\u6210\u529f\uff01\"<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ read()\u540e\uff0c\u7ed3\u6784\u4f53\u4e2d\u624d\u6709\u5bf9\u5e94\u7684\u6570\u636e<\/span>m_strDeviceInfo.read();<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">return<\/span>;}}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u8bbe\u5907\u6ce8\u9500 SDK\u91ca\u653e<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">static<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">Logout<\/span><span style=\"box-sizing: inherit;\">()<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (lUserID &gt;= <span style=\"box-sizing: inherit;\">0<\/span>) {<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (!hCNetSDK.NET_DVR_Logout(lUserID)) {System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u6ce8\u9500\u5931\u8d25\uff0c\u9519\u8bef\u7801\u4e3a\"<\/span> + hCNetSDK.NET_DVR_GetLastError());}System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u6ce8\u9500\u6210\u529f\"<\/span>);hCNetSDK.NET_DVR_Cleanup();<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">return<\/span>;} <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">else<\/span> {System.out.println(<span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"\u8bbe\u5907\u672a\u767b\u5f55\"<\/span>);hCNetSDK.NET_DVR_Cleanup();<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">return<\/span>;}}}<\/code><\/pre>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;font-weight: 700;\">5-6 \u6b65\u76f8\u5173\u4ee3\u7801<\/span><\/p>\n<pre style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13px;word-break: break-word;overflow-wrap: normal;overflow: auto;margin-bottom: 20px;padding: 1em;border-width: initial;border-style: none;border-color: initial;border-radius: 4px;line-height: 1.5;background: rgb(246, 246, 246);color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;\"><code style=\"box-sizing: inherit;font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;border-width: initial;border-style: none;border-color: initial;border-radius: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;overflow: visible;word-break: normal;display: block;line-height: 1.5;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">class<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">FRealDataCallback<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">implements<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">HCNetSDK<\/span>.<span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">FRealDataCallBack_V30<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">final<\/span> MK_MEDIA mkMedia;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">final<\/span> Memory buffer = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> Memory(<span style=\"box-sizing: inherit;\">1024<\/span> * <span style=\"box-sizing: inherit;\">1024<\/span> * <span style=\"box-sizing: inherit;\">5<\/span>);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> bufferSize = <span style=\"box-sizing: inherit;\">0<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">long<\/span> pts;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">double<\/span> fps;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">long<\/span> time_base;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> videoType = <span style=\"box-sizing: inherit;\">0<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> audioType = <span style=\"box-sizing: inherit;\">0<\/span>;<span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">FRealDataCallback<\/span><span style=\"box-sizing: inherit;\">(MK_MEDIA mkMedia, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">double<\/span> fps)<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">this<\/span>.mkMedia = mkMedia;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">this<\/span>.fps = fps;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ZLM\u4ee51000\u4e3a\u65f6\u95f4\u57fa\u51c6<\/span>time_base = (<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">long<\/span>) (<span style=\"box-sizing: inherit;\">1000<\/span> \/ fps);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u56de\u8c03\u4f7f\u7528\u540c\u4e00\u4e2a\u7ebf\u7a0b<\/span>Native.setCallbackThreadInitializer(<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">this<\/span>,<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> CallbackThreadInitializer(<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">true<\/span>, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">false<\/span>, <span style=\"box-sizing: inherit;color: rgb(3, 47, 98);\">\"HikRealStream\"<\/span>));}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">@Override<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">invoke<\/span><span style=\"box-sizing: inherit;\">(<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">long<\/span> lRealHandle,<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> dwDataType,ByteByReference pBuffer,<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> dwBufSize,Pointer pUser)<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">throws<\/span> IOException <\/span>{<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ps\u5c01\u88c5<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (dwDataType == HCNetSDK.NET_DVR_STREAMDATA) {Pointer pointer = pBuffer.getPointer();<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> offset = <span style=\"box-sizing: inherit;\">0<\/span>;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u89e3\u6790psh\u5934 psm\u5934 psm\u6807\u9898<\/span>offset = readPSHAndPSMAndPSMT(pointer, offset);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u8bfb\u53d6pes\u6570\u636e<\/span>readPES(pointer, offset);}}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/*** \u8bfb\u53d6pes\u53ca\u6570\u636e** <span style=\"box-sizing: inherit;\">@param<\/span> pointer* <span style=\"box-sizing: inherit;\">@param<\/span> offset*\/<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">readPES<\/span><span style=\"box-sizing: inherit;\">(Pointer pointer, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> offset)<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/pes header<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] pesHeaderStartCode = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">3<\/span>];pointer.read(offset, pesHeaderStartCode, <span style=\"box-sizing: inherit;\">0<\/span>, pesHeaderStartCode.length);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> ((pesHeaderStartCode[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(pesHeaderStartCode[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(pesHeaderStartCode[<span style=\"box-sizing: inherit;\">2<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x01<\/span>) {offset = offset + pesHeaderStartCode.length;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] streamTypeByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">1<\/span>];pointer.read(offset, streamTypeByte, <span style=\"box-sizing: inherit;\">0<\/span>, streamTypeByte.length);offset = offset + streamTypeByte.length;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> streamType = streamTypeByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u89c6\u9891\u6d41<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (streamType &gt;= <span style=\"box-sizing: inherit;\">0xE0<\/span> &amp;&amp; streamType &lt;= <span style=\"box-sizing: inherit;\">0xEF<\/span>) {<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u89c6\u9891\u6570\u636e<\/span>readVideoES(pointer, offset);} <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">else<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> ((streamType &gt;= <span style=\"box-sizing: inherit;\">0xC0<\/span>) &amp; (streamType &lt;= <span style=\"box-sizing: inherit;\">0xDF<\/span>)) {<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u97f3\u9891\u6570\u636e<\/span>readAudioES(pointer, offset);}}}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/*** \u8bfb\u53d6\u89c6\u9891\u6570\u636e** <span style=\"box-sizing: inherit;\">@param<\/span> pointer* <span style=\"box-sizing: inherit;\">@param<\/span> offset*\/<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">readVideoES<\/span><span style=\"box-sizing: inherit;\">(Pointer pointer, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> offset)<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] pesLengthByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">2<\/span>];pointer.read(offset, pesLengthByte, <span style=\"box-sizing: inherit;\">0<\/span>, pesLengthByte.length);offset = offset + pesLengthByte.length;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> pesLength =((pesLengthByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) &lt;&lt; <span style=\"box-sizing: inherit;\">8<\/span>) | (pesLengthByte[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/pes\u6570\u636e<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (pesLength &gt; <span style=\"box-sizing: inherit;\">0<\/span>) {<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] pts_dts_length_info = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">3<\/span>];pointer.read(offset, pts_dts_length_info, <span style=\"box-sizing: inherit;\">0<\/span>, pts_dts_length_info.length);offset = offset + pts_dts_length_info.length;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> pesHeaderLength = (pts_dts_length_info[<span style=\"box-sizing: inherit;\">2<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u5224\u65ad\u662f\u5426\u662f\u6709pts \u5ffd\u7565dts<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> i = (pts_dts_length_info[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) &gt;&gt; <span style=\"box-sizing: inherit;\">6<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (i == <span style=\"box-sizing: inherit;\">0x02<\/span> || i == <span style=\"box-sizing: inherit;\">0x03<\/span>) {<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/byte[] pts_dts = new byte[5];<\/span><span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/pointer.read(offset, pts_dts, 0, pts_dts.length);<\/span><span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u8fd9\u91cc\u83b7\u53d6\u7684\u662f\u4ee590000\u4e3a\u65f6\u95f4\u57fa\u7684 \u9700\u8981\u8f6c\u4e3a 1\/1000\u4e3a\u57fa\u51c6\u7684 \u4f46\u662fpts\u8fd8\u662f\u4e0d\u591f\u5e73\u6ed1\u5bfc\u81f4\u753b\u9762\u5361\u987f \u6240\u4ee5\u4e0d\u91c7\u7528\u8bfb\u53d6\u7684pts<\/span><span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/long pts_90000 = ((pts_dts[0] &amp; 0x0e) &lt;&lt; 29) | (((pts_dts[1] &lt;&lt; 8 | pts_dts[2]) &amp; 0xfffe) &lt;&lt; 14) | (((pts_dts[3] &lt;&lt; 8 | pts_dts[4]) &amp; 0xfffe) &gt;&gt; 1);<\/span>pts = time_base + pts;}offset = offset + pesHeaderLength;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] naluStart = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">5<\/span>];pointer.read(offset, naluStart, <span style=\"box-sizing: inherit;\">0<\/span>, naluStart.length);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/nalu\u8d77\u59cb\u6807\u5fd7<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> ((naluStart[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(naluStart[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(naluStart[<span style=\"box-sizing: inherit;\">2<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(naluStart[<span style=\"box-sizing: inherit;\">3<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x01<\/span>) {<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (bufferSize != <span style=\"box-sizing: inherit;\">0<\/span>) {<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u83b7\u53d6nalu\u7c7b\u578b<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> naluType = (naluStart[<span style=\"box-sizing: inherit;\">4<\/span>] &amp; <span style=\"box-sizing: inherit;\">0x1F<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u5982\u679c\u662fsps pps\u4e0d\u9700\u8981\u53d8\u5316pts<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (naluType == <span style=\"box-sizing: inherit;\">7<\/span> || naluType == <span style=\"box-sizing: inherit;\">8<\/span>) {pts = pts - time_base;}<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (videoType == <span style=\"box-sizing: inherit;\">0x1B<\/span>) {<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u63a8\u9001\u5e27\u6570\u636e<\/span>ZLM_API.mk_media_input_h264(mkMedia,buffer.share(<span style=\"box-sizing: inherit;\">0<\/span>),bufferSize,pts,pts);} <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">else<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (videoType == <span style=\"box-sizing: inherit;\">0x24<\/span>) {<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u63a8\u9001\u5e27\u6570\u636e<\/span>ZLM_API.mk_media_input_h265(mkMedia,buffer.share(<span style=\"box-sizing: inherit;\">0<\/span>),bufferSize,pts,pts);}bufferSize = <span style=\"box-sizing: inherit;\">0<\/span>;}}<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> naluLength = pesLength - pts_dts_length_info.length - pesHeaderLength;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] temp = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[naluLength];pointer.read(offset, temp, <span style=\"box-sizing: inherit;\">0<\/span>, naluLength);buffer.write(bufferSize, temp, <span style=\"box-sizing: inherit;\">0<\/span>, naluLength);bufferSize = naluLength + bufferSize;}}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/*** \u8bfb\u53d6\u97f3\u9891\u6570\u636e** <span style=\"box-sizing: inherit;\">@param<\/span> pointer* <span style=\"box-sizing: inherit;\">@param<\/span> offset*\/<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">readAudioES<\/span><span style=\"box-sizing: inherit;\">(Pointer pointer, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> offset)<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] pesLengthByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">2<\/span>];pointer.read(offset, pesLengthByte, <span style=\"box-sizing: inherit;\">0<\/span>, pesLengthByte.length);offset = offset + pesLengthByte.length;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> pesLength =((pesLengthByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) &lt;&lt; <span style=\"box-sizing: inherit;\">8<\/span>) | (pesLengthByte[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/pes\u6570\u636e<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (pesLength &gt; <span style=\"box-sizing: inherit;\">0<\/span>) {<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] pts_dts_length_info = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">3<\/span>];pointer.read(offset, pts_dts_length_info, <span style=\"box-sizing: inherit;\">0<\/span>, pts_dts_length_info.length);offset = offset + pts_dts_length_info.length;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> pesHeaderLength = (pts_dts_length_info[<span style=\"box-sizing: inherit;\">2<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u5224\u65ad\u662f\u5426\u662f\u6709pts \u5ffd\u7565dts<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> i = (pts_dts_length_info[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) &gt;&gt; <span style=\"box-sizing: inherit;\">6<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">long<\/span> pts_90000 = <span style=\"box-sizing: inherit;\">0<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (i == <span style=\"box-sizing: inherit;\">0x02<\/span> || i == <span style=\"box-sizing: inherit;\">0x03<\/span>) {<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] pts_dts = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">5<\/span>];pointer.read(offset, pts_dts, <span style=\"box-sizing: inherit;\">0<\/span>, pts_dts.length);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u8fd9\u91cc\u83b7\u53d6\u7684\u662f\u4ee590000\u4e3a\u65f6\u95f4\u57fa\u7684 \u9700\u8981\u8f6c\u4e3a 1\/1000\u4e3a\u57fa\u51c6\u7684 \u4f46\u662fpts\u8fd8\u662f\u4e0d\u591f\u5e73\u6ed1\u5bfc\u81f4\u753b\u9762\u5361\u987f \u6240\u4ee5\u4e0d\u91c7\u7528\u8bfb\u53d6\u7684pts<\/span>pts_90000 =((pts_dts[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0x0e<\/span>) &lt;&lt; <span style=\"box-sizing: inherit;\">29<\/span>) |((((pts_dts[<span style=\"box-sizing: inherit;\">1<\/span>] &lt;&lt; <span style=\"box-sizing: inherit;\">8<\/span>) | pts_dts[<span style=\"box-sizing: inherit;\">2<\/span>]) &amp; <span style=\"box-sizing: inherit;\">0xfffe<\/span>) &lt;&lt; <span style=\"box-sizing: inherit;\">14<\/span>) |((((pts_dts[<span style=\"box-sizing: inherit;\">3<\/span>] &lt;&lt; <span style=\"box-sizing: inherit;\">8<\/span>) | pts_dts[<span style=\"box-sizing: inherit;\">4<\/span>]) &amp; <span style=\"box-sizing: inherit;\">0xfffe<\/span>) &gt;&gt; <span style=\"box-sizing: inherit;\">1<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/pts = time_base + pts;<\/span>}offset = offset + pesHeaderLength;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> audioLength =pesLength - pts_dts_length_info.length - pesHeaderLength;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] bytes = G711ACodec._toPCM(pointer.getByteArray(offset, audioLength));Memory temp = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> Memory(bytes.length);temp.write(<span style=\"box-sizing: inherit;\">0<\/span>, bytes, <span style=\"box-sizing: inherit;\">0<\/span>, bytes.length);ZLM_API.mk_media_input_pcm(mkMedia,temp.share(<span style=\"box-sizing: inherit;\">0<\/span>),bytes.length,pts_90000);temp.close();}}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/*** \u8bfb\u53d6psh\u5934 psm\u5934 psm\u6807\u9898 \u53ca\u6570\u636e** <span style=\"box-sizing: inherit;\">@param<\/span> pointer* <span style=\"box-sizing: inherit;\">@param<\/span> offset* <span style=\"box-sizing: inherit;\">@return<\/span>*\/<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">private<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">readPSHAndPSMAndPSMT<\/span><span style=\"box-sizing: inherit;\">(Pointer pointer, <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> offset)<\/span> <\/span>{<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ps\u5934\u8d77\u59cb\u6807\u5fd7<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] psHeaderStartCode = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">4<\/span>];pointer.read(offset, psHeaderStartCode, <span style=\"box-sizing: inherit;\">0<\/span>, psHeaderStartCode.length);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u5224\u65ad\u662f\u5426\u662fps\u5934<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> ((psHeaderStartCode[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(psHeaderStartCode[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(psHeaderStartCode[<span style=\"box-sizing: inherit;\">2<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x01<\/span> &amp;&amp;(psHeaderStartCode[<span style=\"box-sizing: inherit;\">3<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0xBA<\/span>) {<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] stuffingLengthByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">1<\/span>];offset = <span style=\"box-sizing: inherit;\">13<\/span>;pointer.read(offset, stuffingLengthByte, <span style=\"box-sizing: inherit;\">0<\/span>, stuffingLengthByte.length);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> stuffingLength = stuffingLengthByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0x07<\/span>;offset = offset + stuffingLength + <span style=\"box-sizing: inherit;\">1<\/span>;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ps\u5934\u8d77\u59cb\u6807\u5fd7<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] psSystemHeaderStartCode = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">4<\/span>];pointer.read(offset,psSystemHeaderStartCode,<span style=\"box-sizing: inherit;\">0<\/span>,psSystemHeaderStartCode.length);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/PS system header \u7cfb\u7edf\u6807\u9898<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> ((psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">2<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x01<\/span> &amp;&amp;(psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">3<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0xBB<\/span>) {offset = offset + psSystemHeaderStartCode.length;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] psSystemLengthByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">1<\/span>];<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/ps\u7cfb\u7edf\u5934\u957f\u5ea6<\/span>pointer.read(offset, psSystemLengthByte, <span style=\"box-sizing: inherit;\">0<\/span>, psSystemLengthByte.length);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> psSystemLength = psSystemLengthByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u8df3\u8fc7ps\u7cfb\u7edf\u5934<\/span>offset = offset + psSystemLength;pointer.read(offset,psSystemHeaderStartCode,<span style=\"box-sizing: inherit;\">0<\/span>,psSystemHeaderStartCode.length);}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u5224\u65ad\u662f\u5426\u662fpsm\u7cfb\u7edf\u5934 \u5219\u4e3aIDR\u5e27<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> ((psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x00<\/span> &amp;&amp;(psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">2<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0x01<\/span> &amp;&amp;(psSystemHeaderStartCode[<span style=\"box-sizing: inherit;\">3<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) == <span style=\"box-sizing: inherit;\">0xBC<\/span>) {offset = offset + psSystemHeaderStartCode.length;<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/psm\u5934\u957f\u5ea6\u53ef\u4ee5<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] psmLengthByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">2<\/span>];pointer.read(offset, psmLengthByte, <span style=\"box-sizing: inherit;\">0<\/span>, psmLengthByte.length);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> psmLength =((psmLengthByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) &lt;&lt; <span style=\"box-sizing: inherit;\">8<\/span>) | (psmLengthByte[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>);<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u83b7\u53d6\u97f3\u89c6\u9891\u7c7b\u578b<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">if<\/span> (videoType == <span style=\"box-sizing: inherit;\">0<\/span> || audioType == <span style=\"box-sizing: inherit;\">0<\/span>) {<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/\u81ea\u5b9a\u4e49\u590d\u5408\u6d41\u63cf\u8ff0<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] detailStreamLengthByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">2<\/span>];<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> tempOffset = offset + psmLengthByte.length + <span style=\"box-sizing: inherit;\">2<\/span>;pointer.read(tempOffset,detailStreamLengthByte,<span style=\"box-sizing: inherit;\">0<\/span>,detailStreamLengthByte.length);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> detailStreamLength =((detailStreamLengthByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) &lt;&lt; <span style=\"box-sizing: inherit;\">8<\/span>) |(detailStreamLengthByte[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>);tempOffset =detailStreamLength + detailStreamLengthByte.length + tempOffset + <span style=\"box-sizing: inherit;\">2<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] videoStreamTypeByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">1<\/span>];pointer.read(tempOffset,videoStreamTypeByte,<span style=\"box-sizing: inherit;\">0<\/span>,videoStreamTypeByte.length);videoType = videoStreamTypeByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>;tempOffset = tempOffset + videoStreamTypeByte.length + <span style=\"box-sizing: inherit;\">1<\/span>;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] videoStreamDetailLengthByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">2<\/span>];pointer.read(tempOffset,videoStreamDetailLengthByte,<span style=\"box-sizing: inherit;\">0<\/span>,videoStreamDetailLengthByte.length);<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">int<\/span> videoStreamDetailLength =((videoStreamDetailLengthByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>) &lt;&lt; <span style=\"box-sizing: inherit;\">8<\/span>) |(videoStreamDetailLengthByte[<span style=\"box-sizing: inherit;\">1<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>);tempOffset =tempOffset +videoStreamDetailLengthByte.length +videoStreamDetailLength;<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[] audioStreamTypeByte = <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">new<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">byte<\/span>[<span style=\"box-sizing: inherit;\">1<\/span>];pointer.read(tempOffset,audioStreamTypeByte,<span style=\"box-sizing: inherit;\">0<\/span>,audioStreamTypeByte.length);audioType = audioStreamTypeByte[<span style=\"box-sizing: inherit;\">0<\/span>] &amp; <span style=\"box-sizing: inherit;\">0xFF<\/span>;}offset = offset + psmLengthByte.length + psmLength;}}<span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">return<\/span> offset;}<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/*** \u91ca\u653e\u8d44\u6e90** <span style=\"box-sizing: inherit;\">@return<\/span>*\/<\/span><span style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">public<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">void<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">release<\/span><span style=\"box-sizing: inherit;\">()<\/span> <\/span>{ZLM_API.mk_media_release(mkMedia);buffer.close();}}<\/code><\/pre>\n<h3 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 22px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">5. \u9884\u89c8\u753b\u9762\u4e0e\u5ef6\u8fdf\u5bf9\u6bd4<\/span><\/h3>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;color: rgb(103, 150, 230);\">1.<\/span><span style=\"box-sizing: inherit;color: rgb(204, 204, 204);\"><\/span>\u89c2\u5bdf\u5230\u5bf9\u5e94\u7684\u5a92\u4f53\u6d41\u5df2\u7ecf\u6ce8\u518c\u4e0a\u53bb\uff0c\u5373\u53ef\u4f7f\u7528\u64ad\u653e\u5668\u89c2\u770b<\/p>\n<pre style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13px;word-break: break-word;overflow-wrap: normal;overflow: auto;margin-bottom: 20px;padding: 1em;border-width: initial;border-style: none;border-color: initial;border-radius: 4px;line-height: 1.5;background: rgb(246, 246, 246);color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;\"><code style=\"box-sizing: inherit;font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;border-width: initial;border-style: none;border-color: initial;border-radius: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;overflow: visible;word-break: normal;display: block;line-height: 1.5;\"><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">2024-05-30<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">14<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:38<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:48.514<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">I<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[java.exe]<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[13388-event poller 0]<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">MediaSource<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">.cpp<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:517<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">emitEvent<\/span> | \u5a92\u4f53\u6ce8\u518c<span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:fmp4<\/span>:<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/defaultVhost\/live\/test<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">2024-05-30<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">14<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:38<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:48.514<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">I<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[java.exe]<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[13388-event poller 0]<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">MultiMediaSourceMuxer<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">.cpp<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:561<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">onAllTrackReady<\/span> | <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">stream<\/span>: <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">schema<\/span>:<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/defaultVhost\/app\/stream , codec info: H264[2688\/1520\/25] mpeg4-generic[8000\/1\/16]<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">2024-05-30<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">14<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:38<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:48.514<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">I<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[java.exe]<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[13388-event poller 0]<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">MediaSource<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">.cpp<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:517<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">emitEvent<\/span> | \u5a92\u4f53\u6ce8\u518c<span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:rtsp<\/span>:<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/defaultVhost\/live\/test<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">2024-05-30<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">14<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:38<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:48.514<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">I<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[java.exe]<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[13388-event poller 0]<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">MediaSource<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">.cpp<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:517<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">emitEvent<\/span> | \u5a92\u4f53\u6ce8\u518c<span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:rtmp<\/span>:<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/defaultVhost\/live\/test<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">2024-05-30<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">14<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:38<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:48.515<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">I<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[java.exe]<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[13388-event poller 0]<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">MediaSource<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">.cpp<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:517<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">emitEvent<\/span> | \u5a92\u4f53\u6ce8\u518c<span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:ts<\/span>:<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/defaultVhost\/live\/test<\/span><span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">2024-05-30<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">14<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:38<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:52.080<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">I<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[java.exe]<\/span> <span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">[13388-event poller 0]<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">MediaSource<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">.cpp<\/span><span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:517<\/span> <span style=\"box-sizing: inherit;color: rgb(215, 58, 73);\">emitEvent<\/span> | \u5a92\u4f53\u6ce8\u518c<span style=\"box-sizing: inherit;color: rgb(111, 66, 193);\">:hls<\/span>:<span style=\"box-sizing: inherit;color: rgb(106, 115, 125);\">\/\/defaultVhost\/live\/test<\/span><\/code><\/pre>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;color: rgb(103, 150, 230);\">2.<\/span><span style=\"box-sizing: inherit;color: rgb(204, 204, 204);\"><\/span>\u4f7f\u7528 WS-FLV \u534f\u8bae\u4e0e\u76f4\u63a5\u4f7f\u7528\u6444\u50cf\u5934 RTSP \u534f\u8bae\u64ad\u653e\u5bf9\u6bd4<\/p>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><img loading=\"lazy\" decoding=\"async\" class=\"lazyload\"data-imgfileid=\"502043142\" data-ratio=\"0.445364238410596\"  data-type=\"png\" data-w=\"604\" height=\"269\" style=\"border-width: 0px;border-style: initial;border-color: initial;margin-right: auto;margin-left: auto;max-width: 80%;vertical-align: middle;cursor: zoom-in;\" width=\"604\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214356566.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img loading=\"lazy\" decoding=\"async\" data-imgfileid=\"502043142\" data-ratio=\"0.445364238410596\"  data-type=\"png\" data-w=\"604\" height=\"269\" style=\"border-width: 0px;border-style: initial;border-color: initial;margin-right: auto;margin-left: auto;max-width: 80%;vertical-align: middle;cursor: zoom-in;\" width=\"604\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214356566.png\"  \/><\/noscript><\/p>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;color: rgb(103, 150, 230);\">3.<\/span><span style=\"box-sizing: inherit;color: rgb(204, 204, 204);\"><\/span>\u4f7f\u7528 WS-FLV \u534f\u8bae\u4e0e\u6444\u50cf\u5934\u7ba1\u7406\u754c\u9762\u64ad\u653e\u5bf9\u6bd4<\/p>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><img loading=\"lazy\" decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-imgfileid=\"502043143\" data-ratio=\"0.7864476386036962\"  data-type=\"jpeg\" data-w=\"487\" height=\"383\" style=\"border-width: 0px;border-style: initial;border-color: initial;margin-right: auto;margin-left: auto;max-width: 80%;vertical-align: middle;cursor: zoom-in;\" width=\"487\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214358275.jpeg\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img loading=\"lazy\" decoding=\"async\" class=\"rich_pages wxw-img\" data-imgfileid=\"502043143\" data-ratio=\"0.7864476386036962\"  data-type=\"jpeg\" data-w=\"487\" height=\"383\" style=\"border-width: 0px;border-style: initial;border-color: initial;margin-right: auto;margin-left: auto;max-width: 80%;vertical-align: middle;cursor: zoom-in;\" width=\"487\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214358275.jpeg\"  \/><\/noscript><\/p>\n<p style=\"box-sizing: inherit;margin-bottom: 20px;line-height: inherit;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\">4.<span style=\"box-sizing: inherit;font-weight: 700;\">\u53ef\u4ee5\u770b\u5230\u4e0e\u6444\u50cf\u5934 RTSP \u534f\u8bae\u5bf9\u6bd4\u753b\u9762\u5feb 1-2s \u5de6\u53f3\uff0c\u4e0e\u6444\u50cf\u5934\u7ba1\u7406\u754c\u9762\u5bf9\u6bd4\u753b\u9762\u57fa\u672c\u4e00\u6837\u3002<\/span><\/p>\n<h3 style=\"box-sizing: inherit;font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif;line-height: 1.8;margin-top: 22px;margin-bottom: 16px;font-weight: 600;font-size: 22px;border-width: initial;border-style: none;border-color: initial;color: rgb(51, 51, 51);letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: inherit;\">6. \u603b\u7ed3<\/span><\/h3>\n<blockquote style=\"box-sizing: inherit;margin-top: 0px;margin-bottom: 0px;padding: 20px;background-color: rgb(246, 246, 246);border-left-width: 6px;border-left-color: rgb(230, 230, 230);word-break: break-word;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;\">\n<p style=\"box-sizing: inherit;line-height: inherit;\">\u901a\u8fc7\u5b9e\u6218\u6253\u901a\u6d77\u5eb7 SDK \u4e0e ZLM4J \u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u5b9e\u65f6\u9884\u89c8\u76d1\u63a7\u6848\u4f8b\uff0c\u6211\u4eec\u53ef\u4ee5\u5b66\u5230 ZLM4J \u7684\u63a5\u5165\u6d41\u7a0b\u548c\u7b80\u5355\u4f7f\u7528\u6b65\u9aa4\uff0c\u901a\u8fc7\u8fd9\u4e2a\u793a\u4f8b\u5c55\u793a\u96c6\u6210\u6d41\u5a92\u4f53\u7684\u5e26\u6765\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u5b8c\u6574\u9879\u76ee\u6211\u5df2\u4e0a\u4f20\u81f3 GITEE:https:\/\/gitee.com\/daofuli\/zlm4j_hk\uff0c\u540e\u7eed\u5c06\u5206\u4eab\u66f4\u591a ZLM4J \u4f7f\u7528\u6848\u4f8b\u3002<\/p>\n<\/blockquote>\n<p><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzgyMTI0MA==&amp;mid=2649526788&amp;idx=1&amp;sn=5f4cfbe92097cdd45fa8db72e5b9c1f1&amp;chksm=882bacd3bf5c25c5407d6251f4fa6a7ad444c1fcfba5830636cb217b7ffd37324f15bea0000d&amp;scene=21#wechat_redirect\" textvalue=\"MybatisPlus \u6700\u65b0\u6f0f\u6d1e CVE-2024-35548 \u7533\u660e\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\" rel=\"nofollow\" >MybatisPlus \u6700\u65b0\u6f0f\u6d1e CVE-2024-35548 \u7533\u660e<\/a><\/p>\n<p><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzgyMTI0MA==&amp;mid=2649526780&amp;idx=1&amp;sn=498a660a0b2fc766f9a42f83dbe08db4&amp;chksm=882baf2bbf5c263d2f490ffe6c199796914efb8db85ed97494f66f47e94ed0832faff5a0909a&amp;scene=21#wechat_redirect\" textvalue=\"PIG AI | Java\u5927\u6a21\u578b\u5e94\u7528\u5f00\u53d1\u5e73\u53f0\u91cd\u78c5\u53d1\u5e03\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"11\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\" rel=\"nofollow\" >PIG AI | Java\u5927\u6a21\u578b\u5e94\u7528\u5f00\u53d1\u5e73\u53f0\u91cd\u78c5\u53d1\u5e03<\/a><\/p>\n<p><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzgyMTI0MA==&amp;mid=2649526778&amp;idx=1&amp;sn=2b0b937cb3e33648635bdd2d74dd47a1&amp;chksm=882baf2dbf5c263b6e9cfd6b80e7d2104ae6d60c59f6350b2bf67c17e24adffea53632ba2b7c&amp;scene=21#wechat_redirect\" textvalue=\"\u4e00\u6b3e\u517c\u5177 \u201c\u9ad8\u6027\u80fd\u3001\u9ad8\u989c\u503c\u3001\u9ad8\u6d3b\u8dc3\u201d \u7684\u5206\u5e03\u5f0f\u4efb\u52a1\u8c03\u5ea6\u4e0e\u91cd\u8bd5\u5e73\u53f0 Beta2 \u7248\u672c\u6b63\u5f0f\u53d1\u5e03\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\" rel=\"nofollow\" >\u4e00\u6b3e\u517c\u5177 \u201c\u9ad8\u6027\u80fd\u3001\u9ad8\u989c\u503c\u3001\u9ad8\u6d3b\u8dc3\u201d \u7684\u5206\u5e03\u5f0f\u4efb\u52a1\u8c03\u5ea6\u4e0e\u91cd\u8bd5\u5e73\u53f0 Beta2 \u7248\u672c\u6b63\u5f0f\u53d1\u5e03<\/a><\/p>\n<p><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzgyMTI0MA==&amp;mid=2649526760&amp;idx=1&amp;sn=80d7b3cff280de16e471627a7e416115&amp;chksm=882baf3fbf5c26290b0be5a6e13f7d5f1ed73356a5b9e76ed1e3608ca0e9003dfa052b026719&amp;scene=21#wechat_redirect\" textvalue=\"\u98de\u9f99\u5de5\u4f5c\u6d41\u5f15\u64ce FlowLong \u53d1\u5e03 0.0.6 \u661f\u706b\u7248\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\" rel=\"nofollow\" >\u98de\u9f99\u5de5\u4f5c\u6d41\u5f15\u64ce FlowLong \u53d1\u5e03 0.0.6 \u661f\u706b\u7248<\/a><\/p>\n<p><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzgyMTI0MA==&amp;mid=2649526715&amp;idx=1&amp;sn=700938ecd20c5907c1e5f609124d35fa&amp;chksm=882baf6cbf5c267af9adacd4965ab15a3be8b0596821190ce0e7812ad8c5d9871cc4716214b6&amp;scene=21#wechat_redirect\" textvalue=\"MongoPlus 2.0.9 \u66f4\u65b0\uff0c\u5df2\u652f\u6301\u591a\u6570\u636e\u6e90\u64cd\u4f5c\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\" rel=\"nofollow\" >MongoPlus 2.0.9 \u66f4\u65b0\uff0c\u5df2\u652f\u6301\u591a\u6570\u636e\u6e90\u64cd\u4f5c<\/a><\/p>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u7801\u95ee              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u6d41\u5a92\u4f53\u670d\u52a1\u6846\u67b6 ZLM4J \u53d1\u5e03 1.0.8 \u7248\u672c \ud83d\udd25\ud83d\udd25\ud83d\udd25ZLM4J \u6253\u9020\u5c5e\u4e8e Java \u7684\u6d41\u5a92\u4f53\u751f\u6001\u6846\u67b6\uff0c\u6253\u901a\u76f4\u64ad\u534f\u8bae\u6808\u3001\u89c6\u9891\u76d1 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":4877,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[2,7],"tags":[],"class_list":["post-4882","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214353307-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214356566.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214353307-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214353307.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214356566.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214353307-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214353307.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214353307.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214356566.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214356566.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214358275.jpeg","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801214358275.jpeg","id":"image3"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Java","post_date":"2024-08-01","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":527,"next_post_id":5089,"next_post_title":"\u9762\u8bd5\u5b98\uff1aSpring Bean \u7684\u751f\u547d\u5468\u671f\u90fd\u4e0d\u4f1a\uff0c\u4f60\u8d70\u5427\u4e0b\u4e00\u4f4d","previous_post_id":5068,"previous_post_title":"Spring\u9879\u76ee\u542f\u52a8\u52a0\u901f\uff1a\u4f18\u5316\u7b56\u7565\u5168\u89e3\u6790","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4882"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4882\/revisions"}],"predecessor-version":[{"id":6338,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4882\/revisions\/6338"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/4877"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}