
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
ffmpeg -i rtsp://admin:admin@10.0.0.102:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream -rtsp_transport tcp -r 5 -t 20 -y -vf scale=800:-1 -c:v libx264 -crf 35 -preset veryfast -c:a aac -strict experimental -b:a 192k -ac 2 output.mp4 |
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
//C++ copy files | |
#include <fstream> | |
std::ifstream src("from.ogv", std::ios::binary); | |
std::ofstream dst("to.ogv", std::ios::binary | std::ios::trunc); | |
dst << src.rdbuf(); | |
/* | |
the one-liner: | |
std::ofstream(dest) << std::ifstream(src).rdbuf(); |
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
static jclass callbacksClass; | |
static jobject callbacksInstance; | |
JNIEXPORT void JNICALL Java_com_example_NativeClass_nativeMethod(JNIEnv* env, jclass callingObject, jobject callbacks) | |
{ | |
// Cache the Java callbacks instance | |
callbacksInstance = env->NewGlobalRef(callbacks); | |
// Cache the Java callbacks class (in case of interface, this will be the concrete implementation class) | |
jclass objClass = env->GetObjectClass(callbacks); |
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 | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
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
0 = Success | |
1 = Operation not permitted | |
2 = No such file or directory | |
3 = No such process | |
4 = Interrupted system call | |
5 = Input/output error | |
6 = No such device or address | |
7 = Argument list too long | |
8 = Exec format error |