Skip to content

Instantly share code, notes, and snippets.

View zhengfish's full-sized avatar

zhengfish zhengfish

View GitHub Profile
@mmozeiko
mmozeiko / webcam_capture.c
Created August 28, 2019 20:25
Capture webcam device with Media Foundation API
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include <stdio.h>
#include <intrin.h>
#!/usr/bin/env python3
from struct import unpack
from bcc import BPF
from socket import if_indextoname
C_BPF_KPROBE = """
#include <net/sock.h>