Skip to content

Instantly share code, notes, and snippets.

View shengwen-tw's full-sized avatar

Shengwen Cheng shengwen-tw

View GitHub Profile
@itrobotics
itrobotics / my_waitqueue.c
Last active September 11, 2023 07:41
a simple wait queue example for linux kernel
/*******************************************************************************
* Copyright (c) 2015 Song Yang @ ittraining
*
* All rights reserved.
* This program is free to use, but the ban on selling behavior.
* Modify the program must keep all the original text description.
*
* 保留所有權利。
* 本程式可任意使用,但是禁止販售行為。
* 修改程式時必須保留所有原有文字說明。
@crearo
crearo / gstreamer-recording-dynamic.c
Last active January 17, 2024 18:26
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;
@meffie
meffie / Makefile
Last active December 12, 2023 13:26
libyaml examples
all: emit scan parse
emit.o: emit.c
gcc -c emit.c -g -O0 -Wall
emit: emit.o
gcc -o emit emit.o -lyaml
scan.o: scan.c