This file contains hidden or 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
git -C external/webrtc diff | |
diff --git a/Android.bp b/Android.bp | |
index 204ee672ef..3a18fe095a 100644 | |
--- a/Android.bp | |
+++ b/Android.bp | |
@@ -93,10 +93,10 @@ cc_defaults { | |
}, | |
arch: { | |
arm: { | |
- cflags: ["-DWEBRTC_HAS_NEON"], |
This file contains hidden or 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
fun WebView.postUrl(url: String, postData: ByteArray, additionalHttpHeaders: MutableMap<String, String>) { | |
val savedWebViewClient = if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { | |
webViewClient | |
} | |
else { | |
getLegacyWebViewClient() | |
} | |
webViewClient = object : WebViewClient() { |
This file contains hidden or 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
class B: Encodable { | |
static let needUpdate = Notification.Name("B") | |
var cnt = 0; | |
// and many, many other things | |
func upload() { // serialize and upload it to the cloud | |
sleep(1000) | |
} | |
} | |
class A1 { // this is not thread-safe |
This file contains hidden or 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
#!/bin/sh | |
cd $(dirname $0) | |
# set framework name or read it from project by this variable | |
FRAMEWORK_NAME=$1 | |
#xcframework path | |
FRAMEWORK_PATH="../${FRAMEWORK_NAME}.xcframework" | |
if [ -e ${FRAMEWORK_PATH} ]; then |
This file contains hidden or 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
JNIEXPORT jbyteArray JNICALL | |
Java_com_company_app_tools_NV21FrameRotator_rotateNV21(JNIEnv *env, jclass thiz, | |
jbyteArray data, jbyteArray output, | |
jint width, jint height, jint rotation) { | |
clock_t start, end; | |
double cpu_time_used; | |
start = clock(); | |
jbyte *dataPtr = (*env)->GetByteArrayElements(env, data, NULL); | |
jbyte *outputPtr = (*env)->GetByteArrayElements(env, output, NULL); |
This file contains hidden or 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
// 1,3,5,7…2,4,6,8… will become 1,2,3,4,5,6,7,8 | |
// for T == int, positive | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
template <typename T> |
This file contains hidden or 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
// x1,x2,…,xn,y1,y2,…,yn will become x1,y1,x2,y2,…,x(n),y(n) in-place | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
template <typename T> | |
vector<T> expected(vector<T> const& a) { |
This file contains hidden or 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
#include "App.h" | |
using namespace std::chrono_literals; | |
using namespace std::chrono; | |
#include "../uSockets/src/internal/eventing/epoll_kqueue.h" | |
/* Note that uWS::SSLApp({options}) is the same as uWS::App() when compiled without SSL support */ | |
int main() { |
This file contains hidden or 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
private static byte[] YUV_420_888toNV21(Image image) { | |
// optimized conversion from YUV_420_888 to NV21 | |
// see https://stackoverflow.com/a/52740776/192373 | |
int width = image.getWidth(); | |
int height = image.getHeight(); | |
int ySize = width*height; | |
int uvSize = width*height/4; | |
byte[] nv21 = new byte[ySize + uvSize*2]; |
NewerOlder