Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问这不需要服务端吗? #4

Open
bxcx opened this issue Apr 16, 2019 · 5 comments
Open

请问这不需要服务端吗? #4

bxcx opened this issue Apr 16, 2019 · 5 comments

Comments

@bxcx
Copy link

bxcx commented Apr 16, 2019

请问这不需要服务端吗?我直接运行demo跑起来后只能看到自己的摄像头,对方的无法接收到,确认ip正确。

@xmtggh
Copy link
Owner

xmtggh commented Apr 16, 2019

这是p2p的,不需要服务器,无法接收你查看一下你的机子是否能ping的通,网上找一些网络调试工具来试试吧 @bxcx

@bxcx
Copy link
Author

bxcx commented Apr 16, 2019

非常感谢您的回复,ping通肯定是可以ping通的,我试过socket发视频画面可以传过来,就是太卡顿,无意间发现您的项目,感觉应该非常适合我的需求,我现在跑起来后下面的自身画面可以看到,netty有触发channelActive,但触发不了channelRead0,这可能是什么原因呢?

@xmtggh
Copy link
Owner

xmtggh commented Apr 16, 2019

@bxcx 默认使用的是硬遍 你切换成软编就好了,硬遍看上去有点卡,软编比较舒服,如果没有触发,你可以打印一下错误哪里的日志,或者你发送端发出去了,没有接收到,可能你的网络环境有点小问题,你可以尝试用360wifi发送手机链接试试,或者调试网络传输助手,通过抓包去解决

@bxcx
Copy link
Author

bxcx commented Apr 17, 2019

非常感谢,回到家后网络正常了,可能真的跟网络有关系,非常感谢!

@bxcx
Copy link
Author

bxcx commented Apr 28, 2019

我采用硬编,首次连接都正常,但断开后重连时经常出现下面的异常,请问有解决的办法吗?
java.lang.IllegalStateException
at android.media.MediaCodec.getInputBuffers(MediaCodec.java:3070)
at com.hm.library.vchat.decode.AndroidHradwareDecode.onDecodeData(AndroidHradwareDecode.java:55)
at com.hm.library.vchat.VChatManager$2.onVideoData(VChatManager.java:170)
at com.hm.library.vchat.net.udp.NettyReceiverHandler.channelRead0(NettyReceiverHandler.java:49)
at com.hm.library.vchat.net.udp.NettyReceiverHandler.channelRead0(NettyReceiverHandler.java:17)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:93)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:784)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants