Skip to content

Instantly share code, notes, and snippets.

@jeeb
jeeb / wave_ffmpeg_apple.md
Created October 28, 2022 21:39
WAVE, FFmpeg, Apple audio channels
FFmpeg AVChannel WAVE dwChannelMask Apple AudioChannelLabel Apple Notes
AV_CHAN_FRONT_LEFT SPEAKER_FRONT_LEFT kAudioChannelLabel_Left
AV_CHAN_FRONT_RIGHT SPEAKER_FRONT_RIGHT kAudioChannelLabel_Right
AV_CHAN_FRONT_CENTER SPEAKER_FRONT_CENTER kAudioChannelLabel_Center
AV_CHAN_LOW_FREQUENCY SPEAKER_LOW_FREQUENCY kAudioChannelLabel_LFEScreen
AV_CHAN_BACK_LEFT SPEAKER_BACK_LEFT kAudioChannelLabel_LeftSurround
AV_CHAN_BACK_RIGHT SPEAKER_BACK_RIGHT kAudioChannelLabel_RightSurround
AV_CHAN_FRONT_LEFT_OF_CENTER SPEAKER_FRONT_LEFT_OF_CENTER kAudioChannelLabel_LeftCenter
AV_CHAN_FRONT_RIGHT_OF_CENTER SPEAKER_FRONT_RIGHT_OF_CENTER kAudioChannelLabel_RightCenter
--- a/.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7/waflib/Tools/ccroot.py 2016-07-28 23:33:59.985601243 +0300
+++ b/.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7/waflib/Tools/ccroot.py 2016-07-29 00:46:17.597861502 +0300
@@ -293,10 +293,10 @@
@feature('cshlib','cxxshlib','dshlib','fcshlib','vnum')
@after_method('apply_link','propagate_uselib_vars')
def apply_vnum(self):
- if not getattr(self,'vnum','')or os.name!='posix'or self.env.DEST_BINFMT not in('elf','mac-o'):
+ if getattr(self,'vnum',None) is None or os.name!='posix'or self.env.DEST_BINFMT not in('elf','mac-o'):
return
link=self.link_task
@jeeb
jeeb / bashrc_poke.sh
Created June 19, 2016 12:31
ssh-agent thing for cygwin
SSH_ENV=$HOME/.ssh/environment
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
diff --git a/app/src/main/jni/main.cpp b/app/src/main/jni/main.cpp
index 7f536f0..d1d3ffe 100644
--- a/app/src/main/jni/main.cpp
+++ b/app/src/main/jni/main.cpp
@@ -100,6 +100,8 @@ jni_func(void, create) {
mpv = mpv_create();
if (!mpv)
die("context init failed");
+
+ mpv_request_log_messages(mpv, "v");
@jeeb
jeeb / hurr.c
Last active April 22, 2016 17:57
#include <stdio.h>
#include <math.h>
static double normalize(double input) {
if (input < 0.08145)
return input / 4.5;
else
return pow(((input + 0.0993) / 1.0993), (1.0/0.45));
}
@jeeb
jeeb / 01-mingw-w64-build-3.0.6.sh
Created September 24, 2012 21:50
Mingw-w64 toolchain scripts based on Zeranoe's
#!/bin/bash
################################################################################
# MingGW-w64 Build Script 3.0.6
################################################################################
# Copyright (C) 2011-2012 Kyle Schwarz
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
@jeeb
jeeb / ffms2patch.diff
Created September 21, 2012 15:36
ffmpegsource, make mingw-w64 compile
Index: include/ffmscompat.h
===================================================================
--- include/ffmscompat.h (revision 712)
+++ include/ffmscompat.h (working copy)
@@ -39,7 +39,7 @@
# define VERSION_CHECK(LIB, cmp, major, minor, micro, u1, u2, u3) ((LIB) cmp (AV_VERSION_INT(major, minor, micro)))
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && ! defined(__MINGW64_VERSION_MAJOR)
@jeeb
jeeb / compile_zlib_bzip.sh
Created June 20, 2012 09:38
Compilation script for zlib/bzip2 on windows for the usual mingw toolchains
#!/bin/bash
# Get the date and compile folder
DATE_PREFIX=`date +"%Y-%m-%d_%H-%M_"`
FOLDERNAME="${DATE_PREFIX}compiles"
# Get the mingw prefixes
P32B=i686-w64-mingw32
P64B=x86_64-w64-mingw32
@jeeb
jeeb / backup_files.sh
Created May 13, 2012 17:10
Random backup script for various files on a server.
#!/bin/bash
USER_OUTPUT_FOLDER="/home/hogehoge/backups/"
USER_WEBROOT="/var/www/"
USER_APACHE="/etc/apache2/"
USER_MUNIN="/etc/munin/"
USER_PHP="/etc/php5/"
DATE_PREFIX=`date +"%Y-%m-%d_%H-%M_"`
@jeeb
jeeb / readme.txt
Created July 28, 2011 06:12
Msys/mingw howto
# What you need to set up a msys/mingw environment:
# * CCCP's Nicholi's April 2010 msys/mingw package
# http://www.cccp-project.net/nichorai/msys.premade.2010.04.30.7z
# * Newest 7z file with the Msys/Mingw from xhmikosr found at:
# http://sourceforge.net/apps/trac/mpc-hc/wiki/How_to_compile_the_MPC
# * Your favourite mingw package (Komisar's or Alexis', both are fine)
# http://komisar.gin.by/mingw/ (4.5.x generally recommended)
# * Command-line SVN
# http://subversion.tigris.org/files/documents/15/47914/svn-win32-1.6.6.zip
#