This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <ctime> | |
#include <msgpack.hpp> | |
struct message | |
{ | |
std::string tag; | |
std::time_t time; | |
std::string text; | |
MSGPACK_DEFINE(tag, time, text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wizard to convert a cubemap to an equirectangular cubemap. | |
// Put this into an /Editor folder | |
// Run it from Tools > Cubemap to Equirectangular Map | |
using UnityEditor; | |
using UnityEngine; | |
using System.IO; | |
class CubemapToEquirectangularWizard : ScriptableWizard { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Runtime.InteropServices; | |
public class LoadTexture : MonoBehaviour { | |
[DllImport ("__Internal")] | |
private static extern IntPtr CreateTexture(string filename, out int w, out int h); | |
Texture2D tex = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "H264_Decoder.h" | |
H264_Decoder::H264_Decoder(h264_decoder_callback frameCallback, void* user) | |
:codec(NULL) | |
,codec_context(NULL) | |
,parser(NULL) | |
,fp(NULL) | |
,frame(0) | |
,cb_frame(frameCallback) | |
,cb_user(user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class DebugUtil | |
{ | |
public static void DumpRenderTexture(RenderTexture rt, string pngOutPath) | |
{ | |
var oldRT = RenderTexture.active; | |
var tex = new Texture2D(rt.width, rt.height); | |
RenderTexture.active = rt; | |
tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ | |
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu | |
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks | |
# OSX terminal | |
brew install qemu | |
# kernel-qemu is a linux kernel compiled with ARM1176 support. | |
# learn more here: http://xecdesign.com/compiling-a-kernel/ | |
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu | |
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Read video frame with FFmpeg and convert to OpenCV image | |
* | |
* Copyright (c) 2016 yohhoy | |
*/ | |
#include <iostream> | |
#include <vector> | |
// FFmpeg | |
extern "C" { | |
#include <libavformat/avformat.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Author: Renato L. F. Cunha <[email protected]> | |
# This file is available according to the MIT license. Please refer to the | |
# LICENSE file for details. | |
# | |
# This script builds a version of FFmpeg with h.264 support enabled by means of | |
# the libx264 library. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright (c) 2021 Koki Ibukuro | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install qt5 | |
brew linkapp qt5 | |
brew link --force qt5 | |
ln -s /usr/local/opt/qt5/mkspecs /usr/local/mkspecs | |
ln -s /usr/local/opt/qt5/plugins /usr/local/plugins | |
git clone https://github.com/Ableton/link.git | |
cd link | |
git submodule update --init --recursive | |
mkdir build | |
cd build |
OlderNewer