Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
commit
05d58c91ef
|
|
@ -17,6 +17,8 @@ build-darwin-*
|
|||
build-vc80/
|
||||
build-vc100/
|
||||
build-vc120/
|
||||
build-vc120-32/
|
||||
build-vc120-64/
|
||||
indra/build-vc[0-9]*
|
||||
indra/CMakeFiles
|
||||
indra/lib/mono/1.0/*.dll
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ Linux.distcc_version =
|
|||
Linux.gcc_version = /usr/bin/gcc-4.6
|
||||
Linux.cxx_version = /usr/bin/g++-4.6
|
||||
|
||||
# Need viewer-build-variables as well as other shared repositories
|
||||
buildscripts_shared_more_NAMEs="build_variables"
|
||||
build_variables_repostory_url = "https://bitbucket.org/lindenlab/viewer-build-variables"
|
||||
|
||||
################################################################
|
||||
#### Examples of how to set the viewer_channel ####
|
||||
#
|
||||
|
|
|
|||
1686
autobuild.xml
1686
autobuild.xml
File diff suppressed because it is too large
Load Diff
|
|
@ -2,16 +2,28 @@
|
|||
#
|
||||
# Compilation options shared by all Second Life components.
|
||||
|
||||
#*****************************************************************************
|
||||
# It's important to realize that CMake implicitly concatenates
|
||||
# CMAKE_CXX_FLAGS with (e.g.) CMAKE_CXX_FLAGS_RELEASE for Release builds. So
|
||||
# set switches in CMAKE_CXX_FLAGS that should affect all builds, but in
|
||||
# CMAKE_CXX_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELWITHDEBINFO for switches
|
||||
# that should affect only that build variant.
|
||||
#
|
||||
# Also realize that CMAKE_CXX_FLAGS may already be partially populated on
|
||||
# entry to this file.
|
||||
#*****************************************************************************
|
||||
|
||||
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
||||
|
||||
include(Variables)
|
||||
|
||||
# Portable compilation flags.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"-DLL_RELEASE=1 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
|
||||
|
||||
|
|
@ -74,9 +86,14 @@ if (WINDOWS)
|
|||
/nologo
|
||||
/Oy-
|
||||
/Zc:wchar_t-
|
||||
/arch:SSE2
|
||||
# /arch:SSE2
|
||||
/fp:fast
|
||||
)
|
||||
|
||||
# Nicky: x64 implies SSE2
|
||||
if( ADDRESS_SIZE EQUAL 32 )
|
||||
add_definitions( /arch:SSE2 )
|
||||
endif()
|
||||
|
||||
# Are we using the crummy Visual Studio KDU build workaround?
|
||||
if (NOT VS_DISABLE_FATAL_WARNINGS)
|
||||
|
|
@ -133,13 +150,6 @@ if (LINUX)
|
|||
# Let's actually get a numerical version of gxx's version
|
||||
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION})
|
||||
|
||||
# Hacks to work around gcc 4.1 TC build pool machines which can't process pragma warning disables
|
||||
# This is pure rubbish; I wish there was another way.
|
||||
#
|
||||
if(${CXX_VERSION_NUMBER} LESS 420)
|
||||
set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-uninitialized -Wno-unused-variable -Wno-unused-function ${CMAKE_CXX_FLAGS}")
|
||||
endif (${CXX_VERSION_NUMBER} LESS 420)
|
||||
|
||||
if(${CXX_VERSION_NUMBER} GREATER 459)
|
||||
set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
|
||||
endif (${CXX_VERSION_NUMBER} GREATER 459)
|
||||
|
|
@ -173,9 +183,9 @@ if (LINUX)
|
|||
add_definitions(-fvisibility=hidden)
|
||||
# don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
|
||||
add_definitions(-DLL_IGNORE_SIGCHLD)
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
if (ADDRESS_SIZE EQUAL 32)
|
||||
add_definitions(-march=pentium4)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
endif (ADDRESS_SIZE EQUAL 32)
|
||||
add_definitions(-mfpmath=sse)
|
||||
#add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
|
||||
if (NOT USESYSTEMLIBS)
|
||||
|
|
@ -201,8 +211,9 @@ if (DARWIN)
|
|||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
set(ENABLE_SIGNING TRUE)
|
||||
set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
|
||||
## Really?? On developer machines too?
|
||||
##set(ENABLE_SIGNING TRUE)
|
||||
##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
|
|
@ -226,22 +237,17 @@ if (LINUX OR DARWIN)
|
|||
set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
elseif (WORD_SIZE EQUAL 64)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m${ADDRESS_SIZE}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m${ADDRESS_SIZE}")
|
||||
endif (LINUX OR DARWIN)
|
||||
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
add_definitions(-DLL_USESYSTEMLIBS=1)
|
||||
|
||||
if (LINUX AND ${ARCH} STREQUAL "i686")
|
||||
if (LINUX AND ADDRESS_SIZE EQUAL 32)
|
||||
add_definitions(-march=pentiumpro)
|
||||
endif (LINUX AND ${ARCH} STREQUAL "i686")
|
||||
endif (LINUX AND ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
else (USESYSTEMLIBS)
|
||||
set(${ARCH}_linux_INCLUDES
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ set(cmake_SOURCE_FILES
|
|||
FindFMODEX.cmake
|
||||
FindGLH.cmake
|
||||
FindGoogleBreakpad.cmake
|
||||
FindGooglePerfTools.cmake
|
||||
FindHUNSPELL.cmake
|
||||
FindJsonCpp.cmake
|
||||
FindNDOF.cmake
|
||||
|
|
@ -46,11 +45,8 @@ set(cmake_SOURCE_FILES
|
|||
GLOD.cmake
|
||||
## GStreamer010Plugin.cmake
|
||||
GetPrerequisites_2_8.cmake
|
||||
## Glui.cmake
|
||||
Glut.cmake
|
||||
GoogleBreakpad.cmake
|
||||
GoogleMock.cmake
|
||||
GooglePerfTools.cmake
|
||||
Havok.cmake
|
||||
Hunspell.cmake
|
||||
JPEG.cmake
|
||||
|
|
@ -90,7 +86,6 @@ set(cmake_SOURCE_FILES
|
|||
Prebuilt.cmake
|
||||
PulseAudio.cmake
|
||||
Python.cmake
|
||||
QuickTimePlugin.cmake
|
||||
TemplateCheck.cmake
|
||||
Tut.cmake
|
||||
UI.cmake
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@ SET(DEBUG_PKG_CONFIG "YES")
|
|||
IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
|
||||
|
||||
# Guess at architecture-specific system library paths.
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
if (ADDRESS_SIZE EQUAL 32)
|
||||
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib)
|
||||
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib)
|
||||
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu)
|
||||
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu)
|
||||
else (WORD_SIZE EQUAL 32)
|
||||
else (ADDRESS_SIZE EQUAL 32)
|
||||
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib)
|
||||
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib)
|
||||
SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu)
|
||||
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
endif (ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
# Use DPKG architecture, if available.
|
||||
IF (${DPKG_ARCH})
|
||||
|
|
|
|||
|
|
@ -30,17 +30,16 @@ if(WINDOWS)
|
|||
#*******************************
|
||||
# Misc shared libs
|
||||
|
||||
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||
set(debug_files
|
||||
openjpegd.dll
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
ssleay32.dll
|
||||
libeay32.dll
|
||||
glod.dll
|
||||
libhunspell.dll
|
||||
)
|
||||
# set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||
# set(debug_files
|
||||
# libapr-1.dll
|
||||
# libaprutil-1.dll
|
||||
# libapriconv-1.dll
|
||||
# ssleay32.dll
|
||||
# libeay32.dll
|
||||
# glod.dll
|
||||
# libhunspell.dll
|
||||
# )
|
||||
|
||||
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(release_files
|
||||
|
|
@ -54,13 +53,8 @@ if(WINDOWS)
|
|||
libhunspell.dll
|
||||
)
|
||||
|
||||
if(USE_TCMALLOC)
|
||||
set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
|
||||
set(release_files ${release_files} libtcmalloc_minimal.dll)
|
||||
endif(USE_TCMALLOC)
|
||||
|
||||
if (FMODEX)
|
||||
set(debug_files ${debug_files} fmodexL.dll)
|
||||
# set(debug_files ${debug_files} fmodexL.dll)
|
||||
set(release_files ${release_files} fmodex.dll)
|
||||
endif (FMODEX)
|
||||
|
||||
|
|
@ -234,10 +228,6 @@ elseif(LINUX)
|
|||
libfontconfig.so.1
|
||||
)
|
||||
|
||||
if (USE_TCMALLOC)
|
||||
set(release_files ${release_files} "libtcmalloc_minimal.so")
|
||||
endif (USE_TCMALLOC)
|
||||
|
||||
if (FMODEX)
|
||||
set(debug_files ${debug_files} "libfmodexL.so")
|
||||
set(release_files ${release_files} "libfmodex.so")
|
||||
|
|
@ -294,13 +284,13 @@ set(third_party_targets ${third_party_targets} ${out_targets})
|
|||
|
||||
|
||||
|
||||
copy_if_different(
|
||||
${debug_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_DEBUG}"
|
||||
out_targets
|
||||
${debug_files}
|
||||
)
|
||||
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
#copy_if_different(
|
||||
# ${debug_src_dir}
|
||||
# "${SHARED_LIB_STAGING_DIR_DEBUG}"
|
||||
# out_targets
|
||||
# ${debug_files}
|
||||
# )
|
||||
#set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ if (NOT USESYSTEMLIBS)
|
|||
if (WINDOWS OR LINUX)
|
||||
use_prebuilt_binary(glext)
|
||||
endif (WINDOWS OR LINUX)
|
||||
use_prebuilt_binary(glh-linear)
|
||||
use_prebuilt_binary(glh_linear)
|
||||
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (NOT USESYSTEMLIBS)
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ set(GLH_FIND_QUIETLY TRUE)
|
|||
if (USESYSTEMLIBS)
|
||||
include(FindGLH)
|
||||
else (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(glh-linear)
|
||||
use_prebuilt_binary(glh_linear)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
set(GLUI OFF CACHE BOOL
|
||||
"GLUI support for the llplugin/llmedia test apps.")
|
||||
else (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(glui)
|
||||
set(GLUI ON CACHE BOOL
|
||||
"GLUI support for the llplugin/llmedia test apps.")
|
||||
endif (USESYSTEMLIBS)
|
||||
|
||||
if (LINUX)
|
||||
set(GLUI ON CACHE BOOL
|
||||
"llplugin media apps HACK for Linux.")
|
||||
endif (LINUX)
|
||||
|
||||
if (DARWIN OR LINUX)
|
||||
set(GLUI_LIBRARY
|
||||
glui)
|
||||
endif (DARWIN OR LINUX)
|
||||
|
||||
if (WINDOWS)
|
||||
set(GLUI_LIBRARY
|
||||
debug glui32.lib
|
||||
optimized glui32.lib)
|
||||
endif (WINDOWS)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
if (WINDOWS)
|
||||
use_prebuilt_binary(freeglut)
|
||||
set(GLUT_LIBRARY
|
||||
debug freeglut_static.lib
|
||||
optimized freeglut_static.lib)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (LINUX)
|
||||
FIND_LIBRARY(GLUT_LIBRARY glut)
|
||||
endif (LINUX)
|
||||
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(GLUT_LIBRARY GLUT)
|
||||
endif (DARWIN)
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
# If you want to enable or disable TCMALLOC in viewer builds, this is the place.
|
||||
# set ON or OFF as desired.
|
||||
set (USE_TCMALLOC OFF)
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindGooglePerfTools)
|
||||
else (USESYSTEMLIBS)
|
||||
if (WINDOWS)
|
||||
if (USE_TCMALLOC)
|
||||
use_prebuilt_binary(gperftools)
|
||||
set(TCMALLOC_LIBRARIES
|
||||
debug libtcmalloc_minimal-debug
|
||||
optimized libtcmalloc_minimal)
|
||||
set(TCMALLOC_LINK_FLAGS "/INCLUDE:__tcmalloc")
|
||||
else (USE_TCMALLOC)
|
||||
set(TCMALLOC_LIBRARIES)
|
||||
set(TCMALLOC_LINK_FLAGS)
|
||||
endif (USE_TCMALLOC)
|
||||
set(GOOGLE_PERFTOOLS_FOUND "YES")
|
||||
endif (WINDOWS)
|
||||
if (LINUX)
|
||||
if (USE_TCMALLOC)
|
||||
use_prebuilt_binary(gperftools)
|
||||
set(TCMALLOC_LIBRARIES
|
||||
tcmalloc)
|
||||
else (USE_TCMALLOC)
|
||||
set(TCMALLOC_LIBRARIES)
|
||||
endif (USE_TCMALLOC)
|
||||
set(PROFILER_LIBRARIES profiler)
|
||||
set(GOOGLE_PERFTOOLS_INCLUDE_DIR
|
||||
${LIBS_PREBUILT_DIR}/include)
|
||||
set(GOOGLE_PERFTOOLS_FOUND "YES")
|
||||
endif (LINUX)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
||||
if (GOOGLE_PERFTOOLS_FOUND)
|
||||
# XXX Disable temporarily, until we have compilation issues on 64-bit
|
||||
# Etch sorted.
|
||||
set(USE_GOOGLE_PERFTOOLS OFF CACHE BOOL "Build with Google PerfTools support.")
|
||||
endif (GOOGLE_PERFTOOLS_FOUND)
|
||||
|
||||
if (WINDOWS)
|
||||
set(USE_GOOGLE_PERFTOOLS ON)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (USE_GOOGLE_PERFTOOLS)
|
||||
if (USE_TCMALLOC)
|
||||
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
|
||||
else (USE_TCMALLOC)
|
||||
set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
|
||||
endif (USE_TCMALLOC)
|
||||
endif (USE_GOOGLE_PERFTOOLS)
|
||||
|
||||
if (USE_GOOGLE_PERFTOOLS)
|
||||
include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
|
||||
set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES})
|
||||
else (USE_GOOGLE_PERFTOOLS)
|
||||
endif (USE_GOOGLE_PERFTOOLS)
|
||||
|
|
@ -4,7 +4,6 @@ include(APR)
|
|||
include(Boost)
|
||||
include(EXPAT)
|
||||
include(ZLIB)
|
||||
include(GooglePerfTools)
|
||||
|
||||
set(LLCOMMON_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llcommon
|
||||
|
|
@ -34,8 +33,6 @@ else (LINUX)
|
|||
${BOOST_SYSTEM_LIBRARY} )
|
||||
endif (LINUX)
|
||||
|
||||
# add_definitions(${TCMALLOC_FLAG})
|
||||
|
||||
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
add_definitions(-DLL_COMMON_LINK_SHARED=1)
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
if(INSTALL_PROPRIETARY)
|
||||
include(Prebuilt)
|
||||
if (WINDOWS)
|
||||
use_prebuilt_binary(quicktime)
|
||||
endif (WINDOWS)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(QUICKTIME_LIBRARY QuickTime)
|
||||
elseif (WINDOWS)
|
||||
set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK"
|
||||
CACHE PATH "Location of the QuickTime SDK.")
|
||||
|
||||
find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient.lib
|
||||
PATHS
|
||||
${ARCH_PREBUILT_DIRS_DEBUG}
|
||||
"${QUICKTIME_SDK_DIR}\\libraries"
|
||||
)
|
||||
|
||||
find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient.lib
|
||||
PATHS
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}
|
||||
"${QUICKTIME_SDK_DIR}\\libraries"
|
||||
)
|
||||
|
||||
if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
|
||||
set(QUICKTIME_LIBRARY
|
||||
optimized ${RELEASE_QUICKTIME_LIBRARY}
|
||||
debug ${DEBUG_QUICKTIME_LIBRARY}
|
||||
)
|
||||
|
||||
endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
|
||||
|
||||
include_directories(
|
||||
${LIBS_PREBUILT_DIR}/include/quicktime
|
||||
"${QUICKTIME_SDK_DIR}\\CIncludes"
|
||||
)
|
||||
endif (DARWIN)
|
||||
|
||||
mark_as_advanced(QUICKTIME_LIBRARY)
|
||||
|
||||
if (QUICKTIME_LIBRARY)
|
||||
set(QUICKTIME ON CACHE BOOL "Build with QuickTime streaming media support.")
|
||||
endif (QUICKTIME_LIBRARY)
|
||||
|
||||
|
|
@ -32,9 +32,9 @@ if (USESYSTEMLIBS)
|
|||
add_definitions(${${pkg}_CFLAGS_OTHERS})
|
||||
endforeach(pkg)
|
||||
else (USESYSTEMLIBS)
|
||||
if (LINUX OR WINDOWS)
|
||||
if (LINUX)
|
||||
use_prebuilt_binary(gtk-atk-pango-glib)
|
||||
endif (LINUX OR WINDOWS)
|
||||
endif (LINUX)
|
||||
|
||||
if (LINUX)
|
||||
set(UI_LIBRARIES
|
||||
|
|
|
|||
|
|
@ -60,46 +60,55 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
|
||||
endif (NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
# If someone has specified an address size, use that to determine the
|
||||
# architecture. Otherwise, let the architecture specify the address size.
|
||||
if (ADDRESS_SIZE EQUAL 32)
|
||||
#message(STATUS "ADDRESS_SIZE is 32")
|
||||
set(ARCH i686)
|
||||
elseif (ADDRESS_SIZE EQUAL 64)
|
||||
#message(STATUS "ADDRESS_SIZE is 64")
|
||||
set(ARCH x86_64)
|
||||
else (ADDRESS_SIZE EQUAL 32)
|
||||
#message(STATUS "ADDRESS_SIZE is UNRECOGNIZED: '${ADDRESS_SIZE}'")
|
||||
# Use Python's platform.machine() since uname -m isn't available everywhere.
|
||||
# Even if you can assume cygwin uname -m, the answer depends on whether
|
||||
# you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will
|
||||
# report a 64-bit processor.
|
||||
execute_process(COMMAND
|
||||
"${PYTHON_EXECUTABLE}" "-c"
|
||||
"import platform; print platform.machine()"
|
||||
OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# We expect values of the form i386, i686, x86_64, AMD64.
|
||||
# In CMake, expressing ARCH.endswith('64') is awkward:
|
||||
string(LENGTH "${ARCH}" ARCH_LENGTH)
|
||||
math(EXPR ARCH_LEN_2 "${ARCH_LENGTH} - 2")
|
||||
string(SUBSTRING "${ARCH}" ${ARCH_LEN_2} 2 ARCH_LAST_2)
|
||||
if (ARCH_LAST_2 STREQUAL 64)
|
||||
#message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}")
|
||||
set(ADDRESS_SIZE 64)
|
||||
else ()
|
||||
#message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}")
|
||||
set(ADDRESS_SIZE 32)
|
||||
endif ()
|
||||
endif (ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(WINDOWS ON BOOL FORCE)
|
||||
set(ARCH i686)
|
||||
set(LL_ARCH ${ARCH}_win32)
|
||||
set(LL_ARCH_DIR ${ARCH}-win32)
|
||||
set(WORD_SIZE 32)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(LINUX ON BOOl FORCE)
|
||||
|
||||
# If someone has specified a word size, use that to determine the
|
||||
# architecture. Otherwise, let the architecture specify the word size.
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
#message(STATUS "WORD_SIZE is 32")
|
||||
set(ARCH i686)
|
||||
elseif (WORD_SIZE EQUAL 64)
|
||||
#message(STATUS "WORD_SIZE is 64")
|
||||
set(ARCH x86_64)
|
||||
else (WORD_SIZE EQUAL 32)
|
||||
#message(STATUS "WORD_SIZE is UNDEFINED")
|
||||
execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/
|
||||
OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (ARCH STREQUAL x86_64)
|
||||
#message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}")
|
||||
set(WORD_SIZE 64)
|
||||
else (ARCH STREQUAL x86_64)
|
||||
#message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}")
|
||||
set(WORD_SIZE 32)
|
||||
endif (ARCH STREQUAL x86_64)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
if (ADDRESS_SIZE EQUAL 32)
|
||||
set(DEB_ARCHITECTURE i386)
|
||||
set(FIND_LIBRARY_USE_LIB64_PATHS OFF)
|
||||
set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH})
|
||||
else (WORD_SIZE EQUAL 32)
|
||||
else (ADDRESS_SIZE EQUAL 32)
|
||||
set(DEB_ARCHITECTURE amd64)
|
||||
set(FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
endif (ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH
|
||||
RESULT_VARIABLE DPKG_RESULT
|
||||
|
|
@ -140,18 +149,15 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
|
||||
|
||||
# Build only for i386 by default, system default on MacOSX 10.6+ is x86_64
|
||||
if (NOT CMAKE_OSX_ARCHITECTURES)
|
||||
set(CMAKE_OSX_ARCHITECTURES "i386")
|
||||
endif (NOT CMAKE_OSX_ARCHITECTURES)
|
||||
set(CMAKE_OSX_ARCHITECTURES "${ARCH}")
|
||||
string(REPLACE "i686" "i386" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}")
|
||||
string(REPLACE "AMD64" "x86_64" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}")
|
||||
|
||||
set(ARCH ${CMAKE_OSX_ARCHITECTURES})
|
||||
set(LL_ARCH ${ARCH}_darwin)
|
||||
set(LL_ARCH_DIR universal-darwin)
|
||||
set(WORD_SIZE 32)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
# Default deploy grid
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ include(Boost)
|
|||
include(LLSharedLibs)
|
||||
include(JsonCpp)
|
||||
include(GoogleBreakpad)
|
||||
include(GooglePerfTools)
|
||||
include(Copy3rdPartyLibs)
|
||||
include(ZLIB)
|
||||
include(URIPARSER)
|
||||
|
|
@ -250,13 +249,13 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
|||
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
##add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif(NOT WORD_SIZE EQUAL 32)
|
||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
# always generate llcommon.pdb, even for "Release" builds
|
||||
set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG")
|
||||
|
|
@ -339,8 +338,4 @@ if (LL_TESTS)
|
|||
## throwing and catching exceptions.
|
||||
##LL_ADD_INTEGRATION_TEST(llexception "" "${test_libs}")
|
||||
|
||||
# *TODO - reenable these once tcmalloc libs no longer break the build.
|
||||
#ADD_BUILD_TEST(llallocator llcommon)
|
||||
#ADD_BUILD_TEST(llallocator_heap_profile llcommon)
|
||||
#ADD_BUILD_TEST(llmemtype llcommon)
|
||||
endif (LL_TESTS)
|
||||
|
|
|
|||
|
|
@ -27,47 +27,6 @@
|
|||
#include "linden_common.h"
|
||||
#include "llallocator.h"
|
||||
|
||||
#if (LL_USE_TCMALLOC && LL_USE_HEAP_PROFILER)
|
||||
|
||||
#include "google/heap-profiler.h"
|
||||
#include "google/commandlineflags_public.h"
|
||||
|
||||
DECLARE_bool(heap_profile_use_stack_trace);
|
||||
//DECLARE_double(tcmalloc_release_rate);
|
||||
|
||||
void LLAllocator::setProfilingEnabled(bool should_enable)
|
||||
{
|
||||
// NULL disables dumping to disk
|
||||
static char const * const PREFIX = NULL;
|
||||
if(should_enable)
|
||||
{
|
||||
HeapProfilerSetUseStackTrace(false);
|
||||
HeapProfilerStart(PREFIX);
|
||||
}
|
||||
else
|
||||
{
|
||||
HeapProfilerStop();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAllocator::isProfiling()
|
||||
{
|
||||
return IsHeapProfilerRunning();
|
||||
}
|
||||
|
||||
std::string LLAllocator::getRawProfile()
|
||||
{
|
||||
// *TODO - fix google-perftools to accept an buffer to avoid this
|
||||
// malloc-copy-free cycle.
|
||||
char * buffer = GetHeapProfile();
|
||||
std::string ret = buffer;
|
||||
free(buffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else // LL_USE_TCMALLOC
|
||||
|
||||
//
|
||||
// stub implementations for when tcmalloc is disabled
|
||||
//
|
||||
|
|
@ -87,8 +46,6 @@ std::string LLAllocator::getRawProfile()
|
|||
return std::string();
|
||||
}
|
||||
|
||||
#endif // LL_USE_TCMALLOC
|
||||
|
||||
LLAllocatorHeapProfile const & LLAllocator::getProfile()
|
||||
{
|
||||
mProf.mLines.clear();
|
||||
|
|
|
|||
|
|
@ -101,7 +101,11 @@ LLCoros::LLCoros():
|
|||
// Previously we used
|
||||
// boost::context::guarded_stack_allocator::default_stacksize();
|
||||
// empirically this is 64KB on Windows and Linux. Try quadrupling.
|
||||
#if ADDRESS_SIZE == 64
|
||||
mStackSize(512*1024)
|
||||
#else
|
||||
mStackSize(256*1024)
|
||||
#endif
|
||||
{
|
||||
// Register our cleanup() method for "mainloop" ticks
|
||||
LLEventPumps::instance().obtain("mainloop").listen(
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ public:
|
|||
virtual std::string describe(bool full=true) const;
|
||||
|
||||
protected:
|
||||
typedef std::vector< std::pair<int, int> > EdgeList;
|
||||
typedef std::vector<int> VertexList;
|
||||
typedef std::vector< std::pair<std::size_t, std::size_t> > EdgeList;
|
||||
typedef std::vector<std::size_t> VertexList;
|
||||
VertexList topo_sort(int vertices, const EdgeList& edges) const;
|
||||
|
||||
/**
|
||||
|
|
@ -508,7 +508,7 @@ public:
|
|||
// been explicitly added. Rely on std::map rejecting a second attempt
|
||||
// to insert the same key. Use the map's size() as the vertex number
|
||||
// to get a distinct value for each successful insertion.
|
||||
typedef std::map<KEY, int> VertexMap;
|
||||
typedef std::map<KEY, std::size_t> VertexMap;
|
||||
VertexMap vmap;
|
||||
// Nest each of these loops because !@#$%? MSVC warns us that its
|
||||
// former broken behavior has finally been fixed -- and our builds
|
||||
|
|
|
|||
|
|
@ -90,33 +90,15 @@ public:
|
|||
#if LL_FASTTIMER_USE_RDTSC
|
||||
static U32 getCPUClockCount32()
|
||||
{
|
||||
U32 ret_val;
|
||||
__asm
|
||||
{
|
||||
_emit 0x0f
|
||||
_emit 0x31
|
||||
shr eax,8
|
||||
shl edx,24
|
||||
or eax, edx
|
||||
mov dword ptr [ret_val], eax
|
||||
}
|
||||
return ret_val;
|
||||
unsigned __int64 val = __rdtsc();
|
||||
val = val >> 8;
|
||||
return static_cast<U32>(val);
|
||||
}
|
||||
|
||||
// return full timer value, *not* shifted by 8 bits
|
||||
static U64 getCPUClockCount64()
|
||||
{
|
||||
U64 ret_val;
|
||||
__asm
|
||||
{
|
||||
_emit 0x0f
|
||||
_emit 0x31
|
||||
mov eax,eax
|
||||
mov edx,edx
|
||||
mov dword ptr [ret_val+4], edx
|
||||
mov dword ptr [ret_val], eax
|
||||
}
|
||||
return ret_val;
|
||||
return static_cast<U64>( __rdtsc() );
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
@ -173,16 +155,16 @@ public:
|
|||
// Mac+Linux+Solaris FAST x86 implementation of CPU clock
|
||||
static U32 getCPUClockCount32()
|
||||
{
|
||||
U64 x;
|
||||
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
|
||||
return (U32)(x >> 8);
|
||||
U32 low(0),high(0);
|
||||
__asm__ volatile (".byte 0x0f, 0x31": "=a"(low), "=d"(high) );
|
||||
return (low>>8) | (high<<24);
|
||||
}
|
||||
|
||||
static U64 getCPUClockCount64()
|
||||
{
|
||||
U64 x;
|
||||
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
|
||||
return x;
|
||||
U32 low(0),high(0);
|
||||
__asm__ volatile (".byte 0x0f, 0x31": "=a"(low), "=d"(high) );
|
||||
return (U64)low | ( ((U64)high) << 32);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ typedef FILE LLFILE;
|
|||
typedef struct _stat llstat;
|
||||
#else
|
||||
typedef struct stat llstat;
|
||||
#include <bits/postypes.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
|
|
|
|||
|
|
@ -12,12 +12,10 @@
|
|||
*
|
||||
* also relevant:
|
||||
*
|
||||
* Template parameter deduction for constructors
|
||||
* http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0091r0.html
|
||||
*
|
||||
* https://github.com/viboes/std-make
|
||||
*
|
||||
* but obviously we're not there yet.
|
||||
* Template argument deduction for class templates
|
||||
* http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0091r3.html
|
||||
* was apparently adopted in June 2016? Unclear when compilers will
|
||||
* portably support this, but there is hope.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2015&license=viewerlgpl$
|
||||
* Copyright (c) 2015, Linden Research, Inc.
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ char* LLPrivateMemoryPool::LLMemoryBlock::allocate()
|
|||
void LLPrivateMemoryPool::LLMemoryBlock::freeMem(void* addr)
|
||||
{
|
||||
//bit index
|
||||
U32 idx = ((U32)addr - (U32)mBuffer - mDummySize) / mSlotSize ;
|
||||
uintptr_t idx = ((uintptr_t)addr - (uintptr_t)mBuffer - mDummySize) / mSlotSize ;
|
||||
|
||||
U32* bits = &mUsageBits ;
|
||||
if(idx >= 32)
|
||||
|
|
@ -773,7 +773,7 @@ char* LLPrivateMemoryPool::LLMemoryChunk::allocate(U32 size)
|
|||
|
||||
void LLPrivateMemoryPool::LLMemoryChunk::freeMem(void* addr)
|
||||
{
|
||||
U32 blk_idx = getPageIndex((U32)addr) ;
|
||||
U32 blk_idx = getPageIndex((uintptr_t)addr) ;
|
||||
LLMemoryBlock* blk = (LLMemoryBlock*)(mMetaBuffer + blk_idx * sizeof(LLMemoryBlock)) ;
|
||||
blk = blk->mSelf ;
|
||||
|
||||
|
|
@ -798,7 +798,7 @@ bool LLPrivateMemoryPool::LLMemoryChunk::empty()
|
|||
|
||||
bool LLPrivateMemoryPool::LLMemoryChunk::containsAddress(const char* addr) const
|
||||
{
|
||||
return (U32)mBuffer <= (U32)addr && (U32)mBuffer + mBufferSize > (U32)addr ;
|
||||
return (uintptr_t)mBuffer <= (uintptr_t)addr && (uintptr_t)mBuffer + mBufferSize > (uintptr_t)addr ;
|
||||
}
|
||||
|
||||
//debug use
|
||||
|
|
@ -831,13 +831,13 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump()
|
|||
for(U32 i = 1 ; i < blk_list.size(); i++)
|
||||
{
|
||||
total_size += blk_list[i]->getBufferSize() ;
|
||||
if((U32)blk_list[i]->getBuffer() < (U32)blk_list[i-1]->getBuffer() + blk_list[i-1]->getBufferSize())
|
||||
if((uintptr_t)blk_list[i]->getBuffer() < (uintptr_t)blk_list[i-1]->getBuffer() + blk_list[i-1]->getBufferSize())
|
||||
{
|
||||
LL_ERRS() << "buffer corrupted." << LL_ENDL ;
|
||||
}
|
||||
}
|
||||
|
||||
llassert_always(total_size + mMinBlockSize >= mBufferSize - ((U32)mDataBuffer - (U32)mBuffer)) ;
|
||||
llassert_always(total_size + mMinBlockSize >= mBufferSize - ((uintptr_t)mDataBuffer - (uintptr_t)mBuffer)) ;
|
||||
|
||||
U32 blk_num = (mBufferSize - (mDataBuffer - mBuffer)) / mMinBlockSize ;
|
||||
for(U32 i = 0 ; i < blk_num ; )
|
||||
|
|
@ -860,7 +860,7 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump()
|
|||
#endif
|
||||
#if 0
|
||||
LL_INFOS() << "---------------------------" << LL_ENDL ;
|
||||
LL_INFOS() << "Chunk buffer: " << (U32)getBuffer() << " size: " << getBufferSize() << LL_ENDL ;
|
||||
LL_INFOS() << "Chunk buffer: " << (uintptr_t)getBuffer() << " size: " << getBufferSize() << LL_ENDL ;
|
||||
|
||||
LL_INFOS() << "available blocks ... " << LL_ENDL ;
|
||||
for(S32 i = 0 ; i < mBlockLevels ; i++)
|
||||
|
|
@ -868,7 +868,7 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump()
|
|||
LLMemoryBlock* blk = mAvailBlockList[i] ;
|
||||
while(blk)
|
||||
{
|
||||
LL_INFOS() << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ;
|
||||
LL_INFOS() << "blk buffer " << (uintptr_t)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ;
|
||||
blk = blk->mNext ;
|
||||
}
|
||||
}
|
||||
|
|
@ -879,7 +879,7 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump()
|
|||
LLMemoryBlock* blk = mFreeSpaceList[i] ;
|
||||
while(blk)
|
||||
{
|
||||
LL_INFOS() << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ;
|
||||
LL_INFOS() << "blk buffer " << (uintptr_t)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ;
|
||||
blk = blk->mNext ;
|
||||
}
|
||||
}
|
||||
|
|
@ -1155,9 +1155,9 @@ void LLPrivateMemoryPool::LLMemoryChunk::addToAvailBlockList(LLMemoryBlock* blk)
|
|||
return ;
|
||||
}
|
||||
|
||||
U32 LLPrivateMemoryPool::LLMemoryChunk::getPageIndex(U32 addr)
|
||||
U32 LLPrivateMemoryPool::LLMemoryChunk::getPageIndex(uintptr_t addr)
|
||||
{
|
||||
return (addr - (U32)mDataBuffer) / mMinBlockSize ;
|
||||
return (addr - (uintptr_t)mDataBuffer) / mMinBlockSize ;
|
||||
}
|
||||
|
||||
//for mAvailBlockList
|
||||
|
|
@ -1495,7 +1495,7 @@ void LLPrivateMemoryPool::removeChunk(LLMemoryChunk* chunk)
|
|||
|
||||
U16 LLPrivateMemoryPool::findHashKey(const char* addr)
|
||||
{
|
||||
return (((U32)addr) / CHUNK_SIZE) % mHashFactor ;
|
||||
return (((uintptr_t)addr) / CHUNK_SIZE) % mHashFactor ;
|
||||
}
|
||||
|
||||
LLPrivateMemoryPool::LLMemoryChunk* LLPrivateMemoryPool::findChunk(const char* addr)
|
||||
|
|
@ -1720,7 +1720,7 @@ LLPrivateMemoryPoolManager::~LLPrivateMemoryPoolManager()
|
|||
S32 k = 0 ;
|
||||
for(mem_allocation_info_t::iterator iter = sMemAllocationTracker.begin() ; iter != sMemAllocationTracker.end() ; ++iter)
|
||||
{
|
||||
LL_INFOS() << k++ << ", " << (U32)iter->first << " : " << iter->second << LL_ENDL ;
|
||||
LL_INFOS() << k++ << ", " << (uintptr_t)iter->first << " : " << iter->second << LL_ENDL ;
|
||||
}
|
||||
sMemAllocationTracker.clear() ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
|
|||
//------------------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
#if !LL_USE_TCMALLOC
|
||||
inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
|
|
@ -187,13 +186,6 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // r
|
|||
#endif
|
||||
}
|
||||
|
||||
#else // USE_TCMALLOC
|
||||
// ll_aligned_foo_16 are not needed with tcmalloc
|
||||
#define ll_aligned_malloc_16 malloc
|
||||
#define ll_aligned_realloc_16(a,b,c) realloc(a,b)
|
||||
#define ll_aligned_free_16 free
|
||||
#endif // USE_TCMALLOC
|
||||
|
||||
inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed with ll_aligned_free_32().
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
|
|
@ -423,7 +415,7 @@ public:
|
|||
{
|
||||
bool operator()(const LLMemoryBlock* const& lhs, const LLMemoryBlock* const& rhs)
|
||||
{
|
||||
return (U32)lhs->getBuffer() < (U32)rhs->getBuffer();
|
||||
return (uintptr_t)lhs->getBuffer() < (uintptr_t)rhs->getBuffer();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
@ -454,7 +446,7 @@ public:
|
|||
void dump() ;
|
||||
|
||||
private:
|
||||
U32 getPageIndex(U32 addr) ;
|
||||
U32 getPageIndex(uintptr_t addr) ;
|
||||
U32 getBlockLevel(U32 size) ;
|
||||
U16 getPageLevel(U32 size) ;
|
||||
LLMemoryBlock* addBlock(U32 blk_idx) ;
|
||||
|
|
|
|||
|
|
@ -138,6 +138,12 @@
|
|||
#pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden
|
||||
#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
|
||||
//#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file
|
||||
|
||||
#if ADDRESS_SIZE == 64
|
||||
// That one is all over the place for x64 builds.
|
||||
#pragma warning( disable : 4267 ) // 'var' : conversion from 'size_t' to 'type', possible loss of data)
|
||||
#endif
|
||||
|
||||
#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
|
||||
#pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
|
||||
#pragma warning( disable : 4996 ) // warning: deprecated
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ static F64 calculate_cpu_frequency(U32 measure_msecs)
|
|||
HANDLE hThread = GetCurrentThread();
|
||||
unsigned long dwCurPriorityClass = GetPriorityClass(hProcess);
|
||||
int iCurThreadPriority = GetThreadPriority(hThread);
|
||||
unsigned long dwProcessMask, dwSystemMask, dwNewMask = 1;
|
||||
DWORD_PTR dwProcessMask, dwSystemMask, dwNewMask = 1;
|
||||
GetProcessAffinityMask(hProcess, &dwProcessMask, &dwSystemMask);
|
||||
|
||||
SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ void set_thread_name( DWORD dwThreadID, const char* threadName)
|
|||
|
||||
__try
|
||||
{
|
||||
::RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (DWORD*)&info );
|
||||
::RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (ULONG_PTR*)&info );
|
||||
}
|
||||
__except(EXCEPTION_CONTINUE_EXECUTION)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ endif (DARWIN)
|
|||
# The following come from LLAddBuildTest.cmake's INTEGRATION_TEST_xxxx target.
|
||||
set_target_properties(http_texture_load
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE ${TCMALLOC_LINK_FLAGS}"
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
|
||||
LINK_FLAGS_RELEASE ""
|
||||
)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ from SocketServer import ThreadingMixIn
|
|||
|
||||
from llbase.fastest_elementtree import parse as xml_parse
|
||||
from llbase import llsd
|
||||
|
||||
# we're in llcorehttp/tests ; testrunner.py is found in llmessage/tests
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
|
||||
"llmessage", "tests"))
|
||||
|
||||
from testrunner import freeport, run, debug, VERBOSE
|
||||
|
||||
class TestHTTPRequestHandler(BaseHTTPRequestHandler):
|
||||
|
|
|
|||
|
|
@ -1,265 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
"""\
|
||||
@file testrunner.py
|
||||
@author Nat Goodspeed
|
||||
@date 2009-03-20
|
||||
@brief Utilities for writing wrapper scripts for ADD_COMM_BUILD_TEST unit tests
|
||||
|
||||
$LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
Second Life Viewer Source Code
|
||||
Copyright (C) 2010, Linden Research, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation;
|
||||
version 2.1 of the License only.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
$/LicenseInfo$
|
||||
"""
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import errno
|
||||
import socket
|
||||
|
||||
VERBOSE = os.environ.get("INTEGRATION_TEST_VERBOSE", "0") # default to quiet
|
||||
# Support usage such as INTEGRATION_TEST_VERBOSE=off -- distressing to user if
|
||||
# that construct actually turns on verbosity...
|
||||
VERBOSE = not re.match(r"(0|off|false|quiet)$", VERBOSE, re.IGNORECASE)
|
||||
|
||||
if VERBOSE:
|
||||
def debug(fmt, *args):
|
||||
print fmt % args
|
||||
sys.stdout.flush()
|
||||
else:
|
||||
debug = lambda *args: None
|
||||
|
||||
def freeport(portlist, expr):
|
||||
"""
|
||||
Find a free server port to use. Specifically, evaluate 'expr' (a
|
||||
callable(port)) until it stops raising EADDRINUSE exception.
|
||||
|
||||
Pass:
|
||||
|
||||
portlist: an iterable (e.g. xrange()) of ports to try. If you exhaust the
|
||||
range, freeport() lets the socket.error exception propagate. If you want
|
||||
unbounded, you could pass itertools.count(baseport), though of course in
|
||||
practice the ceiling is 2^16-1 anyway. But it seems prudent to constrain
|
||||
the range much more sharply: if we're iterating an absurd number of times,
|
||||
probably something else is wrong.
|
||||
|
||||
expr: a callable accepting a port number, specifically one of the items
|
||||
from portlist. If calling that callable raises socket.error with
|
||||
EADDRINUSE, freeport() retrieves the next item from portlist and retries.
|
||||
|
||||
Returns: (expr(port), port)
|
||||
|
||||
port: the value from portlist for which expr(port) succeeded
|
||||
|
||||
Raises:
|
||||
|
||||
Any exception raised by expr(port) other than EADDRINUSE.
|
||||
|
||||
socket.error if, for every item from portlist, expr(port) raises
|
||||
socket.error. The exception you see is the one from the last item in
|
||||
portlist.
|
||||
|
||||
StopIteration if portlist is completely empty.
|
||||
|
||||
Example:
|
||||
|
||||
class Server(HTTPServer):
|
||||
# If you use BaseHTTPServer.HTTPServer, turning off this flag is
|
||||
# essential for proper operation of freeport()!
|
||||
allow_reuse_address = False
|
||||
# ...
|
||||
server, port = freeport(xrange(8000, 8010),
|
||||
lambda port: Server(("localhost", port),
|
||||
MyRequestHandler))
|
||||
# pass 'port' to client code
|
||||
# call server.serve_forever()
|
||||
"""
|
||||
try:
|
||||
# If portlist is completely empty, let StopIteration propagate: that's an
|
||||
# error because we can't return meaningful values. We have no 'port',
|
||||
# therefore no 'expr(port)'.
|
||||
portiter = iter(portlist)
|
||||
port = portiter.next()
|
||||
|
||||
while True:
|
||||
try:
|
||||
# If this value of port works, return as promised.
|
||||
value = expr(port)
|
||||
|
||||
except socket.error, err:
|
||||
# Anything other than 'Address already in use', propagate
|
||||
if err.args[0] != errno.EADDRINUSE:
|
||||
raise
|
||||
|
||||
# Here we want the next port from portiter. But on StopIteration,
|
||||
# we want to raise the original exception rather than
|
||||
# StopIteration. So save the original exc_info().
|
||||
type, value, tb = sys.exc_info()
|
||||
try:
|
||||
try:
|
||||
port = portiter.next()
|
||||
except StopIteration:
|
||||
raise type, value, tb
|
||||
finally:
|
||||
# Clean up local traceback, see docs for sys.exc_info()
|
||||
del tb
|
||||
|
||||
else:
|
||||
debug("freeport() returning %s on port %s", value, port)
|
||||
return value, port
|
||||
|
||||
# Recap of the control flow above:
|
||||
# If expr(port) doesn't raise, return as promised.
|
||||
# If expr(port) raises anything but EADDRINUSE, propagate that
|
||||
# exception.
|
||||
# If portiter.next() raises StopIteration -- that is, if the port
|
||||
# value we just passed to expr(port) was the last available -- reraise
|
||||
# the EADDRINUSE exception.
|
||||
# If we've actually arrived at this point, portiter.next() delivered a
|
||||
# new port value. Loop back to pass that to expr(port).
|
||||
|
||||
except Exception, err:
|
||||
debug("*** freeport() raising %s: %s", err.__class__.__name__, err)
|
||||
raise
|
||||
|
||||
def run(*args, **kwds):
|
||||
"""All positional arguments collectively form a command line, executed as
|
||||
a synchronous child process.
|
||||
In addition, pass server=new_thread_instance as an explicit keyword (to
|
||||
differentiate it from an additional command-line argument).
|
||||
new_thread_instance should be an instantiated but not yet started Thread
|
||||
subclass instance, e.g.:
|
||||
run("python", "-c", 'print "Hello, world!"', server=TestHTTPServer(name="httpd"))
|
||||
"""
|
||||
# If there's no server= keyword arg, don't start a server thread: simply
|
||||
# run a child process.
|
||||
try:
|
||||
thread = kwds.pop("server")
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
# Start server thread. Note that this and all other comm server
|
||||
# threads should be daemon threads: we'll let them run "forever,"
|
||||
# confident that the whole process will terminate when the main thread
|
||||
# terminates, which will be when the child process terminates.
|
||||
thread.setDaemon(True)
|
||||
thread.start()
|
||||
# choice of os.spawnv():
|
||||
# - [v vs. l] pass a list of args vs. individual arguments,
|
||||
# - [no p] don't use the PATH because we specifically want to invoke the
|
||||
# executable passed as our first arg,
|
||||
# - [no e] child should inherit this process's environment.
|
||||
debug("Running %s...", " ".join(args))
|
||||
if kwds.get("use_path", False):
|
||||
rc = os.spawnvp(os.P_WAIT, args[0], args)
|
||||
else:
|
||||
rc = os.spawnv(os.P_WAIT, args[0], args)
|
||||
debug("%s returned %s", args[0], rc)
|
||||
return rc
|
||||
|
||||
# ****************************************************************************
|
||||
# test code -- manual at this point, see SWAT-564
|
||||
# ****************************************************************************
|
||||
def test_freeport():
|
||||
# ------------------------------- Helpers --------------------------------
|
||||
from contextlib import contextmanager
|
||||
# helper Context Manager for expecting an exception
|
||||
# with exc(SomeError):
|
||||
# raise SomeError()
|
||||
# raises AssertionError otherwise.
|
||||
@contextmanager
|
||||
def exc(exception_class, *args):
|
||||
try:
|
||||
yield
|
||||
except exception_class, err:
|
||||
for i, expected_arg in enumerate(args):
|
||||
assert expected_arg == err.args[i], \
|
||||
"Raised %s, but args[%s] is %r instead of %r" % \
|
||||
(err.__class__.__name__, i, err.args[i], expected_arg)
|
||||
print "Caught expected exception %s(%s)" % \
|
||||
(err.__class__.__name__, ', '.join(repr(arg) for arg in err.args))
|
||||
else:
|
||||
assert False, "Failed to raise " + exception_class.__class__.__name__
|
||||
|
||||
# helper to raise specified exception
|
||||
def raiser(exception):
|
||||
raise exception
|
||||
|
||||
# the usual
|
||||
def assert_equals(a, b):
|
||||
assert a == b, "%r != %r" % (a, b)
|
||||
|
||||
# ------------------------ Sanity check the above ------------------------
|
||||
class SomeError(Exception): pass
|
||||
# Without extra args, accept any err.args value
|
||||
with exc(SomeError):
|
||||
raiser(SomeError("abc"))
|
||||
# With extra args, accept only the specified value
|
||||
with exc(SomeError, "abc"):
|
||||
raiser(SomeError("abc"))
|
||||
with exc(AssertionError):
|
||||
with exc(SomeError, "abc"):
|
||||
raiser(SomeError("def"))
|
||||
with exc(AssertionError):
|
||||
with exc(socket.error, errno.EADDRINUSE):
|
||||
raiser(socket.error(errno.ECONNREFUSED, 'Connection refused'))
|
||||
|
||||
# ----------- freeport() without engaging socket functionality -----------
|
||||
# If portlist is empty, freeport() raises StopIteration.
|
||||
with exc(StopIteration):
|
||||
freeport([], None)
|
||||
|
||||
assert_equals(freeport([17], str), ("17", 17))
|
||||
|
||||
# This is the magic exception that should prompt us to retry
|
||||
inuse = socket.error(errno.EADDRINUSE, 'Address already in use')
|
||||
# Get the iterator to our ports list so we can check later if we've used all
|
||||
ports = iter(xrange(5))
|
||||
with exc(socket.error, errno.EADDRINUSE):
|
||||
freeport(ports, lambda port: raiser(inuse))
|
||||
# did we entirely exhaust 'ports'?
|
||||
with exc(StopIteration):
|
||||
ports.next()
|
||||
|
||||
ports = iter(xrange(2))
|
||||
# Any exception but EADDRINUSE should quit immediately
|
||||
with exc(SomeError):
|
||||
freeport(ports, lambda port: raiser(SomeError()))
|
||||
assert_equals(ports.next(), 1)
|
||||
|
||||
# ----------- freeport() with platform-dependent socket stuff ------------
|
||||
# This is what we should've had unit tests to begin with (see CHOP-661).
|
||||
def newbind(port):
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.bind(('127.0.0.1', port))
|
||||
return sock
|
||||
|
||||
bound0, port0 = freeport(xrange(7777, 7780), newbind)
|
||||
assert_equals(port0, 7777)
|
||||
bound1, port1 = freeport(xrange(7777, 7780), newbind)
|
||||
assert_equals(port1, 7778)
|
||||
bound2, port2 = freeport(xrange(7777, 7780), newbind)
|
||||
assert_equals(port2, 7779)
|
||||
with exc(socket.error, errno.EADDRINUSE):
|
||||
bound3, port3 = freeport(xrange(7777, 7780), newbind)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_freeport()
|
||||
|
|
@ -1218,9 +1218,10 @@ void LLImageRaw::fill( const LLColor4U& color )
|
|||
if( 4 == getComponents() )
|
||||
{
|
||||
U32* data = (U32*) getData();
|
||||
U32 rgbaColor = color.asRGBA();
|
||||
for( S32 i = 0; i < pixels; i++ )
|
||||
{
|
||||
data[i] = color.mAll;
|
||||
data[ i ] = rgbaColor;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -41,8 +41,12 @@ LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl()
|
|||
|
||||
std::string LLImageJ2COJ::getEngineInfo() const
|
||||
{
|
||||
#ifdef OPENJPEG_VERSION
|
||||
return std::string("OpenJPEG: " OPENJPEG_VERSION ", Runtime: ")
|
||||
+ opj_version();
|
||||
#else
|
||||
return std::string("OpenJPEG runtime: ") + opj_version();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Return string from message, eliminating final \n if present
|
||||
|
|
|
|||
|
|
@ -40,6 +40,14 @@ set_source_files_properties(${llkdu_HEADER_FILES}
|
|||
|
||||
list(APPEND llkdu_SOURCE_FILES ${llkdu_HEADER_FILES})
|
||||
|
||||
# Our KDU package is built with KDU_X86_INTRINSICS in its .vcxproj file.
|
||||
# Unless that macro is also set for every consumer build, KDU freaks out,
|
||||
# spamming the viewer log with alignment FUD.
|
||||
set_source_files_properties(${llkdu_SOURCE_FILES}
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS
|
||||
"KDU_X86_INTRINSICS")
|
||||
|
||||
if (USE_KDU)
|
||||
add_library (llkdu ${llkdu_SOURCE_FILES})
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* @file include_kdu_xxxx.h
|
||||
* @author Nat Goodspeed
|
||||
* @date 2016-04-25
|
||||
* @brief
|
||||
*
|
||||
* $LicenseInfo:firstyear=2016&license=viewerlgpl$
|
||||
* Copyright (c) 2016, Linden Research, Inc.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// This file specifically omits #include guards of its own: it's sort of an
|
||||
// #include macro used to wrap KDU #includes with proper incantations. Usage:
|
||||
|
||||
// #define kdu_xxxx "kdu_compressed.h" // or whichever KDU header
|
||||
// #include "include_kdu_xxxx.h"
|
||||
// // kdu_xxxx #undef'ed by include_kdu_xxxx.h
|
||||
|
||||
#if LL_DARWIN
|
||||
// don't *really* want to rebuild KDU so turn off specific warnings for this header
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wself-assign-field"
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
#include kdu_xxxx
|
||||
#pragma clang diagnostic pop
|
||||
#elif LL_WINDOWS
|
||||
// With warnings-as-errors in effect, strange relationship between
|
||||
// jp2_output_box and its subclass jp2_target in kdu_compressed.h
|
||||
// causes build failures. Specifically:
|
||||
// warning C4263: 'void kdu_supp::jp2_target::open(kdu_supp::jp2_family_tgt *)' : member function does not override any base class virtual member function
|
||||
// warning C4264: 'void kdu_supp::jp2_output_box::open(kdu_core::kdu_uint32)' : no override available for virtual member function from base 'kdu_supp::jp2_output_box'; function is hidden
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4263 4264)
|
||||
#include kdu_xxxx
|
||||
#pragma warning(pop)
|
||||
#else // some other platform
|
||||
#include kdu_xxxx
|
||||
#endif
|
||||
|
||||
#undef kdu_xxxx
|
||||
|
|
@ -25,21 +25,37 @@
|
|||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llimagej2ckdu.h"
|
||||
|
||||
#include "lltimer.h"
|
||||
#include "llpointer.h"
|
||||
#include "llmath.h"
|
||||
#include "llkdumem.h"
|
||||
#include "stringize.h"
|
||||
|
||||
#include "kdu_block_coding.h"
|
||||
#define kdu_xxxx "kdu_block_coding.h"
|
||||
#include "include_kdu_xxxx.h"
|
||||
|
||||
// Avoid ubiquitous necessity of kdu_core:: qualification
|
||||
using namespace kdu_core;
|
||||
|
||||
#include "llexception.h"
|
||||
#include <boost/exception/diagnostic_information.hpp>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
// stream kdu_dims to std::ostream
|
||||
// Turns out this must NOT be in the anonymous namespace!
|
||||
// It must also precede #include "stringize.h".
|
||||
inline
|
||||
std::ostream& operator<<(std::ostream& out, const kdu_dims& dims)
|
||||
{
|
||||
return out << "(" << dims.pos.x << "," << dims.pos.y << "),"
|
||||
"[" << dims.size.x << "x" << dims.size.y << "]";
|
||||
}
|
||||
|
||||
#include "stringize.h"
|
||||
|
||||
namespace {
|
||||
// Failure to load an image shouldn't crash the whole viewer.
|
||||
struct KDUError: public LLContinueError
|
||||
|
|
@ -82,19 +98,10 @@ std::string report_kdu_exception(kdu_exception mb)
|
|||
}
|
||||
} // anonymous namespace
|
||||
|
||||
// stream kdu_dims to std::ostream
|
||||
// Turns out this must NOT be in the anonymous namespace!
|
||||
inline
|
||||
std::ostream& operator<<(std::ostream& out, const kdu_dims& dims)
|
||||
{
|
||||
return out << "(" << dims.pos.x << "," << dims.pos.y << "),"
|
||||
"[" << dims.size.x << "x" << dims.size.y << "]";
|
||||
}
|
||||
|
||||
class kdc_flow_control {
|
||||
|
||||
public:
|
||||
kdc_flow_control(kdu_image_in_base *img_in, kdu_codestream codestream);
|
||||
kdc_flow_control(kdu_supp::kdu_image_in_base *img_in, kdu_codestream codestream);
|
||||
~kdc_flow_control();
|
||||
bool advance_components();
|
||||
void process_components();
|
||||
|
|
@ -103,7 +110,7 @@ private:
|
|||
|
||||
struct kdc_component_flow_control {
|
||||
public:
|
||||
kdu_image_in_base *reader;
|
||||
kdu_supp::kdu_image_in_base *reader;
|
||||
int vert_subsampling;
|
||||
int ratio_counter; /* Initialized to 0, decremented by `count_delta';
|
||||
when < 0, a new line must be processed, after
|
||||
|
|
@ -143,7 +150,8 @@ std::string LLImageJ2CKDU::getEngineInfo() const
|
|||
class LLKDUDecodeState
|
||||
{
|
||||
public:
|
||||
LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap);
|
||||
LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap,
|
||||
kdu_codestream* codestreamp);
|
||||
~LLKDUDecodeState();
|
||||
bool processTileDecode(F32 decode_time, bool limit_time = true);
|
||||
|
||||
|
|
@ -345,9 +353,9 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, bool keep_codestream, ECod
|
|||
// This method is only called from methods that catch KDUError.
|
||||
// We want to fail the image load, not crash the viewer.
|
||||
LLTHROW(KDUError(STRINGIZE("Component " << idx << " dimensions "
|
||||
<< other_dims
|
||||
<< " do not match component 0 dimensions "
|
||||
<< dims << "!")));
|
||||
<< stringize(other_dims)
|
||||
<< " do not match component 0 dimensions "
|
||||
<< stringize(dims) << "!")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -559,7 +567,8 @@ bool LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco
|
|||
kdu_coords offset = tile_dims.pos - dims.pos;
|
||||
int row_gap = channels*dims.size.x; // inter-row separation
|
||||
kdu_byte *buf = buffer + offset.y*row_gap + offset.x*channels;
|
||||
mDecodeState.reset(new LLKDUDecodeState(tile, buf, row_gap));
|
||||
mDecodeState.reset(new LLKDUDecodeState(tile, buf, row_gap,
|
||||
mCodeStreamp.get()));
|
||||
}
|
||||
// Do the actual processing
|
||||
F32 remaining_time = decode_time - decode_timer.getElapsedTimeF32();
|
||||
|
|
@ -1247,7 +1256,8 @@ all necessary level shifting, type conversion, rounding and truncation. */
|
|||
}
|
||||
}
|
||||
|
||||
LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap)
|
||||
LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap,
|
||||
kdu_codestream* codestreamp)
|
||||
{
|
||||
S32 c;
|
||||
|
||||
|
|
@ -1293,7 +1303,7 @@ LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap)
|
|||
mEngines[c] = kdu_synthesis(res,&mAllocator,use_shorts);
|
||||
}
|
||||
}
|
||||
mAllocator.finalize(); // Actually creates buffering resources
|
||||
mAllocator.finalize(*codestreamp); // Actually creates buffering resources
|
||||
for (c = 0; c < mNumComponents; c++)
|
||||
{
|
||||
mLines[c].create(); // Grabs resources from the allocator.
|
||||
|
|
@ -1351,7 +1361,7 @@ separation between consecutive rows in the real buffer. */
|
|||
|
||||
// kdc_flow_control
|
||||
|
||||
kdc_flow_control::kdc_flow_control (kdu_image_in_base *img_in, kdu_codestream codestream)
|
||||
kdc_flow_control::kdc_flow_control (kdu_supp::kdu_image_in_base *img_in, kdu_codestream codestream)
|
||||
{
|
||||
int n;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,15 +37,8 @@
|
|||
#include "kdu_messaging.h"
|
||||
#include "kdu_params.h"
|
||||
|
||||
// don't *really* want to rebuild KDU so turn off specific warnings for this header
|
||||
#if LL_DARWIN
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
#include "kdu_compressed.h"
|
||||
#pragma clang diagnostic pop
|
||||
#else
|
||||
#include "kdu_compressed.h"
|
||||
#endif
|
||||
#define kdu_xxxx "kdu_compressed.h"
|
||||
#include "include_kdu_xxxx.h"
|
||||
|
||||
#include "kdu_sample_processing.h"
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
|
@ -111,17 +104,19 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
kdu_codestream* operator->() { return &mCodeStream; }
|
||||
// for those few times when you need a raw kdu_codestream*
|
||||
kdu_core::kdu_codestream* get() { return &mCodeStream; }
|
||||
kdu_core::kdu_codestream* operator->() { return &mCodeStream; }
|
||||
|
||||
private:
|
||||
kdu_codestream mCodeStream;
|
||||
kdu_core::kdu_codestream mCodeStream;
|
||||
};
|
||||
|
||||
// Encode variable
|
||||
boost::scoped_ptr<LLKDUMemSource> mInputp;
|
||||
CodeStreamHolder mCodeStreamp;
|
||||
boost::scoped_ptr<kdu_coords> mTPosp; // tile position
|
||||
boost::scoped_ptr<kdu_dims> mTileIndicesp;
|
||||
boost::scoped_ptr<kdu_core::kdu_coords> mTPosp; // tile position
|
||||
boost::scoped_ptr<kdu_core::kdu_dims> mTileIndicesp;
|
||||
int mBlocksSize;
|
||||
int mPrecinctsSize;
|
||||
int mLevels;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@
|
|||
#include "llkdumem.h"
|
||||
#include "llerror.h"
|
||||
|
||||
using namespace kdu_core;
|
||||
using kd_supp_image_local::image_line_buf;
|
||||
|
||||
#if defined(LL_WINDOWS)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,26 +29,22 @@
|
|||
|
||||
// Support classes for reading and writing from memory buffers in KDU
|
||||
#define KDU_NO_THREADS
|
||||
// don't *really* want to rebuild KDU so turn off specific warnings for this header
|
||||
#if LL_DARWIN
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wself-assign-field"
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
#include "kdu_image.h"
|
||||
#pragma clang diagnostic pop
|
||||
#else
|
||||
#include "kdu_image.h"
|
||||
#endif
|
||||
|
||||
#define kdu_xxxx "kdu_image.h"
|
||||
#include "include_kdu_xxxx.h"
|
||||
|
||||
#include "kdu_elementary.h"
|
||||
#include "kdu_messaging.h"
|
||||
#include "kdu_params.h"
|
||||
#include "kdu_compressed.h"
|
||||
|
||||
#define kdu_xxxx "kdu_compressed.h"
|
||||
#include "include_kdu_xxxx.h"
|
||||
|
||||
#include "kdu_sample_processing.h"
|
||||
#include "image_local.h"
|
||||
#include "stdtypes.h"
|
||||
|
||||
class LLKDUMemSource: public kdu_compressed_source
|
||||
class LLKDUMemSource: public kdu_core::kdu_compressed_source
|
||||
{
|
||||
public:
|
||||
LLKDUMemSource(U8 *input_buffer, U32 size)
|
||||
|
|
@ -62,7 +58,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
int read(kdu_byte *buf, int num_bytes)
|
||||
int read(kdu_core::kdu_byte *buf, int num_bytes)
|
||||
{
|
||||
U32 num_out;
|
||||
num_out = num_bytes;
|
||||
|
|
@ -87,7 +83,7 @@ private:
|
|||
U32 mCurPos;
|
||||
};
|
||||
|
||||
class LLKDUMemTarget: public kdu_compressed_target
|
||||
class LLKDUMemTarget: public kdu_core::kdu_compressed_target
|
||||
{
|
||||
public:
|
||||
LLKDUMemTarget(U8 *output_buffer, U32 &output_size, const U32 buffer_size)
|
||||
|
|
@ -102,7 +98,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool write(const kdu_byte *buf, int num_bytes)
|
||||
bool write(const kdu_core::kdu_byte *buf, int num_bytes)
|
||||
{
|
||||
U32 num_out;
|
||||
num_out = num_bytes;
|
||||
|
|
@ -126,7 +122,7 @@ private:
|
|||
U32 *mOutputSize;
|
||||
};
|
||||
|
||||
class LLKDUMemIn : public kdu_image_in_base
|
||||
class LLKDUMemIn : public kdu_supp::kdu_image_in_base
|
||||
{
|
||||
public:
|
||||
LLKDUMemIn(const U8 *data,
|
||||
|
|
@ -134,10 +130,10 @@ public:
|
|||
const U16 rows,
|
||||
const U16 cols,
|
||||
U8 in_num_components,
|
||||
siz_params *siz);
|
||||
kdu_core::siz_params *siz);
|
||||
~LLKDUMemIn();
|
||||
|
||||
bool get(int comp_idx, kdu_line_buf &line, int x_tnum);
|
||||
bool get(int comp_idx, kdu_core::kdu_line_buf &line, int x_tnum);
|
||||
|
||||
private:
|
||||
const U8 *mData;
|
||||
|
|
@ -146,8 +142,8 @@ private:
|
|||
int rows, cols;
|
||||
int alignment_bytes; // Number of 0's at end of each line.
|
||||
int precision[3];
|
||||
image_line_buf *incomplete_lines; // Each "sample" represents a full pixel
|
||||
image_line_buf *free_lines;
|
||||
kd_supp_image_local::image_line_buf *incomplete_lines; // Each "sample" represents a full pixel
|
||||
kd_supp_image_local::image_line_buf *free_lines;
|
||||
int num_unread_rows;
|
||||
|
||||
U32 mCurPos;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "llimagej2ckdu.h"
|
||||
|
||||
#if LL_DARWIN
|
||||
// For this source, it's true that private fields in llkdumem.h are unused.
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
#include "llkdumem.h"
|
||||
|
|
@ -37,7 +38,6 @@
|
|||
#else
|
||||
#include "llkdumem.h"
|
||||
#endif
|
||||
|
||||
#include "kdu_block_coding.h"
|
||||
// Tut header
|
||||
#include "lltut.h"
|
||||
|
|
@ -113,17 +113,19 @@ void LLImageJ2C::setLastError(const std::string&, const std::string&) { }
|
|||
bool LLImageJ2C::updateData() { return false; }
|
||||
void LLImageJ2C::updateRawDiscardLevel() { }
|
||||
|
||||
LLKDUMemIn::LLKDUMemIn(const U8*, const U32, const U16, const U16, const U8, siz_params*) { }
|
||||
LLKDUMemIn::LLKDUMemIn(const U8*, const U32, const U16, const U16, const U8, kdu_core::siz_params*) { }
|
||||
LLKDUMemIn::~LLKDUMemIn() { }
|
||||
bool LLKDUMemIn::get(int, kdu_line_buf&, int) { return false; }
|
||||
bool LLKDUMemIn::get(int, kdu_core::kdu_line_buf&, int) { return false; }
|
||||
|
||||
// Stub Kakadu Library calls
|
||||
// they're all namespaced now
|
||||
namespace kdu_core {
|
||||
kdu_tile_comp kdu_tile::access_component(int ) { kdu_tile_comp a; return a; }
|
||||
kdu_block_encoder::kdu_block_encoder() { }
|
||||
kdu_block_decoder::kdu_block_decoder() { }
|
||||
void kdu_block::set_max_passes(int , bool ) { }
|
||||
void kdu_block::set_max_bytes(int , bool ) { }
|
||||
void kdu_tile::close(kdu_thread_env* ) { }
|
||||
void kdu_tile::close(kdu_thread_env *, bool) {}
|
||||
int kdu_tile::get_num_components() { return 0; }
|
||||
bool kdu_tile::get_ycc() { return false; }
|
||||
void kdu_tile::set_components_of_interest(int , const int* ) { }
|
||||
|
|
@ -156,14 +158,14 @@ void kdu_codestream::set_fussy() { }
|
|||
void kdu_codestream::get_dims(int, kdu_dims&, bool ) { }
|
||||
int kdu_codestream::get_min_dwt_levels() { return 5; }
|
||||
int kdu_codestream::get_max_tile_layers() { return 1; }
|
||||
void kdu_codestream::change_appearance(bool, bool, bool) { }
|
||||
void kdu_codestream::change_appearance(bool, bool, bool, kdu_thread_env *) {}
|
||||
void kdu_codestream::get_tile_dims(kdu_coords, int, kdu_dims&, bool ) { }
|
||||
void kdu_codestream::destroy() { }
|
||||
void kdu_codestream::collect_timing_stats(int ) { }
|
||||
void kdu_codestream::set_max_bytes(kdu_long, bool, bool ) { }
|
||||
void kdu_codestream::get_valid_tiles(kdu_dims& ) { }
|
||||
void kdu_codestream::create(kdu_compressed_source*, kdu_thread_env*) { }
|
||||
void kdu_codestream::apply_input_restrictions( int, int, int, int, kdu_dims*, kdu_component_access_mode ) { }
|
||||
void kdu_codestream::apply_input_restrictions(int, int, int, int, kdu_dims const *, kdu_component_access_mode, kdu_thread_env *, kdu_quality_limiter const *) {}
|
||||
void kdu_codestream::get_subsampling(int , kdu_coords&, bool ) { }
|
||||
void kdu_codestream::flush(kdu_long *, int, kdu_uint16 *, bool, bool, double, kdu_thread_env*, int) { }
|
||||
void kdu_codestream::set_resilient(bool ) { }
|
||||
|
|
@ -178,13 +180,15 @@ siz_params* kdu_codestream::access_siz() { return NULL; }
|
|||
kdu_tile kdu_codestream::open_tile(kdu_coords , kdu_thread_env* ) { kdu_tile a; return a; }
|
||||
kdu_codestream_comment kdu_codestream::add_comment() { kdu_codestream_comment a; return a; }
|
||||
void kdu_subband::close_block(kdu_block*, kdu_thread_env*) { }
|
||||
void kdu_subband::get_valid_blocks(kdu_dims &indices) { }
|
||||
kdu_block* kdu_subband::open_block(kdu_coords, int*, kdu_thread_env*) { return NULL; }
|
||||
void kdu_subband::get_valid_blocks(kdu_dims &indices) const { }
|
||||
kdu_block * kdu_subband::open_block(kdu_coords, int *, kdu_thread_env *, int, bool) { return NULL; }
|
||||
bool kdu_codestream_comment::put_text(const char*) { return false; }
|
||||
void kdu_customize_warnings(kdu_message*) { }
|
||||
void kdu_customize_errors(kdu_message*) { }
|
||||
kdu_long kdu_multi_analysis::create(kdu_codestream, kdu_tile, kdu_thread_env*, kdu_thread_queue*, int, kdu_roi_image*, int) { kdu_long a = 0; return a; }
|
||||
kdu_long kdu_multi_analysis::create(kdu_codestream, kdu_tile, kdu_thread_env *,kdu_thread_queue *, int, kdu_roi_image *, int, kdu_sample_allocator *, kdu_push_pull_params const *) { return kdu_long(0); }
|
||||
void kdu_multi_analysis::destroy(kdu_thread_env *) {}
|
||||
siz_params::siz_params() : kdu_params(NULL, false, false, false, false, false) { }
|
||||
siz_params::~siz_params() {}
|
||||
void siz_params::finalize(bool ) { }
|
||||
void siz_params::copy_with_xforms(kdu_params*, int, int, bool, bool, bool) { }
|
||||
int siz_params::write_marker_segment(kdu_output*, kdu_params*, int) { return 0; }
|
||||
|
|
@ -193,10 +197,15 @@ bool siz_params::read_marker_segment(kdu_uint16, int, kdu_byte a[], int) { retur
|
|||
|
||||
kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*, int) { }
|
||||
void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long, kdu_thread_env* ) { }
|
||||
kdu_sample_allocator::~kdu_sample_allocator() {}
|
||||
void kdu_sample_allocator::do_finalize(kdu_codestream) {}
|
||||
void (*kdu_convert_ycc_to_rgb_rev16)(kdu_int16*,kdu_int16*,kdu_int16*,int);
|
||||
void (*kdu_convert_ycc_to_rgb_irrev16)(kdu_int16*,kdu_int16*,kdu_int16*,int);
|
||||
void (*kdu_convert_ycc_to_rgb_rev32)(kdu_int32*,kdu_int32*,kdu_int32*,int);
|
||||
void (*kdu_convert_ycc_to_rgb_irrev32)(float*,float*,float*,int);
|
||||
bool kdu_core_sample_alignment_checker(int, int, int, int, bool, bool) { return false; }
|
||||
void kdu_pull_ifc::destroy() {}
|
||||
} // namespace kdu_core
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
// TUT
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ inline F64 llabs(const F64 a)
|
|||
|
||||
inline S32 lltrunc( F32 f )
|
||||
{
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER )
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && (ADDRESS_SIZE == 32)
|
||||
// Avoids changing the floating point control word.
|
||||
// Add or subtract 0.5 - epsilon and then round
|
||||
const static U32 zpfp[] = { 0xBEFFFFFF, 0x3EFFFFFF };
|
||||
|
|
@ -179,7 +179,7 @@ inline S32 lltrunc( F64 f )
|
|||
|
||||
inline S32 llfloor( F32 f )
|
||||
{
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER )
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && (ADDRESS_SIZE == 32)
|
||||
// Avoids changing the floating point control word.
|
||||
// Accurate (unlike Stereopsis version) for all values between S32_MIN and S32_MAX and slightly faster than Stereopsis version.
|
||||
// Add -(0.5 - epsilon) and then round
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#error "Please include llmath.h before this file."
|
||||
#endif
|
||||
|
||||
#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 ) )
|
||||
#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) )
|
||||
#error SSE2 not enabled. LLVector4a and related class will not compile.
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -47,14 +47,7 @@ class LLColor4U
|
|||
{
|
||||
public:
|
||||
|
||||
union
|
||||
{
|
||||
U8 mV[LENGTHOFCOLOR4U];
|
||||
U32 mAll;
|
||||
LLColor4* mSources;
|
||||
LLColor4U* mSourcesU;
|
||||
};
|
||||
|
||||
U8 mV[LENGTHOFCOLOR4U];
|
||||
|
||||
LLColor4U(); // Initializes LLColor4U to (0, 0, 0, 1)
|
||||
LLColor4U(U8 r, U8 g, U8 b); // Initializes LLColor4U to (r, g, b, 1)
|
||||
|
|
@ -132,6 +125,9 @@ public:
|
|||
return LLColor4(*this);
|
||||
}
|
||||
|
||||
U32 asRGBA() const;
|
||||
void fromRGBA( U32 aVal );
|
||||
|
||||
static LLColor4U white;
|
||||
static LLColor4U black;
|
||||
static LLColor4U red;
|
||||
|
|
@ -565,6 +561,26 @@ void LLColor4U::setVecScaleClamp(const LLColor3& color)
|
|||
mV[3] = 255;
|
||||
}
|
||||
|
||||
inline U32 LLColor4U::asRGBA() const
|
||||
{
|
||||
// Little endian: values are swapped in memory. The original code access the array like a U32, so we need to swap here
|
||||
|
||||
return (mV[3] << 24) | (mV[2] << 16) | (mV[1] << 8) | mV[0];
|
||||
}
|
||||
|
||||
inline void LLColor4U::fromRGBA( U32 aVal )
|
||||
{
|
||||
// Little endian: values are swapped in memory. The original code access the array like a U32, so we need to swap here
|
||||
|
||||
mV[ 0 ] = aVal & 0xFF;
|
||||
aVal >>= 8;
|
||||
mV[ 1 ] = aVal & 0xFF;
|
||||
aVal >>= 8;
|
||||
mV[ 2 ] = aVal & 0xFF;
|
||||
aVal >>= 8;
|
||||
mV[ 3 ] = aVal & 0xFF;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,10 @@ def run(*args, **kwds):
|
|||
# executable passed as our first arg,
|
||||
# - [no e] child should inherit this process's environment.
|
||||
debug("Running %s...", " ".join(args))
|
||||
rc = os.spawnv(os.P_WAIT, args[0], args)
|
||||
if kwds.get("use_path", False):
|
||||
rc = os.spawnvp(os.P_WAIT, args[0], args)
|
||||
else:
|
||||
rc = os.spawnv(os.P_WAIT, args[0], args)
|
||||
debug("%s returned %s", args[0], rc)
|
||||
return rc
|
||||
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ set(llplugin_HEADER_FILES
|
|||
set_source_files_properties(${llplugin_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
##add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif(NOT WORD_SIZE EQUAL 32)
|
||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
|
||||
|
||||
|
|
|
|||
|
|
@ -2039,7 +2039,8 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
|
|||
}
|
||||
}
|
||||
|
||||
mVerticesp[mCount] = mVerticesp[mCount-1];
|
||||
if( mCount > 0 ) // ND: Guard against crashes if mCount is zero, yes it can happen
|
||||
mVerticesp[mCount] = mVerticesp[mCount-1];
|
||||
}
|
||||
|
||||
void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 vert_count)
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class LLDragDropWin32Target:
|
|||
PVOID data = GlobalLock( stgmed.hGlobal );
|
||||
mDropUrl = std::string( (char*)data );
|
||||
// XXX MAJOR MAJOR HACK!
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA );
|
||||
if (NULL != window_imp)
|
||||
{
|
||||
LLCoordGL gl_coord( 0, 0 );
|
||||
|
|
@ -168,7 +168,7 @@ class LLDragDropWin32Target:
|
|||
if ( mAllowDrop )
|
||||
{
|
||||
// XXX MAJOR MAJOR HACK!
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA );
|
||||
if (NULL != window_imp)
|
||||
{
|
||||
LLCoordGL gl_coord( 0, 0 );
|
||||
|
|
@ -215,7 +215,7 @@ class LLDragDropWin32Target:
|
|||
HRESULT __stdcall DragLeave( void )
|
||||
{
|
||||
// XXX MAJOR MAJOR HACK!
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA );
|
||||
if (NULL != window_imp)
|
||||
{
|
||||
LLCoordGL gl_coord( 0, 0 );
|
||||
|
|
@ -232,7 +232,7 @@ class LLDragDropWin32Target:
|
|||
if ( mAllowDrop )
|
||||
{
|
||||
// window impl stored in Window data (neat!)
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong( mAppWindowHandle, GWL_USERDATA );
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA );
|
||||
if ( NULL != window_imp )
|
||||
{
|
||||
POINT pt_client;
|
||||
|
|
|
|||
|
|
@ -785,7 +785,7 @@ void LLWindowWin32::close()
|
|||
LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL;
|
||||
|
||||
// Don't process events in our mainWindowProc any longer.
|
||||
SetWindowLong(mWindowHandle, GWL_USERDATA, NULL);
|
||||
SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, NULL);
|
||||
|
||||
// Make sure we don't leave a blank toolbar button.
|
||||
ShowWindow(mWindowHandle, SW_HIDE);
|
||||
|
|
@ -1564,7 +1564,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
|
|||
LL_DEBUGS("Window") << "Keeping vertical sync" << LL_ENDL;
|
||||
}
|
||||
|
||||
SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this);
|
||||
SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, (LONG_PTR)this);
|
||||
|
||||
// register this window as handling drag/drop events from the OS
|
||||
DragAcceptFiles( mWindowHandle, TRUE );
|
||||
|
|
@ -1876,7 +1876,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
// This is to avoid triggering double click teleport after returning focus (see MAINT-3786).
|
||||
static bool sHandleDoubleClick = true;
|
||||
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA);
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( h_wnd, GWLP_USERDATA );
|
||||
|
||||
|
||||
if (NULL != window_imp)
|
||||
|
|
|
|||
|
|
@ -8,14 +8,10 @@ if (LINUX)
|
|||
endif (LINUX)
|
||||
|
||||
if (DARWIN)
|
||||
add_subdirectory(quicktime)
|
||||
add_subdirectory(cef)
|
||||
endif (DARWIN)
|
||||
|
||||
if (WINDOWS)
|
||||
add_subdirectory(cef)
|
||||
add_subdirectory(winmmshim)
|
||||
add_subdirectory(libvlc)
|
||||
endif (WINDOWS)
|
||||
|
||||
### add_subdirectory(example)
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ include_directories(SYSTEM
|
|||
|
||||
### media_plugin_base
|
||||
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
##add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif(NOT WORD_SIZE EQUAL 32)
|
||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
set(media_plugin_base_SOURCE_FILES
|
||||
media_plugin_base.cpp
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@ include_directories(SYSTEM
|
|||
|
||||
### media_plugin_cef
|
||||
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
##add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif(NOT WORD_SIZE EQUAL 32)
|
||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
set(media_plugin_cef_SOURCE_FILES
|
||||
media_plugin_cef.cpp
|
||||
|
|
|
|||
|
|
@ -501,7 +501,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
LLCEFLib::LLCEFLibSettings settings;
|
||||
settings.initial_width = 1024;
|
||||
settings.initial_height = 1024;
|
||||
settings.page_zoom_factor = message_in.getValueReal("factor");
|
||||
// The LLCEFLibSettings struct in the Windows 32-bit
|
||||
// llceflib's build 500907 does not have a page_zoom_factor
|
||||
// member. Set below.
|
||||
//settings.page_zoom_factor = message_in.getValueReal("factor");
|
||||
settings.plugins_enabled = mPluginsEnabled;
|
||||
settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granualrity/query UI
|
||||
settings.javascript_enabled = mJavascriptEnabled;
|
||||
|
|
@ -518,6 +521,9 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
// if this fails, the media system in viewer will put up a message
|
||||
}
|
||||
|
||||
// now we can set page zoom factor
|
||||
mLLCEFLib->setPageZoom(message_in.getValueReal("factor"));
|
||||
|
||||
// Plugin gets to decide the texture parameters to use.
|
||||
mDepth = 4;
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
|
||||
|
|
|
|||
|
|
@ -42,44 +42,15 @@ private:
|
|||
VolumeCatcherImpl();
|
||||
~VolumeCatcherImpl();
|
||||
|
||||
typedef void (WINAPI *set_volume_func_t)(F32);
|
||||
typedef void (WINAPI *set_mute_func_t)(bool);
|
||||
|
||||
set_volume_func_t mSetVolumeFunc;
|
||||
set_mute_func_t mSetMuteFunc;
|
||||
|
||||
// tests if running on Vista, 7, 8 + once in CTOR
|
||||
bool isWindowsVistaOrHigher();
|
||||
|
||||
F32 mVolume;
|
||||
F32 mPan;
|
||||
bool mSystemIsVistaOrHigher;
|
||||
};
|
||||
|
||||
bool VolumeCatcherImpl::isWindowsVistaOrHigher()
|
||||
{
|
||||
OSVERSIONINFO osvi;
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
GetVersionEx(&osvi);
|
||||
return osvi.dwMajorVersion >= 6;
|
||||
}
|
||||
|
||||
VolumeCatcherImpl::VolumeCatcherImpl()
|
||||
: mVolume(1.0f), // default volume is max
|
||||
mPan(0.f) // default pan is centered
|
||||
{
|
||||
mSystemIsVistaOrHigher = isWindowsVistaOrHigher();
|
||||
|
||||
if ( ! mSystemIsVistaOrHigher )
|
||||
{
|
||||
HMODULE handle = ::LoadLibrary(L"winmm.dll");
|
||||
if(handle)
|
||||
{
|
||||
mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume");
|
||||
mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VolumeCatcherImpl::~VolumeCatcherImpl()
|
||||
|
|
@ -90,26 +61,12 @@ void VolumeCatcherImpl::setVolume(F32 volume)
|
|||
{
|
||||
mVolume = volume;
|
||||
|
||||
if ( mSystemIsVistaOrHigher )
|
||||
{
|
||||
// set both left/right to same volume
|
||||
// TODO: use pan value to set independently
|
||||
DWORD left_channel = (DWORD)(mVolume * 65535.0f);
|
||||
DWORD right_channel = (DWORD)(mVolume * 65535.0f);
|
||||
DWORD hw_volume = left_channel << 16 | right_channel;
|
||||
::waveOutSetVolume(NULL, hw_volume);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mSetMuteFunc)
|
||||
{
|
||||
mSetMuteFunc(volume == 0.f);
|
||||
}
|
||||
if (mSetVolumeFunc)
|
||||
{
|
||||
mSetVolumeFunc(mVolume);
|
||||
}
|
||||
}
|
||||
// set both left/right to same volume
|
||||
// TODO: use pan value to set independently
|
||||
DWORD left_channel = (DWORD)(mVolume * 65535.0f);
|
||||
DWORD right_channel = (DWORD)(mVolume * 65535.0f);
|
||||
DWORD hw_volume = left_channel << 16 | right_channel;
|
||||
::waveOutSetVolume(NULL, hw_volume);
|
||||
}
|
||||
|
||||
void VolumeCatcherImpl::setPan(F32 pan)
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ include_directories(SYSTEM
|
|||
|
||||
### media_plugin_example
|
||||
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
##add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif(NOT WORD_SIZE EQUAL 32)
|
||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
set(media_plugin_example_SOURCE_FILES
|
||||
media_plugin_example.cpp
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ include_directories(SYSTEM
|
|||
|
||||
### media_plugin_gstreamer010
|
||||
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
##add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif(NOT WORD_SIZE EQUAL 32)
|
||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
set(media_plugin_gstreamer010_SOURCE_FILES
|
||||
media_plugin_gstreamer010.cpp
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ include_directories(SYSTEM
|
|||
|
||||
### media_plugin_libvlc
|
||||
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
##add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif(NOT WORD_SIZE EQUAL 32)
|
||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
set(media_plugin_libvlc_SOURCE_FILES
|
||||
media_plugin_libvlc.cpp
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
project(media_plugin_quicktime)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLImage)
|
||||
include(LLPlugin)
|
||||
include(LLMath)
|
||||
include(LLRender)
|
||||
include(LLWindow)
|
||||
include(Linking)
|
||||
include(PluginAPI)
|
||||
include(MediaPluginBase)
|
||||
include(OpenGL)
|
||||
include(QuickTimePlugin)
|
||||
|
||||
include_directories(
|
||||
${LLPLUGIN_INCLUDE_DIRS}
|
||||
${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLIMAGE_INCLUDE_DIRS}
|
||||
${LLRENDER_INCLUDE_DIRS}
|
||||
${LLWINDOW_INCLUDE_DIRS}
|
||||
)
|
||||
include_directories(SYSTEM
|
||||
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
### media_plugin_quicktime
|
||||
|
||||
set(media_plugin_quicktime_SOURCE_FILES
|
||||
media_plugin_quicktime.cpp
|
||||
)
|
||||
|
||||
add_library(media_plugin_quicktime
|
||||
SHARED
|
||||
${media_plugin_quicktime_SOURCE_FILES}
|
||||
)
|
||||
|
||||
target_link_libraries(media_plugin_quicktime
|
||||
${LLPLUGIN_LIBRARIES}
|
||||
${MEDIA_PLUGIN_BASE_LIBRARIES}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${QUICKTIME_LIBRARY}
|
||||
${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||
)
|
||||
|
||||
add_dependencies(media_plugin_quicktime
|
||||
${LLPLUGIN_LIBRARIES}
|
||||
${MEDIA_PLUGIN_BASE_LIBRARIES}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
set_target_properties(
|
||||
media_plugin_quicktime
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/MANIFEST:NO"
|
||||
)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (QUICKTIME)
|
||||
|
||||
add_definitions(-DLL_QUICKTIME_ENABLED=1)
|
||||
|
||||
if (DARWIN)
|
||||
# Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
|
||||
set_target_properties(
|
||||
media_plugin_quicktime
|
||||
PROPERTIES
|
||||
PREFIX ""
|
||||
BUILD_WITH_INSTALL_RPATH 1
|
||||
INSTALL_NAME_DIR "@executable_path"
|
||||
LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
|
||||
)
|
||||
|
||||
# We use a bunch of deprecated system APIs.
|
||||
set_source_files_properties(
|
||||
media_plugin_quicktime.cpp PROPERTIES
|
||||
COMPILE_FLAGS -Wno-deprecated-declarations
|
||||
)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
target_link_libraries(media_plugin_quicktime ${CARBON_LIBRARY})
|
||||
endif (DARWIN)
|
||||
endif (QUICKTIME)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,37 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
project(winmm_shim)
|
||||
|
||||
### winmm_shim
|
||||
# *HACK - override msvcrt implementation (intialized on 00-Common) to be
|
||||
# statically linked for winmm.dll this relies on vc taking the last flag on
|
||||
# the command line
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
|
||||
set(winmm_shim_SOURCE_FILES
|
||||
forwarding_api.cpp
|
||||
winmm_shim.cpp
|
||||
)
|
||||
|
||||
set(winmm_shim_HEADER_FILES
|
||||
forwarding_api.h
|
||||
winmm.def
|
||||
)
|
||||
|
||||
list(APPEND winmm_shim_SOURCE_FILES ${winmm_shim_HEADER_FILES})
|
||||
|
||||
add_library(winmm_shim
|
||||
SHARED
|
||||
${winmm_shim_SOURCE_FILES}
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
set_target_properties(
|
||||
winmm_shim
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/MANIFEST:NO"
|
||||
OUTPUT_NAME "winmm"
|
||||
)
|
||||
endif (WINDOWS)
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,390 +0,0 @@
|
|||
/**
|
||||
* @file forwarding_api.h
|
||||
* @brief forwards winmm API calls to real winmm.dll
|
||||
*
|
||||
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// this turns off __declspec(dllimport) for the functions declared in mmsystem.h
|
||||
#define _WINMM_
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
void init_function_pointers(HMODULE winmm_handle);
|
||||
void ll_winmm_shim_initialize();
|
||||
|
||||
typedef VOID (*LPTASKCALLBACK)(DWORD_PTR dwInst);
|
||||
|
||||
typedef LRESULT (WINAPI *CloseDriver_type)( HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
|
||||
extern CloseDriver_type CloseDriver_orig;
|
||||
typedef HDRVR (WINAPI *OpenDriver_type)( LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2);
|
||||
extern OpenDriver_type OpenDriver_orig;
|
||||
typedef LRESULT (WINAPI *SendDriverMessage_type)( HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2);
|
||||
extern SendDriverMessage_type SendDriverMessage_orig;
|
||||
typedef HMODULE (WINAPI *DrvGetModuleHandle_type)( HDRVR hDriver);
|
||||
extern DrvGetModuleHandle_type DrvGetModuleHandle_orig;
|
||||
typedef HMODULE (WINAPI *GetDriverModuleHandle_type)( HDRVR hDriver);
|
||||
extern GetDriverModuleHandle_type GetDriverModuleHandle_orig;
|
||||
typedef LRESULT (WINAPI *DefDriverProc_type)( DWORD_PTR dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
|
||||
extern DefDriverProc_type DefDriverProc_orig;
|
||||
typedef BOOL (WINAPI *DriverCallback_type)(DWORD dwCallBack, DWORD dwFlags, HDRVR hdrvr, DWORD msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
|
||||
extern DriverCallback_type DriverCallback_orig;
|
||||
typedef UINT (WINAPI *mmsystemGetVersion_type)(void);
|
||||
extern mmsystemGetVersion_type mmsystemGetVersion_orig;
|
||||
typedef BOOL (WINAPI *sndPlaySoundA_type)( LPCSTR pszSound, UINT fuSound);
|
||||
extern sndPlaySoundA_type sndPlaySoundA_orig;
|
||||
typedef BOOL (WINAPI *sndPlaySoundW_type)( LPCWSTR pszSound, UINT fuSound);
|
||||
extern sndPlaySoundW_type sndPlaySoundW_orig;
|
||||
typedef BOOL (WINAPI *PlaySoundA_type)( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
|
||||
extern PlaySoundA_type PlaySoundA_orig;
|
||||
typedef BOOL (WINAPI *PlaySoundW_type)( LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
|
||||
extern PlaySoundW_type PlaySoundW_orig;
|
||||
typedef UINT (WINAPI *waveOutGetNumDevs_type)(void);
|
||||
extern waveOutGetNumDevs_type waveOutGetNumDevs_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetDevCapsA_type)( UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc);
|
||||
extern waveOutGetDevCapsA_type waveOutGetDevCapsA_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetDevCapsW_type)( UINT_PTR uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc);
|
||||
extern waveOutGetDevCapsW_type waveOutGetDevCapsW_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetVolume_type)( HWAVEOUT hwo, LPDWORD pdwVolume);
|
||||
extern waveOutGetVolume_type waveOutGetVolume_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutSetVolume_type)( HWAVEOUT hwo, DWORD dwVolume);
|
||||
extern waveOutSetVolume_type waveOutSetVolume_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
|
||||
extern waveOutGetErrorTextA_type waveOutGetErrorTextA_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
|
||||
extern waveOutGetErrorTextW_type waveOutGetErrorTextW_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutOpen_type)( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
|
||||
extern waveOutOpen_type waveOutOpen_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutClose_type)( HWAVEOUT hwo);
|
||||
extern waveOutClose_type waveOutClose_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutPrepareHeader_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
|
||||
extern waveOutPrepareHeader_type waveOutPrepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutUnprepareHeader_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
|
||||
extern waveOutUnprepareHeader_type waveOutUnprepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutWrite_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
|
||||
extern waveOutWrite_type waveOutWrite_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutPause_type)( HWAVEOUT hwo);
|
||||
extern waveOutPause_type waveOutPause_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutRestart_type)( HWAVEOUT hwo);
|
||||
extern waveOutRestart_type waveOutRestart_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutReset_type)( HWAVEOUT hwo);
|
||||
extern waveOutReset_type waveOutReset_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutBreakLoop_type)( HWAVEOUT hwo);
|
||||
extern waveOutBreakLoop_type waveOutBreakLoop_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetPosition_type)( HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt);
|
||||
extern waveOutGetPosition_type waveOutGetPosition_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetPitch_type)( HWAVEOUT hwo, LPDWORD pdwPitch);
|
||||
extern waveOutGetPitch_type waveOutGetPitch_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutSetPitch_type)( HWAVEOUT hwo, DWORD dwPitch);
|
||||
extern waveOutSetPitch_type waveOutSetPitch_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetPlaybackRate_type)( HWAVEOUT hwo, LPDWORD pdwRate);
|
||||
extern waveOutGetPlaybackRate_type waveOutGetPlaybackRate_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutSetPlaybackRate_type)( HWAVEOUT hwo, DWORD dwRate);
|
||||
extern waveOutSetPlaybackRate_type waveOutSetPlaybackRate_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutGetID_type)( HWAVEOUT hwo, LPUINT puDeviceID);
|
||||
extern waveOutGetID_type waveOutGetID_orig;
|
||||
typedef MMRESULT (WINAPI *waveOutMessage_type)( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
|
||||
extern waveOutMessage_type waveOutMessage_orig;
|
||||
typedef UINT (WINAPI *waveInGetNumDevs_type)(void);
|
||||
extern waveInGetNumDevs_type waveInGetNumDevs_orig;
|
||||
typedef MMRESULT (WINAPI *waveInGetDevCapsA_type)( UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic);
|
||||
extern waveInGetDevCapsA_type waveInGetDevCapsA_orig;
|
||||
typedef MMRESULT (WINAPI *waveInGetDevCapsW_type)( UINT_PTR uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic);
|
||||
extern waveInGetDevCapsW_type waveInGetDevCapsW_orig;
|
||||
typedef MMRESULT (WINAPI *waveInGetErrorTextA_type)(MMRESULT mmrError, LPSTR pszText, UINT cchText);
|
||||
extern waveInGetErrorTextA_type waveInGetErrorTextA_orig;
|
||||
typedef MMRESULT (WINAPI *waveInGetErrorTextW_type)(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
|
||||
extern waveInGetErrorTextW_type waveInGetErrorTextW_orig;
|
||||
typedef MMRESULT (WINAPI *waveInOpen_type)( LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
|
||||
extern waveInOpen_type waveInOpen_orig;
|
||||
typedef MMRESULT (WINAPI *waveInClose_type)( HWAVEIN hwi);
|
||||
extern waveInClose_type waveInClose_orig;
|
||||
typedef MMRESULT (WINAPI *waveInPrepareHeader_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
|
||||
extern waveInPrepareHeader_type waveInPrepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *waveInUnprepareHeader_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
|
||||
extern waveInUnprepareHeader_type waveInUnprepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *waveInAddBuffer_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
|
||||
extern waveInAddBuffer_type waveInAddBuffer_orig;
|
||||
typedef MMRESULT (WINAPI *waveInStart_type)( HWAVEIN hwi);
|
||||
extern waveInStart_type waveInStart_orig;
|
||||
typedef MMRESULT (WINAPI *waveInStop_type)( HWAVEIN hwi);
|
||||
extern waveInStop_type waveInStop_orig;
|
||||
typedef MMRESULT (WINAPI *waveInReset_type)( HWAVEIN hwi);
|
||||
extern waveInReset_type waveInReset_orig;
|
||||
typedef MMRESULT (WINAPI *waveInGetPosition_type)( HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt);
|
||||
extern waveInGetPosition_type waveInGetPosition_orig;
|
||||
typedef MMRESULT (WINAPI *waveInGetID_type)( HWAVEIN hwi, LPUINT puDeviceID);
|
||||
extern waveInGetID_type waveInGetID_orig;
|
||||
typedef MMRESULT (WINAPI *waveInMessage_type)( HWAVEIN hwi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
|
||||
extern waveInMessage_type waveInMessage_orig;
|
||||
typedef UINT (WINAPI *midiOutGetNumDevs_type)(void);
|
||||
extern midiOutGetNumDevs_type midiOutGetNumDevs_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamOpen_type)( LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
|
||||
extern midiStreamOpen_type midiStreamOpen_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamClose_type)( HMIDISTRM hms);
|
||||
extern midiStreamClose_type midiStreamClose_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamProperty_type)( HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty);
|
||||
extern midiStreamProperty_type midiStreamProperty_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamPosition_type)( HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt);
|
||||
extern midiStreamPosition_type midiStreamPosition_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamOut_type)( HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh);
|
||||
extern midiStreamOut_type midiStreamOut_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamPause_type)( HMIDISTRM hms);
|
||||
extern midiStreamPause_type midiStreamPause_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamRestart_type)( HMIDISTRM hms);
|
||||
extern midiStreamRestart_type midiStreamRestart_orig;
|
||||
typedef MMRESULT (WINAPI *midiStreamStop_type)( HMIDISTRM hms);
|
||||
extern midiStreamStop_type midiStreamStop_orig;
|
||||
typedef MMRESULT (WINAPI *midiConnect_type)( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
|
||||
extern midiConnect_type midiConnect_orig;
|
||||
typedef MMRESULT (WINAPI *midiDisconnect_type)( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
|
||||
extern midiDisconnect_type midiDisconnect_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutGetDevCapsA_type)( UINT_PTR uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc);
|
||||
extern midiOutGetDevCapsA_type midiOutGetDevCapsA_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutGetDevCapsW_type)( UINT_PTR uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc);
|
||||
extern midiOutGetDevCapsW_type midiOutGetDevCapsW_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutGetVolume_type)( HMIDIOUT hmo, LPDWORD pdwVolume);
|
||||
extern midiOutGetVolume_type midiOutGetVolume_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutSetVolume_type)( HMIDIOUT hmo, DWORD dwVolume);
|
||||
extern midiOutSetVolume_type midiOutSetVolume_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
|
||||
extern midiOutGetErrorTextA_type midiOutGetErrorTextA_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
|
||||
extern midiOutGetErrorTextW_type midiOutGetErrorTextW_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutOpen_type)( LPHMIDIOUT phmo, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
|
||||
extern midiOutOpen_type midiOutOpen_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutClose_type)( HMIDIOUT hmo);
|
||||
extern midiOutClose_type midiOutClose_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutPrepareHeader_type)( HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
|
||||
extern midiOutPrepareHeader_type midiOutPrepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutUnprepareHeader_type)(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
|
||||
extern midiOutUnprepareHeader_type midiOutUnprepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutShortMsg_type)( HMIDIOUT hmo, DWORD dwMsg);
|
||||
extern midiOutShortMsg_type midiOutShortMsg_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutLongMsg_type)(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
|
||||
extern midiOutLongMsg_type midiOutLongMsg_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutReset_type)( HMIDIOUT hmo);
|
||||
extern midiOutReset_type midiOutReset_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutCachePatches_type)( HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache);
|
||||
extern midiOutCachePatches_type midiOutCachePatches_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutCacheDrumPatches_type)( HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache);
|
||||
extern midiOutCacheDrumPatches_type midiOutCacheDrumPatches_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutGetID_type)( HMIDIOUT hmo, LPUINT puDeviceID);
|
||||
extern midiOutGetID_type midiOutGetID_orig;
|
||||
typedef MMRESULT (WINAPI *midiOutMessage_type)( HMIDIOUT hmo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
|
||||
extern midiOutMessage_type midiOutMessage_orig;
|
||||
typedef UINT (WINAPI *midiInGetNumDevs_type)(void);
|
||||
extern midiInGetNumDevs_type midiInGetNumDevs_orig;
|
||||
typedef MMRESULT (WINAPI *midiInGetDevCapsA_type)( UINT_PTR uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic);
|
||||
extern midiInGetDevCapsA_type midiInGetDevCapsA_orig;
|
||||
typedef MMRESULT (WINAPI *midiInGetDevCapsW_type)( UINT_PTR uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic);
|
||||
extern midiInGetDevCapsW_type midiInGetDevCapsW_orig;
|
||||
typedef MMRESULT (WINAPI *midiInGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
|
||||
extern midiInGetErrorTextA_type midiInGetErrorTextA_orig;
|
||||
typedef MMRESULT (WINAPI *midiInGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
|
||||
extern midiInGetErrorTextW_type midiInGetErrorTextW_orig;
|
||||
typedef MMRESULT (WINAPI *midiInOpen_type)( LPHMIDIIN phmi, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
|
||||
extern midiInOpen_type midiInOpen_orig;
|
||||
typedef MMRESULT (WINAPI *midiInClose_type)( HMIDIIN hmi);
|
||||
extern midiInClose_type midiInClose_orig;
|
||||
typedef MMRESULT (WINAPI *midiInPrepareHeader_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
|
||||
extern midiInPrepareHeader_type midiInPrepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *midiInUnprepareHeader_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
|
||||
extern midiInUnprepareHeader_type midiInUnprepareHeader_orig;
|
||||
typedef MMRESULT (WINAPI *midiInAddBuffer_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
|
||||
extern midiInAddBuffer_type midiInAddBuffer_orig;
|
||||
typedef MMRESULT (WINAPI *midiInStart_type)( HMIDIIN hmi);
|
||||
extern midiInStart_type midiInStart_orig;
|
||||
typedef MMRESULT (WINAPI *midiInStop_type)( HMIDIIN hmi);
|
||||
extern midiInStop_type midiInStop_orig;
|
||||
typedef MMRESULT (WINAPI *midiInReset_type)( HMIDIIN hmi);
|
||||
extern midiInReset_type midiInReset_orig;
|
||||
typedef MMRESULT (WINAPI *midiInGetID_type)( HMIDIIN hmi, LPUINT puDeviceID);
|
||||
extern midiInGetID_type midiInGetID_orig;
|
||||
typedef MMRESULT (WINAPI *midiInMessage_type)( HMIDIIN hmi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
|
||||
extern midiInMessage_type midiInMessage_orig;
|
||||
typedef UINT (WINAPI *auxGetNumDevs_type)(void);
|
||||
extern auxGetNumDevs_type auxGetNumDevs_orig;
|
||||
typedef MMRESULT (WINAPI *auxGetDevCapsA_type)( UINT_PTR uDeviceID, LPAUXCAPSA pac, UINT cbac);
|
||||
extern auxGetDevCapsA_type auxGetDevCapsA_orig;
|
||||
typedef MMRESULT (WINAPI *auxGetDevCapsW_type)( UINT_PTR uDeviceID, LPAUXCAPSW pac, UINT cbac);
|
||||
extern auxGetDevCapsW_type auxGetDevCapsW_orig;
|
||||
typedef MMRESULT (WINAPI *auxSetVolume_type)( UINT uDeviceID, DWORD dwVolume);
|
||||
extern auxSetVolume_type auxSetVolume_orig;
|
||||
typedef MMRESULT (WINAPI *auxGetVolume_type)( UINT uDeviceID, LPDWORD pdwVolume);
|
||||
extern auxGetVolume_type auxGetVolume_orig;
|
||||
typedef MMRESULT (WINAPI *auxOutMessage_type)( UINT uDeviceID, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
|
||||
extern auxOutMessage_type auxOutMessage_orig;
|
||||
typedef UINT (WINAPI *mixerGetNumDevs_type)(void);
|
||||
extern mixerGetNumDevs_type mixerGetNumDevs_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetDevCapsA_type)( UINT_PTR uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps);
|
||||
extern mixerGetDevCapsA_type mixerGetDevCapsA_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetDevCapsW_type)( UINT_PTR uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps);
|
||||
extern mixerGetDevCapsW_type mixerGetDevCapsW_orig;
|
||||
typedef MMRESULT (WINAPI *mixerOpen_type)( LPHMIXER phmx, UINT uMxId, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
|
||||
extern mixerOpen_type mixerOpen_orig;
|
||||
typedef MMRESULT (WINAPI *mixerClose_type)( HMIXER hmx);
|
||||
extern mixerClose_type mixerClose_orig;
|
||||
typedef DWORD (WINAPI *mixerMessage_type)( HMIXER hmx, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
|
||||
extern mixerMessage_type mixerMessage_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetLineInfoA_type)( HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo);
|
||||
extern mixerGetLineInfoA_type mixerGetLineInfoA_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetLineInfoW_type)( HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo);
|
||||
extern mixerGetLineInfoW_type mixerGetLineInfoW_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetID_type)( HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId);
|
||||
extern mixerGetID_type mixerGetID_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetLineControlsA_type)( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls);
|
||||
extern mixerGetLineControlsA_type mixerGetLineControlsA_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetLineControlsW_type)( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls);
|
||||
extern mixerGetLineControlsW_type mixerGetLineControlsW_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetControlDetailsA_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
|
||||
extern mixerGetControlDetailsA_type mixerGetControlDetailsA_orig;
|
||||
typedef MMRESULT (WINAPI *mixerGetControlDetailsW_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
|
||||
extern mixerGetControlDetailsW_type mixerGetControlDetailsW_orig;
|
||||
typedef MMRESULT (WINAPI *mixerSetControlDetails_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
|
||||
extern mixerSetControlDetails_type mixerSetControlDetails_orig;
|
||||
typedef DWORD (WINAPI *mmGetCurrentTask_type)(void);
|
||||
extern mmGetCurrentTask_type mmGetCurrentTask_orig;
|
||||
typedef void (WINAPI *mmTaskBlock_type)(DWORD);
|
||||
extern mmTaskBlock_type mmTaskBlock_orig;
|
||||
typedef UINT (WINAPI *mmTaskCreate_type)(LPTASKCALLBACK, HANDLE*, DWORD_PTR);
|
||||
extern mmTaskCreate_type mmTaskCreate_orig;
|
||||
typedef BOOL (WINAPI *mmTaskSignal_type)(DWORD);
|
||||
extern mmTaskSignal_type mmTaskSignal_orig;
|
||||
typedef VOID (WINAPI *mmTaskYield_type)(VOID);
|
||||
extern mmTaskYield_type mmTaskYield_orig;
|
||||
typedef MMRESULT (WINAPI *timeGetSystemTime_type)( LPMMTIME pmmt, UINT cbmmt);
|
||||
extern timeGetSystemTime_type timeGetSystemTime_orig;
|
||||
typedef DWORD (WINAPI *timeGetTime_type)(void);
|
||||
extern timeGetTime_type timeGetTime_orig;
|
||||
typedef MMRESULT (WINAPI *timeSetEvent_type)( UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD_PTR dwUser, UINT fuEvent);
|
||||
extern timeSetEvent_type timeSetEvent_orig;
|
||||
typedef MMRESULT (WINAPI *timeKillEvent_type)( UINT uTimerID);
|
||||
extern timeKillEvent_type timeKillEvent_orig;
|
||||
typedef MMRESULT (WINAPI *timeGetDevCaps_type)( LPTIMECAPS ptc, UINT cbtc);
|
||||
extern timeGetDevCaps_type timeGetDevCaps_orig;
|
||||
typedef MMRESULT (WINAPI *timeBeginPeriod_type)( UINT uPeriod);
|
||||
extern timeBeginPeriod_type timeBeginPeriod_orig;
|
||||
typedef MMRESULT (WINAPI *timeEndPeriod_type)( UINT uPeriod);
|
||||
extern timeEndPeriod_type timeEndPeriod_orig;
|
||||
typedef UINT (WINAPI *joyGetNumDevs_type)(void);
|
||||
extern joyGetNumDevs_type joyGetNumDevs_orig;
|
||||
typedef MMRESULT (WINAPI *joyConfigChanged_type)(DWORD dwFlags);
|
||||
extern joyConfigChanged_type joyConfigChanged_orig;
|
||||
typedef MMRESULT (WINAPI *joyGetDevCapsA_type)( UINT_PTR uJoyID, LPJOYCAPSA pjc, UINT cbjc);
|
||||
extern joyGetDevCapsA_type joyGetDevCapsA_orig;
|
||||
typedef MMRESULT (WINAPI *joyGetDevCapsW_type)( UINT_PTR uJoyID, LPJOYCAPSW pjc, UINT cbjc);
|
||||
extern joyGetDevCapsW_type joyGetDevCapsW_orig;
|
||||
typedef MMRESULT (WINAPI *joyGetPos_type)( UINT uJoyID, LPJOYINFO pji);
|
||||
extern joyGetPos_type joyGetPos_orig;
|
||||
typedef MMRESULT (WINAPI *joyGetPosEx_type)( UINT uJoyID, LPJOYINFOEX pji);
|
||||
extern joyGetPosEx_type joyGetPosEx_orig;
|
||||
typedef MMRESULT (WINAPI *joyGetThreshold_type)( UINT uJoyID, LPUINT puThreshold);
|
||||
extern joyGetThreshold_type joyGetThreshold_orig;
|
||||
typedef MMRESULT (WINAPI *joyReleaseCapture_type)( UINT uJoyID);
|
||||
extern joyReleaseCapture_type joyReleaseCapture_orig;
|
||||
typedef MMRESULT (WINAPI *joySetCapture_type)( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged);
|
||||
extern joySetCapture_type joySetCapture_orig;
|
||||
typedef MMRESULT (WINAPI *joySetThreshold_type)( UINT uJoyID, UINT uThreshold);
|
||||
extern joySetThreshold_type joySetThreshold_orig;
|
||||
typedef BOOL(WINAPI *mciDriverNotify_type)(HANDLE hwndCallback, MCIDEVICEID uDeviceID, UINT uStatus);
|
||||
extern mciDriverNotify_type mciDriverNotify_orig;
|
||||
typedef UINT (WINAPI *mciDriverYield_type)(UINT uDeviceID);
|
||||
extern mciDriverYield_type mciDriverYield_orig;
|
||||
typedef FOURCC (WINAPI *mmioStringToFOURCCA_type)( LPCSTR sz, UINT uFlags);
|
||||
extern mmioStringToFOURCCA_type mmioStringToFOURCCA_orig;
|
||||
typedef FOURCC (WINAPI *mmioStringToFOURCCW_type)( LPCWSTR sz, UINT uFlags);
|
||||
extern mmioStringToFOURCCW_type mmioStringToFOURCCW_orig;
|
||||
typedef LPMMIOPROC (WINAPI *mmioInstallIOProcA_type)( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
|
||||
extern mmioInstallIOProcA_type mmioInstallIOProcA_orig;
|
||||
typedef LPMMIOPROC (WINAPI *mmioInstallIOProcW_type)( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
|
||||
extern mmioInstallIOProcW_type mmioInstallIOProcW_orig;
|
||||
typedef HMMIO (WINAPI *mmioOpenA_type)( LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
|
||||
extern mmioOpenA_type mmioOpenA_orig;
|
||||
typedef HMMIO (WINAPI *mmioOpenW_type)( LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
|
||||
extern mmioOpenW_type mmioOpenW_orig;
|
||||
typedef MMRESULT (WINAPI *mmioRenameA_type)( LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
|
||||
extern mmioRenameA_type mmioRenameA_orig;
|
||||
typedef MMRESULT (WINAPI *mmioRenameW_type)( LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
|
||||
extern mmioRenameW_type mmioRenameW_orig;
|
||||
typedef MMRESULT (WINAPI *mmioClose_type)( HMMIO hmmio, UINT fuClose);
|
||||
extern mmioClose_type mmioClose_orig;
|
||||
typedef LONG (WINAPI *mmioRead_type)( HMMIO hmmio, HPSTR pch, LONG cch);
|
||||
extern mmioRead_type mmioRead_orig;
|
||||
typedef LONG (WINAPI *mmioWrite_type)( HMMIO hmmio, const char _huge* pch, LONG cch);
|
||||
extern mmioWrite_type mmioWrite_orig;
|
||||
typedef LONG (WINAPI *mmioSeek_type)( HMMIO hmmio, LONG lOffset, int iOrigin);
|
||||
extern mmioSeek_type mmioSeek_orig;
|
||||
typedef MMRESULT (WINAPI *mmioGetInfo_type)( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo);
|
||||
extern mmioGetInfo_type mmioGetInfo_orig;
|
||||
typedef MMRESULT (WINAPI *mmioSetInfo_type)( HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo);
|
||||
extern mmioSetInfo_type mmioSetInfo_orig;
|
||||
typedef MMRESULT (WINAPI *mmioSetBuffer_type)( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer);
|
||||
extern mmioSetBuffer_type mmioSetBuffer_orig;
|
||||
typedef MMRESULT (WINAPI *mmioFlush_type)( HMMIO hmmio, UINT fuFlush);
|
||||
extern mmioFlush_type mmioFlush_orig;
|
||||
typedef MMRESULT (WINAPI *mmioAdvance_type)( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance);
|
||||
extern mmioAdvance_type mmioAdvance_orig;
|
||||
typedef LRESULT (WINAPI *mmioSendMessage_type)( HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
|
||||
extern mmioSendMessage_type mmioSendMessage_orig;
|
||||
typedef MMRESULT (WINAPI *mmioDescend_type)( HMMIO hmmio, LPMMCKINFO pmmcki, const MMCKINFO FAR* pmmckiParent, UINT fuDescend);
|
||||
extern mmioDescend_type mmioDescend_orig;
|
||||
typedef MMRESULT (WINAPI *mmioAscend_type)( HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend);
|
||||
extern mmioAscend_type mmioAscend_orig;
|
||||
typedef MMRESULT (WINAPI *mmioCreateChunk_type)(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate);
|
||||
extern mmioCreateChunk_type mmioCreateChunk_orig;
|
||||
typedef MCIERROR (WINAPI *mciSendCommandA_type)( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
|
||||
extern mciSendCommandA_type mciSendCommandA_orig;
|
||||
typedef MCIERROR (WINAPI *mciSendCommandW_type)( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
|
||||
extern mciSendCommandW_type mciSendCommandW_orig;
|
||||
typedef MCIERROR (WINAPI *mciSendStringA_type)( LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
|
||||
extern mciSendStringA_type mciSendStringA_orig;
|
||||
typedef MCIERROR (WINAPI *mciSendStringW_type)( LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
|
||||
extern mciSendStringW_type mciSendStringW_orig;
|
||||
typedef MCIDEVICEID (WINAPI *mciGetDeviceIDA_type)( LPCSTR pszDevice);
|
||||
extern mciGetDeviceIDA_type mciGetDeviceIDA_orig;
|
||||
typedef MCIDEVICEID (WINAPI *mciGetDeviceIDW_type)( LPCWSTR pszDevice);
|
||||
extern mciGetDeviceIDW_type mciGetDeviceIDW_orig;
|
||||
typedef MCIDEVICEID (WINAPI *mciGetDeviceIDFromElementIDA_type)( DWORD dwElementID, LPCSTR lpstrType );
|
||||
extern mciGetDeviceIDFromElementIDA_type mciGetDeviceIDFromElementIDA_orig;
|
||||
typedef MCIDEVICEID (WINAPI *mciGetDeviceIDFromElementIDW_type)( DWORD dwElementID, LPCWSTR lpstrType );
|
||||
extern mciGetDeviceIDFromElementIDW_type mciGetDeviceIDFromElementIDW_orig;
|
||||
typedef DWORD_PTR (WINAPI *mciGetDriverData_type)(UINT uDeviceID);
|
||||
extern mciGetDriverData_type mciGetDriverData_orig;
|
||||
typedef BOOL (WINAPI *mciGetErrorStringA_type)( MCIERROR mcierr, LPSTR pszText, UINT cchText);
|
||||
extern mciGetErrorStringA_type mciGetErrorStringA_orig;
|
||||
typedef BOOL (WINAPI *mciGetErrorStringW_type)( MCIERROR mcierr, LPWSTR pszText, UINT cchText);
|
||||
extern mciGetErrorStringW_type mciGetErrorStringW_orig;
|
||||
typedef BOOL (WINAPI *mciSetDriverData_type)(UINT uDeviceID, DWORD_PTR dwData);
|
||||
extern mciSetDriverData_type mciSetDriverData_orig;
|
||||
typedef BOOL (WINAPI *mciSetYieldProc_type)( MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData);
|
||||
extern mciSetYieldProc_type mciSetYieldProc_orig;
|
||||
typedef BOOL (WINAPI *mciFreeCommandResource_type)(UINT uTable);
|
||||
extern mciFreeCommandResource_type mciFreeCommandResource_orig;
|
||||
typedef HTASK (WINAPI *mciGetCreatorTask_type)( MCIDEVICEID mciId);
|
||||
extern mciGetCreatorTask_type mciGetCreatorTask_orig;
|
||||
typedef YIELDPROC (WINAPI *mciGetYieldProc_type)( MCIDEVICEID mciId, LPDWORD pdwYieldData);
|
||||
extern mciGetYieldProc_type mciGetYieldProc_orig;
|
||||
typedef UINT (WINAPI *mciLoadCommandResource_type)(HANDLE hInstance, LPCWSTR lpResName, UINT uType);
|
||||
extern mciLoadCommandResource_type mciLoadCommandResource_orig;
|
||||
typedef BOOL (WINAPI *mciExecute_type)(LPCSTR pszCommand);
|
||||
extern mciExecute_type mciExecute_orig;
|
||||
|
|
@ -1,218 +0,0 @@
|
|||
;
|
||||
; winmm.def
|
||||
;
|
||||
; Exports for WINMM DLL
|
||||
;
|
||||
|
||||
LIBRARY WINMM
|
||||
EXPORTS
|
||||
CloseDriver
|
||||
DefDriverProc
|
||||
DriverCallback
|
||||
DrvGetModuleHandle
|
||||
GetDriverModuleHandle
|
||||
;MigrateAllDrivers
|
||||
;MigrateSoundEvents
|
||||
;NotifyCallbackData
|
||||
OpenDriver
|
||||
;PlaySound
|
||||
PlaySoundA
|
||||
PlaySoundW
|
||||
SendDriverMessage
|
||||
;WOW32DriverCallback
|
||||
;WOW32ResolveMultiMediaHandle
|
||||
;WOWAppExit
|
||||
;WinmmLogoff
|
||||
;WinmmLogon
|
||||
;aux32Message
|
||||
auxGetDevCapsA
|
||||
auxGetDevCapsW
|
||||
auxGetNumDevs
|
||||
auxGetVolume
|
||||
auxOutMessage
|
||||
auxSetVolume
|
||||
;gfxAddGfx
|
||||
;gfxBatchChange
|
||||
;gfxCreateGfxFactoriesList
|
||||
;gfxCreateZoneFactoriesList
|
||||
;gfxDestroyDeviceInterfaceList
|
||||
;gfxEnumerateGfxs
|
||||
;gfxLogoff
|
||||
;gfxLogon
|
||||
;gfxModifyGfx
|
||||
;gfxOpenGfx
|
||||
;gfxRemoveGfx
|
||||
;joy32Message
|
||||
joyConfigChanged
|
||||
joyGetDevCapsA
|
||||
joyGetDevCapsW
|
||||
joyGetNumDevs
|
||||
joyGetPos
|
||||
joyGetPosEx
|
||||
joyGetThreshold
|
||||
joyReleaseCapture
|
||||
joySetCapture
|
||||
joySetThreshold
|
||||
;mci32Message
|
||||
mciDriverNotify
|
||||
mciDriverYield
|
||||
mciExecute
|
||||
mciFreeCommandResource
|
||||
mciGetCreatorTask
|
||||
mciGetDeviceIDA
|
||||
mciGetDeviceIDFromElementIDA
|
||||
mciGetDeviceIDFromElementIDW
|
||||
mciGetDeviceIDW
|
||||
mciGetDriverData
|
||||
mciGetErrorStringA
|
||||
mciGetErrorStringW
|
||||
mciGetYieldProc
|
||||
mciLoadCommandResource
|
||||
mciSendCommandA
|
||||
mciSendCommandW
|
||||
mciSendStringA
|
||||
mciSendStringW
|
||||
mciSetDriverData
|
||||
mciSetYieldProc
|
||||
;mid32Message
|
||||
midiConnect
|
||||
midiDisconnect
|
||||
midiInAddBuffer
|
||||
midiInClose
|
||||
midiInGetDevCapsA
|
||||
midiInGetDevCapsW
|
||||
midiInGetErrorTextA
|
||||
midiInGetErrorTextW
|
||||
midiInGetID
|
||||
midiInGetNumDevs
|
||||
midiInMessage
|
||||
midiInOpen
|
||||
midiInPrepareHeader
|
||||
midiInReset
|
||||
midiInStart
|
||||
midiInStop
|
||||
midiInUnprepareHeader
|
||||
midiOutCacheDrumPatches
|
||||
midiOutCachePatches
|
||||
midiOutClose
|
||||
midiOutGetDevCapsA
|
||||
midiOutGetDevCapsW
|
||||
midiOutGetErrorTextA
|
||||
midiOutGetErrorTextW
|
||||
midiOutGetID
|
||||
midiOutGetNumDevs
|
||||
midiOutGetVolume
|
||||
midiOutLongMsg
|
||||
midiOutMessage
|
||||
midiOutOpen
|
||||
midiOutPrepareHeader
|
||||
midiOutReset
|
||||
midiOutSetVolume
|
||||
midiOutShortMsg
|
||||
midiOutUnprepareHeader
|
||||
midiStreamClose
|
||||
midiStreamOpen
|
||||
midiStreamOut
|
||||
midiStreamPause
|
||||
midiStreamPosition
|
||||
midiStreamProperty
|
||||
midiStreamRestart
|
||||
midiStreamStop
|
||||
mixerClose
|
||||
mixerGetControlDetailsA
|
||||
mixerGetControlDetailsW
|
||||
mixerGetDevCapsA
|
||||
mixerGetDevCapsW
|
||||
mixerGetID
|
||||
mixerGetLineControlsA
|
||||
mixerGetLineControlsW
|
||||
mixerGetLineInfoA
|
||||
mixerGetLineInfoW
|
||||
mixerGetNumDevs
|
||||
mixerMessage
|
||||
mixerOpen
|
||||
mixerSetControlDetails
|
||||
;mmDrvInstall
|
||||
mmGetCurrentTask
|
||||
mmTaskBlock
|
||||
mmTaskCreate
|
||||
mmTaskSignal
|
||||
mmTaskYield
|
||||
mmioAdvance
|
||||
mmioAscend
|
||||
mmioClose
|
||||
mmioCreateChunk
|
||||
mmioDescend
|
||||
mmioFlush
|
||||
mmioGetInfo
|
||||
mmioInstallIOProcA
|
||||
mmioInstallIOProcW
|
||||
mmioOpenA
|
||||
mmioOpenW
|
||||
mmioRead
|
||||
mmioRenameA
|
||||
mmioRenameW
|
||||
mmioSeek
|
||||
mmioSendMessage
|
||||
mmioSetBuffer
|
||||
mmioSetInfo
|
||||
mmioStringToFOURCCA
|
||||
mmioStringToFOURCCW
|
||||
mmioWrite
|
||||
mmsystemGetVersion
|
||||
;mod32Message
|
||||
;mxd32Message
|
||||
sndPlaySoundA
|
||||
sndPlaySoundW
|
||||
;tid32Message
|
||||
timeBeginPeriod
|
||||
timeEndPeriod
|
||||
timeGetDevCaps
|
||||
timeGetSystemTime
|
||||
timeGetTime
|
||||
timeKillEvent
|
||||
timeSetEvent
|
||||
waveInAddBuffer
|
||||
waveInClose
|
||||
waveInGetDevCapsA
|
||||
waveInGetDevCapsW
|
||||
waveInGetErrorTextA
|
||||
waveInGetErrorTextW
|
||||
waveInGetID
|
||||
waveInGetNumDevs
|
||||
waveInGetPosition
|
||||
waveInMessage
|
||||
waveInOpen
|
||||
waveInPrepareHeader
|
||||
waveInReset
|
||||
waveInStart
|
||||
waveInStop
|
||||
waveInUnprepareHeader
|
||||
waveOutBreakLoop
|
||||
waveOutClose
|
||||
waveOutGetDevCapsA
|
||||
waveOutGetDevCapsW
|
||||
waveOutGetErrorTextA
|
||||
waveOutGetErrorTextW
|
||||
waveOutGetID
|
||||
waveOutGetNumDevs
|
||||
waveOutGetPitch
|
||||
waveOutGetPlaybackRate
|
||||
waveOutGetPosition
|
||||
waveOutGetVolume
|
||||
waveOutMessage
|
||||
waveOutOpen
|
||||
waveOutPause
|
||||
waveOutPrepareHeader
|
||||
waveOutReset
|
||||
waveOutRestart
|
||||
waveOutSetPitch
|
||||
waveOutSetPlaybackRate
|
||||
waveOutSetVolume
|
||||
waveOutUnprepareHeader
|
||||
waveOutWrite
|
||||
;wid32Message
|
||||
;winmmSetDebugLevel
|
||||
;wod32Message
|
||||
setPluginVolume
|
||||
setPluginMute
|
||||
|
|
@ -1,219 +0,0 @@
|
|||
/**
|
||||
* @file winmmshim.cpp
|
||||
* @brief controls volume level of process by intercepting calls to winmm.dll
|
||||
*
|
||||
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010-2014, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#include "forwarding_api.h"
|
||||
#include <xmmintrin.h>
|
||||
#include <map>
|
||||
#include <math.h>
|
||||
|
||||
using std::wstring;
|
||||
|
||||
static float sVolumeLevel = 1.f; // Could be covered by critical section,
|
||||
static bool sMute = false; // not needed with atomicity and alignment.
|
||||
static CRITICAL_SECTION sCriticalSection;
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
InitializeCriticalSection(&sCriticalSection);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void ll_winmm_shim_initialize(){
|
||||
static volatile bool initialized = false;
|
||||
|
||||
// do this only once using double-check locking
|
||||
if (!initialized)
|
||||
{
|
||||
EnterCriticalSection(&sCriticalSection);
|
||||
if (!initialized)
|
||||
{ // bind to original winmm.dll
|
||||
TCHAR system_path[MAX_PATH];
|
||||
TCHAR dll_path[MAX_PATH];
|
||||
::GetSystemDirectory(system_path, MAX_PATH);
|
||||
|
||||
// grab winmm.dll from system path, where it should live
|
||||
wsprintf(dll_path, "%s\\winmm.dll", system_path);
|
||||
HMODULE winmm_handle = ::LoadLibrary(dll_path);
|
||||
|
||||
if (winmm_handle != NULL)
|
||||
{ // we have a dll, let's get out pointers!
|
||||
init_function_pointers(winmm_handle);
|
||||
::OutputDebugStringA("WINMM_SHIM.DLL: real winmm.dll initialized successfully\n");
|
||||
initialized = true; // Last thing after completing setup
|
||||
}
|
||||
else
|
||||
{
|
||||
// failed to initialize real winmm.dll
|
||||
::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n");
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&sCriticalSection);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// tracks the requested format for a given waveout buffer
|
||||
struct WaveOutFormat
|
||||
{
|
||||
WaveOutFormat(int bits_per_sample)
|
||||
: mBitsPerSample(bits_per_sample)
|
||||
{}
|
||||
int mBitsPerSample;
|
||||
};
|
||||
typedef std::map<HWAVEOUT, WaveOutFormat*> wave_out_map_t;
|
||||
static wave_out_map_t sWaveOuts; // Covered by sCriticalSection
|
||||
|
||||
MMRESULT WINAPI waveOutOpen( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
|
||||
{
|
||||
ll_winmm_shim_initialize();
|
||||
if (pwfx->wFormatTag != WAVE_FORMAT_PCM
|
||||
|| (pwfx->wBitsPerSample != 8 && pwfx->wBitsPerSample != 16))
|
||||
{ // uncompressed 8 and 16 bit sound are the only types we support
|
||||
return WAVERR_BADFORMAT;
|
||||
}
|
||||
|
||||
MMRESULT result = waveOutOpen_orig(phwo, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen);
|
||||
if (result == MMSYSERR_NOERROR
|
||||
&& ((fdwOpen & WAVE_FORMAT_QUERY) == 0)) // not just querying for format support
|
||||
{ // remember the requested bits per sample, and associate with the given handle
|
||||
WaveOutFormat* wave_outp = new WaveOutFormat(pwfx->wBitsPerSample);
|
||||
EnterCriticalSection(&sCriticalSection);
|
||||
sWaveOuts.insert(std::make_pair(*phwo, wave_outp));
|
||||
LeaveCriticalSection(&sCriticalSection);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
MMRESULT WINAPI waveOutClose( HWAVEOUT hwo)
|
||||
{
|
||||
ll_winmm_shim_initialize();
|
||||
EnterCriticalSection(&sCriticalSection);
|
||||
wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
|
||||
if (found_it != sWaveOuts.end())
|
||||
{ // forget what we know about this handle
|
||||
delete found_it->second;
|
||||
sWaveOuts.erase(found_it);
|
||||
}
|
||||
LeaveCriticalSection(&sCriticalSection);
|
||||
return waveOutClose_orig(hwo);
|
||||
}
|
||||
|
||||
MMRESULT WINAPI waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
|
||||
{
|
||||
ll_winmm_shim_initialize();
|
||||
MMRESULT result = MMSYSERR_NOERROR;
|
||||
|
||||
if (sMute)
|
||||
{ // zero out the audio buffer when muted
|
||||
memset(pwh->lpData, 0, pwh->dwBufferLength);
|
||||
}
|
||||
else if (sVolumeLevel != 1.f)
|
||||
{ // need to apply volume level
|
||||
int bits_per_sample(0);
|
||||
|
||||
EnterCriticalSection(&sCriticalSection);
|
||||
wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
|
||||
if (found_it != sWaveOuts.end())
|
||||
{
|
||||
bits_per_sample = found_it->second->mBitsPerSample;
|
||||
}
|
||||
LeaveCriticalSection(&sCriticalSection);
|
||||
if (bits_per_sample)
|
||||
{
|
||||
switch (bits_per_sample)
|
||||
{
|
||||
case 8:
|
||||
{
|
||||
char volume = (char)(sVolumeLevel * 127.f);
|
||||
for (unsigned int i = 0; i < pwh->dwBufferLength; i++)
|
||||
{
|
||||
// unsigned multiply doesn't use most significant bit, so shift by 7 bits
|
||||
// to get resulting value back into 8 bits
|
||||
pwh->lpData[i] = (pwh->lpData[i] * volume) >> 7;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 16:
|
||||
{
|
||||
short volume_16 = (short)(sVolumeLevel * 32767.f);
|
||||
|
||||
// copy volume level 4 times into 64 bit MMX register
|
||||
__m64 volume_64 = _mm_set_pi16(volume_16, volume_16, volume_16, volume_16);
|
||||
__m64* sample_64;
|
||||
__m64* last_sample_64 = (__m64*)(pwh->lpData + pwh->dwBufferLength - sizeof(__m64));
|
||||
// for everything that can be addressed in 64 bit multiples...
|
||||
for (sample_64 = (__m64*)pwh->lpData;
|
||||
sample_64 <= last_sample_64;
|
||||
++sample_64)
|
||||
{
|
||||
//...multiply the samples by the volume...
|
||||
__m64 scaled_sample = _mm_mulhi_pi16(*sample_64, volume_64);
|
||||
// ...and shift left 1 bit since an unsigned multiple loses the most significant bit
|
||||
// 0x7FFF * 0x7FFF = 0x3fff0001
|
||||
// 0x3fff0001 << 1 = 0x7ffe0002
|
||||
// notice that the LSB is always 0...should consider dithering
|
||||
*sample_64 = _mm_slli_pi16(scaled_sample, 1);
|
||||
}
|
||||
|
||||
// the captain has turned off the MMX sign, you are now free to use floating point registers
|
||||
_mm_empty();
|
||||
|
||||
// finish remaining samples that didn't fit into 64 bit register
|
||||
for (short* sample_16 = (short*)sample_64;
|
||||
sample_16 < (short*)(pwh->lpData + pwh->dwBufferLength);
|
||||
++sample_16)
|
||||
{
|
||||
*sample_16 = (*sample_16 * volume_16) >> 15;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// don't do anything
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return waveOutWrite_orig( hwo, pwh, cbwh);
|
||||
}
|
||||
|
||||
void WINAPI setPluginVolume(float volume)
|
||||
{
|
||||
sVolumeLevel = volume;
|
||||
}
|
||||
|
||||
void WINAPI setPluginMute(bool mute)
|
||||
{
|
||||
sMute = mute;
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,6 @@ include(DragDrop)
|
|||
include(EXPAT)
|
||||
include(FMODEX)
|
||||
include(GLOD)
|
||||
include(GooglePerfTools)
|
||||
include(Hunspell)
|
||||
include(JsonCpp)
|
||||
include(LLAppearance)
|
||||
|
|
@ -1682,7 +1681,7 @@ if (WINDOWS)
|
|||
set_target_properties(${VIEWER_BINARY_NAME}
|
||||
PROPERTIES
|
||||
# *TODO -reenable this once we get server usage sorted out
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE"
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE"
|
||||
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE"
|
||||
)
|
||||
|
|
@ -1702,20 +1701,8 @@ if (WINDOWS)
|
|||
# In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py
|
||||
# and have the build deps get tracked *please* tell me about it.
|
||||
|
||||
if(USE_TCMALLOC)
|
||||
# Configure a var for tcmalloc location, if used.
|
||||
# Note the need to specify multiple names explicitly.
|
||||
set(GOOGLE_PERF_TOOLS_SOURCE
|
||||
${SHARED_LIB_STAGING_DIR}/Release/libtcmalloc_minimal.dll
|
||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll
|
||||
${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll
|
||||
)
|
||||
endif(USE_TCMALLOC)
|
||||
|
||||
|
||||
set(COPY_INPUT_DEPENDENCIES
|
||||
# The following commented dependencies are determined at variably at build time. Can't do this here.
|
||||
#${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll
|
||||
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
||||
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll
|
||||
|
|
@ -1957,7 +1944,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
|||
${LLLOGIN_LIBRARIES}
|
||||
${LLPHYSICS_LIBRARIES}
|
||||
${LLPHYSICSEXTENSIONS_LIBRARIES}
|
||||
${TCMALLOC_LIBRARIES}
|
||||
${LLAPPEARANCE_LIBRARIES}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -6354,17 +6354,6 @@
|
|||
<key>Value</key>
|
||||
<integer>512</integer>
|
||||
</map>
|
||||
<key>MemProfiling</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>You want to use tcmalloc's memory profiling options.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MenuAccessKeyTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -10046,28 +10035,28 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderUseFarClip</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If false, frustum culling will ignore far clip plane.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderUseImpostors</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<key>RenderUseFarClip</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If false, frustum culling will ignore far clip plane.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderUseImpostors</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>OBSOLETE and UNUSED. See RenderAvatarMaxNonImpostors and RenderAvatarMaxComplexity.</string>
|
||||
<key>Persist</key>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
<key>RenderAutoMuteByteLimit</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -2133,7 +2133,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
LLVector4a src;
|
||||
|
||||
U32 vec[4];
|
||||
vec[0] = vec[1] = vec[2] = vec[3] = color.mAll;
|
||||
vec[0] = vec[1] = vec[2] = vec[3] = color.asRGBA();
|
||||
|
||||
src.loadua((F32*) vec);
|
||||
|
||||
|
|
@ -2169,7 +2169,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
LLColor4U glow4u = LLColor4U(0,0,0,glow);
|
||||
|
||||
U32 glow32 = glow4u.mAll;
|
||||
U32 glow32 = glow4u.asRGBA();
|
||||
|
||||
U32 vec[4];
|
||||
vec[0] = vec[1] = vec[2] = vec[3] = glow32;
|
||||
|
|
|
|||
|
|
@ -735,7 +735,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color,
|
|||
continue;
|
||||
}
|
||||
S32 offset = px + py * image_width;
|
||||
((U32*)datap)[offset] = color.mAll;
|
||||
((U32*)datap)[offset] = color.asRGBA();
|
||||
}
|
||||
|
||||
// top line
|
||||
|
|
@ -748,7 +748,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color,
|
|||
continue;
|
||||
}
|
||||
S32 offset = px + py * image_width;
|
||||
((U32*)datap)[offset] = color.mAll;
|
||||
((U32*)datap)[offset] = color.asRGBA();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -770,7 +770,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color,
|
|||
continue;
|
||||
}
|
||||
S32 offset = p_x + p_y * image_width;
|
||||
((U32*)datap)[offset] = color.mAll;
|
||||
((U32*)datap)[offset] = color.asRGBA();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,10 +99,16 @@ const std::string &LLVersionInfo::getShortVersion()
|
|||
|
||||
namespace
|
||||
{
|
||||
// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The
|
||||
// macro expands to the string name of the channel, but without quotes. We
|
||||
// need to turn it into a quoted string. This macro trick does that.
|
||||
#define stringize_inner(x) #x
|
||||
#define stringize_outer(x) stringize_inner(x)
|
||||
|
||||
/// Storage of the channel name the viewer is using.
|
||||
// The channel name is set by hardcoded constant,
|
||||
// or by calling LLVersionInfo::resetChannel()
|
||||
std::string sWorkingChannelName(LL_VIEWER_CHANNEL);
|
||||
std::string sWorkingChannelName(stringize_outer(LL_VIEWER_CHANNEL));
|
||||
|
||||
// Storage for the "version and channel" string.
|
||||
// This will get reset too.
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ void LLSkyTex::create(const F32 brightness)
|
|||
S32 offset = basic_offset * sComponents;
|
||||
U32* pix = (U32*)(data + offset);
|
||||
LLColor4U temp = LLColor4U(mSkyData[basic_offset]);
|
||||
*pix = temp.mAll;
|
||||
*pix = temp.asRGBA();
|
||||
}
|
||||
}
|
||||
createGLImage(sCurrent);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ protected:
|
|||
{
|
||||
S32 offset = (i * sResolution + j) * sComponents;
|
||||
U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]);
|
||||
*pix = col.mAll;
|
||||
*pix = col.asRGBA();
|
||||
}
|
||||
|
||||
LLColor4U getPixel(const S32 i, const S32 j)
|
||||
|
|
@ -179,7 +179,7 @@ protected:
|
|||
LLColor4U col;
|
||||
S32 offset = (i * sResolution + j) * sComponents;
|
||||
U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]);
|
||||
col.mAll = *pix;
|
||||
col.fromRGBA( *pix );
|
||||
return col;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,13 @@
|
|||
|
||||
#include "../llversioninfo.h"
|
||||
|
||||
// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The
|
||||
// macro expands to the string name of the channel, but without quotes. We
|
||||
// need to turn it into a quoted string. This macro trick does that.
|
||||
#define stringize_inner(x) #x
|
||||
#define stringize_outer(x) stringize_inner(x)
|
||||
#define ll_viewer_channel stringize_outer(LL_VIEWER_CHANNEL)
|
||||
|
||||
namespace tut
|
||||
{
|
||||
struct versioninfo
|
||||
|
|
@ -50,7 +57,7 @@ namespace tut
|
|||
mShortVersion = stream.str();
|
||||
stream.str("");
|
||||
|
||||
stream << LL_VIEWER_CHANNEL
|
||||
stream << ll_viewer_channel
|
||||
<< " "
|
||||
<< mVersion;
|
||||
mVersionAndChannel = stream.str();
|
||||
|
|
@ -89,7 +96,7 @@ namespace tut
|
|||
LL_VIEWER_VERSION_BUILD);
|
||||
ensure_equals("Channel version",
|
||||
LLVersionInfo::getChannel(),
|
||||
LL_VIEWER_CHANNEL);
|
||||
ll_viewer_channel);
|
||||
ensure_equals("Version String",
|
||||
LLVersionInfo::getVersion(),
|
||||
mVersion);
|
||||
|
|
|
|||
|
|
@ -287,7 +287,8 @@ class ViewerManifest(LLManifest):
|
|||
random.shuffle(names)
|
||||
return ', '.join(names)
|
||||
|
||||
class Windows_i686_Manifest(ViewerManifest):
|
||||
|
||||
class WindowsManifest(ViewerManifest):
|
||||
def final_exe(self):
|
||||
return self.app_name_oneword()+".exe"
|
||||
|
||||
|
|
@ -338,7 +339,7 @@ class Windows_i686_Manifest(ViewerManifest):
|
|||
print "Doesn't exist:", src
|
||||
|
||||
def construct(self):
|
||||
super(Windows_i686_Manifest, self).construct()
|
||||
super(WindowsManifest, self).construct()
|
||||
|
||||
pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
|
||||
relpkgdir = os.path.join(pkgdir, "lib", "release")
|
||||
|
|
@ -386,10 +387,7 @@ class Windows_i686_Manifest(ViewerManifest):
|
|||
print "Skipping fmodex audio library(assuming other audio engine)"
|
||||
|
||||
# For textures
|
||||
if self.args['configuration'].lower() == 'debug':
|
||||
self.path("openjpegd.dll")
|
||||
else:
|
||||
self.path("openjpeg.dll")
|
||||
self.path("openjpeg.dll")
|
||||
|
||||
# These need to be installed as a SxS assembly, currently a 'private' assembly.
|
||||
# See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
|
||||
|
|
@ -699,7 +697,17 @@ class Windows_i686_Manifest(ViewerManifest):
|
|||
self.package_file = installer_file
|
||||
|
||||
|
||||
class Darwin_i386_Manifest(ViewerManifest):
|
||||
class Windows_i686_Manifest(WindowsManifest):
|
||||
# specialize when we must
|
||||
pass
|
||||
|
||||
|
||||
class Windows_x86_64_Manifest(WindowsManifest):
|
||||
# specialize when we must
|
||||
pass
|
||||
|
||||
|
||||
class DarwinManifest(ViewerManifest):
|
||||
def is_packaging_viewer(self):
|
||||
# darwin requires full app bundle packaging even for debugging.
|
||||
return True
|
||||
|
|
@ -725,7 +733,7 @@ class Darwin_i386_Manifest(ViewerManifest):
|
|||
|
||||
# most everything goes in the Resources directory
|
||||
if self.prefix(src="", dst="Resources"):
|
||||
super(Darwin_i386_Manifest, self).construct()
|
||||
super(DarwinManifest, self).construct()
|
||||
|
||||
if self.prefix("cursors_mac"):
|
||||
self.path("*.tif")
|
||||
|
|
@ -1052,6 +1060,20 @@ class Darwin_i386_Manifest(ViewerManifest):
|
|||
self.package_file = finalname
|
||||
self.remove(sparsename)
|
||||
|
||||
|
||||
class Darwin_i386_Manifest(DarwinManifest):
|
||||
pass
|
||||
|
||||
|
||||
class Darwin_i686_Manifest(DarwinManifest):
|
||||
"""alias in case arch is passed as i686 instead of i386"""
|
||||
pass
|
||||
|
||||
|
||||
class Darwin_x86_64_Manifest(DarwinManifest):
|
||||
pass
|
||||
|
||||
|
||||
class LinuxManifest(ViewerManifest):
|
||||
def construct(self):
|
||||
super(LinuxManifest, self).construct()
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ target_link_libraries(lltest
|
|||
${BOOST_CONTEXT_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${DL_LIBRARY}
|
||||
${GOOGLE_PERFTOOLS_LIBRARIES}
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -1,336 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
project(llplugintest)
|
||||
|
||||
include(00-Common)
|
||||
include(OpenGL)
|
||||
include(LLCommon)
|
||||
include(LLPlugin)
|
||||
include(Linking)
|
||||
include(LLSharedLibs)
|
||||
include(PluginAPI)
|
||||
include(LLImage)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLRender)
|
||||
include(LLWindow)
|
||||
include(Glut)
|
||||
include(Glui)
|
||||
|
||||
include_directories(
|
||||
${LLPLUGIN_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLIMAGE_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLMESSAGE_INCLUDE_DIRS}
|
||||
${LLRENDER_INCLUDE_DIRS}
|
||||
${LLWINDOW_INCLUDE_DIRS}
|
||||
)
|
||||
include_directories(SYSTEM
|
||||
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
||||
endif (DARWIN)
|
||||
|
||||
### demo_plugin
|
||||
|
||||
#set(demo_plugin_SOURCE_FILES
|
||||
# demo_plugin.cpp
|
||||
# )
|
||||
#
|
||||
#add_library(demo_plugin
|
||||
# SHARED
|
||||
# ${demo_plugin_SOURCE_FILES}
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(demo_plugin
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
# ${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#add_dependencies(demo_plugin
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#if (DARWIN)
|
||||
# # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
|
||||
# set_target_properties(
|
||||
# demo_plugin
|
||||
# PROPERTIES
|
||||
# PREFIX ""
|
||||
# BUILD_WITH_INSTALL_RPATH 1
|
||||
# INSTALL_NAME_DIR "@executable_path"
|
||||
# )
|
||||
#endif (DARWIN)
|
||||
|
||||
### plugin_host
|
||||
|
||||
#set(plugin_host_SOURCE_FILES
|
||||
# plugin_host.cpp
|
||||
# )
|
||||
#
|
||||
#add_executable(plugin_host
|
||||
# WIN32
|
||||
# ${plugin_host_SOURCE_FILES}
|
||||
#)
|
||||
#
|
||||
#set_target_properties(plugin_host
|
||||
# PROPERTIES
|
||||
# WIN32_EXECUTABLE
|
||||
# FALSE
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(plugin_host
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
# ${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#add_dependencies(plugin_host
|
||||
# demo_plugin
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
#)
|
||||
|
||||
### plugin_process_launcher
|
||||
|
||||
#set(plugin_process_launcher_SOURCE_FILES
|
||||
# plugin_process_launcher.cpp
|
||||
# )
|
||||
#
|
||||
#add_executable(plugin_process_launcher
|
||||
# WIN32
|
||||
# ${plugin_process_launcher_SOURCE_FILES}
|
||||
#)
|
||||
#
|
||||
#set_target_properties(plugin_process_launcher
|
||||
# PROPERTIES
|
||||
# WIN32_EXECUTABLE
|
||||
# FALSE
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(plugin_process_launcher
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLMESSAGE_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
# ${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#add_dependencies(plugin_process_launcher
|
||||
# SLPlugin
|
||||
# demo_plugin
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLMESSAGE_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
#)
|
||||
|
||||
### media_simple_test
|
||||
|
||||
#set(media_simple_test_SOURCE_FILES
|
||||
# media_simple_test.cpp
|
||||
# )
|
||||
#
|
||||
#add_executable(media_simple_test
|
||||
# WIN32
|
||||
# ${media_simple_test_SOURCE_FILES}
|
||||
#)
|
||||
#
|
||||
#add_dependencies(media_simple_test stage_third_party_libs)
|
||||
#
|
||||
#set_target_properties(media_simple_test
|
||||
# PROPERTIES
|
||||
# WIN32_EXECUTABLE
|
||||
# FALSE
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(media_simple_test
|
||||
# ${GLUT_LIBRARY}
|
||||
# ${OPENGL_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
#)
|
||||
|
||||
### media_plugin_test
|
||||
|
||||
#set(media_plugin_test_SOURCE_FILES
|
||||
# media_plugin_test.cpp
|
||||
# )
|
||||
#
|
||||
#add_executable(media_plugin_test
|
||||
# WIN32
|
||||
# ${media_plugin_test_SOURCE_FILES}
|
||||
#)
|
||||
#
|
||||
#set_target_properties(media_plugin_test
|
||||
# PROPERTIES
|
||||
# WIN32_EXECUTABLE
|
||||
# FALSE
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(media_plugin_test
|
||||
# ${GLUT_LIBRARY}
|
||||
# ${OPENGL_LIBRARIES}
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLMESSAGE_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
# ${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#add_dependencies(media_plugin_test
|
||||
# stage_third_party_libs
|
||||
# SLPlugin
|
||||
# demo_media_plugin
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLMESSAGE_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
#)
|
||||
|
||||
### demo_media_plugin
|
||||
|
||||
#set(demo_media_plugin_SOURCE_FILES
|
||||
# demo_media_plugin.cpp
|
||||
# )
|
||||
#
|
||||
#add_library(demo_media_plugin
|
||||
# SHARED
|
||||
# ${demo_media_plugin_SOURCE_FILES}
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(demo_media_plugin
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
# ${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#add_dependencies(demo_media_plugin
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#if (DARWIN)
|
||||
# # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
|
||||
# set_target_properties(
|
||||
# demo_media_plugin
|
||||
# PROPERTIES
|
||||
# PREFIX ""
|
||||
# BUILD_WITH_INSTALL_RPATH 1
|
||||
# INSTALL_NAME_DIR "@executable_path"
|
||||
# )
|
||||
#endif (DARWIN)
|
||||
|
||||
### demo_media_plugin_2
|
||||
|
||||
#set(demo_media_plugin_2_SOURCE_FILES
|
||||
# demo_media_plugin_2.cpp
|
||||
# )
|
||||
#
|
||||
#add_library(demo_media_plugin_2
|
||||
# SHARED
|
||||
# ${demo_media_plugin_2_SOURCE_FILES}
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(demo_media_plugin_2
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
# ${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#add_dependencies(demo_media_plugin_2
|
||||
# ${LLPLUGIN_LIBRARIES}
|
||||
# ${LLCOMMON_LIBRARIES}
|
||||
#)
|
||||
#
|
||||
#if (DARWIN)
|
||||
# # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
|
||||
# set_target_properties(
|
||||
# demo_media_plugin_2
|
||||
# PROPERTIES
|
||||
# PREFIX ""
|
||||
# BUILD_WITH_INSTALL_RPATH 1
|
||||
# INSTALL_NAME_DIR "@executable_path"
|
||||
# )
|
||||
#endif (DARWIN)
|
||||
|
||||
# Gather build products of the various dependencies into the build directory for the testbed.
|
||||
|
||||
if(WINDOWS)
|
||||
#********************
|
||||
# Plugin test library deploy
|
||||
#
|
||||
# Debug config runtime files required for the plugin test mule
|
||||
set(plugintest_debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||
set(plugintest_debug_files
|
||||
libeay32.dll
|
||||
libglib-2.0-0.dll
|
||||
libgmodule-2.0-0.dll
|
||||
libgobject-2.0-0.dll
|
||||
libgthread-2.0-0.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
out_targets
|
||||
${plugintest_debug_files}
|
||||
)
|
||||
set(plugin_test_targets ${plugin_test_targets} ${out_targets})
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule
|
||||
set(plugintest_release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(plugintest_release_files
|
||||
libeay32.dll
|
||||
libglib-2.0-0.dll
|
||||
libgmodule-2.0-0.dll
|
||||
libgobject-2.0-0.dll
|
||||
libgthread-2.0-0.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(plugin_test_targets ${plugin_test_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(plugin_test_targets ${plugin_test_targets} ${out_targets})
|
||||
|
||||
add_custom_target(copy_plugintest_libs ALL
|
||||
DEPENDS
|
||||
${plugin_test_targets}
|
||||
)
|
||||
|
||||
endif(WINDOWS)
|
||||
|
||||
if (DARWIN)
|
||||
set(plugintest_release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(plugintest_release_files
|
||||
libexception_handler.dylib
|
||||
libaprutil-1.0.dylib
|
||||
libapr-1.0.dylib
|
||||
libexpat.1.5.2.dylib
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${PLUGINS_DESTINATION_DIR}"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(plugin_test_targets ${plugin_test_targets} ${out_targets})
|
||||
|
||||
add_custom_target(copy_plugintest_libs ALL
|
||||
DEPENDS
|
||||
${plugin_test_targets}
|
||||
)
|
||||
|
||||
endif (DARWIN)
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
1. Description
|
||||
|
||||
Exercises SLPlugin. Demonstrates mediakit plugin reuse and
|
||||
switchover as MIME type changes (web, quicktime, flash).
|
||||
|
||||
|
||||
2. Running
|
||||
|
||||
2.1 Mac
|
||||
|
||||
Make certain '.' is included in PATH. E.g.:
|
||||
|
||||
PATH=.:"$PATH" open build-darwin-i386/test_apps/llmediaplugintest/RelWithDebInfo/llmediaplugintest.app
|
||||
|
||||
Otherwise the program won't find SLPlugin and will timeout and
|
||||
fail after 30 seconds and give you little information as to why.
|
||||
|
||||
Running 'dtruss' on plugin test applications will give you a great
|
||||
deal of insight into why they aren't activating.
|
||||
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# format is description, url (don't put ',' chars in description :)
|
||||
# if no ',' found, whole line is used for both description and url
|
||||
(WK) Google Home Page,http://www.google.com
|
||||
(WK) BBC News Home Page,http://news.bbc.co.uk
|
||||
(WK) Second Life,http://secondlife.com
|
||||
(WK) WebKit Home ,http://www.webkit.org
|
||||
(WK) Yahoo News,http://news.yahoo.com
|
||||
(WK) Canvas Paint (DHTML version of MS Paint),http://www.canvaspaint.org
|
||||
(WK) DHTML Lemmings!,http://www.elizium.nu/scripts/lemmings/
|
||||
(WK) DHTML graphics demos,http://www.dhteumeuleu.com/
|
||||
(WK) Shared paint app,http://colorillo.com/ac79?1l0q6cp
|
||||
(Flash) YouTube,http://youtube.com
|
||||
(Flash) Vimeo,http://www.vimeo.com/1778399
|
||||
(Flash) Simple whiteboard,http://www.imaginationcubed.com/
|
||||
(Flash) Dabble Board,http://www.dabbleboard.com/draw
|
||||
(Flash) Bubble Shooter game,http://www.wiicade.com/playGame.aspx?gameID=72&gameName=Bubble%20Shooter
|
||||
(Flash) Pixlr photo editor,http://pixlr.com/editor/
|
||||
(Flash) Scribd,http://www.scribd.com/doc/14427744/Second-Life-Quickstart-Guide
|
||||
(Flash) MAME,http://yvern.com/fMAME/fMAME.html
|
||||
(QT) Local sample,file:///C|/Program Files/QuickTime/Sample.mov
|
||||
(QT) Movie - Watchmen Trailer,http://trailers.apple.com/movies/wb/watchmen/watchmen-tlr2_480p.mov
|
||||
(QT) Movie - Transformers - Revenge of the Fallen,http://trailers.apple.com/movies/paramount/transformers2/transformersrevengeofthefallen-tlr1_h.320.mov
|
||||
(QT) Movie - Terminator Salvation,http://trailers.apple.com/movies/wb/terminatorsalvation/terminatorsalvation-tlr3_h.320.mov
|
||||
(QT) Movie - Angels and Demons,http://trailers.apple.com/movies/sony_pictures/angelsanddemons/angelsanddemons-video_h.320.mov
|
||||
(QT) Movie - Sin City Trailer,http://trailers.apple.com/movies/miramax/sin_city/sin_city_480.mov
|
||||
(QT) Movie - The Incredibles Trailer,http://trailers.apple.com/movies/disney/the_incredibles/the_incredibles-tlr_a480.mov
|
||||
(QT) Movie - Streaming Apple Event,http://stream.qtv.apple.com/events/mar/0903lajkszg/m_090374535329zdwg_650_ref.mov
|
||||
(QT) Movie - MPEG-4 from Amazon S3,http://s3.amazonaws.com/callum-linden/flashdemo/interactive_flash_demo.mp4
|
||||
(QT) Movie - Star Trek,http://trailers.apple.com/movies/paramount/star_trek/startrek-tlr3_h.320.mov
|
||||
(QT) Movie - Ice Age 3,http://trailers.apple.com/movies/fox/ice_age_iii/iceage3-tlrd_h.320.mov
|
||||
(QT) Movie - AstroBoy,http://trailers.apple.com/movies/summit/astroboy/astroboy-tsr_h.320.mov
|
||||
(QT) Movie - Ante Up,http://trailers.apple.com/movies/independent/anteup/anteup_h.320.mov
|
||||
(QT) Movie - Every Little Step,http://trailers.apple.com/movies/sony/everylittlestep/everylittlestep-clip_h.320.mov
|
||||
(QT) Movie - The Informers,http://trailers.apple.com/movies/independent/theinformers/theinformers_h.320.mov
|
||||
(QT) Animated GIF,http://upload.wikimedia.org/wikipedia/commons/4/44/Optical.greysquares.arp-animated.gif
|
||||
(QT) Apple Text Descriptors,http://ubrowser.com/tmp/apple_text.txt
|
||||
(EX) Example Plugin,example://blah
|
||||
Loading…
Reference in New Issue