Skip to content

Instantly share code, notes, and snippets.

View wobbals's full-sized avatar

Charley Robinson wobbals

  • Hopin
  • New York, NY
View GitHub Profile
# Please make this file available to others
# by sending it to <winlirc.configs@gmail.com>
#
# this config file was automatically generated
# using lirc-0.9.0(IRToy) on Thu Jul 14 22:23:51 2016
#
# contributed by
#
# brand: C:\Users\charley\Downloads\winlirc-0.9.0i\WinLIRC\config.cf.conf
private byte [] getYV12(int inputWidth, int inputHeight, Bitmap scaled) {
int [] argb = new int[inputWidth * inputHeight];
scaled.getPixels(argb, 0, inputWidth, 0, 0, inputWidth, inputHeight);
byte [] yuv = new byte[inputWidth*inputHeight*3/2];
encodeYV12(yuv, argb, inputWidth, inputHeight);
scaled.recycle();
@wobbals
wobbals / AvcEncoder.java
Created October 31, 2012 22:46
MediaCodec encoder sample
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 {