Skip to content

Instantly share code, notes, and snippets.

@2bits
2bits / avpc.patch
Created October 18, 2011 19:28
patch for cmake/av_plugin.cmake to add an include directory
--- a/cmake/av_plugin.cmake 2009-08-31 08:56:21.000000000 -0700
+++ b/cmake/av_plugin.cmake 2011-10-18 12:22:25.000000000 -0700
@@ -7,7 +7,8 @@
MACRO(INIT_AUDIO_DEVICE _lib)
INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_core/include")
INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_coreAudio/include")
- INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_audiodevice/")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_audiodevice")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux")
ENDMACRO(INIT_AUDIO_DEVICE)
@2bits
2bits / CMakeLists.txt.patch
Created October 18, 2011 21:10
Patch for AudioCore/CMakeLists.txt adds INCLUDE_DIRECTORIES & adjusts TARGET_LINK_LIBRARIES
--- a/plugins/ADM_audioDevices/AudioCore/CMakeLists.txt 2011-10-17 22:50:10.000000000 -0700
+++ b/plugins/ADM_audioDevices/AudioCore/CMakeLists.txt 2011-10-18 15:40:59.000000000 -0700
@@ -4,6 +4,7 @@
SET(ADM_av_audiocore_SRCS ADM_deviceAudioCore.cpp)
ADD_LIBRARY(ADM_av_audiocore SHARED ${ADM_av_audiocore_SRCS})
-TARGET_LINK_LIBRARIES(ADM_av_audiocore winmm ADM_core ADM_coreAudio)
+INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux")
+TARGET_LINK_LIBRARIES(ADM_av_audiocore ADM_core ADM_coreAudio "-Wl,-framework,Carbon" "-Wl,-framework,AudioUnit")
INIT_AUDIO_DEVICE(ADM_av_audiocore)
@2bits
2bits / ADM_deviceAudioCore.cpp.patch
Created October 18, 2011 21:13
Patch for AudioCore/ADM_deviceAudioCore.cpp to fix the missing or moved #includes
--- a/plugins/ADM_audioDevices/AudioCore/ADM_deviceAudioCore.cpp 2011-10-22 00:23:02.000000000 -0700
+++ b/plugins/ADM_audioDevices/AudioCore/ADM_deviceAudioCore.cpp 2011-10-23 10:12:43.000000000 -0700
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <pthread.h>
#include <AudioUnit/AudioUnit.h>
+#include <CoreServices/CoreServices.h>
#include "ADM_default.h"
#include "ADM_assert.h"
@2bits
2bits / console.log
Created October 18, 2011 23:48
Console log showing avidemux-2.5 svn grunster libADM_av_audiocore.dylib symbol loading failed
10/18/11 4:42:23 PM [ADM_vf_plugin] Scanning done
10/18/11 4:42:23 PM [ADM_av_plugin] Scanning directory /usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/audioDevices/
10/18/11 4:42:23 PM Symbol loading failed for /usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/audioDevices//libADM_av_audiocore.dylib
10/18/11 4:42:23 PM /usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/audioDevices//libADM_av_audiocore.dylib:CannotLoad
10/18/11 4:42:23 PM Name :Esd ApiVersion :1
10/18/11 4:42:23 PM [Filters] Registered filter /usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/audioDevices//libADM_av_esd.dylib as Esd audio device (c) mean
10/18/11 4:42:23 PM [ADM_av_plugin] Scanning done
10/18/11 4:42:23 PM [ADM_ae_plugin] Scanning directory /usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/audioEncoders/
@2bits
2bits / c_m.m.d.patch
Created October 20, 2011 04:05
avidemux-2.5 svn grunster on OSX patch to set PIC=-DPIC not PIC=-fPIC, where -fno-common is already set.
--- a/cmake/patches/config_macosx.mak.diff 2010-05-13 13:01:37.000000000 -0700
+++ b/cmake/patches/config_macosx.mak.diff 2011-10-19 21:00:11.000000000 -0700
@@ -1,6 +1,6 @@
--- config.mak.old 2009-05-01 19:26:13.808782802 +0200
+++ config.mak 2009-05-01 18:10:25.000085291 +0200
-@@ -60,7 +60,7 @@
+@@ -60,7 +60,8 @@
INSTALL=install
LIBTARGET=
-SLIBNAME=$(SLIBPREF)$(FULLNAME)$(SLIBSUF)
@2bits
2bits / dac.h.patch
Created October 20, 2011 10:11
Patch for AudioCore/ADM_deviceAudioCore.h to fix the channels to be uint32_t not uint8_t
--- a/plugins/ADM_audioDevices/AudioCore/ADM_deviceAudioCore.h 2008-07-03 12:29:25.000000000 -0700
+++ b/plugins/ADM_audioDevices/AudioCore/ADM_deviceAudioCore.h 2011-10-20 03:06:58.000000000 -0700
@@ -17,7 +17,7 @@
uint8_t _inUse;
public:
coreAudioDevice(void);
- virtual uint8_t init(uint8_t channels, uint32_t fq);
+ virtual uint8_t init(uint32_t channels, uint32_t fq);
virtual uint8_t play(uint32_t len, float *data);
virtual uint8_t stop(void);
@2bits
2bits / console.log
Created October 20, 2011 22:52
Latest avidemux-2.5 svn grunster branch on OSX showing CoreAudio device working & loading an avi (xvid/mp3)
10/20/11 3:46:46 PM *************************
10/20/11 3:46:46 PM Avidemux v2.5.5
10/20/11 3:46:46 PM *************************
10/20/11 3:46:46 PM http://www.avidemux.org
10/20/11 3:46:46 PM Code : Mean, JSC, Grant Pedersen
10/20/11 3:46:46 PM GFX : Nestor Di, [email protected]
10/20/11 3:46:46 PM Design : Jakub Misak
10/20/11 3:46:46 PM FreeBSD : Anish Mistry, [email protected]
10/20/11 3:46:46 PM Audio : Mihail Zenkov
10/20/11 3:46:46 PM Mac OS X : Kuisathaverat, Harry van der Wolf
@2bits
2bits / explanation.txt
Created October 20, 2011 23:13
Why cmake doesn't create a links for some versioned dylibs
# When Cmake is told the avidemux2_cli target has a target_link_library
# dependency on the versioned ffmpeg lib it just built as a seperate
# library, libADM5avcodec.52.dylib, cmake then does not link against
# that versioned lib. It links against the unversioned lib. Not only
# does it link against the unversioned lib, but it only installs the
# the versioned one and doesn't symlink it to an unversioned one because
# it's not building and installing the library, rather it's building and
# installing the app. The ffmpeg build & install (which did create
# symlinks automatically) is only done into the temporary macbuild
# folder that avidemux itself is building in.
@2bits
2bits / gist:1302841
Created October 21, 2011 01:03
avidemux-2.5 svn grunster QT4 on OSX console log showing some xvid dylib image not found
10/20/11 4:05:16 PM ** conf updated **
10/20/11 4:05:16 PM Unable to load [/usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/videoEncoder/xvid/libADM_vidEnc_Xvid_Qt.dylib]: dlopen(/usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/videoEncoder/xvid/libADM_vidEnc_Xvid_Qt.dylib, 6): Library not loaded: libADM_vidEnc_xvid.dylib
10/20/11 4:05:16 PM Referenced from: /usr/local/Cellar/avidemux/HEAD/bin/avidemux2.app/Contents/MacOS/../lib/ADM_plugins/videoEncoder/xvid/libADM_vidEnc_Xvid_Qt.dylib
10/20/11 4:05:16 PM Reason: image not found
@2bits
2bits / CreateBundle.sh.in.patch
Created October 21, 2011 10:01
Patch for avidemux-2.5svn cmake/Apple/CreateBundle.sh.in to support the new lib versions from ffmpeg
--- a/cmake/Apple/CreateBundle.sh.in 2009-03-08 08:31:58.000000000 -0700
+++ b/cmake/Apple/CreateBundle.sh.in 2011-10-21 02:33:47.000000000 -0700
@@ -20,17 +20,17 @@
fi
# Hopefully temporary fix to softlink libraries
-rm -rf "@CMAKE_INSTALL_PREFIX@/lib/libswscale.dylib"
-rm -rf "@CMAKE_INSTALL_PREFIX@/lib/libpostproc.dylib"
-rm -rf "@CMAKE_INSTALL_PREFIX@/lib/libavutil.dylib"
-rm -rf "@CMAKE_INSTALL_PREFIX@/lib/libavcodec.dylib"