sony / nmos-cpp

An NMOS (Networked Media Open Specifications) Registry and Node in C++ (IS-04, IS-05)
Apache License 2.0
141 stars 80 forks source link

SDP HDCP signalling #317

Closed N-Nagorny closed 1 year ago

N-Nagorny commented 1 year ago

I explored what's needed to signalize HDCP support in RTP streams and found two useful SDP session attributes: hkep described in https://vsf.tv/download/technical_recommendations/VSF_TR-10-5_2022-03-22.pdf (Section 10) and extmap described in https://www.digital-cp.com/sites/default/files/HDCP%20Direct%20Adaptation%20Amendment%20Spec%20Rev2_3.pdf (Section 3.6.1).

Could you guys review this PR please and give some feedback if it's useful for the project?

N-Nagorny commented 1 year ago

Regarding keeping sdp_parameters the current size, I don't have other ideas except of copying the approach from JSON representation: replacing member variables, related to session attributes, to a single vector<variant<extmap, hkep>> or something like this.

garethsb commented 1 year ago

Regarding keeping sdp_parameters the current size,

I think it's a nice idea to include the changes to parse and generate extmap and hkep between SDP string and JSON in _sdp/sdpgrammar.cpp etc. so that sdp::make_session_description() and sdp::parse_sesssion_description() support them by default.

My question is whether these attributes are sufficiently general use to mean that nmos::sdp_parameters and the nmos::make_session_description() and nmos::get_session_description_sdp_parameters() functions should include the higher level generate/parse from typed C++ structs/values to/from JSON, or whether we should leave that to user application code, which can access the JSON model directly, alongside those functions?

garethsb commented 1 year ago

@N-Nagorny over to you to see if this meets your requirements :-)

N-Nagorny commented 1 year ago

@garethsb, thank you for the review and the rework you've done! I'm happy with the current code and it meets my requirements!