Skip to content

Instantly share code, notes, and snippets.

View tmm1's full-sized avatar

Aman Gupta Karmani tmm1

View GitHub Profile
@tmm1
tmm1 / .block
Last active April 16, 2020 22:51 — forked from piwodlaiwo/.block
World Map in D3v4 with Queue and Tooltips
license: mit
@tmm1
tmm1 / h264bsf.patch
Last active October 9, 2019 23:29
ffmpeg h264_metadata_bsf issue
$ wget https://tmm1.s3.amazonaws.com/h264-metadata.mpg
$ ffmpeg -i h264-metadata.mpg -c copy -map v -f h264 -y /dev/stdout | h264_analyze /dev/stdin > /tmp/a.out
$ ffmpeg -i h264-metadata.mpg -bsf:v h264_metadata -c copy -map v -f h264 -y /dev/stdout | h264_analyze /dev/stdin > /tmp/b.out
$ diff -uNdr /tmp/a.out /tmp/b.out | head -20
--- /tmp/a.out 2019-10-09 14:33:07.000000000 -0700
+++ /tmp/b.out 2019-10-09 14:33:01.000000000 -0700
@@ -144,8 +144,8 @@
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 9152af4fb3..896a945470 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -64,6 +64,7 @@ typedef struct VAAPIEncodeH264Context {
H264RawSEIPicTiming pic_timing;
H264RawSEIRecoveryPoint recovery_point;
H264RawSEIUserDataUnregistered identifier;
+ H264RawSEIUserDataRegistered a53_cc;
char *identifier_string;
diff --git a/SynoBuildConf/abiconfig b/SynoBuildConf/abiconfig
new file mode 100644
index 0000000000..70e02a72b5
--- /dev/null
+++ b/SynoBuildConf/abiconfig
@@ -0,0 +1,4 @@
+{
+ "skip_including": ["d3d11va.h", "dxva2.h", "qsv.h", "vda.h", "vdpau.h", "xvmc.h"],
+ "defines": "#define __STDC_CONSTANT_MACROS"
+}
@tmm1
tmm1 / aes_reader.go
Last active April 30, 2019 16:41
Golang AES CBC PKCS7 io.Reader
package hls
import (
"crypto/aes"
"crypto/cipher"
"io"
"github.com/Sonelli/gojuice/crypto/pkcs7"
)
From db6f249e3d95b124c388f26e39f95b855b15dcdf Mon Sep 17 00:00:00 2001
From: Aman Gupta <aman@tmm1.net>
Date: Fri, 22 Mar 2019 17:54:38 -0700
Subject: [PATCH] avformat/utils: add hack to allow read seeks via io context
Signed-off-by: Aman Gupta <aman@tmm1.net>
---
libavformat/utils.c | 3 +++
1 file changed, 3 insertions(+)
@tmm1
tmm1 / elitedesktop.md
Created April 9, 2012 08:00
How to pimp your linux

THIS ASSUMES YOU RUN DEBIAN (or ubuntu, mint) AND ARE NOT A SUCKA MC

XDM

sudo aptitude install xdm
sudo echo '/usr/bin/xdm' > /etc/X11/default-display-manager

spectrwm, dmenu

sudo aptitude install dmenu libxtst-dev
git clone git://opensource.conformal.com/spectrwm.git
cd spectrwm/linux

commit 7fba8f5e4978b2ff990304f7150918f1cc0eea74
Author: Aman Gupta <aman@tmm1.net>
Date: Fri Mar 27 13:51:30 2009 -0700
dtrace patch for 1.8.7 (run autoconf, then ./configure --disable-pthread --enable-dtrace --prefix=/opt/ruby-dtrace)
diff --git a/Makefile.in b/Makefile.in
index a37bcf6..604bfed 100644
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index c104067a93..d9d6d7c7bf 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -64,6 +64,9 @@ func cname(s string) string {
if strings.HasPrefix(s, "sizeof_") {
return "sizeof(" + cname(s[len("sizeof_"):]) + ")"
}
+ if strings.HasPrefix(s, "objc_class_") {
+ return s[len("objc_class_"):]
@tmm1
tmm1 / mpv-opengl-android.patch
Last active October 9, 2017 19:09
mpv --vo=opengl --opengl-backend=android --wid=(int64_t)(intptr_t)(android.view.Surface *)surface
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c
index 72311e11fa..dab32d122a 100644
--- a/video/out/opengl/context.c
+++ b/video/out/opengl/context.c
@@ -46,10 +46,14 @@ extern const struct mpgl_driver mpgl_driver_angle;
extern const struct mpgl_driver mpgl_driver_angle_es2;
extern const struct mpgl_driver mpgl_driver_dxinterop;
extern const struct mpgl_driver mpgl_driver_rpi;
+extern const struct mpgl_driver mpgl_driver_android;
extern const struct mpgl_driver mpgl_driver_mali;