Conversation
d9257ff to
5286f1a
Compare
5286f1a to
5d0d703
Compare
|
clippy should be clean if you rebase on top of latest main |
703493f to
a9c14b7
Compare
0790c2d to
017b97f
Compare
and write new methods to access the parsed SDP members as enums
02ea209 to
b7942a5
Compare
| /// Payload type, a numerical value between 0 and 127 | ||
| pub pt: u8, | ||
| /// Name of the encoding | ||
| // TODO: is it useful to have an enum for all known encoding? |
There was a problem hiding this comment.
Potentially useful, just like for the registered payload types. But in this struct here, a string / u8 is the correct thing. You could have functions on the struct that try to handle pt / encoding with those enums though
There was a problem hiding this comment.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/44a632811e6718909409b5c229508072a1447e62/net/rtsp/src/rtspsrc/sdp.rs#L215 basically having guess_rtpmap_from_pt() and guess_rtpmap_from_encoding_name() here in some form seems useful.
@nirbheek Do you remember why your code allows rtpmap without clock-rate? The SDP RFC does not allow that
There was a problem hiding this comment.
There are payload types for which clock-rate is static, and tools like ffmpeg won't add the clock-rate in those cases. For example pt=10/11 (L16 2ch/1ch), see table in https://en.wikipedia.org/wiki/RTP_payload_formats#Audio_and_video_payload_types.
There was a problem hiding this comment.
Thanks. ffmpeg is wrong to not add it of course, specifying the clock rate in the SDP is not optional.
b7942a5 to
efef672
Compare
efef672 to
5fa4206
Compare
d7c780b to
cd27d00
Compare
I wonder why the other tests or my local build did not report this error |
Because you don't build with Rust 1.65 |
|
So is it a shortcoming of Rust 1.65? Why do we have a test with that specific version? |
|
Because that's the minimum version supported here |
cd27d00 to
69822f2
Compare
| /// Type of the `connection_address`. | ||
| pub addrtype: String, | ||
| /// Connection address. | ||
| pub connection_address: String, |
There was a problem hiding this comment.
This one should probably also be updated accordingly. Note that this is not just a single address but can include a multicast TTL or a "number of addresses".
There was a problem hiding this comment.
(and the other fields, nettype/addrtype are like what you handle elsewhere here already)
There was a problem hiding this comment.
Did you mean changing the types of these? We want to keep backward compatibility, so added the try-get and set-from methods for these.
There was a problem hiding this comment.
Yeah those are already added in impl Connection 21c47b5#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R650
Fixes #1