summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-13 12:10:54 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-13 12:10:54 +0000
commit11285cd0d6ef7de80d22187b99376602ed547214 (patch)
tree034c72eea2e7838b08abd00f37acf8e3c9e97949 /media
parente1e535c1c6372f95b4a14b6a00b6d6e7be400c3b (diff)
parentd3383327a749ddb5c0626146c6f83bdfa3ea9936 (diff)
downloadUXP-11285cd0d6ef7de80d22187b99376602ed547214.tar
UXP-11285cd0d6ef7de80d22187b99376602ed547214.tar.gz
UXP-11285cd0d6ef7de80d22187b99376602ed547214.tar.lz
UXP-11285cd0d6ef7de80d22187b99376602ed547214.tar.xz
UXP-11285cd0d6ef7de80d22187b99376602ed547214.zip
Merge branch 'master' into es-modules-work
Diffstat (limited to 'media')
-rw-r--r--media/libyuv/build/mac/find_sdk_uxp.py12
-rw-r--r--media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c7
-rw-r--r--media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.h2
-rw-r--r--media/mtransport/third_party/nICEr/src/ice/ice_component.c12
-rw-r--r--media/webrtc/trunk/build/common.gypi2
-rw-r--r--media/webrtc/trunk/build/mac/find_sdk_uxp.py38
6 files changed, 58 insertions, 15 deletions
diff --git a/media/libyuv/build/mac/find_sdk_uxp.py b/media/libyuv/build/mac/find_sdk_uxp.py
new file mode 100644
index 000000000..b81dba947
--- /dev/null
+++ b/media/libyuv/build/mac/find_sdk_uxp.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+import sys
+import subprocess
+
+def main():
+ return subprocess.call([sys.executable, "../webrtc/trunk/build/mac/find_sdk_uxp.py"] + sys.argv[1:])
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c b/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c
index 6c07ae2a6..f08a20a1f 100644
--- a/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c
@@ -418,8 +418,7 @@ static int nr_ice_candidate_copy_for_triggered_check(nr_ice_cand_pair *pair)
copy->nominated = pair->nominated;
r_log(LOG_ICE,LOG_INFO,"CAND-PAIR(%s): Adding pair to check list and trigger check queue: %s",pair->codeword,pair->as_string);
- if(r=nr_ice_candidate_pair_insert(&pair->remote->stream->check_list,copy))
- ABORT(r);
+ nr_ice_candidate_pair_insert(&pair->remote->stream->check_list,copy);
nr_ice_candidate_pair_trigger_check_append(&pair->remote->stream->trigger_check_queue,copy);
copy->triggered = 1;
@@ -601,7 +600,7 @@ int nr_ice_candidate_pair_trigger_check_append(nr_ice_cand_pair_head *head,nr_ic
return(0);
}
-int nr_ice_candidate_pair_insert(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair)
+void nr_ice_candidate_pair_insert(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair)
{
nr_ice_cand_pair *c1;
@@ -615,8 +614,6 @@ int nr_ice_candidate_pair_insert(nr_ice_cand_pair_head *head,nr_ice_cand_pair *p
c1=TAILQ_NEXT(c1,check_queue_entry);
}
if(!c1) TAILQ_INSERT_TAIL(head,pair,check_queue_entry);
-
- return(0);
}
void nr_ice_candidate_pair_restart_stun_nominated_cb(NR_SOCKET s, int how, void *cb_arg)
diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.h b/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.h
index 171ded4a0..cb3d61eca 100644
--- a/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.h
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.h
@@ -82,7 +82,7 @@ int nr_ice_candidate_pair_dump_state(nr_ice_cand_pair *pair, FILE *out);
int nr_ice_candidate_pair_cancel(nr_ice_peer_ctx *pctx,nr_ice_cand_pair *pair, int move_to_wait_state);
int nr_ice_candidate_pair_select(nr_ice_cand_pair *pair);
int nr_ice_candidate_pair_do_triggered_check(nr_ice_peer_ctx *pctx, nr_ice_cand_pair *pair);
-int nr_ice_candidate_pair_insert(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair);
+void nr_ice_candidate_pair_insert(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair);
int nr_ice_candidate_pair_trigger_check_append(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair);
void nr_ice_candidate_pair_restart_stun_nominated_cb(NR_SOCKET s, int how, void *cb_arg);
int nr_ice_candidate_pair_destroy(nr_ice_cand_pair **pairp);
diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_component.c b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
index 11b4fcbc1..7a42eb208 100644
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
@@ -1613,8 +1613,7 @@ int nr_ice_component_finalize(nr_ice_component *lcomp, nr_ice_component *rcomp)
int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair)
{
- int r,_status;
- int pair_inserted=0;
+ int _status;
/* Pairs for peer reflexive are marked SUCCEEDED immediately */
if (pair->state != NR_ICE_PAIR_STATE_FROZEN &&
@@ -1623,10 +1622,8 @@ int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair
ABORT(R_BAD_ARGS);
}
- if(r=nr_ice_candidate_pair_insert(&pair->remote->stream->check_list,pair))
- ABORT(r);
-
- pair_inserted=1;
+ /* We do not throw an error after this, because we've inserted the pair. */
+ nr_ice_candidate_pair_insert(&pair->remote->stream->check_list,pair);
/* Make sure the check timer is running, if the stream was previously
* started. We will not start streams just because a pair was created,
@@ -1638,13 +1635,12 @@ int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair
!pair->remote->stream->pctx->checks_started)){
if(nr_ice_media_stream_start_checks(pair->remote->stream->pctx, pair->remote->stream)) {
r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s)/CAND-PAIR(%s): Could not restart checks for new pair %s.",pair->remote->stream->pctx->label, pair->codeword, pair->as_string);
- ABORT(R_INTERNAL);
}
}
_status=0;
abort:
- if (_status && !pair_inserted) {
+ if (_status) {
nr_ice_candidate_pair_destroy(&pair);
}
return(_status);
diff --git a/media/webrtc/trunk/build/common.gypi b/media/webrtc/trunk/build/common.gypi
index 68003ba06..47ad77de4 100644
--- a/media/webrtc/trunk/build/common.gypi
+++ b/media/webrtc/trunk/build/common.gypi
@@ -1176,7 +1176,7 @@
# Enable Keystone auto-update support.
'mac_keystone%': 1,
}, { # else: branding!="Chrome" or buildtype!="Official"
- 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
+ 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk_uxp.py <(mac_sdk_path))',
'mac_breakpad_uploads%': 0,
'mac_breakpad%': 0,
'mac_keystone%': 0,
diff --git a/media/webrtc/trunk/build/mac/find_sdk_uxp.py b/media/webrtc/trunk/build/mac/find_sdk_uxp.py
new file mode 100644
index 000000000..3c419f1e4
--- /dev/null
+++ b/media/webrtc/trunk/build/mac/find_sdk_uxp.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import print_function
+import os
+import re
+import sys
+
+if sys.platform == 'darwin':
+ if len(sys.argv) <= 1:
+ print("find_sdk_uxp.py: error: Not enough arguments")
+ sys.exit(1)
+ else:
+ if os.path.isdir(sys.argv[1]):
+ SDK_PATH = sys.argv[1]
+ else:
+ print("find_sdk_uxp.py: error: Specified path does not exist or is not a directory")
+ sys.exit(1)
+
+ KNOWN_SDK_VERSIONS = ["10.7", "10.8", "10.9", "10.10",
+ "10.11", "10.12", "10.13", "10.14",
+ "10.15"]
+
+ REGEX = "^MacOSX(10\.\d+)\.sdk$"
+ SDK_VERSION = re.findall(REGEX, os.path.basename(SDK_PATH))
+
+ if not SDK_VERSION:
+ print("find_sdk_uxp.py: error: Could not determin the MacOS X SDK version")
+ sys.exit(1)
+
+ if SDK_VERSION[0] in KNOWN_SDK_VERSIONS:
+ print(SDK_VERSION[0])
+ else:
+ print("find_sdk_uxp.py: error: Unknown MacOS X SDK version")
+
+sys.exit(0)