Skip to content

Instantly share code, notes, and snippets.

@JBurkeKF
JBurkeKF / YuvFrame.java
Last active Oct 6, 2022
Copy a WebRTC I420Frame, convert it to a Bitmap (requires io.pristine:libjingle)
View YuvFrame.java
// TODO: Your own package name here
//package com.kittehface;
// Some work based on http://stackoverflow.com/a/12702836 by rics (http://stackoverflow.com/users/21047/rics)
import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
// TODO: project should include io.pristine:libjingle from Maven
@JBurkeKF
JBurkeKF / YuvFrame.java
Created Feb 19, 2020
Copy a WebRTC I420Frame, convert it to a Bitmap (requires org.webrtc:google-webrtc and io.github.zncmn.libyuv:core)
View YuvFrame.java
// TODO: Your own package name here
//package com.kittehface;
// Some work based on http://stackoverflow.com/a/12702836 by rics (http://stackoverflow.com/users/21047/rics)
import android.graphics.Bitmap;
import android.graphics.Matrix;
// TODO: project should include org.webrtc:google-webrtc from Google
import org.webrtc.VideoFrame;
@JBurkeKF
JBurkeKF / I420Frame.h
Created Feb 20, 2020
Copy a WebRTC I420Frame, convert it to a UIImage (requires CocoaPods GoogleWebRTC and libyuv-iOS)
View I420Frame.h
//
// I420Frame.h
//
// Created by Joel Burke on 2/7/17.
// Copyright © 2017 Kittehface Software. All rights reserved.
//
// Requires GoogleWebRTC CocoaPod
// Requires libyuv-iOS CocoaPod
#ifndef I420Frame_h
View lfs_file_list.py
import os
import sys
import subprocess
def Execute( command, cwd=None ):
result = 0
output = ""
print( "Run command [" + command + "]" )
View pong.py
mainBall = Circle(180, 200, 10, fill='red')
l = Label('No hit', 200, 20)
padLeft = Rect(5, 180, 5, 40, fill='black')
padRight = Rect(390, 180, 5, 40, fill='black')
mainBall.speedX = 6
mainBall.speedY = 5
mainBall.currentSpeedX = mainBall.speedX