Skip to content

Instantly share code, notes, and snippets.

UASV-FZZE-SNRN-VWE5-Z2EK-GUH9
RX25-KM7Q-AYTM-A5CH-5Y2G-Q647
MGDJ-XD9D-V7G4-SUVX-T6GM-B3GH
afb47-645bz-11ee-b472
b9b6e-645b3-11ee-bbae
be1cf-645b4-11ee-ae8d
@silently
silently / Compile steps
Created May 27, 2021 07:36
Simple GStreamer audio filter test
gcc -Wall `pkg-config --cflags --libs gstreamer-audio-1.0` -fPIC -c plugin.c -o build/passthrough-plugin.o
gcc -Wall `pkg-config --cflags --libs gstreamer-audio-1.0` -fPIC -c passthrough.c -o build/passthrough.o
g++ -shared -Wall `pkg-config --cflags --libs gstreamer-audio-1.0` -lssl -lcrypto -o build/libpassthrough.so build/passthrough.o build/passthrough-plugin.o
@silently
silently / gstreamer-recording-dynamic.c
Created March 11, 2021 09:23 — forked from crearo/gstreamer-recording-dynamic.c
Example of dynamic pipeline in Gstreamer (recording + display). Stop recording at will by hitting ctrl+c.
#include <string.h>
#include <gst/gst.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
// v4l2src ! tee name=t t. ! x264enc ! mp4mux ! filesink location=/home/rish/Desktop/okay.264 t. ! videoconvert ! autovideosink
static GMainLoop *loop;
@silently
silently / .block
Last active September 9, 2019 15:00
iris
license: mit
@silently
silently / .block
Last active September 9, 2019 12:46
fresh block
license: mit
@silently
silently / gist:adb078679399a5cb0424
Last active November 22, 2016 09:00
3 ways to iterate over arrays
var a = [1, 2, 3, 4, 5];
// standard for loop
for (let i = 0; i < a.length; i++) {
console.log(a[i]);
}
// from ES5
a.forEach(function(item) {
console.log(item);
@silently
silently / gist:3762461
Created September 21, 2012 16:23
[Mongoose] multiple validation errors on Document#save
// package.json file
////////////////////
{
"name": "test",
"version": "0.0.1",
"dependencies": {
"mongoose": "3.1.2"
}
}