Skip to content

Instantly share code, notes, and snippets.

Avatar

MaZderMind MaZderMind

View GitHub Profile
View cpp_scope_guards.cpp
#include <iostream>
// https://github.com/ricab/scope_guard
#include "scope_guard.hpp"
int main (int argc, char** argv)
{
std::cout << "enter main" << std::endl;
std::cout << "open something" << std::endl;
View RTP-PTP-Testquelle.py
#!/usr/bin/env python3
import logging
import sys
import gi
gi.require_version('Gst', '1.0')
gi.require_version('GstNet', '1.0')
from gi.repository import Gst, GstNet, GObject
View ptp.py
import sys
import gi
gi.require_version('Gst', '1.0')
gi.require_version('GstNet', '1.0')
from gi.repository import Gst, GstNet
ptp_domain = 0
ptp_interfaces = ['enp0s25']
@MaZderMind
MaZderMind / carlmix.py
Created Nov 28, 2018
quick and dirty gstreamer videomixer, switching between 1 of 20 sources
View carlmix.py
#!/usr/bin/env python3
import logging
import random
import signal
import sys
import gi
gi.require_version('Gst', '1.0')
gi.require_version('GstNet', '1.0')
@MaZderMind
MaZderMind / AnnotationUtil.java
Last active Jul 23, 2018
A Variant of the AuthenticationPrincipalArgumentResolver which injects an AuthenticationPrincipal merged into the correct EntityManager
View AnnotationUtil.java
package net.seibertmedia.team-rocket.someproject.configuration.mergedAuthenticationPrincipal;
import java.lang.annotation.Annotation;
import org.springframework.core.MethodParameter;
import org.springframework.core.annotation.AnnotationUtils;
public class AnnotationUtil {
private AnnotationUtil() {
}
View backup-github-locally.sh
#!/bin/bash
set -xe
source /bulk/data/Drittsysteme/_env.sh
DIR="$BASEDIR/github"
NAMES_TMP=/tmp/github-repo-names.tmp
NAMES=/tmp/github-repo-names
PAGE=1
rm -f $NAMES
while true;
View jia-ticket-status-inline.css
.ghx-issue-content {
position: relative;
}
.ghx-plan-extra-fields.ghx-row {
height: 0;
margin: 0
}
.ghx-plan-extra-fields .ghx-extra-field {
position: absolute;
top: 6px;
View 18-videos-hd.sh
#!/bin/sh
gst-launch-1.0 \
videotestsrc pattern=ball foreground-color=0x00ff0000 ! video/x-raw,width=1920,height=1080,framerate=30/1,format=UYVY ! queue ! comp1. \
videotestsrc pattern=ball foreground-color=0x00ffff00 ! video/x-raw,width=1920,height=1080,framerate=30/1,format=UYVY ! queue ! comp1. \
videotestsrc pattern=ball foreground-color=0x0000ff00 ! video/x-raw,width=1920,height=1080,framerate=30/1,format=UYVY ! queue ! comp1. \
\
videotestsrc pattern=ball foreground-color=0x0000ffff ! video/x-raw,width=1920,height=1080,framerate=30/1,format=UYVY ! queue ! comp1. \
videotestsrc pattern=ball foreground-color=0x000000ff ! video/x-raw,width=1920,height=1080,framerate=30/1,format=UYVY ! queue ! comp1. \
videotestsrc pattern=ball foreground-color=0x00ff00ff ! video/x-raw,width=1920,height=1080,framerate=30/1,format=UYVY ! queue ! comp1. \
\
@MaZderMind
MaZderMind / example.cpp
Created Mar 4, 2018
Ideas of how the DMX-Processiung might be programed
View example.cpp
#include <DmxProxy.h>
PmxProxy dmxProxy(processing_function);
void setup() {
}
boolean processing_function(DmxFrame* in, DmxFrame *out)
{
View gist:83454329c1cfdbe8a9518d02f748594d
#!/bin/bash
ffmpeg -hide_banner -y -nostdin -f decklink -list_devices 1 -i dummy 2>&1 | head -n -1 | tail -n +2 | cut -c 31- | cut -c -1 | while read device; do
ffmpeg -hide_banner -y -nostdin -f decklink -list_formats 1 -i $device 2>&1 | head -n -1 | tail -n +4 | cut -c 2- | cut -f1 -d' ' | while read mode; do
for plug in sdi hdmi; do
desc="$device@$mode on $plug"
echo "-> /tmp/$desc.png"
ffmpeg -v warning -hide_banner -y -nostdin -f decklink -video_input $plug -format_code $mode\
-i "$device" \
-ss 1 -vframes 1 \