Comments (4)
Just to be sure we understand each other, what you are doing is something like this:
- on client side:
socket.setSockFlag(SockOpt.STREAMID, "Hello")
- on client side: connect to server
- on server side: onListen is trigger but streamId is empty
Is this what you are doing?
Have you tried socket.getSockFlag(SockOpt.STREAMID)
on your server receiving socket when connection has been accepted by server?
from srtdroid.
Client:
if (this.srtSocket.setSockFlag(SockOpt.STREAMID, "Hello") != 0) {
this.srtSocket.close();
Thread.currentThread().interrupt();
return;
//throw new Exception("Failed to set sock flag to Sender: ${Utils.getErrorMessage()}");
}
if (this.srtSocket.connect(url, port) != 0) {
this.srtSocket.close();
Thread.currentThread().interrupt();
return;
//throw new Exception("Failed to connect to $ip:$port: ${Utils.getErrorMessage()}");
}
Server:
hSock = srt_accept(listenfd, (struct sockaddr )&clientaddr, &addrlen);
int st = srt_getsockflag(hSock, SRTO_STREAMID, (void) msg, &addrlen);
st = 0 (no error)
addlen=0 (no message received)
P.S.
also on Client side debuger console I see error:
E/SRTJniStructs: OptVal: unknown class java.lang.String
from srtdroid.
Hey,
I just fixed it in https://github.com/ThibaultBee/SRTWrapper/tree/bugfix/setSockOpt
You can try to use the artifact from jitpack when build is completed:
dependencies { implementation 'com.github.ThibaultBee:SRTWrapper:bugfix~setSockOpt-0660d81bd0-1' }
If it is Ok with you, I will merge into master and create milestone 0.8.1.
from srtdroid.
I checked and now it works, thank you very much.
from srtdroid.
Related Issues (18)
- openssl_project compiler error HOT 7
- I am having a problem trying to send camera stream to srt server (vMix) HOT 3
- is stable the srtdroid ? HOT 17
- Rendezvous mode works only with outgoing connection HOT 6
- Android video file upload HOT 6
- Upgrade to SRT 1.5.0 HOT 1
- Is there a Java version available HOT 1
- how to use the lib send byte array HOT 1
- How to add SRT over RTMP HOT 1
- Run failed HOT 6
- how to use MsgCtrl HOT 1
- srtcore/core.cpp@6491:sendmsg2 14:54:30.657568/Thread-60*E:SRT.as: INVALID: Data size for sending declared with length: 0 HOT 5
- How often to send a SDT PMT PATοΌ HOT 1
- srtdroid on API 19+ HOT 6
- how can I transfer the video stream from one android device to another and play it HOT 4
- Segfault when attempting to connect using hostname without internet (SRT v1.5.1) HOT 2
- I am getting build command failed issue when I am syncing this project in my system 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 srtdroid.