Update: 2023/11/30 Bruce Momjian's take on things: https://momjian.us/main/blogs/pgblog/2023.html#November_22_2023
Given a table...
CREATE TABLE foo (
  id SERIAL PRIMARY KEY,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  ...
);| var p1 = { | |
| x: 20, | |
| y: 20 | |
| }; | |
| var p2 = { | |
| x: 40, | |
| y: 40 | |
| }; | 
| // memdjpeg - A super simple example of how to decode a jpeg in memory | |
| // Kenneth Finnegan, 2012 | |
| // blog.thelifeofkenneth.com | |
| // | |
| // After installing jpeglib, compile with: | |
| // cc memdjpeg.c -ljpeg -o memdjpeg | |
| // | |
| // Run with: | |
| // ./memdjpeg filename.jpg | |
| // | 
Update: 2023/11/30 Bruce Momjian's take on things: https://momjian.us/main/blogs/pgblog/2023.html#November_22_2023
Given a table...
CREATE TABLE foo (
  id SERIAL PRIMARY KEY,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  ...
);| #!/usr/bin/env python | |
| import gi | |
| import sys | |
| gi.require_version('Gst', '1.0') | |
| from gi.repository import GObject, Gst | |
| import cairo | |
| class Renderer(): | |
| OVERLAY_FRAME_WIDTH = 320 | 
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
you can tweak -b and -fps to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera
| # Example of a script that can be run from the command line and parses out options. This is adapted | |
| # from the Gut command line interface. The first 2 classes are not to be used directly, they are used | |
| # by the Options class and can be ignored. Start reading after the Options class to get a feel for | |
| # how it is used, then work backwards. | |
| # | |
| # This could be easily extracted out into a class itself, but in the interest of how it is being used | |
| # I wanted it all in one file. It is yours to do with what you please, but if you make something out | |
| # of it, I'd love to hear about it. I'm bitwes on godot forums, github, and bitbucket. | |
| extends SceneTree | 
| Node* planeNode = scene_->CreateChild("Plane"); | |
| planeNode->SetScale(Vector3(100.0f, 1.0f, 100.0f)); | |
| StaticModel* planeObject = planeNode->CreateComponent<StaticModel>(); | |
| planeObject->SetModel(cache->GetResource<Model>("Models/Plane.mdl")); | |
| auto mat = cache->GetResource<Material>("Materials/StoneTiled.xml")->Clone(); | |
| mat->SetRenderOrder(100); // Lower render order to render first | |
| auto tecs = mat->GetTechniques(); | |
| for (size_t i = 0; i < tecs.Size(); ++i) | |
| { | 
| class LowPassFilter { | |
| constructor(alpha) { | |
| this.setAlpha(alpha); | |
| this.y = null; | |
| this.s = null; | |
| } | |
| setAlpha(alpha) { | |
| if (alpha <= 0 || alpha > 1.0) { | |
| throw new Error(); | 
| <html> | |
| <head> | |
| <script src="qrc:///qtwebchannel/qwebchannel.js"></script> | |
| <style> | |
| ::selection { | |
| background:transparent; | |
| } | |
| </style> | |
| </head> |