Comments (18)
ok, then I will make the change and we can see if any one reviews it :)
from libsrtp.
It's defined on srtp_priv.h, so not totally opaque ;-) You can include that file and you have access to the structure members.
from libsrtp.
The doc clearly says that srtp_stream_t
is an opaque field and thus I cannot rely (or should not rely) on a non public API file (srtp_priv.h).
from libsrtp.
You only live once :-)
On Aug 22, 2014 1:51 PM, "Iñaki Baz Castillo" [email protected]
wrote:
The doc clearly says that srtp_stream_t is an opaque field and thus I
cannot rely (or should not rely) on a non public API file (srtp_priv.h).—
Reply to this email directly or view it on GitHub
#67 (comment).
from libsrtp.
My guess is this is just an oversight by the person that added the event handler API. There's probably no way to address this without significant changes to the API. I've shared my opinion on another thread recently, we may want to look at a major uplift to the API and bump the major from 1 to 2. This will break backwards compatibility, but it'll allow us to clean up these opacity issues.
from libsrtp.
Agreed.
from libsrtp.
Closing issue due to inactivity
from libsrtp.
Inactivity? :)
I think the bug was properly reported and no more action was needed (but just a proper fix/implementation). I expected this to be done in the announced future new API design.
from libsrtp.
This issue is tagged as a "question", not a "bug". Since the most recent discussion was October 9, it looked inactive to me.
from libsrtp.
Looks like this was missed in the move to 2.0, this is a shame I think it will be a long time to 3.0 .
One option would be make a new api in 2.1 and depreciate the old api, removing it in 3.0
The fix would be to swap the srtp_stream_t argument with uint32_t SSRC.
I wounder how many users are actually using this API.
from libsrtp.
I wounder how many users are actually using this API.
Probably no one (other than for logging purposes) as such a current API is of very little use.
from libsrtp.
So then the question is if we can just change the srtp_stream_t argument to be a uintptr_t, and set it to the SSRC in version 2.1 Changing it to be uint32_t in 3.0 .
from libsrtp.
Same SSRC may happen many times in different SRTP contexts/sessions. I expect the associated session should be given within the callback.
from libsrtp.
in 2.0 the event data signature is
typedef struct srtp_event_data_t {
srtp_t session; /**< The session in which the event happend. */
srtp_stream_t stream; /**< The stream in which the event happend. */
srtp_event_t event;
so changing it to
typedef struct srtp_event_data_t {
srtp_t session; /**< The session in which the event happend. */
uintptr_t ssrc; /**< The stream in which the event happend. */
srtp_event_t event;
should be ok, and then you can map it to you application, or?
from libsrtp.
You are right.
from libsrtp.
I looked at the code. My question: what is the reason for changing "srtp_stream_t stream;" when "srtp_t session;" is also present? It's also a typedef in srtp.h, with the actual type defined in srtp_priv.h. What am I missing?
from libsrtp.
It happens that srtp_priv.h
is supposed to be private API, and we cannot rely on it.
from libsrtp.
srtp_t session is still opaque but it is used as the first argument to a few of the srtp_xxxx functions. It is also possible for the receiver of the callback to map back to which session the event happened on. With srtp_stream_t it is not possible to use it for anything, not even finding out the SSRC that generated the event. the combination of srtp_t and SSRC should give the user enough context to be able to handle the event.
from libsrtp.
Related Issues (20)
- unresolved external symbol srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80 when linking lib on windows HOT 2
- Writeup of the when Openssl is required, and which operations/modes are affected? HOT 4
- support ubuntu-22.04 in github workflow HOT 2
- check if libdl and libz are really needed HOT 1
- New release would be appreciated HOT 3
- Usecase Question about libsrtp HOT 1
- Hash of v2.4.2 tarball has changed HOT 4
- srtp_create fails if setting up RTP encryption with AES-128-GCM and not specifying RTCP encryption HOT 2
- Implementation of custom encryption algorithm HOT 1
- Performance issue with OpennSSL 3 and libsrtp HOT 9
- Build fails on macOS -Wshorten-64-to-32 HOT 2
- How to compile libsrtp2.3.0 with AES-GCM cipher group support ? HOT 1
- Cross-compile libsrtp to Windows (64-bit) is failing given that OpenSSL can't be found HOT 1
- When is safe to use srtp_remove_stream? HOT 2
- Bad link in README.md HOT 1
- Release Version 3.0.0 HOT 3
- Use consistent types through out code base HOT 1
- Review public API
- libsrtp + openssl + certificates HOT 2
- remove NO_64BIT_MATH code
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 libsrtp.