-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into windows-2022
- Loading branch information
Showing
13 changed files
with
385 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -579,13 +579,25 @@ jobs: | |
apt-get --allow-unauthenticated install -y curl g++ git make patch zlib1g-dev libssl-dev bsdmainutils dnsutils unzip | ||
# ubuntu-14.04 ca-certificates are out of date | ||
git config --global http.sslVerify false | ||
curl -sS https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz | tar -xJ | ||
cd Python-3.6.9 | ||
./configure | ||
# build and install openssl | ||
curl -OsSk https://www.openssl.org/source/openssl-1.1.1v.tar.gz | ||
tar xzf openssl-1.1.1v.tar.gz | ||
cd openssl-1.1.1v | ||
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl | ||
make -j1 depend | ||
make -j8 | ||
make install_sw | ||
cd .. | ||
# install ffi.h, which is required for python build | ||
apt install libffi-dev | ||
# build and install python | ||
curl -sSk https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tar.xz | tar -xJ | ||
cd Python-3.11.5 | ||
./configure -C --with-openssl=/usr/local/custom-openssl --with-openssl-rpath=auto | ||
make -j8 | ||
make install | ||
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.6 3 | ||
ln -s /usr/local/bin/python3.6 /usr/bin/python | ||
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.11 3 | ||
ln -s /usr/local/bin/python3.11 /usr/bin/python | ||
curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py | python | ||
curl -sS https://nodejs.org/dist/v12.16.2/node-v12.16.2-linux-x64.tar.xz | tar -xJ | ||
echo "`pwd`/node-v12.16.2-linux-x64/bin" >> $GITHUB_PATH | ||
|
@@ -1075,4 +1087,4 @@ jobs: | |
git config --global user.name 'test-results-uploader' | ||
git config --global user.email '[email protected]' | ||
git commit -qm "Badges for README at ${{ env.GITHUB_COMMIT }}" | ||
git push -f `git remote` badges-${{ env.GITHUB_COMMIT }}:badges | ||
git push -f `git remote` badges-${{ env.GITHUB_COMMIT }}:badges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include "nmos/sdp_attributes.h" | ||
|
||
#include "cpprest/json_utils.h" | ||
|
||
namespace nmos | ||
{ | ||
namespace details | ||
{ | ||
// hm, forward declaration for function in nmos/sdp_utils.cpp | ||
std::pair<sdp::address_type, bool> get_address_type_multicast(const utility::string_t& address); | ||
} | ||
|
||
namespace sdp_attributes | ||
{ | ||
web::json::value make_extmap(const extmap& extmap) | ||
{ | ||
using web::json::value_of; | ||
|
||
const bool keep_order = true; | ||
|
||
return value_of({ | ||
{ sdp::fields::name, sdp::attributes::extmap }, | ||
{ sdp::fields::value, value_of({ | ||
{ sdp::fields::local_id, extmap.local_id }, | ||
{ extmap.direction != sdp::direction{} ? sdp::fields::direction.key : U(""), extmap.direction.name }, | ||
{ sdp::fields::uri, extmap.uri }, | ||
{ !extmap.ext_attributes.empty() ? sdp::fields::extensionattributes.key : U(""), extmap.ext_attributes }, | ||
}, keep_order) } | ||
}, keep_order); | ||
} | ||
|
||
extmap parse_extmap(const web::json::value& extmap) | ||
{ | ||
return{ sdp::fields::local_id(extmap), sdp::direction(sdp::fields::direction(extmap)), sdp::fields::uri(extmap), sdp::fields::extensionattributes(extmap) }; | ||
} | ||
|
||
web::json::value make_hkep(const hkep& hkep) | ||
{ | ||
using web::json::value_of; | ||
|
||
const bool keep_order = true; | ||
|
||
return value_of({ | ||
{ sdp::fields::name, sdp::attributes::hkep }, | ||
{ sdp::fields::value, value_of({ | ||
{ sdp::fields::port, hkep.port }, | ||
{ sdp::fields::network_type, sdp::network_types::internet.name }, | ||
{ sdp::fields::address_type, details::get_address_type_multicast(hkep.unicast_address).first.name }, | ||
{ sdp::fields::unicast_address, hkep.unicast_address }, | ||
{ sdp::fields::node_id, hkep.node_id }, | ||
{ sdp::fields::port_id, hkep.port_id }, | ||
}, keep_order) } | ||
}, keep_order); | ||
} | ||
|
||
hkep parse_hkep(const web::json::value& hkep) | ||
{ | ||
return{ sdp::fields::port(hkep), sdp::fields::unicast_address(hkep), sdp::fields::node_id(hkep), sdp::fields::port_id(hkep) }; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#ifndef NMOS_SDP_ATTRIBUTES_H | ||
#define NMOS_SDP_ATTRIBUTES_H | ||
|
||
#include "sdp/json.h" | ||
|
||
namespace nmos | ||
{ | ||
namespace sdp_attributes | ||
{ | ||
// RTP Header Extensions | ||
// See https://tools.ietf.org/html/rfc5285#section-5 | ||
struct extmap | ||
{ | ||
uint64_t local_id; | ||
sdp::direction direction; | ||
utility::string_t uri; | ||
utility::string_t ext_attributes; | ||
|
||
extmap() : local_id() {} | ||
extmap(uint64_t local_id, const utility::string_t& uri) : local_id(local_id), uri(uri) {} | ||
extmap(uint64_t local_id, const sdp::direction& direction, const utility::string_t& uri) : local_id(local_id), direction(direction), uri(uri) {} | ||
extmap(uint64_t local_id, const utility::string_t& uri, const utility::string_t& ext_attributes) : local_id(local_id), uri(uri), ext_attributes(ext_attributes) {} | ||
extmap(uint64_t local_id, const sdp::direction& direction, const utility::string_t& uri, const utility::string_t& ext_attributes) : local_id(local_id), direction(direction), uri(uri), ext_attributes(ext_attributes) {} | ||
}; | ||
|
||
web::json::value make_extmap(const extmap& extmap); | ||
extmap parse_extmap(const web::json::value& extmap); | ||
|
||
// HDCP Key Exchange Protocol (HKEP) Signalling | ||
// See VSF TR-10-5:2022 Internet Protocol Media Experience (IPMX): HDCP Key Exchange Protocol, Section 10 | ||
// at https://videoservicesforum.com/download/technical_recommendations/VSF_TR-10-5_2022-03-22.pdf | ||
struct hkep | ||
{ | ||
uint64_t port; | ||
utility::string_t unicast_address; | ||
utility::string_t node_id; | ||
utility::string_t port_id; | ||
|
||
hkep() : port() {} | ||
hkep(uint64_t port, const utility::string_t& unicast_address, const utility::string_t& node_id, const utility::string_t& port_id) : port(port), unicast_address(unicast_address), node_id(node_id), port_id(port_id) {} | ||
}; | ||
|
||
web::json::value make_hkep(const hkep& hkep); | ||
hkep parse_hkep(const web::json::value& hkep); | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.