Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
云逸之
SimpleVideoServer
提交
d14b4da5
S
SimpleVideoServer
项目概览
云逸之
/
SimpleVideoServer
通知
685
Star
47
Fork
14
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SimpleVideoServer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d14b4da5
编写于
8月 06, 2022
作者:
云逸之
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复广域网ip不满位导致无法显示视频问题
上级
82d15652
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
26 deletion
+16
-26
simpleVideoRecorder/src/UdpClient.cpp
simpleVideoRecorder/src/UdpClient.cpp
+0
-1
src/org/btik/server/util/ByteUtil.java
src/org/btik/server/util/ByteUtil.java
+14
-0
src/org/btik/server/video/device/udp2/NewUDPDeviceChannel.java
...rg/btik/server/video/device/udp2/NewUDPDeviceChannel.java
+1
-24
src/org/btik/server/video/device/web/BioHttpVideoServer.java
src/org/btik/server/video/device/web/BioHttpVideoServer.java
+1
-1
未找到文件。
simpleVideoRecorder/src/UdpClient.cpp
浏览文件 @
d14b4da5
...
...
@@ -64,6 +64,5 @@ void LightUDP::send(uint8_t* buf, size_t len) {
sizeof
(
recipient
));
if
(
sent
<
0
)
{
Serial
.
printf
(
"could not send data: %d
\n
"
,
errno
);
return
;
}
}
\ No newline at end of file
src/org/btik/server/util/ByteUtil.java
浏览文件 @
d14b4da5
package
org.btik.server.util
;
import
java.io.IOException
;
/**
* @author lustre
* @version 1.0
...
...
@@ -89,6 +91,18 @@ public class ByteUtil {
return
buf
;
}
public
static
byte
[]
toFullHexString
(
long
val
)
{
byte
[]
buf
=
new
byte
[
8
<<
1
];
int
charPos
=
buf
.
length
;
int
mask
=
0xf
;
do
{
buf
[--
charPos
]
=
LOW_DIGEST
[((
int
)
val
)
&
mask
];
val
>>>=
4
;
}
while
(
charPos
>
0
);
return
buf
;
}
public
static
int
getChars
(
long
i
,
int
index
,
byte
[]
buf
)
{
long
q
;
int
r
;
...
...
src/org/btik/server/video/device/udp2/NewUDPDeviceChannel.java
浏览文件 @
d14b4da5
...
...
@@ -121,29 +121,6 @@ public class NewUDPDeviceChannel extends Thread implements DevChannel {
return
SN_LEN
;
}
static
class
UDPDev
{
byte
[]
frame
;
int
[]
sizeTable
;
VideoChannel
videoChannel
;
BufferPool
bufferPool
;
long
address
;
int
segmentIndex
=
0
;
public
UDPDev
(
byte
[]
frame
,
VideoChannel
videoChannel
,
BufferPool
bufferPool
,
long
address
)
{
this
.
frame
=
frame
;
this
.
sizeTable
=
new
int
[
frame
.
length
];
this
.
videoChannel
=
videoChannel
;
this
.
address
=
address
;
this
.
bufferPool
=
bufferPool
;
}
}
class
FrameDispatcher
implements
Runnable
{
LinkedBlockingQueue
<
FrameBuffer
>
messages
=
new
LinkedBlockingQueue
<>();
...
...
@@ -184,7 +161,7 @@ public class NewUDPDeviceChannel extends Thread implements DevChannel {
private
void
onNewStreamOpen
(
FrameBuffer
frame
)
{
byte
[]
sn
=
new
byte
[
SN_LEN
+
1
];
System
.
arraycopy
(
ByteUtil
.
toHexString
(
frame
.
address
),
0
,
sn
,
1
,
SN_LEN
);
System
.
arraycopy
(
ByteUtil
.
to
Full
HexString
(
frame
.
address
),
0
,
sn
,
1
,
SN_LEN
);
VideoChannel
channel
=
videoServer
.
createChannel
(
sn
);
videoChannelMap
.
put
(
frame
.
address
,
channel
);
}
...
...
src/org/btik/server/video/device/web/BioHttpVideoServer.java
浏览文件 @
d14b4da5
...
...
@@ -62,7 +62,7 @@ public class BioHttpVideoServer extends Thread implements HttpConstant, VideoSer
while
(
runFlag
)
{
Socket
client
=
serverSocket
.
accept
();
InputStream
inputStream
=
client
.
getInputStream
();
client
.
setSoTimeout
(
300
);
client
.
setSoTimeout
(
300
0
);
try
{
if
(
inputStream
.
read
(
uri
)
<
URI_LEN
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录