this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Initial stubs for AudioToolbox/AudioFile, CoreBideo and CGL, other misc stuff

+507 -4
+5 -1
etc/dylib.conf
··· 17 17 /usr/lib/libltdl.7.dylib=libc.so.6 18 18 /usr/lib/libmx.A.dylib=libc.so.6 19 19 /usr/lib/libpcap.A.dylib=libpcap.so.1 20 + /usr/lib/libssl.0.9.8.dylib=libssl.so.0.9.8 20 21 21 22 @rpath/libclang.dylib=libclang.so 22 23 @rpath/libobjc.A.dylib=libobjc.A.dylib.so ··· 35 36 36 37 [CoreGraphics.framework] 37 38 A=libCoreGraphics.so 39 + 40 + [CoreVideo.framework] 41 + A=libCoreVideo.so 38 42 39 43 [Foundation.framework] 40 44 C=libFoundation.so ··· 61 65 A=libldap_r-2.4.so.2 62 66 63 67 [OpenGL.framework] 64 - A=libGL.so.1 68 + A=libOpenGL.so 65 69 66 70 [OpenAL.framework] 67 71 A=libopenal.so.1
+2
src/AudioToolbox/AudioFile.cpp
··· 1 + #include "AudioFile.h" 2 +
+86
src/AudioToolbox/AudioFile.h
··· 1 + #ifndef AUDIOFILE_H 2 + #define AUDIOFILE_H 3 + 4 + #include <CoreServices/MacTypes.h> 5 + #include <CoreFoundation/CFURL.h> 6 + 7 + #define kAFInfoDictionary_Artist "artist" 8 + #define kAFInfoDictionary_Album "album" 9 + #define kAFInfoDictionary_Tempo "tempo" 10 + #define kAFInfoDictionary_KeySignature "key signature" 11 + #define kAFInfoDictionary_TimeSignature "time signature" 12 + #define kAFInfoDictionary_TrackNumber "track number" 13 + #define kAFInfoDictionary_Year "year" 14 + #define kAFInfoDictionary_Composer "composer" 15 + #define kAFInfoDictionary_Lyricist "lyricist" 16 + #define kAFInfoDictionary_Genre "genre" 17 + #define kAFInfoDictionary_Title "title" 18 + #define kAFInfoDictionary_RecordedDate "recorded date" 19 + #define kAFInfoDictionary_Comments "comments" 20 + #define kAFInfoDictionary_Copyright "copyright" 21 + #define kAFInfoDictionary_SourceEncoder "source encoder" 22 + #define kAFInfoDictionary_EncodingApplication "encoding application" 23 + #define kAFInfoDictionary_NominalBitRate "nominal bit rate" 24 + #define kAFInfoDictionary_ChannelLayout "channel layout" 25 + #define kAFInfoDictionary_ApproximateDurationInSeconds "approximate duration in seconds" 26 + #define kAFInfoDictionary_SourceBitDepth "source bit depth" 27 + #define kAFInfoDictionary_ISRC "ISRC" 28 + #define kAFInfoDictionary_SubTitle "subtitle" 29 + 30 + enum 31 + { 32 + kAudioFileReadPermission = 0x01, 33 + kAudioFileWritePermission = 0x02, 34 + kAudioFileReadWritePermission = 0x03 35 + }; 36 + 37 + enum 38 + { 39 + kAudioFileFlags_EraseFile = 1, 40 + kAudioFileFlags_DontPageAlignAudioData = 2 41 + }; 42 + 43 + enum { 44 + kAudioFileAIFFType = 'AIFF', 45 + kAudioFileAIFCType = 'AIFC', 46 + kAudioFileWAVEType = 'WAVE', 47 + kAudioFileSoundDesigner2Type = 'Sd2f', 48 + kAudioFileNextType = 'NeXT', 49 + kAudioFileMP3Type = 'MPG3', 50 + kAudioFileMP2Type = 'MPG2', 51 + kAudioFileMP1Type = 'MPG1', 52 + kAudioFileAC3Type = 'ac-3', 53 + kAudioFileAAC_ADTSType = 'adts', 54 + kAudioFileMPEG4Type = 'mp4f', 55 + kAudioFileM4AType = 'm4af', 56 + kAudioFileCAFType = 'caff', 57 + kAudioFile3GPType = '3gpp', 58 + kAudioFile3GP2Type = '3gp2', 59 + kAudioFileAMRType = 'amrf' 60 + }; 61 + typedef UInt32 AudioFileTypeID; 62 + 63 + struct AudioFileTypeAndFormatID 64 + { 65 + AudioFileTypeID mFileType; 66 + UInt32 mFormatID; 67 + }; 68 + 69 + typedef OSStatus (*AudioFile_ReadProc)(void *inClientData, SInt64 inPosition, UInt32 requestCount, void *buffer, UInt32 *actualCount); 70 + typedef SInt64 (*AudioFile_SetSizeProc)(void *inClientData); 71 + typedef OSStatus (*AudioFile_WriteProc)(void *inClientData, SInt64 inPosition, UInt32 requestCount, const void *buffer, UInt32 *actualCount); 72 + typedef SInt64 (*AudioFile_GetSizeProc)(void *inClientData); 73 + 74 + class AudioFileImpl; 75 + typedef AudioFileImpl* AudioFileID; 76 + 77 + extern "C" { 78 + 79 + OSStatus AudioFileOpenURL(CFURLRef inFileRef, SInt8 inPermissions, AudioFileTypeID inFileTypeHint, AudioFileID* outAudioFile); 80 + OSStatus AudioFileOpenWithCallbacks(void* opaque, AudioFile_ReadProc inReadFunc, AudioFile_WriteProc inWriteFunc, AudioFile_GetSizeProc inGetSizeFunc, AudioFile_SetSizeProc inSetSizeFunc, AudioFileTypeID inFileTypeHint, AudioFileID* outAudioFile); 81 + OSStatus AudioFileClose(AudioFileID inAudioFile); 82 + 83 + } 84 + 85 + #endif 86 +
+2 -1
src/AudioToolbox/CMakeLists.txt
··· 14 14 15 15 set(AudioToolbox_SRCS 16 16 AudioConverter.cpp 17 + AudioFile.cpp 17 18 ) 18 19 19 20 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${SUFFIX}/darling") ··· 22 23 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 23 24 24 25 add_library(AudioToolbox SHARED ${AudioToolbox_SRCS}) 25 - target_link_libraries(AudioToolbox util -lavcodec -lavresample CoreFoundation) 26 + target_link_libraries(AudioToolbox util -lavcodec -lavresample -lavformat CoreFoundation) 26 27 27 28 install(TARGETS AudioToolbox DESTINATION "lib${SUFFIX}/darling") 28 29
+29
src/CoreVideo/CMakeLists.txt
··· 1 + project(CoreVideo) 2 + 3 + cmake_minimum_required(VERSION 2.4.0) 4 + if(COMMAND cmake_policy) 5 + cmake_policy(SET CMP0003 NEW) 6 + endif(COMMAND cmake_policy) 7 + 8 + #configure_file(config.h.in config.h) 9 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 10 + 11 + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 12 + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 13 + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../util) 14 + 15 + set(CoreVideo_SRCS 16 + CoreVideo.cpp 17 + CVDisplayLink.cpp 18 + ) 19 + 20 + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${SUFFIX}/darling") 21 + #SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags") 22 + SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 23 + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 24 + 25 + add_library(CoreVideo SHARED ${CoreVideo_SRCS}) 26 + target_link_libraries(CoreVideo util) 27 + 28 + install(TARGETS CoreVideo DESTINATION "lib${SUFFIX}/darling") 29 +
+34
src/CoreVideo/CVBase.h
··· 1 + #ifndef CVBASE_H 2 + #define CVBASE_H 3 + #include <stdint.h> 4 + #include <CoreServices/MacTypes.h> 5 + 6 + struct CVSMPTETime 7 + { 8 + SInt16 subframes; 9 + SInt16 subframeDivisor; 10 + UInt32 counter; 11 + UInt32 type; 12 + UInt32 flags; 13 + SInt16 hours; 14 + SInt16 minutes; 15 + SInt16 seconds; 16 + SInt16 frames; 17 + }; 18 + 19 + 20 + struct CVTimeStamp 21 + { 22 + uint32_t version; 23 + int32_t videoTimeScale; 24 + int64_t videoTime; 25 + uint64_t hostTime; 26 + double rateScalar; 27 + int64_t videoRefreshPeriod; 28 + CVSMPTETime smpteTime; 29 + uint64_t flags; 30 + uint64_t reserved; 31 + }; 32 + 33 + #endif 34 +
+48
src/CoreVideo/CVDisplayLink.cpp
··· 1 + #include "CVDisplayLink.h" 2 + #include <util/debug.h> 3 + 4 + CVDisplayLink::CVDisplayLink() 5 + : m_bRunning(false) 6 + { 7 + STUB(); 8 + } 9 + 10 + CVDisplayLink::~CVDisplayLink() 11 + { 12 + } 13 + 14 + CVReturn CVDisplayLink::start() 15 + { 16 + STUB(); 17 + if (m_bRunning) 18 + return kCVReturnDisplayLinkAlreadyRunning; 19 + 20 + m_bRunning = true; 21 + 22 + return kCVReturnSuccess; 23 + } 24 + 25 + CVReturn CVDisplayLink::stop() 26 + { 27 + STUB(); 28 + 29 + if (!m_bRunning) 30 + return kCVReturnDisplayLinkNotRunning; 31 + 32 + m_bRunning = false; 33 + 34 + return kCVReturnSuccess; 35 + } 36 + 37 + bool CVDisplayLink::isRunning() 38 + { 39 + return m_bRunning; 40 + } 41 + 42 + CVReturn CVDisplayLink::setDisplay(CGLContextObj cglContext, CGLPixelFormatObj cglPixelFormat) 43 + { 44 + STUB(); 45 + 46 + return kCVReturnError; 47 + } 48 +
+21
src/CoreVideo/CVDisplayLink.h
··· 1 + #ifndef CVDISPLAYLINK_H 2 + #define CVDISPLAYLINK_H 3 + #include "CoreVideo.h" 4 + 5 + class CVDisplayLink 6 + { 7 + public: 8 + CVDisplayLink(); 9 + virtual ~CVDisplayLink(); 10 + 11 + CVReturn start(); 12 + CVReturn stop(); 13 + bool isRunning(); 14 + 15 + CVReturn setDisplay(CGLContextObj cglContext, CGLPixelFormatObj cglPixelFormat); 16 + private: 17 + bool m_bRunning; 18 + }; 19 + 20 + #endif 21 +
+33
src/CoreVideo/CVReturn.h
··· 1 + #ifndef CVRETURN_H 2 + #define CVRETURN_H 3 + #include <stdint.h> 4 + 5 + enum 6 + { 7 + kCVReturnSuccess = 0, 8 + kCVReturnFirst = -6660, 9 + kCVReturnError = kCVReturnFirst, 10 + kCVReturnInvalidArgument = -6661, 11 + kCVReturnAllocationFailed = -6662, 12 + 13 + kCVReturnInvalidDisplay = -6670, 14 + kCVReturnDisplayLinkAlreadyRunning = -6671, 15 + kCVReturnDisplayLinkNotRunning = -6672, 16 + kCVReturnDisplayLinkCallbacksNotSet = -6673, 17 + 18 + kCVReturnInvalidPixelFormat = -6680, 19 + kCVReturnInvalidSize = -6681, 20 + kCVReturnInvalidPixelBufferAttributes = -6682, 21 + kCVReturnPixelBufferNotOpenGLCompatible = -6683, 22 + 23 + kCVReturnWouldExceedAllocationThreshold = -6689, 24 + kCVReturnPoolAllocationFailed = -6690, 25 + kCVReturnInvalidPoolAttributes = -6691, 26 + 27 + kCVReturnLast = -6699 28 + }; 29 + 30 + typedef int32_t CVReturn; 31 + 32 + #endif 33 +
+49
src/CoreVideo/CoreVideo.cpp
··· 1 + #include "CoreVideo.h" 2 + #include "CVDisplayLink.h" 3 + #include <util/debug.h> 4 + 5 + CVReturn CVDisplayLinkCreateWithActiveCGDisplays(CVDisplayLinkRef* displayLinkOut) 6 + { 7 + *displayLinkOut = new CVDisplayLink; 8 + return kCVReturnSuccess; 9 + } 10 + 11 + CVReturn CVDisplayLinkStart(CVDisplayLinkRef displayLink) 12 + { 13 + if (!displayLink) 14 + return kCVReturnInvalidArgument; 15 + return displayLink->start(); 16 + } 17 + 18 + CVReturn CVDisplayLinkStop(CVDisplayLinkRef displayLink) 19 + { 20 + if (!displayLink) 21 + return kCVReturnInvalidArgument; 22 + return displayLink->stop(); 23 + } 24 + 25 + Boolean CVDisplayLinkIsRunning(CVDisplayLinkRef displayLink) 26 + { 27 + if (!displayLink) 28 + return false; 29 + return displayLink->isRunning(); 30 + } 31 + 32 + void CVDisplayLinkRelease(CVDisplayLinkRef displayLink) 33 + { 34 + delete displayLink; 35 + } 36 + 37 + CVReturn CVDisplayLinkSetOutputCallback(CVDisplayLinkRef displayLink, CVDisplayLinkOutputCallback callback, void *userInfo) 38 + { 39 + STUB(); 40 + return kCVReturnSuccess; 41 + } 42 + 43 + CVReturn CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(CVDisplayLinkRef displayLink, CGLContextObj cglContext, CGLPixelFormatObj cglPixelFormat) 44 + { 45 + if (!displayLink) 46 + return kCVReturnInvalidArgument; 47 + return displayLink->setDisplay(cglContext, cglPixelFormat); 48 + } 49 +
+31
src/CoreVideo/CoreVideo.h
··· 1 + #ifndef COREVIDEO_H 2 + #define COREVIDEO_H 3 + #include <CoreServices/MacTypes.h> 4 + #include "CVBase.h" 5 + #include <OpenGL/CGLTypes.h> 6 + #include "CVReturn.h" 7 + 8 + class CVDisplayLink; 9 + 10 + typedef CVDisplayLink* CVDisplayLinkRef; 11 + typedef UInt32 CVOptionFlags; 12 + 13 + typedef CVReturn (*CVDisplayLinkOutputCallback)(CVDisplayLinkRef displayLink, const CVTimeStamp *inNow, const CVTimeStamp *inOutputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *displayLinkContext); 14 + 15 + extern "C" { 16 + 17 + CVReturn CVDisplayLinkCreateWithActiveCGDisplays(CVDisplayLinkRef* displayLinkOut); 18 + 19 + CVReturn CVDisplayLinkStart(CVDisplayLinkRef displayLink); 20 + CVReturn CVDisplayLinkStop(CVDisplayLinkRef displayLink); 21 + Boolean CVDisplayLinkIsRunning(CVDisplayLinkRef displayLink); 22 + 23 + void CVDisplayLinkRelease(CVDisplayLinkRef displayLink); 24 + 25 + CVReturn CVDisplayLinkSetOutputCallback(CVDisplayLinkRef displayLink, CVDisplayLinkOutputCallback callback, void *userInfo); 26 + CVReturn CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(CVDisplayLinkRef displayLink, CGLContextObj cglContext, CGLPixelFormatObj cglPixelFormat); 27 + 28 + } 29 + 30 + #endif 31 +
+16
src/OpenGL/CGLContext.h
··· 1 + #ifndef CGLCONTEXT_H 2 + #define CGLCONTEXT_H 3 + 4 + class CGLContextImpl; 5 + 6 + struct CGLContext 7 + { 8 + void* rend; 9 + void* disp; 10 + CGLContextImpl* priv; 11 + void* stak; 12 + }; 13 + 14 + 15 + #endif 16 +
+27
src/OpenGL/CGLContextImpl.cpp
··· 1 + #include "CGLContextImpl.h" 2 + 3 + CGLContextImpl::CGLContextImpl() 4 + { 5 + pthread_mutexattr_t mta; 6 + 7 + pthread_mutexattr_init(&mta); 8 + pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE); 9 + 10 + pthread_mutex_init(&m_lock, &mta); 11 + } 12 + 13 + CGLContextImpl::~CGLContextImpl() 14 + { 15 + pthread_mutex_destroy(&m_lock); 16 + } 17 + 18 + void CGLContextImpl::lock() 19 + { 20 + pthread_mutex_lock(&m_lock); 21 + } 22 + 23 + void CGLContextImpl::unlock() 24 + { 25 + pthread_mutex_unlock(&m_lock); 26 + } 27 +
+18
src/OpenGL/CGLContextImpl.h
··· 1 + #ifndef CGLCONTEXTIMPL_H 2 + #define CGLCONTEXTIMPL_H 3 + #include <pthread.h> 4 + 5 + class CGLContextImpl 6 + { 7 + public: 8 + CGLContextImpl(); 9 + virtual ~CGLContextImpl(); 10 + 11 + void lock(); 12 + void unlock(); 13 + private: 14 + pthread_mutex_t m_lock; 15 + }; 16 + 17 + #endif 18 +
+33
src/OpenGL/CGLTypes.h
··· 1 + #ifndef CGLTYPES_H 2 + #define CGLTYPES_H 3 + #include "CGLContext.h" 4 + 5 + typedef CGLContext* CGLContextObj; 6 + typedef struct CGLPixelFormat* CGLPixelFormatObj; 7 + 8 + enum CGLError 9 + { 10 + kCGLNoError = 0, 11 + kCGLBadAttribute = 10000, 12 + kCGLBadProperty = 10001, 13 + kCGLBadPixelFormat = 10002, 14 + kCGLBadRendererInfo = 10003, 15 + kCGLBadContext = 10004, 16 + kCGLBadDrawable = 10005, 17 + kCGLBadDisplay = 10006, 18 + kCGLBadState = 10007, 19 + kCGLBadValue = 10008, 20 + kCGLBadMatch = 10009, 21 + kCGLBadEnumeration = 10010, 22 + kCGLBadOffScreen = 10011, 23 + kCGLBadFullScreen = 10012, 24 + kCGLBadWindow = 10013, 25 + kCGLBadAddress = 10014, 26 + kCGLBadCodeModule = 10015, 27 + kCGLBadAlloc = 10016, 28 + kCGLBadConnection = 10017 29 + }; 30 + 31 + 32 + #endif 33 +
+29
src/OpenGL/CMakeLists.txt
··· 1 + project(OpenGL) 2 + 3 + cmake_minimum_required(VERSION 2.4.0) 4 + if(COMMAND cmake_policy) 5 + cmake_policy(SET CMP0003 NEW) 6 + endif(COMMAND cmake_policy) 7 + 8 + #configure_file(config.h.in config.h) 9 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 10 + 11 + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 12 + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 13 + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../util) 14 + 15 + set(OpenGL_SRCS 16 + CGLContextImpl.cpp 17 + OpenGL.cpp 18 + ) 19 + 20 + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${SUFFIX}/darling") 21 + #SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags") 22 + SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 23 + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 24 + 25 + add_library(OpenGL SHARED ${OpenGL_SRCS}) 26 + target_link_libraries(OpenGL util -lGL) 27 + 28 + install(TARGETS OpenGL DESTINATION "lib${SUFFIX}/darling") 29 +
+24
src/OpenGL/OpenGL.cpp
··· 1 + #include "CGLTypes.h" 2 + #include "CGLContext.h" 3 + #include "CGLContextImpl.h" 4 + 5 + CGLError CGLLockContext(CGLContextObj context) 6 + { 7 + if (!context) 8 + return kCGLBadContext; 9 + 10 + context->priv->lock(); 11 + 12 + return kCGLNoError; 13 + } 14 + 15 + CGLError CGLUnlockContext(CGLContextObj context) 16 + { 17 + if (!context) 18 + return kCGLBadContext; 19 + 20 + context->priv->unlock(); 21 + 22 + return kCGLNoError; 23 + } 24 +
+14
src/OpenGL/OpenGL.h
··· 1 + #ifndef OPENGL_H 2 + #define OPENGL_H 3 + #include "CGLContext.h" 4 + #include "CGLTypes.h" 5 + 6 + extern "C" { 7 + 8 + CGLError CGLLockContext(CGLContextObj context); 9 + CGLError CGLUnlockContext(CGLContextObj context); 10 + 11 + } 12 + 13 + #endif 14 +
+4
src/libstdc++darwin/CMakeLists.txt
··· 4 4 SET(CMAKE_CXX_COMPILER "/usr/bin/g++") 5 5 set(CMAKE_CXX_FLAGS "") 6 6 7 + if (SUFFIX STREQUAL "32") 8 + set(CMAKE_CXX_FLAGS "-m32") 9 + endif (SUFFIX STREQUAL "32") 10 + 7 11 cmake_minimum_required(VERSION 2.4.0) 8 12 9 13 add_definitions(-Bsymbolic -fno-weak)
+2 -2
src/motool/motool.cpp
··· 17 17 * along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 18 * */ 19 19 20 - #include "MachO.h" 21 - #include "FatMachO.h" 20 + #include <libmach-o/MachO.h> 21 + #include <libmach-o/FatMachO.h> 22 22 #include <iostream> 23 23 #include <sys/types.h> 24 24 #include <sys/stat.h>