Skip to content

Instantly share code, notes, and snippets.

@oleg-login
oleg-login / Output
Created January 17, 2023 13:18 — forked from Circuitsoft/Output
Capture single image V4L2
Driver Caps:
Driver: "omap3"
Card: "omap3/mt9v032//"
Bus: ""
Version: 0.0
Capabilities: 04000001
Camera Cropping:
Bounds: 752x480+0+0
Default: 752x480+0+0
Aspect: 1/1
@oleg-login
oleg-login / libvpu_encode.c
Created January 16, 2023 08:01 — forked from atiti/libvpu_encode.c
IMX6 VPU Encode
// From https://raw.githubusercontent.com/ahmedammar/imx-testing-apps-misc/master/libvpu_encode.c
include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <fcntl.h> /* fcntl */
#include <sys/mman.h> /* mmap */
#include <sys/ioctl.h> /* fopen/fread */
#include "vpu_io.h"
@oleg-login
oleg-login / ip1.c
Created September 16, 2022 07:49 — forked from kelvin-fly/ip1.c
a small code using sockaddr_in and ifreq to get ip and mac
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<net/if.h>
#include<arpa/inet.h>
#include<linux/sockios.h>
int main(int argc,char **argv)
{
@oleg-login
oleg-login / probes-test.c
Created March 17, 2022 12:46
Adding buffer probe from within event probe callback and a query
#include <gst/gst.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static GstElement *
get_element_by_name (GstElement *pipeline, gchar *name)
{
GstElement *element = gst_bin_get_by_name (GST_BIN (pipeline), name);
@oleg-login
oleg-login / tcp_server.c
Created July 27, 2021 12:07 — forked from oleksiiBobko/tcp_server.c
Simple socket server in C using threads (pthread library) Compiles on linux
/*
C socket server example, handles multiple clients using threads
Compile
gcc server.c -lpthread -o server
*/
#include<stdio.h>
#include<string.h> //strlen
#include<stdlib.h> //strlen
#include<sys/socket.h>