Skip to content

Instantly share code, notes, and snippets.

View avspeed's full-sized avatar
🎯
Focusing

Team@AVSPEED avspeed

🎯
Focusing
  • AVSPEED
  • CARY, NC
View GitHub Profile
@avspeed
avspeed / gist:ab60168afe7362cc6e4b
Last active August 29, 2015 14:03
JavaScript calculate distance between 2 points
function toRad(value) {
var RADIANT_CONSTANT = 0.0174532925199433;
return (value * RADIANT_CONSTANT);
}
function calculateDistance(starting, ending) {
var KM_RATIO = 6371;
try {
var dLat = toRad(ending.latitude - starting.latitude);
var dLon = toRad(ending.longitude - starting.longitude);
package com.opentok.media.avc;
import java.io.IOException;
import java.nio.ByteBuffer;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
public class AvcEncoder {