Skip to content

Instantly share code, notes, and snippets.

View j0sh's full-sized avatar
🐠

Josh Allmann j0sh

🐠
View GitHub Profile
@j0sh
j0sh / client.html
Last active August 29, 2015 14:20
websocket disc test
<!DOCTYPE html>
<html>
<head>
<title>WebSocket</title>
<script type="text/javascript">
function domLoaded(s)
{
(new WebSocket("ws://localhost:8080/ws")).onopen = function() {
console.log("Connected to WebSocket Server");
};
@j0sh
j0sh / .vimrc
Created January 17, 2015 00:01
syntax on
set number
set tabstop=4
set shiftwidth=4
set expandtab
set background=dark
colorscheme darkblue
:highlight ExtraWhitespace ctermbg=red guibg=red
"show trailing whitespace
./configure --enable-cross-compile --arch=aarch64 --target-os=darwin \
--cc=`xcrun -f --sdk iphoneos7.1 clang` \
--as=/usr/local/bin/gas-preprocessor.pl \
--extra-cflags='-arch arm64' \
--extra-ldflags='-arch arm64 -miphoneos-version-min=7.0' \
--sysroot=`xcrun --sdk iphoneos7.1 --show-sdk-path` \
--cpu=generic
init_poc in <filename> : (<field1_poc>, <field2_poc>) <picture_num>
init poc in h264_parser.c: (1008,1008) 1008
init poc in h264_slice.c: (1008, 1008) 1008
init poc in h264_slice.c: (1008, 1008) 1008
init poc in h264_parser.c: (1010,1010) 1010
init poc in h264_slice.c: (1010, 1010) 1010
init poc in h264_parser.c: (1012,1012) 1012
init poc in h264_slice.c: (1012, 1012) 1012
init poc in h264_parser.c: (1014,1014) 1014
commit 78abe68e412223fb7a79efaddf3553617f19b66d
Author: Josh Allmann <joshua.allmann@gmail.com>
Date: Thu May 1 10:41:17 2014 -0700
configure: Select zlib when enabling png.
Currently, --disable-everything --enable-decoder=png won't actually
enable the PNG decoder unless --enable-zlib is also specified.
This patch implicitly enables zlib.
@j0sh
j0sh / gist:11380203
Created April 28, 2014 18:32
Set codec ID in the codec context by default.
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 2e41ce4..9e5f08a 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -84,6 +84,7 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
s->av_class = &av_codec_context_class;
s->codec_type = codec ? codec->type : AVMEDIA_TYPE_UNKNOWN;
+ s->codec_id = codec ? codec->id : AV_CODEC_ID_NONE;
s->codec = codec;
@j0sh
j0sh / output
Last active August 29, 2015 13:57
F
==============================================================================
Failure: suite:0:test
expected: Invalid_argument("index out of bounds")
but got: Invalid_argument("index out of bounds")
------------------------------------------------------------------------------
Ran: 1 tests in: 0.00 seconds.
FAILED: Cases: 1 Tried: 1 Errors: 0 Failures: 1 Skip: 0 Todo: 0 Timeouts: 0.
@j0sh
j0sh / gist:8921240
Created February 10, 2014 18:14
Libav Dictionary
From 6919a147f72647de98791af7f0473643adc5854d Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Fri, 4 Jun 2010 22:58:00 -0700
Subject: [PATCH 1/2] Added dictionary data structure. This will make setting custom HTTP headers more flexible.
---
libavformat/http.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/libavformat/http.c b/libavformat/http.c
@j0sh
j0sh / activity.html
Last active August 17, 2018 23:05
Foresight JSBridge demos. frame.html: Frame capture activity.html: Frame capture with audio activity detection
<!DOCTYPE html>
<html>
<head>
<title>Foresight JSBridge Demo: Frame Capturing</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var swf = null, video = null, micid = null;
var WIDTH=320,HEIGHT=240
function getframe()
{
commit b8429744c5963b2b475304abe4952fdf3c10589d
Author: Josh Allmann <joshua.allmann@gmail.com>
Date: Fri Sep 20 09:49:22 2013 -0700
rtpenc/wip: Retransmit H.264 extradata periodically.
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index d330607..c9952c9 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c