Comments (5)
去看下海康的NET_DVR_SetESRealPlayCallBack接口
from zlmediakit.
去看下海康的NET_DVR_SetESRealPlayCallBack接口
使用海康的NET_DVR_SetESRealPlayCallBack接口
hcNetSDK.NET_DVR_SetESRealPlayCallBack(lPreviewHandle , mfPlayESCallBack, null);
在回调函数中打印信息
static class MFPlayESCallBack implements HCNetSDK.FPlayESCallBack {
public void invoke(int lPlayHandle, HCNetSDK.NET_DVR_PACKET_INFO_EX struPackInfo, Pointer pUser) {
log.info("包类型:{}", struPackInfo.dwPacketType);
}
}
得到结果
2024-04-12 18:16:24.171 [Thread-13] INFO com.service.HCPlayService:114 - 包类型:0
2024-04-12 18:16:24.211 [Thread-14] INFO com.service.HCPlayService:114 - 包类型:70780800
2024-04-12 18:16:24.212 [Thread-15] INFO com.service.HCPlayService:114 - 包类型:0
2024-04-12 18:16:24.212 [Thread-16] INFO com.service.HCPlayService:114 - 包类型:70780800
2024-04-12 18:16:24.217 [Thread-17] INFO com.service.HCPlayService:114 - 包类型:70780800
2024-04-12 18:16:24.257 [Thread-18] INFO com.service.HCPlayService:114 - 包类型:70780800
2024-04-12 18:16:24.286 [Thread-19] INFO com.service.HCPlayService:114 - 包类型:70780800
2024-04-12 18:16:24.326 [Thread-20] INFO com.service.HCPlayService:114 - 包类型:70780800
2024-04-12 18:16:24.366 [Thread-21] INFO com.service.HCPlayService:114 - 包类型:70780800
2024-04-12 18:16:24.417 [Thread-22] INFO com.service.HCPlayService:114 - 包类型:70780800
直接将回调函数中的流输出到MediaSource
MK_FRAME mkFrame = ZLM_API.mk_frame_create(0, 0, 0, struPackInfo.pPacketBuffer, struPackInfo.dwPacketSize, null, null);
ZLM_API.mk_media_input_frame(mkMedia, mkFrame);
抛出异常
java.lang.Error: Invalid memory access
at com.sun.jna.Native.invokePointer(Native Method)
at com.sun.jna.Function.invokePointer(Function.java:497)
at com.sun.jna.Function.invoke(Function.java:450)
at com.sun.jna.Function.invoke(Function.java:361)
at com.sun.jna.Library$Handler.invoke(Library.java:270)
at com.sun.proxy.$Proxy72.mk_frame_create(Unknown Source)
无法进行流播放
from zlmediakit.
NET_DVR_SetESRealPlayCallBack回调 可能就不是H264 你先保存264文件 看看能否播放
from zlmediakit.
NET_DVR_SetESRealPlayCallBack回调 可能就不是H264 你先保存264文件 看看能否播放
已解决,Java版SDK的接口文件存在问题,替换后再次使用NET_DVR_SetESRealPlayCallBack就好了
多谢
from zlmediakit.
我也是存在和你一样的问题,你能把你使用的SDK接口文件发我一下吗?感谢
from zlmediakit.
Related Issues (20)
- 通过TCP代理播放国标接入的视频流时,服务崩溃 HOT 1
- [功能请求] 按需拉流功能可以无人观看时自动拉流恢复观看时自动恢复代理流 HOT 4
- [功能请求] 文件访问新增鉴权,安全配置现在文件完全裸露 HOT 1
- [功能请求] 现文件资源完全裸露,可以直接访问,建议新增基础鉴权配置 HOT 2
- 服务器端使用MediaServer -c config.ini运行着,出去有点事,回来就崩溃了 HOT 14
- [功能请求] 希望能够拉取常规的HTTP二进制直播流 HOT 1
- [功能请求] 希望支持常规的application/octet-stream二进制直播源拉流 HOT 1
- [BUG] 使用最新的镜像运行的容器转码H265失败 HOT 5
- [编译问题] libext-codec.a文件undefined reference to `vtable for mediakit::CommonRtmpDecoder' HOT 4
- [BUG] 点播时,推流超时报错
- Benchmark(测试代码如何编译) HOT 1
- [benchmark](benchmark测试编译) HOT 1
- [BUG] 编译成exe文件加入服务启动报错 HOT 2
- [BUG] 看日志设备推流进来了,但是无法播放 HOT 3
- [BUG] 通过RTMP推流失败 HOT 1
- [BUG]使用RTMP推流失败 HOT 2
- SPSParser 报错 HOT 1
- [BUG] ZLMediakit在开启webrtc进行编译时,视频流有人观看的时候也会在无人观看时间到达时自动触发on_stream_none_reader事件 HOT 3
- 通过addStreamProxy拉取远端的 rtsp时,会出现频繁的注销和注册流 HOT 1
- 通过addStreamProxy拉取远端的 rtsp时,会出现频繁的注销和注册流 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zlmediakit.