Skip to content

Instantly share code, notes, and snippets.

@EricDavies
EricDavies / TextureToJava.
Created June 27, 2017 17:26
Android code for getting a snapshot from a RTCMediaStream.
package com.priologic.easyrtcMedia;
import android.opengl.GLES11Ext;
import android.opengl.GLES20;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import org.webrtc.*;
/**
* Class for converting OES textures RGBA. It should be constructed on a thread with
* an active EGL context, and only be used from that thread. It is used by the EasyrtcSingleFrameCapturer.
@petewarden
petewarden / ..build-protobuf-3.0.0.md
Last active September 27, 2022 08:19 — forked from BennettSmith/..build-protbuf-2.5.0.md
Script used to build Google Protobuf 3.0.0 for use with Xcode 7 / iOS 9. Builds all supported architectures and produces a universal binary static library.

Google Protobuf 3.0.1 - Mac OS X and iOS Support

The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simulator.

This gist was adapted from the original at https://gist.github.com/BennettSmith/7150245, and updated to deal with Xcode 7 and iOS 9, and download protobuf version 3.0.0.

@diogopms
diogopms / videoinfo.js
Last active October 30, 2023 18:24
Get video information using ffprobe and url
var exec = require('child_process').exec
var url = 'https://URL'
var command =
'curl --silent ' + url + '| ffprobe pipe:0 -print_format json -show_format'
exec(command, function callback (error, stdout, stderr) {
if (stderr.indexOf('Invalid data') > -1) {
console.error('Error!')
}