Merge branch 'master' of https://github.com/stepmania/stepmania
@@ -0,0 +1,65 @@
|
||||
version: 5.0.10.{build}.{branch}
|
||||
environment:
|
||||
access_token:
|
||||
secure: vsDaeFdGCIGlIxWSEdsDomYtr5mKS5IPGHc4NwuDZ5D6mCna0STrDvMZ6IP6mOBK
|
||||
pull_requests:
|
||||
do_not_increment_build_number: true
|
||||
skip_tags: true
|
||||
os: Visual Studio 2015
|
||||
configuration: Release
|
||||
shallow_clone: false
|
||||
clone_depth: 1
|
||||
clone_folder: C:\Repos\wolfmania
|
||||
init:
|
||||
- cmd: >-
|
||||
git config --global credential.helper store
|
||||
|
||||
set GITHUB_API_URL=https://api.github.com/repos/%APPVEYOR_REPO_NAME%/statuses/%APPVEYOR_REPO_COMMIT%
|
||||
|
||||
set GITHUB_API_PENDING="{"""state""": """pending""", """target_url""": """https://ci.appveyor.com/project/%APPVEYOR_REPO_NAME%/build/%APPVEYOR_BUILD_VERSION%""", """description""": """Starting the appveyor build.""", """context""": """continuous-integration/appveyor"""}"
|
||||
|
||||
set APPVEYOR_BUILD_URL=https://ci.appveyor.com/project/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%/build/%APPVEYOR_BUILD_VERSION%
|
||||
|
||||
set SM_COMMIT_SHORT=%APPVEYOR_REPO_COMMIT:~0,7%
|
||||
|
||||
set SM_SETUP_EXE_NAME=StepMania-5.0-git-%SM_COMMIT_SHORT%-win32.exe
|
||||
|
||||
curl -u wolfman2000:%access_token% -H "User-Agent: Appveyor-wolfman2000-stepmania-app" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" -X POST -d %GITHUB_API_PENDING% %GITHUB_API_URL%
|
||||
|
||||
install:
|
||||
- cmd: >-
|
||||
choco install cmake
|
||||
|
||||
choco install nsis -version 2.46.0.20150406
|
||||
before_build:
|
||||
- cmd: >-
|
||||
cd Build
|
||||
|
||||
cmake -G "Visual Studio 14 2015" -DWITH_IRC_POST_HOOK=ON ..
|
||||
build:
|
||||
project: C:\Repos\wolfmania\Build\StepMania.sln
|
||||
verbosity: normal
|
||||
after_build:
|
||||
- cmd: >-
|
||||
msbuild "C:\Repos\wolfmania\Build\PACKAGE.vcxproj" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
artifacts:
|
||||
- path: Build/*.exe
|
||||
type: exe
|
||||
on_success:
|
||||
- cmd: >-
|
||||
set GITHUB_API_SUCCESS="{"""state""": """success""", """target_url""": """%APPVEYOR_BUILD_URL%""", """description""": """Successfully compiled in appveyor.""", """context""": """continuous-integration/appveyor"""}"
|
||||
|
||||
curl -u wolfman2000:%access_token% -H "User-Agent: Appveyor-wolfman2000-stepmania-app" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" -X POST -d %GITHUB_API_SUCCESS% %GITHUB_API_URL%
|
||||
|
||||
echo "Posting to IRC now..."
|
||||
|
||||
C:\Repos\wolfmania\Program\irc-reporter.exe "%APPVEYOR_REPO_NAME%" "%APPVEYOR_BUILD_VERSION%" "%SM_COMMIT_SHORT%" "%APPVEYOR_REPO_COMMIT_AUTHOR%" "%APPVEYOR_BUILD_URL%" "success"
|
||||
on_failure:
|
||||
- cmd: >-
|
||||
set GITHUB_API_FAILURE="{"""state""": """failure""", """target_url""": """%APPVEYOR_BUILD_URL%""", """description""": """Build failure on appveyor.""", """context""": """continuous-integration/appveyor"""}"
|
||||
|
||||
curl -u wolfman2000:%access_token% -H "User-Agent: Appveyor-wolfman2000-stepmania-app" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" -X POST -d %GITHUB_API_FAILURE% %GITHUB_API_URL%
|
||||
|
||||
echo "Posting to IRC now..."
|
||||
|
||||
C:\Repos\wolfmania\Program\irc-reporter.exe "%APPVEYOR_REPO_NAME%" "%APPVEYOR_BUILD_VERSION%" "%SM_COMMIT_SHORT%" "%APPVEYOR_REPO_COMMIT_AUTHOR%" "%APPVEYOR_BUILD_URL%" "failure"
|
||||
@@ -27,6 +27,9 @@ Xcode/Info.StepMania.plist
|
||||
Xcode/plistHelper.hpp
|
||||
src/version_updater/VersionUpdater
|
||||
src/generated
|
||||
extern/mad-0.15.1b/config.h
|
||||
extern/libjpeg/jconfig.h
|
||||
extern/newogg/include/ogg/config_types.h
|
||||
|
||||
# Text Editor Based Items
|
||||
___*
|
||||
@@ -79,6 +82,8 @@ PBProject/Hardware.plist
|
||||
*.exp
|
||||
*.ilk
|
||||
*.map
|
||||
*.aps
|
||||
*.res
|
||||
|
||||
# Windows General Files
|
||||
Thumbs.db
|
||||
@@ -183,4 +188,3 @@ BuildLog.htm
|
||||
*.swp
|
||||
*.pc
|
||||
*.d
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
|
||||
tar -xzvf cmake-3.2.2.tar.gz
|
||||
cd cmake-3.2.2 && ./configure && make && sudo make install
|
||||
|
||||
@@ -1,35 +1,83 @@
|
||||
language: cpp
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
sudo: false
|
||||
git:
|
||||
submodules: false
|
||||
notifications:
|
||||
email: false
|
||||
irc: "chat.freenode.net#stepmania-devs"
|
||||
|
||||
matrix:
|
||||
include:
|
||||
-
|
||||
env: CXX_COMPILER=clang++-3.6 CC_COMPILER=clang-3.6 BUILD_TYPE=Release WITH_FFMPEG=OFF WITH_FFMPEG_JOBS=1
|
||||
compiler: clang
|
||||
addons: &clang36
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.6
|
||||
packages:
|
||||
- nasm
|
||||
- clang-3.6
|
||||
- libmad0-dev
|
||||
- libgtk2.0-dev
|
||||
- binutils-dev
|
||||
- libasound-dev
|
||||
- libpulse-dev
|
||||
- libjack-dev
|
||||
- libc6-dev
|
||||
- libogg-dev
|
||||
- libvorbis-dev
|
||||
- libxtst-dev
|
||||
- libxrandr-dev
|
||||
- libglew-dev
|
||||
|
||||
-
|
||||
env: CXX_COMPILER=clang++-3.6 CC_COMPILER=clang-3.6 BUILD_TYPE=Release WITH_FFMPEG=ON WITH_FFMPEG_JOBS=1
|
||||
compiler: clang
|
||||
addons: *clang36
|
||||
|
||||
-
|
||||
env: CXX_COMPILER=g++-5 CC_COMPILER=gcc-5 BUILD_TYPE=Release WITH_FFMPEG=OFF WITH_FFMPEG_JOBS=1
|
||||
compiler: gcc
|
||||
addons: &gcc5
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- nasm
|
||||
- gcc-5
|
||||
- g++-5
|
||||
- libmad0-dev
|
||||
- libgtk2.0-dev
|
||||
- binutils-dev
|
||||
- libasound-dev
|
||||
- libpulse-dev
|
||||
- libjack-dev
|
||||
- libc6-dev
|
||||
- libogg-dev
|
||||
- libvorbis-dev
|
||||
- libxtst-dev
|
||||
- libxrandr-dev
|
||||
- libglew-dev
|
||||
|
||||
install:
|
||||
# Setup a directory for necessary dependencies.
|
||||
- cd ~
|
||||
- export DEPS_DIR="${PWD}/deps"
|
||||
- mkdir ${DEPS_DIR}
|
||||
- cd ${DEPS_DIR}
|
||||
# Use the binary for cmake instead of building it now.
|
||||
- export CMAKE_URL=http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz
|
||||
- mkdir cmake
|
||||
- wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
|
||||
- export PATH=${PWD}/cmake/bin:${PATH}
|
||||
|
||||
before_script:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -y nasm
|
||||
- sudo apt-get install -y libmad0-dev
|
||||
- sudo apt-get install -y libgtk2.0-dev
|
||||
- sudo apt-get install -y binutils-dev
|
||||
- sudo apt-get install -y libasound-dev
|
||||
- sudo apt-get install -y libpulse-dev
|
||||
- sudo apt-get install -y libjack-dev
|
||||
- sudo apt-get install -y libc6-dev
|
||||
- sudo apt-get install -y libogg-dev
|
||||
- sudo apt-get install -y libvorbis-dev
|
||||
- sudo apt-get install -y libbz2-dev
|
||||
- sudo apt-get install -y zlib1g-dev
|
||||
- sudo apt-get install -y libjpeg8-dev
|
||||
- sudo apt-get install -y libpng12-dev
|
||||
- sudo apt-get install -y libxtst-dev libxrandr-dev
|
||||
- sudo apt-get install -y libglu1-mesa-dev
|
||||
- sudo apt-get install -y mesa-common-dev
|
||||
- sudo apt-get install -y libglew-dev
|
||||
- ./.install-cmake.sh
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
- cd Build
|
||||
- cmake .. -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${CC_COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_FFMPEG_JOBS=${WITH_FFMPEG_JOBS}
|
||||
|
||||
script:
|
||||
- cmake -DWITH_PORTABLE_TOMCRYPT=ON -G 'Unix Makefiles'
|
||||
- make
|
||||
- make -j2
|
||||
|
||||
|
||||
@@ -55,3 +55,58 @@ function(disable_project_warnings projectName)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(check_compile_features BIN_DIR SOURCE_FILE GREETER GREET_SUCCESS GREET_FAILURE TARGET_VAR ON_SUCCESS)
|
||||
if(NOT DEFINED "${TARGET_VAR}")
|
||||
message(STATUS "${GREETER}")
|
||||
try_compile(${TARGET_VAR} "${BIN_DIR}"
|
||||
SOURCES "${SOURCE_FILE}"
|
||||
)
|
||||
if(${TARGET_VAR})
|
||||
if (${ON_SUCCESS})
|
||||
message(STATUS "${GREETER} - ${GREET_SUCCESS}")
|
||||
set(${TARGET_VAR} 1 CACHE INTERNAL "${GREETER}")
|
||||
else()
|
||||
message(STATUS "${GREETER} - ${GREET_FAILURE}")
|
||||
set(${TARGET_VAR} "" CACHE INTERNAL "${GREETER}")
|
||||
endif()
|
||||
else()
|
||||
if(${ON_SUCCESS})
|
||||
message(STATUS "${GREETER} - ${GREET_FAILURE}")
|
||||
set(${TARGET_VAR} 1 CACHE INTERNAL "${GREETER}")
|
||||
else()
|
||||
message(STATUS "${GREETER} - ${GREET_SUCCESS}")
|
||||
set(${TARGET_VAR} "" CACHE INTERNAL "${GREETER}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Borrowed from http://stackoverflow.com/q/10113017
|
||||
macro(configure_msvc_runtime)
|
||||
if(MSVC)
|
||||
# Get the compiler options generally used.
|
||||
list(APPEND COMPILER_VARIABLES
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
)
|
||||
if (WITH_STATIC_LINKING)
|
||||
set(TO_REPLACE "/MD")
|
||||
set(REPLACE_WITH "/MT")
|
||||
else()
|
||||
set(TO_REPLACE "/MT")
|
||||
set(REPLACE_WITH "/MD")
|
||||
endif()
|
||||
foreach(COMPILER_VARIABLE ${COMPILER_VARIABLES})
|
||||
if (${COMPILER_VARIABLE} MATCHES "${TO_REPLACE}")
|
||||
string(REGEX REPLACE "${TO_REPLACE}" "${REPLACE_WITH}" ${COMPILER_VARIABLE} "${${COMPILER_VARIABLE}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
if(WITH_FULL_RELEASE)
|
||||
set(NSIS_VERSION_FINAL "${SM_VERSION_TRADITIONAL}")
|
||||
else()
|
||||
set(NSIS_VERSION_FINAL "${SM_VERSION_GIT}")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "${SM_EXE_NAME}")
|
||||
set(CPACK_PACKAGE_VENDOR "StepMania")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Rhythm Game Simulator")
|
||||
@@ -6,15 +12,32 @@ set(CPACK_PACKAGE_VERSION_MINOR "${SM_VERSION_MINOR}")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${SM_VERSION_PATCH}")
|
||||
set(CPACK_PACKAGE_VERSION "${SM_VERSION_TRADITIONAL}")
|
||||
set(CPACK_NSIS_HELP_LINK "https://github.com/stepmania/stepmania/issues")
|
||||
set(CPACK_NSIS_PACKAGE_NAME "${SM_EXE_NAME} ${NSIS_VERSION_FINAL}")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.stepmania.com/")
|
||||
set(CPACK_RESOURCE_FILE_README "${SM_ROOT_DIR}/README.md")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${SM_CMAKE_DIR}/license_install.txt")
|
||||
set(CPACK_PACKAGE_EXECUTABLES
|
||||
"${SM_EXE_NAME}" "StepMania ${SM_VERSION_MAJOR}"
|
||||
)
|
||||
set(CPACK_NSIS_MUI_ICON "${SM_INSTALLER_DIR}/install.ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${SM_INSTALLER_DIR}/uninstall.ico")
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
# Custom items for nsis go here.
|
||||
set(CPACK_SM_NSIS_REPOSITORY "https://github.com/stepmania/stepmania")
|
||||
set(CPACK_SM_NSIS_ROOT_DIR "${SM_ROOT_DIR}")
|
||||
set(CPACK_SM_NSIS_PRODUCT_ID "StepMania ${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}")
|
||||
set(CPACK_SM_NSIS_PRODUCT_VERSION "${SM_VERSION_TRADITIONAL}.0")
|
||||
set(CPACK_SM_NSIS_HEADER_BITMAP "${SM_INSTALLER_DIR}/header-sm5.bmp")
|
||||
set(CPACK_SM_NSIS_WELCOME_BITMAP "${SM_INSTALLER_DIR}/welcome-sm5.bmp")
|
||||
set(CPACK_SM_NSIS_GIT_VERSION "${SM_VERSION_GIT}")
|
||||
|
||||
if(WIN32)
|
||||
# The header and welcome bitmaps require backslashes.
|
||||
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_SM_NSIS_HEADER_BITMAP "${CPACK_SM_NSIS_HEADER_BITMAP}")
|
||||
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_SM_NSIS_WELCOME_BITMAP "${CPACK_SM_NSIS_WELCOME_BITMAP}")
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "${SM_EXE_NAME}-${NSIS_VERSION_FINAL}-win32")
|
||||
# By setting these install keys manually,
|
||||
# The default directory of "StepMania major.minor.patch" is lost.
|
||||
# This is currently done to maintain backwards compatibility.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# Prep options that are needed for each platform.
|
||||
|
||||
# This option allows for networking support with StepMania.
|
||||
option(WITH_NETWORKING "Build with networking support." ON)
|
||||
|
||||
# This option quiets warnings that are a part of external projects.
|
||||
@@ -17,7 +19,7 @@ option(WITH_JPEG "Build with JPEG Image Support." ON)
|
||||
option(WITH_FULL_RELEASE "Build as a proper, full release." OFF)
|
||||
|
||||
# Turn this on to compile tomcrypt with no assembly data. This is a portable mode.
|
||||
option(WITH_PORTABLE_TOMCRYPT "Build with assembly/free tomcrypt, making it portable." OFF)
|
||||
option(WITH_PORTABLE_TOMCRYPT "Build with assembly/free tomcrypt, making it portable." ON)
|
||||
|
||||
# Turn this on to not use the ROLC assembly featurs of tomcrypt.
|
||||
# If WITH_PORTABLE_TOMCRYPT is ON, this will automatically have no effect.
|
||||
@@ -26,19 +28,40 @@ option(WITH_NO_ROLC_TOMCRYPT "Build without the ROLC assembly instructions for t
|
||||
# Turn this option off to not use the GPL exclusive components.
|
||||
option(WITH_GPL_LIBS "Build with GPL libraries." ON)
|
||||
|
||||
# Turn this option off to disable using WAV files with the game.
|
||||
# Note that it is recommended to keep this on.
|
||||
option(WITH_WAV "Build with WAV Support." ON)
|
||||
|
||||
# Turn this option off to disable using MP3 files with the game.
|
||||
option(WITH_MP3 "Build with MP3 Support." ON)
|
||||
|
||||
# Turn this option off to disable using OGG files with the game.
|
||||
option(WITH_OGG "Build with OGG/Vorbis Support." ON)
|
||||
|
||||
if(NOT MSVC)
|
||||
# Turn this option off to disable using FFMEPG.
|
||||
option(WITH_FFMPEG "Build with FFMPEG." ON)
|
||||
# Change this number to utilize a different number of jobs for building FFMPEG.
|
||||
option(WITH_FFMPEG_JOBS "Build FFMPEG with this many jobs." 2)
|
||||
else()
|
||||
# Turn this option on to enable using the Texture Font Generator.
|
||||
option(WITH_TEXTURE_GENERATOR "Build with the Texture Font Generator. Ensure the MFC library is installed." OFF)
|
||||
# Turn this option off to use dynamic linking instead of static linking.
|
||||
option(WITH_STATIC_LINKING "Build StepMania with static linking." ON)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
option(WITH_MINIMAID "Build with Mimimaid Lights Support." OFF)
|
||||
option(WITH_MINIMAID "Build with Minimaid Lights Support." ON)
|
||||
# Developer only option: connect to IRC to report the result. Only use with build servers.
|
||||
option(WITH_IRC_POST_HOOK "Report via IRC of the success afterwards." OFF)
|
||||
elseif(LINUX)
|
||||
option(WITH_FFMPEG "Build with FFMPEG." ON)
|
||||
# Builder beware: later versions of ffmpeg may break!
|
||||
option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG." OFF)
|
||||
option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG, disabled build with bundled's FFMPEG" OFF)
|
||||
option(WITH_CRYSTALHD_DISABLED "Build FFMPEG without Crystal HD support." OFF)
|
||||
option(WITH_TTY "Build with Linux TTY Input Support." OFF)
|
||||
option(WITH_PROFILING "Build with Profiling Support." OFF)
|
||||
option(WITH_GLES2 "Build with OpenGL ES 2.0 Support." ON)
|
||||
option(WITH_GTK2 "Build with GTK2 Support." ON)
|
||||
option(WITH_OGG "Build with OGG/Vorbis Support." ON)
|
||||
option(WITH_MP3 "Build with MP3 Support." ON)
|
||||
option(WITH_PARALLEL_PORT "Build with Parallel Lights I/O Support." OFF)
|
||||
option(WITH_CRASH_HANDLER "Build with Crash Handler Support." ON)
|
||||
endif()
|
||||
|
||||
@@ -10,16 +10,18 @@ if(NOT WIN32)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "$ENV{DXSDK_DIR}")
|
||||
message(FATAL_ERROR "Could not find Microsoft DirectX SDK installation!")
|
||||
endif()
|
||||
|
||||
set(DIRECTX_INCLUDE_SEARCH_PATHS
|
||||
# TODO: Do not be limited to x86 in the future.
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include"
|
||||
"C:/DXSDK/Include"
|
||||
"$ENV{DXSDK_DIR}/Include"
|
||||
)
|
||||
|
||||
set(DIRECTX_LIBRARY_SEARCH_PATHS
|
||||
# TODO: Do not be limited to x86 in the future.
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86"
|
||||
"C:/DXSDK/Include/Lib/x86"
|
||||
"$ENV{DXSDK_DIR}/Lib/x86"
|
||||
)
|
||||
|
||||
find_path(DIRECTX_INCLUDE_DIR
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Stick to traditional approaches here. The following are defined.
|
||||
|
||||
# DL_FOUND - The system has the dl library.
|
||||
# DL_INCLUDE_DIR - The dl include directory.
|
||||
# DL_LIBRARIES - The library file to link to.
|
||||
|
||||
if (DL_INCLUDE_DIR AND DL_LIBRARIES)
|
||||
# Already in cache, so don't repeat the finding procedures.
|
||||
set(DL_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
find_path(DL_INCLUDE_DIR dlfcn.h
|
||||
PATHS /usr/local/include /usr/include
|
||||
)
|
||||
|
||||
find_library(DL_LIBRARIES dl
|
||||
PATHS /usr/local/lib /usr/lib /lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DL DEFAULT_MSG DL_LIBRARIES DL_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(DL_INCLUDE_DIR DL_LIBRARIES)
|
||||
|
||||
@@ -36,92 +36,16 @@
|
||||
# Originally from VTK project
|
||||
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR1 avformat.h
|
||||
find_path(FFMPEG_INCLUDE_DIR libavformat/avformat.h
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/ffmpeg
|
||||
$ENV{FFMPEG_DIR}/libavformat
|
||||
$ENV{FFMPEG_DIR}/include/libavformat
|
||||
$ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/libavformat
|
||||
/usr/include/ffmpeg/libavformat
|
||||
/usr/local/include/libavformat
|
||||
/usr/include/
|
||||
/usr/local/include/
|
||||
)
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR2 avutil.h
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/ffmpeg
|
||||
$ENV{FFMPEG_DIR}/libavutil
|
||||
$ENV{FFMPEG_DIR}/include/libavutil
|
||||
$ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/libavutil
|
||||
/usr/include/ffmpeg/libavutil
|
||||
/usr/local/include/libavutil
|
||||
)
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR3 avcodec.h
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/ffmpeg
|
||||
$ENV{FFMPEG_DIR}/libavcodec
|
||||
$ENV{FFMPEG_DIR}/include/libavcodec
|
||||
$ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/libavcodec
|
||||
/usr/include/ffmpeg/libavcodec
|
||||
/usr/local/include/libavcodec
|
||||
)
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR4 swscale.h
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/ffmpeg
|
||||
$ENV{FFMPEG_DIR}/libswscale
|
||||
$ENV{FFMPEG_DIR}/include/libswscale
|
||||
$ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/libswscale
|
||||
/usr/include/ffmpeg/libswscale
|
||||
/usr/local/include/libswscale
|
||||
)
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR5 avdevice.h
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/ffmpeg
|
||||
$ENV{FFMPEG_DIR}/libavdevice
|
||||
$ENV{FFMPEG_DIR}/include/libavdevice
|
||||
$ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/libavdevice
|
||||
/usr/include/ffmpeg/libavdevice
|
||||
/usr/local/include/libavdevice
|
||||
)
|
||||
|
||||
if(FFMPEG_INCLUDE_DIR1)
|
||||
if(FFMPEG_INCLUDE_DIR2)
|
||||
if(FFMPEG_INCLUDE_DIR3)
|
||||
set(FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR1}
|
||||
${FFMPEG_INCLUDE_DIR2}
|
||||
${FFMPEG_INCLUDE_DIR3})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FFMPEG_INCLUDE_DIR4)
|
||||
set(FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR}
|
||||
${FFMPEG_INCLUDE_DIR4})
|
||||
endif()
|
||||
|
||||
if(FFMPEG_INCLUDE_DIR5)
|
||||
set(FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR}
|
||||
${FFMPEG_INCLUDE_DIR5}
|
||||
${FFMPEG_INCLUDE_DIR5}/..)
|
||||
endif()
|
||||
|
||||
find_library(FFMPEG_avformat_LIBRARY avformat
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Borrowed from https://github.com/onyx-intl/cmake_modules/blob/master/FindIconv.cmake
|
||||
|
||||
# Find Iconv on the system. When this is done, the following are defined:
|
||||
|
||||
# ICONV_FOUND - The system has Iconv.
|
||||
# ICONV_INCLUDE_DIR - The Iconv include directory.
|
||||
# ICONV_LIBRARIES - The library file to link to.
|
||||
|
||||
if (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||
# Already in cache, so don't repeat the finding procedures.
|
||||
set(ICONV_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
find_path(ICONV_INCLUDE_DIR iconv.h)
|
||||
set(ICONV_NAMES ${ICONV_NAMES} iconv libiconv libiconv-2 c)
|
||||
find_library(ICONV_LIBRARIES NAMES ${ICONV_NAMES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ICONV DEFAULT_MSG ICONV_LIBRARIES ICONV_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIBRARIES)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Try to find the nasm assembly program.
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_program(NASM_EXECUTABLE nasm
|
||||
HINTS $ENV{NASM_ROOT} ${NASM_ROOT}
|
||||
PATH_SUFFIXES bin
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(nasm DEFAULT_MSG NASM_EXECUTABLE)
|
||||
|
||||
mark_as_advanced(NASM_EXECUTABLE)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Set up version numbers according to the new scheme.
|
||||
set(SM_VERSION_MAJOR 5)
|
||||
set(SM_VERSION_MINOR 0)
|
||||
set(SM_VERSION_PATCH 9)
|
||||
set(SM_VERSION_PATCH 10)
|
||||
set(SM_VERSION_TRADITIONAL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
@@ -12,10 +12,18 @@ execute_process(COMMAND git rev-parse --short HEAD
|
||||
)
|
||||
|
||||
if(NOT (ret STREQUAL "0"))
|
||||
message(WARNING "git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake.")
|
||||
set(SM_VERSION_GIT_HASH "UNKNOWN")
|
||||
set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}")
|
||||
else()
|
||||
set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}")
|
||||
if (WITH_FULL_RELEASE)
|
||||
set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
else()
|
||||
set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_MAJOR_VERSION STREQUAL "3")
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
set(SM_FFMPEG_VERSION "2.1.3")
|
||||
set(SM_FFMPEG_SRC_LIST "${SM_EXTERN_DIR}" "/ffmpeg-linux-" "${SM_FFMPEG_VERSION}")
|
||||
sm_join("${SM_FFMPEG_SRC_LIST}" "" SM_FFMPEG_SRC_DIR)
|
||||
set(SM_FFMPEG_CONFIGURE_EXE "${SM_FFMPEG_SRC_DIR}/configure")
|
||||
if (MINGW)
|
||||
# Borrow from http://stackoverflow.com/q/11845823
|
||||
# string(SUBSTRING ${SM_FFMPEG_CONFIGURE_EXE} 0 1 FIRST_LETTER)
|
||||
# string(TOLOWER ${FIRST_LETTER} FIRST_LETTER_LOW)
|
||||
# string(REPLACE "${FIRST_LETTER}:" "/${FIRST_LETTER_LOW}" # SM_FFMPEG_CONFIGURE_EXE ${SM_FFMPEG_CONFIGURE_EXE})
|
||||
# string(REGEX REPLACE "\\\\" "/" SM_FFMPEG_CONFIGURE_EXE "${SM_FFMPEG_CONFIGURE_EXE}")
|
||||
set(SM_FFMPEG_CONFIGURE_EXE "extern/ffmpeg-linux-${SM_FFMPEG_VERSION}/configure")
|
||||
endif()
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"${SM_FFMPEG_CONFIGURE_EXE}"
|
||||
"--disable-programs"
|
||||
"--disable-doc"
|
||||
"--disable-avdevice"
|
||||
"--disable-swresample"
|
||||
"--disable-postproc"
|
||||
"--disable-avfilter"
|
||||
"--disable-shared"
|
||||
"--enable-static"
|
||||
)
|
||||
|
||||
if(MACOSX)
|
||||
# TODO: Remove these two items when Mac OS X StepMania builds in 64-bit.
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--arch=i386"
|
||||
"--cc=clang -m32"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_GPL_LIBS)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--enable-gpl"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WITH_CRYSTALHD_DISABLED)
|
||||
list(APPEND FFMPEG_CONFIGURE "--disable-crystalhd")
|
||||
endif()
|
||||
|
||||
if (NOT WITH_EXTERNAL_WARNINGS)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--extra-cflags=-w"
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND SM_FFMPEG_MAKE
|
||||
"make"
|
||||
)
|
||||
if (WITH_FFMPEG_JOBS GREATER 1)
|
||||
list(APPEND SM_FFMPEG_MAKE "-j${WITH_FFMPEG_JOBS}")
|
||||
endif()
|
||||
|
||||
if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
|
||||
externalproject_add("ffmpeg"
|
||||
SOURCE_DIR "${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE}
|
||||
BUILD_COMMAND "${SM_FFMPEG_MAKE}"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
else()
|
||||
# --shlibdir=$our_installdir/stepmania-$VERSION
|
||||
externalproject_add("ffmpeg"
|
||||
DOWNLOAD_COMMAND git clone "--branch" "n${SM_FFMPEG_VERSION}" "--depth" "1" "git://source.ffmpeg.org/ffmpeg.git" "${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND "${FFMPEG_CONFIGURE}"
|
||||
BUILD_COMMAND "${SM_FFMPEG_MAKE}"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
|
||||
externalproject_get_property("ffmpeg" BINARY_DIR)
|
||||
set(SM_FFMPEG_ROOT ${BINARY_DIR})
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/* Borrowed from libjpeg. */
|
||||
typedef struct undefined_structure * undef_struct_ptr;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int very_long_name_here_one() { return 0; }
|
||||
int very_long_name_here_two() { return 1; }
|
||||
|
||||
int main() {
|
||||
printf("%d\n", very_long_name_here_one());
|
||||
printf("%d\n", very_long_name_here_two());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Borrowed from Wikipedia: Function prototype page. */
|
||||
#include <stdio.h>
|
||||
|
||||
int myfunction(int n);
|
||||
|
||||
int main(void) {
|
||||
printf("%d\n", myfunction()); /* Intentional: we want this to fail. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int myfunction(int n) {
|
||||
if (n == 0) {
|
||||
return 1;
|
||||
}
|
||||
return n * myfunction(n - 1);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,10 @@ Example:
|
||||
This means that three strings were added to the "ScreenDebugOverlay" section,
|
||||
"Mute actions", "Mute actions on", and "Mute actions off".
|
||||
|
||||
2015/10/02
|
||||
----------
|
||||
* [ScreenEdit] save_success_no_sm_split_timing
|
||||
|
||||
2015/07/09
|
||||
----------
|
||||
* [ScreenDebugOverlay] Show Recent Errors
|
||||
|
||||
@@ -4,6 +4,220 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
|
||||
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
|
||||
________________________________________________________________________________
|
||||
|
||||
2015/10/27
|
||||
----------
|
||||
* [Compiling] Link with /MT on windows instead of /MD. [wolfman2000]
|
||||
* [Fonts] Put Texture Font Generator back in package. [wolfman2000]
|
||||
Build Texture Font Generator when WITH_FULL_RELEASE or
|
||||
WITH_TEXTURE_GENERATOR is enabled. [wolfman2000]
|
||||
|
||||
2015/10/26
|
||||
----------
|
||||
* [Song] Added GetMainTitle lua function for bypassing ShowNativeLanguage
|
||||
preference. [kyzentun]
|
||||
|
||||
2015/10/25
|
||||
----------
|
||||
* [Compiling] Number of jobs used when building ffmpeg can be customized by
|
||||
WITH_FFMPEG_JOBS. [wolfman2000]
|
||||
Appveyor support added for automated windows building. [wolfman2000]
|
||||
|
||||
2015/10/23
|
||||
----------
|
||||
* [BMS] Fixed crash when an unknown type chart was in a bms. [kyzentun]
|
||||
|
||||
2015/10/21
|
||||
----------
|
||||
* [Actor] Changed PlayCommandNoRecurse so that setting a theme metric to a
|
||||
function that doesn't exist doesn't emit an error. [kyzentun]
|
||||
* [Compiling] Allow WITH_MP3=Off and WITH_WAV=Off to compile. [wolfman2000]
|
||||
* [EditMode] Fixed crash on missing ScreenMiniMenuTimingDataChangeInformation
|
||||
metrics. [kyzentun]
|
||||
* [ScreenEvaluation] Changed assert that occurs when leaving ScreenGameplay
|
||||
with SM_GoToNextScreen to give more info. [kyzentun]
|
||||
|
||||
2015/10/20
|
||||
----------
|
||||
* [Compiling] Fixed cmake error when compiling with -DWITH_SSE2=off. [wallacoloo]
|
||||
Don't define CPU_X86 on non-x86. [wallacoloo]
|
||||
* [Noteskins] If the fallback for a noteskin is not found, that noteskin is
|
||||
not loaded, to prevent picking it and crashing. [kyzentun]
|
||||
|
||||
2015/10/18
|
||||
----------
|
||||
* [BitmapText] Added set_mult_attrs_with_diffuse lua function. [kyzentun]
|
||||
|
||||
2015/10/17
|
||||
----------
|
||||
* [Course] Fixed loading of courses that use WORST entries. [wolfman2000]
|
||||
* [SextetStream] SextetStream stuff is now in all platforms. [wolfman2000]
|
||||
|
||||
2015/10/15
|
||||
----------
|
||||
* [BMS] Changed bms loading so that iidx bms files aren't loaded as kb7.
|
||||
[zardoru]
|
||||
|
||||
2015/10/12
|
||||
----------
|
||||
* [ActorMultiVertex] Fixed bug that *sometimes* caused diffuse to be applied
|
||||
to verts wrong. [kyzentun]
|
||||
|
||||
2015/10/11
|
||||
----------
|
||||
* [Song] Changed song loading to allow a song to have a blank MusicFile field
|
||||
if the song has any keysounds. A blank MusicFile entry can result from
|
||||
having '#' in the music file name, or be intended for bms files. Do not use
|
||||
'#' in any fields, the .sm and .ssc file formats do not support it. The
|
||||
engine has to detect that the field was loaded blank and look through the
|
||||
song folder to figure out what was supposed to be there. [kyzentun]
|
||||
|
||||
2015/10/09
|
||||
----------
|
||||
* [Edit Mode] Changed Current Second field to not have the global offset
|
||||
added in. People were using one global offset for syncing to workaround
|
||||
the problem and sync by comparing the Current Second in Edit Mode to the
|
||||
current second in a music editor. The workaround of using a different
|
||||
global offset for syncing should no longer be necessary. [kyzentun]
|
||||
* [Input] Fixed input lockup caused by scrolling the mouse wheel. Why wasn't
|
||||
this reported sooner? [kyzentun]
|
||||
|
||||
2015/10/07
|
||||
----------
|
||||
* [ActorFrame] ActorFrame:SetDrawByZPosition now returns self. Missed a spot
|
||||
when implementing function chaining. [kyzentun]
|
||||
* [Gameplay] MaxRegenComboAfterMiss preference brought in. When a step is
|
||||
missed in gameplay, the combo has to get back up to RegenComboAfterMiss
|
||||
before the player starts regaining life. If MaxRegenComboAfterMiss is
|
||||
greater than RegenComboAfterMiss, then each successive miss increases
|
||||
RegenComboAfterMiss until it reaches RegenComboAfterMiss.
|
||||
MaxRegenComboAfterMiss defaults to 5, the same as RegenComboAfterMiss, so
|
||||
there should be no behavior change unless the preference is manually
|
||||
changed. [dbk2]
|
||||
* [Gameplay] When disqualification was turned on via Preferences, the old
|
||||
logic exhibited two problems:
|
||||
1. charts with attacks were always disqualified from ranking
|
||||
2. charts without attacks could be disqualified from ranking if the attack
|
||||
modifier was set to "Off"
|
||||
So, this commit fixes those problems. If a chart has attacks, and the
|
||||
attack modifier is used to turn them "Off", then disqualification is
|
||||
enforced.
|
||||
Additionally, disqualification is enforced if the attack modifier is set to
|
||||
"Random Attacks." This part might not be necessary, but I acted on the
|
||||
assumption that random attacks could theoretically make a chart easier.
|
||||
[dbk2]
|
||||
|
||||
2015/10/04
|
||||
----------
|
||||
* [FFmpeg] Upgrade FFmpeg to 2.1.3 for Windows. [wolfman2000]
|
||||
* [FFmpeg] Fixed cmake WITH_SYSTEM_FFMPEG option. [lthls]
|
||||
|
||||
2015/10/03
|
||||
----------
|
||||
* [FFmpeg] Upgrade FFmpeg to 2.1.3 for Mac OS X. [wolfman2000]
|
||||
* [Gameplay] Fixed timing to apply the current music rate to the global
|
||||
offset so that playing at different music rates doesn't make a chart off
|
||||
sync. [Matt McCutchen]
|
||||
|
||||
2015/10/02
|
||||
----------
|
||||
* [Edit Mode] .sm files will no longer be saved when split timing is used
|
||||
because per-chart timing cannot be done in the .sm format. [kyzentun]
|
||||
* [Scoring] Fixed bug that caused missed holds to be recorded as held in the
|
||||
value returned by PlayerStageStats:GetRadarActual(). [kyzentun]
|
||||
|
||||
2015/09/21
|
||||
----------
|
||||
* [Sprite] Added set_use_effect_clock_for_texcoords for toggling whether the
|
||||
tex coord velocity uses the effect clock instead of the time.
|
||||
|
||||
2015/09/10
|
||||
----------
|
||||
* [MusicWheel] Fixed SetItemPosition so that it actually passes the item
|
||||
index and the number of items to the transform function. [kyzentun]
|
||||
|
||||
2015/09/09
|
||||
----------
|
||||
* [Notefield] Fixed bug where the hold body doesn't scroll if it goes off the
|
||||
top of the screen. [waiei]
|
||||
|
||||
2015/09/08
|
||||
----------
|
||||
* [Compiling] Compiling stepmania on Windows with the locale set to Japanese should work now. [wolfman2000]
|
||||
|
||||
2015/09/06
|
||||
----------
|
||||
* [Preferences] Fixed crash on Advanced Input Options on OS X caused by the
|
||||
Axis Fix preference not existing on OS X. The preference does nothing on
|
||||
OS X, but the game no longer crashes on that screen. [kyzentun]
|
||||
|
||||
2015/09/03
|
||||
----------
|
||||
* [Fonts] Respliced large kanji sprite sheets from 32x106 and 32x61 to 63x54
|
||||
and 48x41 to bring them under 4096 pixels tall, which was causing a forced
|
||||
resize and slowing down loading time. [kyzentun]
|
||||
* [Gameplay] Fixed song position updating logic so that the
|
||||
ScreenGameplay:PauseGame lua function actually pauses the game. Start,
|
||||
Select, and Back are all used for different ways of giving up, so the
|
||||
feature remains unused in the default theme. [kyzentun]
|
||||
|
||||
2015/09/02
|
||||
----------
|
||||
* [Gameplay] Fixed Player logic that spammed TNS_AvoidMine repeatedly. [kyzentun]
|
||||
|
||||
2015/08/29
|
||||
----------
|
||||
* [Edit Mode] Fixed crash on entering edit mode caused by entering edit mode
|
||||
as Player 2. Edit Mode only works as Player 1. [kyzentun]
|
||||
|
||||
2015/08/23
|
||||
----------
|
||||
* [BMS] Added myo2 channel layout and kb7 charts. Added preview point and
|
||||
fixed offset support and linear solo bms layout. [zardoru]
|
||||
* [Linux] Symbolic links will be followed to find the actual executable dir. [Wallacoloo]
|
||||
|
||||
2015/08/20
|
||||
----------
|
||||
* [Minimaid] Minimaid support built in by default instead of off by default. [wolfman2000]
|
||||
* [Options] Put AllowExtraStage on Advanced Options screen in default. [kyzentun]
|
||||
|
||||
2015/08/19
|
||||
----------
|
||||
* [Gameplay] RandomBGEndsAtLastBeat metric defaults to true to be similar to
|
||||
old behavior. [wolfy852]
|
||||
|
||||
2015/08/08
|
||||
----------
|
||||
* [General] When the HighResolutionTextures preference is set to Auto,
|
||||
StepMania checks whether the display height is greater than the theme
|
||||
height instead of whether it's greater than 480. [shakesoda]
|
||||
|
||||
2015/08/04
|
||||
----------
|
||||
* [PIUIO] Only send LightState changes to PIUIO when there is a change. [dbk2]
|
||||
|
||||
2015/08/02
|
||||
----------
|
||||
* [NoteField] Fixed bottomcap when NoteDisplay is zoomed out. [hanubeki]
|
||||
|
||||
2015/07/22
|
||||
----------
|
||||
* [Compiling] Fixed building on 32bit linux. [kyzentun]
|
||||
|
||||
2015/07/19
|
||||
----------
|
||||
* [Pump] Added TimingWindowSecondsCheckpoint for the timing window that
|
||||
checkpoint holds allow you to release for. [wolfman2000]
|
||||
|
||||
2015/07/18
|
||||
----------
|
||||
* [General] Fixed bug that skipped notes on beat 0 in score. [kyzentun]
|
||||
|
||||
2015/07/16
|
||||
----------
|
||||
* [ActorUtil] ActorUtil.ResolvePath and ResolveRelativePath now take a
|
||||
boolean flag to tell if the thing is optional. [kyzentun]
|
||||
* [CryptMan] Fixed bug that clipped hash strings with zeros. [kyzentun]
|
||||
|
||||
2015/07/15
|
||||
----------
|
||||
* [Sprite] Sprite now executes the AnimationFinished command when it reaches
|
||||
|
||||
@@ -7,10 +7,6 @@ stepmania:
|
||||
WITHOUT_NETWORKING
|
||||
Disables all networking stuff (e.g. StepMania Online).
|
||||
--------------------------------------------------------------------------------
|
||||
HAVE_VERSION_INFO
|
||||
If this isn't defined, passing in --version will only show the name of the
|
||||
current StepMania version, no build number or date.
|
||||
Please define HAVE_VERSION_INFO if you can when building StepMania.
|
||||
|
||||
================================================================================
|
||||
sm-ssc:
|
||||
|
||||
@@ -628,11 +628,13 @@
|
||||
<Function name='PixelFont'/>
|
||||
<Function name='Stroke'/>
|
||||
<Function name='distort'/>
|
||||
<Function name='get_mult_attrs_with_diffuse'/>
|
||||
<Function name='jitter'/>
|
||||
<Function name='max_dimension_use_zoom'/>
|
||||
<Function name='maxheight'/>
|
||||
<Function name='maxwidth'/>
|
||||
<Function name='rainbowscroll'/>
|
||||
<Function name='set_mult_attrs_with_diffuse'/>
|
||||
<Function name='settext'/>
|
||||
<Function name='settextf'/>
|
||||
<Function name='strokecolor'/>
|
||||
@@ -1566,6 +1568,7 @@
|
||||
<Function name='GetLastBeat'/>
|
||||
<Function name='GetLastSecond'/>
|
||||
<Function name='GetLyricsPath'/>
|
||||
<Function name='GetMainTitle'/>
|
||||
<Function name='GetMusicPath'/>
|
||||
<Function name='GetOneSteps'/>
|
||||
<Function name='GetOrigin'/>
|
||||
@@ -1699,10 +1702,12 @@
|
||||
<Function name='addimagecoords'/>
|
||||
<Function name='cropto'/>
|
||||
<Function name='customtexturerect'/>
|
||||
<Function name='get_use_effect_clock_for_texcoords'/>
|
||||
<Function name='loop'/>
|
||||
<Function name='position'/>
|
||||
<Function name='rate'/>
|
||||
<Function name='scaletoclipped'/>
|
||||
<Function name='set_use_effect_clock_for_texcoords'/>
|
||||
<Function name='setstate'/>
|
||||
<Function name='stretchtexcoords'/>
|
||||
<Function name='texcoordvelocity'/>
|
||||
|
||||
@@ -1970,6 +1970,12 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='undistort' return='void' arguments=''>
|
||||
Turns off distortion.
|
||||
</Function>
|
||||
<Function name='get_mult_attrs_with_diffuse' return='bool' arguments=''>
|
||||
Returns whether the diffuse colors in the attributes are multiplied by the general diffuse colors of the BitmapText.
|
||||
</Function>
|
||||
<Function name='set_mult_attrs_with_diffuse' return='' arguments='bool mult'>
|
||||
If mult_attrs_with_diffuse is set to true, then the diffuse colors in the attributes are multiplied by the general diffuse colors of the BitmapText.
|
||||
</Function>
|
||||
<Function name='jitter' return='void' arguments='bool bJitter'>
|
||||
If <code>bJitter</code> is <code>true</code>, move each character of the string around by a small random amount.
|
||||
</Function>
|
||||
@@ -4580,6 +4586,10 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='GetLyricsPath' return='string' arguments=''>
|
||||
Gets the path to the lyrics.
|
||||
</Function>
|
||||
<Function name='GetMainTitle' return='string' arguments=''>
|
||||
GetDisplayMainTitle checks the ShowNativeLanguage pref and returns the transliterated title is that pref is false.<br />
|
||||
GetMainTitle (this function) does not check that pref. Instead, it directly returns the title, exactly as it is in the #TITLE field in the simfile.
|
||||
</Function>
|
||||
<Function name='GetMusicPath' return='string' arguments=''>
|
||||
Gets the path to the music file.
|
||||
</Function>
|
||||
@@ -4969,6 +4979,9 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='customtexturerect' return='void' arguments='float fLeft, float fTop, float fRight, float fBottom'>
|
||||
Allows the themer to set a custom texture rectangle that effects the way the texture is drawn.
|
||||
</Function>
|
||||
<Function name='get_use_effect_clock_for_texcoords' return='bool' arguments=''>
|
||||
Returns true if the sprite is using the effect clock for texcoordvelocity.
|
||||
</Function>
|
||||
<Function name='loop' theme='_fallback' return='void' arguments='bool bLoop'>
|
||||
[02 Sprite.lua] Call <Link class='RageTexture' function='loop'><code>RageTexture:loop</code></Link><code>( bLoop )</code> on the texture.
|
||||
</Function>
|
||||
@@ -4984,11 +4997,14 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='setstate' return='void' arguments='int iNewState'>
|
||||
Set the Sprite's state to <code>iNewState</code>.
|
||||
</Function>
|
||||
<Function name='set_use_effect_clock_for_texcoords' return='' arguments='bool use'>
|
||||
If <code>use</code> is true, then the sprite will use the effect clock for texcoordvelocity.
|
||||
</Function>
|
||||
<Function name='stretchtexcoords' return='void' arguments='float fX, float fY'>
|
||||
<!-- XXX: What does this do? -->
|
||||
</Function>
|
||||
<Function name='texcoordvelocity' return='void' arguments='float fVelX, float fVelY'>
|
||||
Set the texture coordinate velocity which controls how the Sprite changes as it animates. <!-- XXX: Can we be more specific? -->
|
||||
Set the texture coordinate velocity which controls how the Sprite changes as it animates. A velocity of 1 makes the texture scroll all the way once per second.
|
||||
</Function>
|
||||
<!-- sm-ssc addons -->
|
||||
<Function name='CropTo' return='void' arguments='float fWidth, float fHeight'>
|
||||
|
||||
@@ -101,11 +101,6 @@ local function func()
|
||||
sButton = "UpLeft"
|
||||
end
|
||||
local path = NOTESKIN:GetPath(sButton,ElementToLoad)
|
||||
if ( string.find(sElement,"Hold") or string.find(sElement,"Roll") )
|
||||
and not ( string.find(sElement,"Head") or string.find(sElement,"Tail") )
|
||||
then
|
||||
path = NOTESKIN:GetPath(sButton,ElementToLoad)
|
||||
end
|
||||
|
||||
local t = LoadActor(path)
|
||||
|
||||
@@ -128,4 +123,4 @@ end
|
||||
Noteskin.Load = func
|
||||
Noteskin.CommonLoad = func
|
||||
|
||||
return Noteskin
|
||||
return Noteskin
|
||||
|
||||
@@ -5,15 +5,24 @@ StepMania is an advanced cross-platform rhythm game for home and arcade use.
|
||||
|
||||
Advanced cross-platform rhythm game for home and arcade use.
|
||||
|
||||
##Installing from Setup/Installer##
|
||||
|
||||
For those that do not wish to compile the game on their own and use a binary right away, be aware of the following issues:
|
||||
|
||||
* Windows users are expected to have installed the [Microsoft Visual C++ x86 Redistributable for Visual Studio 2015](http://www.microsoft.com/en-us/download/details.aspx?id=48145) prior to running the game. For those on a 64-bit operating system, grab the x64 redistributable as well. Windows 7 is the minimum supported version.
|
||||
* Mac OS X users need to have Mac OS X 10.6.8 or higher to run StepMania.
|
||||
* Linux users should receive all they need from the package manager of their choice.
|
||||
|
||||
##Installing from Source##
|
||||
|
||||
StepMania can be compiled using [CMake](http://www.cmake.org/). More information about using CMake can be found in both the `Build` directory and CMake's documentation.
|
||||
|
||||
##Build Status##
|
||||
|
||||
We use Travis as our continuous integration server. The status can be found below.
|
||||
We currently have two integration servers in place. Their statuses are listed below.
|
||||
|
||||
[](https://travis-ci.org/stepmania/stepmania)
|
||||
* Travis (Linux): [](https://travis-ci.org/stepmania/stepmania)
|
||||
* AppVeyor (Windows): [](https://ci.appveyor.com/project/wolfman2000/stepmania-wm87c)
|
||||
|
||||
##Resources##
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
# Include the macros and functions.
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMake/CMakeMacros.cmake)
|
||||
|
||||
# Set up helper variables for future configuring.
|
||||
set(SM_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/CMake")
|
||||
set(SM_EXTERN_DIR "${CMAKE_CURRENT_LIST_DIR}/extern")
|
||||
set(SM_BUNDLE_DIR "${CMAKE_CURRENT_LIST_DIR}/bundle")
|
||||
set(SM_INSTALLER_DIR "${CMAKE_CURRENT_LIST_DIR}/Installer")
|
||||
set(SM_XCODE_DIR "${CMAKE_CURRENT_LIST_DIR}/Xcode")
|
||||
set(SM_PROGRAM_DIR "${CMAKE_CURRENT_LIST_DIR}/Program")
|
||||
set(SM_BUILD_DIR "${CMAKE_CURRENT_LIST_DIR}/Build")
|
||||
@@ -36,46 +36,241 @@ else()
|
||||
endif()
|
||||
|
||||
# Allow for finding our libraries in a standard location.
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}/CMake/Modules/")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" "${SM_CMAKE_DIR}/Modules/")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CMake/DefineOptions.cmake")
|
||||
include("${SM_CMAKE_DIR}/DefineOptions.cmake")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CMake/SMDefs.cmake")
|
||||
include("${SM_CMAKE_DIR}/SMDefs.cmake")
|
||||
|
||||
# Put the predefined targets in separate groups.
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Set up the linker flags for MSVC builds.
|
||||
configure_msvc_runtime()
|
||||
|
||||
# Checks the standard include directories for c-style headers.
|
||||
# We may use C++ in this project, but the check works better with plain C headers.
|
||||
include(CheckIncludeFiles)
|
||||
check_include_files(alloca.h HAVE_ALLOCA_H)
|
||||
check_include_files(assert.h HAVE_ASSERT_H)
|
||||
check_include_files(dlfcn.h HAVE_DLFCN_H)
|
||||
check_include_files(dirent.h HAVE_DIRENT_H)
|
||||
check_include_files(errno.h HAVE_ERRNO_H)
|
||||
check_include_files(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_files(float.h HAVE_FLOAT_H)
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files(limits.h HAVE_LIMITS_H)
|
||||
check_include_files(math.h HAVE_MATH_H)
|
||||
check_include_files(memory.h HAVE_MEMORY_H)
|
||||
check_include_files(stdarg.h HAVE_STDARG_H)
|
||||
check_include_files(stddef.h HAVE_STDDEF_H)
|
||||
check_include_files(stdint.h HAVE_STDINT_H)
|
||||
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||
check_include_files(strings.h HAVE_STRINGS_H)
|
||||
check_include_files(string.h HAVE_STRING_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
|
||||
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
|
||||
|
||||
check_include_files(endian.h HAVE_ENDIAN_H)
|
||||
check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
|
||||
check_include_files(machine/endian.h HAVE_MACHINE_ENDIAN_H)
|
||||
|
||||
if (HAVE_STDLIB_H AND HAVE_STDARG_H AND HAVE_STRING_H AND HAVE_FLOAT_H)
|
||||
set(STDC_HEADERS 1)
|
||||
endif()
|
||||
|
||||
include(CheckFunctionExists)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckCXXSymbolExists)
|
||||
|
||||
# Mostly Windows functions.
|
||||
check_function_exists(_mkdir HAVE__MKDIR)
|
||||
check_cxx_symbol_exists(_snprintf cstdio HAVE__SNPRINTF)
|
||||
check_cxx_symbol_exists(stricmp cstring HAVE_STRICMP)
|
||||
check_cxx_symbol_exists(_stricmp cstring HAVE__STRICMP)
|
||||
|
||||
# Mostly non-Windows functions.
|
||||
check_function_exists(fcntl HAVE_FCNTL)
|
||||
check_function_exists(fork HAVE_FORK)
|
||||
check_function_exists(mkdir HAVE_MKDIR)
|
||||
check_cxx_symbol_exists(snprintf cstdio HAVE_SNPRINTF)
|
||||
check_cxx_symbol_exists(strcasecmp cstring HAVE_STRCASECMP)
|
||||
check_function_exists(waitpid HAVE_WAITPID)
|
||||
|
||||
|
||||
# Mostly universal symbols.
|
||||
check_cxx_symbol_exists(powf cmath HAVE_POWF)
|
||||
check_cxx_symbol_exists(sqrtf cmath HAVE_SQRTF)
|
||||
check_cxx_symbol_exists(sinf cmath HAVE_SINF)
|
||||
check_cxx_symbol_exists(tanf cmath HAVE_TANF)
|
||||
check_cxx_symbol_exists(cosf cmath HAVE_COSF)
|
||||
check_cxx_symbol_exists(acosf cmath HAVE_ACOSF)
|
||||
check_cxx_symbol_exists(truncf cmath HAVE_TRUNCF)
|
||||
check_cxx_symbol_exists(roundf cmath HAVE_ROUNDF)
|
||||
check_cxx_symbol_exists(lrintf cmath HAVE_LRINTF)
|
||||
check_cxx_symbol_exists(strtof cstdlib HAVE_STRTOF)
|
||||
check_symbol_exists(M_PI math.h HAVE_M_PI)
|
||||
check_symbol_exists(size_t stddef.h HAVE_SIZE_T_STDDEF)
|
||||
check_symbol_exists(size_t stdlib.h HAVE_SIZE_T_STDLIB)
|
||||
check_symbol_exists(size_t stdio.h HAVE_SIZE_T_STDIO)
|
||||
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
|
||||
|
||||
if (MINGW)
|
||||
set(NEED_WINDOWS_LOADING_WINDOW TRUE)
|
||||
check_symbol_exists(PBS_MARQUEE commctrl.h HAVE_PBS_MARQUEE)
|
||||
check_symbol_exists(PBM_SETMARQUEE commctrl.h HAVE_PBM_SETMARQUEE)
|
||||
endif()
|
||||
|
||||
# Checks to make it easier to work with 32-bit/64-bit builds if required.
|
||||
include(CheckTypeSize)
|
||||
check_type_size(int16_t SIZEOF_INT16_T)
|
||||
check_type_size(uint16_t SIZEOF_UINT16_T)
|
||||
check_type_size(u_int16_t SIZEOF_U_INT16_T)
|
||||
check_type_size(int32_t SIZEOF_INT32_T)
|
||||
check_type_size(uint32_t SIZEOF_UINT32_T)
|
||||
check_type_size(u_int32_t SIZEOF_U_INT32_T)
|
||||
check_type_size(int64_t SIZEOF_INT64_T)
|
||||
check_type_size(char SIZEOF_CHAR)
|
||||
check_type_size("unsigned char" SIZEOF_UNSIGNED_CHAR)
|
||||
check_type_size(short SIZEOF_SHORT)
|
||||
check_type_size("unsigned short" SIZEOF_UNSIGNED_SHORT)
|
||||
check_type_size(int SIZEOF_INT)
|
||||
check_type_size("unsigned int" SIZEOF_UNSIGNED_INT)
|
||||
check_type_size(long SIZEOF_LONG)
|
||||
check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
check_type_size(float SIZEOF_FLOAT)
|
||||
check_type_size(double SIZEOF_DOUBLE)
|
||||
check_type_size(intptr_t SIZEOF_INTPTR_T)
|
||||
check_type_size(pid_t SIZEOF_PID_T)
|
||||
check_type_size(size_t SIZEOF_SIZE_T)
|
||||
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(BIGENDIAN)
|
||||
if (${BIGENDIAN})
|
||||
set(ENDIAN_BIG 1)
|
||||
else()
|
||||
set(ENDIAN_LITTLE 1)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode" "${SM_CMAKE_DIR}/TestCode/test_prototype.c" "Checking for function prototype capabilities" "found" "not found" SM_IGNORED_PROTOTYPE_CALL FALSE)
|
||||
|
||||
if(NOT SM_IGNORED_PROTOTYPE_CALL)
|
||||
set(HAVE_PROTOTYPES TRUE)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode" "${SM_CMAKE_DIR}/TestCode/test_external.c" "Checking for external name shortening requirements" "not needed" "needed" SM_BUILT_LONG_NAME TRUE)
|
||||
|
||||
if (NOT SM_BUILT_LONG_NAME)
|
||||
set(NEED_SHORT_EXTERNAL_NAMES 1)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode" "${SM_CMAKE_DIR}/TestCode/test_broken.c" "Checking if incomplete types are broken." "not broken" "broken" SM_BUILT_INCOMPLETE_TYPE FALSE)
|
||||
|
||||
if (SM_BUILT_INCOMPLETE_TYPE)
|
||||
set(INCOMPLETE_TYPES_BROKEN 1)
|
||||
endif()
|
||||
|
||||
# Dependencies go here.
|
||||
set(ENDIANNESS "ENDIAN_LITTLE")
|
||||
include(ExternalProject)
|
||||
|
||||
if(NOT WITH_GPL_LIBS)
|
||||
message("Disabling GPL exclusive libraries: no MP3 support.")
|
||||
set(WITH_MP3 OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_WAV)
|
||||
# TODO: Identify which headers to check for ensuring this will always work.
|
||||
set(HAS_WAV TRUE)
|
||||
endif()
|
||||
|
||||
if(WITH_MP3)
|
||||
if(WIN32 OR MACOSX)
|
||||
set(HAS_MP3 TRUE)
|
||||
else()
|
||||
find_package(Mad)
|
||||
if(NOT LIBMAD_FOUND)
|
||||
message(FATAL_ERROR "Libmad library not found. If you wish to skip mp3 support, set WITH_MP3 to OFF when configuring.")
|
||||
else()
|
||||
set(HAS_MP3 TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OGG)
|
||||
if(WIN32 OR MACOSX)
|
||||
set(HAS_OGG TRUE)
|
||||
else()
|
||||
find_package(Ogg)
|
||||
find_package(Vorbis)
|
||||
find_package(VorbisFile)
|
||||
|
||||
if(NOT (OGG_FOUND AND VORBIS_FOUND AND VORBISFILE_FOUND) )
|
||||
message(FATAL_ERROR "Not all vorbis libraries were found. If you wish to skip vorbis support, set WITH_OGG to OFF when configuring.")
|
||||
else()
|
||||
set(HAS_OGG TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(nasm)
|
||||
find_package(yasm)
|
||||
|
||||
find_package(BZip2)
|
||||
if (NOT ${BZIP2_FOUND} AND NOT MSVC)
|
||||
message(FATAL_ERROR "Bzip2 support required.")
|
||||
endif()
|
||||
|
||||
find_package(Iconv)
|
||||
|
||||
find_package(Threads)
|
||||
if (${Threads_FOUND})
|
||||
set(HAS_PTHREAD TRUE)
|
||||
else()
|
||||
set(HAS_PTHREAD FALSE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(HAS_OGG TRUE)
|
||||
set(HAS_MP3 TRUE)
|
||||
set(SYSTEM_PCRE_FOUND FALSE)
|
||||
find_package(DirectX REQUIRED)
|
||||
|
||||
# FFMPEG...it can be evil.
|
||||
find_library(LIB_SWSCALE NAMES "swscale"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_SWSCALE ${LIB_SWSCALE} NAME)
|
||||
if (MINGW AND WITH_FFMPEG)
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
else()
|
||||
# FFMPEG...it can be evil.
|
||||
find_library(LIB_SWSCALE NAMES "swscale"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_SWSCALE ${LIB_SWSCALE} NAME)
|
||||
|
||||
find_library(LIB_AVCODEC NAMES "avcodec"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVCODEC ${LIB_AVCODEC} NAME)
|
||||
find_library(LIB_AVCODEC NAMES "avcodec"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVCODEC ${LIB_AVCODEC} NAME)
|
||||
|
||||
find_library(LIB_AVFORMAT NAMES "avformat"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVFORMAT ${LIB_AVFORMAT} NAME)
|
||||
find_library(LIB_AVFORMAT NAMES "avformat"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVFORMAT ${LIB_AVFORMAT} NAME)
|
||||
|
||||
find_library(LIB_AVUTIL NAMES "avutil"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVUTIL ${LIB_AVUTIL} NAME)
|
||||
find_library(LIB_AVUTIL NAMES "avutil"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVUTIL ${LIB_AVUTIL} NAME)
|
||||
endif()
|
||||
elseif(MACOSX)
|
||||
set(HAS_OGG TRUE)
|
||||
set(HAS_MP3 TRUE)
|
||||
|
||||
if (WITH_FFMPEG)
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
|
||||
set(SYSTEM_PCRE_FOUND FALSE)
|
||||
set(WITH_CRASH_HANDLER TRUE)
|
||||
# Apple Archs needs to be 32-bit for now.
|
||||
@@ -114,14 +309,6 @@ elseif(MACOSX)
|
||||
MAC_FRAME_QUICKTIME
|
||||
)
|
||||
elseif(LINUX)
|
||||
include(TestBigEndian)
|
||||
include(ExternalProject)
|
||||
|
||||
if(NOT WITH_GPL_LIBS)
|
||||
message("Disabling GPL exclusive libraries: no MP3 support.")
|
||||
set(WITH_MP3 OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_GTK2)
|
||||
find_package("GTK2" 2.0)
|
||||
if (${GTK2_FOUND})
|
||||
@@ -144,11 +331,6 @@ elseif(LINUX)
|
||||
find_package(Pcre)
|
||||
set(SYSTEM_PCRE_FOUND ${PCRE_FOUND})
|
||||
|
||||
find_package("BZip2")
|
||||
if (NOT(${BZIP2_FOUND}))
|
||||
message(FATAL_ERROR "Bzip2 support required.")
|
||||
endif()
|
||||
|
||||
find_package("ZLIB")
|
||||
if (NOT(${ZLIB_FOUND}))
|
||||
message(FATAL_ERROR "zlib support required.")
|
||||
@@ -159,12 +341,7 @@ elseif(LINUX)
|
||||
message(FATAL_ERROR "jpeg support required.")
|
||||
endif()
|
||||
|
||||
find_library(DL_LIBRARY dl)
|
||||
if(${LIBDL_FOUND})
|
||||
set(HAS_LIBDL TRUE)
|
||||
else()
|
||||
set(HAS_LIBDL FALSE)
|
||||
endif()
|
||||
find_package(Dl)
|
||||
|
||||
find_package(Xrandr)
|
||||
if (${XRANDR_FOUND})
|
||||
@@ -173,27 +350,6 @@ elseif(LINUX)
|
||||
set(HAX_XRANDR FALSE)
|
||||
endif()
|
||||
|
||||
if (WITH_OGG)
|
||||
find_package(Ogg)
|
||||
find_package(Vorbis)
|
||||
find_package(VorbisFile)
|
||||
|
||||
if(NOT (OGG_FOUND AND VORBIS_FOUND AND VORBISFILE_FOUND) )
|
||||
message(FATAL_ERROR "Not all vorbis libraries were found. If you wish to skip vorbis support, set WITH_OGG to OFF when configuring.")
|
||||
else()
|
||||
set(HAS_OGG TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WITH_MP3)
|
||||
find_package(Mad)
|
||||
if(NOT LIBMAD_FOUND)
|
||||
message(FATAL_ERROR "Libmad library not found. If you wish to skip mp3 support, set WITH_MP3 to OFF when configuring.")
|
||||
else()
|
||||
set(HAS_MP3 TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(PulseAudio)
|
||||
if (PULSEAUDIO_FOUND)
|
||||
set(HAS_PULSE TRUE)
|
||||
@@ -228,16 +384,8 @@ elseif(LINUX)
|
||||
message(STATUS "-- At least one sound library was found. Do not worry if any were not found at this stage.")
|
||||
endif()
|
||||
|
||||
find_package(Threads)
|
||||
if (${Threads_FOUND})
|
||||
set(HAS_PTHREAD TRUE)
|
||||
else()
|
||||
set(HAS_PTHREAD FALSE)
|
||||
endif()
|
||||
|
||||
find_package(yasm)
|
||||
if (NOT YASM_FOUND)
|
||||
message("YASM was not found. Please install if you wish for ffmpeg support.")
|
||||
if (WITH_FFMPEG AND NOT YASM_FOUND AND NOT NASM_FOUND)
|
||||
message("Neither NASM nor YASM were found. Please install at least one of them if you wish for ffmpeg support.")
|
||||
set(WITH_FFMPEG OFF)
|
||||
endif()
|
||||
|
||||
@@ -254,57 +402,7 @@ elseif(LINUX)
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
else()
|
||||
set(SM_FFMPEG_VERSION "2.1.3")
|
||||
set(SM_FFMPEG_SRC_LIST "${SM_EXTERN_DIR}" "/ffmpeg-linux-" "${SM_FFMPEG_VERSION}")
|
||||
sm_join("${SM_FFMPEG_SRC_LIST}" "" SM_FFMPEG_SRC_DIR)
|
||||
set(SM_FFMPEG_ROOT "${CMAKE_BINARY_DIR}/ffmpeg-prefix/src/ffmpeg-build")
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"${SM_FFMPEG_SRC_DIR}/configure"
|
||||
"--disable-programs"
|
||||
"--disable-doc"
|
||||
"--disable-avdevice"
|
||||
"--disable-swresample"
|
||||
"--disable-postproc"
|
||||
"--disable-avfilter"
|
||||
"--disable-shared"
|
||||
"--enable-static"
|
||||
)
|
||||
if(WITH_GPL_LIBS)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--enable-gpl"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WITH_CRYSTALHD_DISABLED)
|
||||
list(APPEND FFMPEG_CONFIGURE "--disable-crystalhd")
|
||||
endif()
|
||||
|
||||
if (NOT WITH_EXTERNAL_WARNINGS)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--extra-cflags=-w"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
|
||||
externalproject_add("ffmpeg"
|
||||
SOURCE_DIR "${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE}
|
||||
BUILD_COMMAND "make"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
else()
|
||||
# --shlibdir=$our_installdir/stepmania-$VERSION
|
||||
externalproject_add("ffmpeg"
|
||||
DOWNLOAD_COMMAND git clone "--branch" "n${SM_FFMPEG_VERSION}" "--depth" "1" "git://source.ffmpeg.org/ffmpeg.git" "${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND "${FFMPEG_CONFIGURE}"
|
||||
BUILD_COMMAND "make"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
else()
|
||||
@@ -321,12 +419,10 @@ elseif(LINUX)
|
||||
message(FATAL_ERROR "GLEW required to compile StepMania.")
|
||||
endif()
|
||||
|
||||
test_big_endian(BIGENDIAN)
|
||||
if (${BIGENDIAN})
|
||||
set(ENDIANNESS "ENDIAN_BIG")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
configure_file("${SM_SRC_DIR}/config.in.hpp" "${SM_SRC_DIR}/generated/config.hpp")
|
||||
configure_file("${SM_SRC_DIR}/verstub.in.cpp" "${SM_SRC_DIR}/generated/verstub.cpp")
|
||||
|
||||
# Define installer based items for cpack.
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CMake/CPackSetup.cmake")
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 660 KiB |
|
Before Width: | Height: | Size: 583 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 271 KiB |
|
After Width: | Height: | Size: 334 KiB |
@@ -1028,67 +1028,47 @@ Line 2=ABCDEFGHIJKLMNOPQRSTYVWX
|
||||
77=24
|
||||
|
||||
[kanji-regular]
|
||||
Line 0=亜哀愛悪握圧扱安暗案以位依偉囲委威尉意慰易為異移維緯胃衣違遺医井
|
||||
Line 1=域育一壱逸稲芋印員因姻引飲院陰隠韻右宇羽雨渦浦運雲営影映栄永泳英
|
||||
Line 2=衛詠鋭液疫益駅悦謁越閲円園宴延援沿演炎煙猿縁遠鉛塩汚凹央奥往応押
|
||||
Line 3=横欧殴王翁黄沖億屋憶乙卸恩温穏音下化仮何価佳加可夏嫁家寡科暇果架
|
||||
Line 4=歌河火禍稼箇花荷華菓課貨過蚊我画芽賀雅餓介会解回塊壊快怪悔懐戒拐
|
||||
Line 5=改械海灰界皆絵開階貝劾外害慨概涯街該垣嚇各拡格核殻獲確穫覚角較郭
|
||||
Line 6=閣隔革学岳楽額掛潟割喝括活渇滑褐轄且株刈乾冠寒刊勘勧巻喚堪完官寛
|
||||
Line 7=干幹患感慣憾換敢棺款歓汗漢環甘監看管簡緩缶肝艦観貫還鑑間閑関陥館
|
||||
Line 8=丸含岸眼岩頑顔願企危喜器基奇寄岐希幾忌揮机旗既期棋棄機帰気汽祈季
|
||||
Line 9=紀規記貴起軌輝飢騎鬼偽儀宜戯技擬欺犠疑義議菊吉喫詰却客脚虐逆丘久
|
||||
Line 10=休及吸宮弓急救朽求泣球究窮級糾給旧牛去居巨拒拠挙虚許距漁魚享京供
|
||||
Line 11=競共凶協叫境峡強恐恭挟教橋況狂狭矯胸脅興郷鏡響驚仰凝暁業局曲極玉
|
||||
Line 12=勤均斤琴禁筋緊菌襟謹近金吟銀九句区苦駆具愚虞空偶遇隅屈掘靴繰桑勲
|
||||
Line 13=君薫訓群軍郡係傾刑兄啓型契形径恵慶憩掲携敬景渓系経継茎蛍計警軽鶏
|
||||
Line 14=芸迎鯨劇撃激傑欠決潔穴結血月件倹健兼券剣圏堅嫌建憲懸検権犬献研絹
|
||||
Line 15=県肩見謙賢軒遣険顕験元原厳幻弦減源玄現言限個古呼固孤己庫弧戸故枯
|
||||
Line 16=湖誇雇顧鼓五互午呉娯後御悟碁語誤護交侯候光公功効厚口向后坑好孔孝
|
||||
Line 17=工巧幸広康恒慌抗拘控攻更校構江洪港溝甲皇硬稿紅絞綱耕考肯航荒行衡
|
||||
Line 18=講貢購郊酵鉱鋼降項香高剛号合拷豪克刻告国穀酷黒獄腰骨込今困墾婚恨
|
||||
Line 19=懇昆根混紺魂佐唆左差査砂詐鎖座債催再最妻宰彩才採栽歳済災砕祭斎細
|
||||
Line 20=菜裁載際剤在材罪財坂咲崎作削搾昨策索錯桜冊刷察撮擦札殺雑皿三傘参
|
||||
Line 21=山惨散桟産算蚕賛酸暫残仕伺使刺司史嗣四士始姉姿子市師志思指支施旨
|
||||
Line 22=枝止死氏祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時
|
||||
Line 23=次滋治璽磁示耳自辞式識軸七執失室湿漆疾質実芝舎写射捨赦斜煮社者謝
|
||||
Line 24=車遮蛇邪借勺尺爵酌釈若寂弱主取守手朱殊狩珠種趣酒首儒受寿授樹需囚
|
||||
Line 25=収周宗就州修愁拾秀秋終習臭舟衆襲週酬集醜住充十従柔汁渋獣縦重銃叔
|
||||
Line 26=宿淑祝縮粛塾熟出術述俊春瞬准循旬殉準潤盾純巡遵順処初所暑庶緒署書
|
||||
Line 27=諸助叙女序徐除傷償勝匠升召商唱奨宵将小少尚床彰承抄招掌昇昭晶松沼
|
||||
Line 28=消渉焼焦照症省硝礁祥称章笑粧紹肖衝訟証詔詳象賞鐘障上丈乗冗剰城場
|
||||
Line 29=壌嬢常情条浄状畳蒸譲醸錠嘱飾植殖織職色触食辱伸信侵唇娠寝審心慎振
|
||||
Line 30=新森浸深申真神紳臣薪親診身辛進針震人仁刃尋甚尽迅陣酢図吹垂帥推水
|
||||
Line 31=炊睡粋衰遂酔錘随髄崇数枢据杉澄寸世瀬畝是制勢姓征性成政整星晴正清
|
||||
Line 32=牲生盛精聖声製西誠誓請逝青静斉税隻席惜斥昔析石積籍績責赤跡切拙接
|
||||
Line 33=摂折設窃節説雪絶舌仙先千占宣専川戦扇栓泉浅洗染潜旋線繊船薦践選遷
|
||||
Line 34=銭銑鮮前善漸然全禅繕塑措疎礎祖租粗素組訴阻僧創双倉喪壮奏層想捜掃
|
||||
Line 35=挿操早曹巣槽燥争相窓総草荘葬藻装走送遭霜騒像増憎臓蔵贈造促側則即
|
||||
Line 36=息束測足速俗属賊族続卒存孫尊損村他多太堕妥惰打駄体対耐帯待怠態替
|
||||
Line 37=泰滞胎袋貸退逮隊代台大第題滝卓宅択拓沢濯託濁諾但達奪脱棚谷丹単嘆
|
||||
Line 38=担探淡炭短端胆誕鍛団壇弾断暖段男談値知地恥池痴稚置致遅築畜竹蓄逐
|
||||
Line 39=秩窒茶嫡着中仲宙忠抽昼柱注虫衷鋳駐著貯丁兆帳庁弔張彫徴懲挑朝潮町
|
||||
Line 40=眺聴脹腸調超跳長頂鳥勅直朕沈珍賃鎮陳津墜追痛通塚漬坪釣亭低停偵貞
|
||||
Line 41=呈堤定帝底庭廷弟抵提程締艇訂逓邸泥摘敵滴的笛適哲徹撤迭鉄典天展店
|
||||
Line 42=添転点伝殿田電吐塗徒斗渡登途都努度土奴怒倒党冬凍刀唐塔島悼投搭東
|
||||
Line 43=桃棟盗湯灯当痘等答筒糖統到討謄豆踏逃透陶頭騰闘働動同堂導洞童胴道
|
||||
Line 44=銅峠匿得徳特督篤毒独読凸突届屯豚曇鈍内縄南軟難二尼弐肉日乳入如尿
|
||||
Line 45=任妊忍認寧猫熱年念燃粘悩濃納能脳農把覇波派破婆馬俳廃拝排敗杯背肺
|
||||
Line 46=輩配倍培媒梅買売賠陪伯博拍泊白舶薄迫漠爆縛麦箱肌畑八鉢発髪伐罰抜
|
||||
Line 47=閥伴判半反帆搬板版犯班畔繁般藩販範煩頒飯晩番盤蛮卑否妃彼悲扉批披
|
||||
Line 48=比泌疲皮碑秘罷肥被費避非飛備尾微美鼻匹必筆姫百俵標氷漂票表評描病
|
||||
Line 49=秒苗品浜貧賓頻敏瓶不付夫婦富布府怖扶敷普浮父符腐膚譜負賦赴附侮武
|
||||
Line 50=舞部封風伏副復幅服福腹複覆払沸仏物分噴墳憤奮粉紛雰文聞丙併兵塀幣
|
||||
Line 51=平弊柄並閉陛米壁癖別偏変片編辺返遍便勉弁保舗捕歩補穂募墓慕暮母簿
|
||||
Line 52=倣俸包報奉宝峰崩抱放方法泡砲縫胞芳褒訪豊邦飽乏亡傍剖坊妨帽忘忙房
|
||||
Line 53=暴望某棒冒紡肪膨謀貿防北僕墨撲朴牧没堀奔本翻凡盆摩磨魔麻埋妹枚毎
|
||||
Line 54=幕膜又抹末繭万慢満漫味未魅岬密脈妙民眠務夢無矛霧婿娘名命明盟迷銘
|
||||
Line 55=鳴滅免綿面模茂妄毛猛盲網耗木黙目戻問紋門匁夜野矢厄役約薬訳躍柳愉
|
||||
Line 56=油癒諭輸唯優勇友幽悠憂有猶由裕誘遊郵雄融夕予余与誉預幼容庸揚揺擁
|
||||
Line 57=曜様洋溶用窯羊葉要謡踊陽養抑欲浴翌翼羅裸来頼雷絡落酪乱卵欄濫覧利
|
||||
Line 58=吏履理痢裏里離陸律率立略流留硫粒隆竜慮旅虜了僚両寮料涼猟療糧良量
|
||||
Line 59=陵領力緑倫厘林臨輪隣塁涙累類令例冷励礼鈴隷零霊麗齢暦歴列劣烈裂廉
|
||||
Line 60=恋練連錬炉路露労廊朗楼浪漏老郎六録論和話賄惑枠湾腕
|
||||
Line 0=亜哀愛悪握圧扱安暗案以位依偉囲委威尉意慰易為異移維緯胃衣違遺医井域育一壱逸稲芋印員因姻引飲院陰隠
|
||||
Line 1=韻右宇羽雨渦浦運雲営影映栄永泳英衛詠鋭液疫益駅悦謁越閲円園宴延援沿演炎煙猿縁遠鉛塩汚凹央奥往応押
|
||||
Line 2=横欧殴王翁黄沖億屋憶乙卸恩温穏音下化仮何価佳加可夏嫁家寡科暇果架歌河火禍稼箇花荷華菓課貨過蚊我画
|
||||
Line 3=芽賀雅餓介会解回塊壊快怪悔懐戒拐改械海灰界皆絵開階貝劾外害慨概涯街該垣嚇各拡格核殻獲確穫覚角較郭
|
||||
Line 4=閣隔革学岳楽額掛潟割喝括活渇滑褐轄且株刈乾冠寒刊勘勧巻喚堪完官寛干幹患感慣憾換敢棺款歓汗漢環甘監
|
||||
Line 5=看管簡緩缶肝艦観貫還鑑間閑関陥館丸含岸眼岩頑顔願企危喜器基奇寄岐希幾忌揮机旗既期棋棄機帰気汽祈季
|
||||
Line 6=紀規記貴起軌輝飢騎鬼偽儀宜戯技擬欺犠疑義議菊吉喫詰却客脚虐逆丘久休及吸宮弓急救朽求泣球究窮級糾給
|
||||
Line 7=旧牛去居巨拒拠挙虚許距漁魚享京供競共凶協叫境峡強恐恭挟教橋況狂狭矯胸脅興郷鏡響驚仰凝暁業局曲極玉
|
||||
Line 8=勤均斤琴禁筋緊菌襟謹近金吟銀九句区苦駆具愚虞空偶遇隅屈掘靴繰桑勲君薫訓群軍郡係傾刑兄啓型契形径恵
|
||||
Line 9=慶憩掲携敬景渓系経継茎蛍計警軽鶏芸迎鯨劇撃激傑欠決潔穴結血月件倹健兼券剣圏堅嫌建憲懸検権犬献研絹
|
||||
Line 10=県肩見謙賢軒遣険顕験元原厳幻弦減源玄現言限個古呼固孤己庫弧戸故枯湖誇雇顧鼓五互午呉娯後御悟碁語誤
|
||||
Line 11=護交侯候光公功効厚口向后坑好孔孝工巧幸広康恒慌抗拘控攻更校構江洪港溝甲皇硬稿紅絞綱耕考肯航荒行衡
|
||||
Line 12=講貢購郊酵鉱鋼降項香高剛号合拷豪克刻告国穀酷黒獄腰骨込今困墾婚恨懇昆根混紺魂佐唆左差査砂詐鎖座債
|
||||
Line 13=催再最妻宰彩才採栽歳済災砕祭斎細菜裁載際剤在材罪財坂咲崎作削搾昨策索錯桜冊刷察撮擦札殺雑皿三傘参
|
||||
Line 14=山惨散桟産算蚕賛酸暫残仕伺使刺司史嗣四士始姉姿子市師志思指支施旨枝止死氏祉私糸紙紫肢脂至視詞詩試
|
||||
Line 15=誌諮資賜雌飼歯事似侍児字寺慈持時次滋治璽磁示耳自辞式識軸七執失室湿漆疾質実芝舎写射捨赦斜煮社者謝
|
||||
Line 16=車遮蛇邪借勺尺爵酌釈若寂弱主取守手朱殊狩珠種趣酒首儒受寿授樹需囚収周宗就州修愁拾秀秋終習臭舟衆襲
|
||||
Line 17=週酬集醜住充十従柔汁渋獣縦重銃叔宿淑祝縮粛塾熟出術述俊春瞬准循旬殉準潤盾純巡遵順処初所暑庶緒署書
|
||||
Line 18=諸助叙女序徐除傷償勝匠升召商唱奨宵将小少尚床彰承抄招掌昇昭晶松沼消渉焼焦照症省硝礁祥称章笑粧紹肖
|
||||
Line 19=衝訟証詔詳象賞鐘障上丈乗冗剰城場壌嬢常情条浄状畳蒸譲醸錠嘱飾植殖織職色触食辱伸信侵唇娠寝審心慎振
|
||||
Line 20=新森浸深申真神紳臣薪親診身辛進針震人仁刃尋甚尽迅陣酢図吹垂帥推水炊睡粋衰遂酔錘随髄崇数枢据杉澄寸
|
||||
Line 21=世瀬畝是制勢姓征性成政整星晴正清牲生盛精聖声製西誠誓請逝青静斉税隻席惜斥昔析石積籍績責赤跡切拙接
|
||||
Line 22=摂折設窃節説雪絶舌仙先千占宣専川戦扇栓泉浅洗染潜旋線繊船薦践選遷銭銑鮮前善漸然全禅繕塑措疎礎祖租
|
||||
Line 23=粗素組訴阻僧創双倉喪壮奏層想捜掃挿操早曹巣槽燥争相窓総草荘葬藻装走送遭霜騒像増憎臓蔵贈造促側則即
|
||||
Line 24=息束測足速俗属賊族続卒存孫尊損村他多太堕妥惰打駄体対耐帯待怠態替泰滞胎袋貸退逮隊代台大第題滝卓宅
|
||||
Line 25=択拓沢濯託濁諾但達奪脱棚谷丹単嘆担探淡炭短端胆誕鍛団壇弾断暖段男談値知地恥池痴稚置致遅築畜竹蓄逐
|
||||
Line 26=秩窒茶嫡着中仲宙忠抽昼柱注虫衷鋳駐著貯丁兆帳庁弔張彫徴懲挑朝潮町眺聴脹腸調超跳長頂鳥勅直朕沈珍賃
|
||||
Line 27=鎮陳津墜追痛通塚漬坪釣亭低停偵貞呈堤定帝底庭廷弟抵提程締艇訂逓邸泥摘敵滴的笛適哲徹撤迭鉄典天展店
|
||||
Line 28=添転点伝殿田電吐塗徒斗渡登途都努度土奴怒倒党冬凍刀唐塔島悼投搭東桃棟盗湯灯当痘等答筒糖統到討謄豆
|
||||
Line 29=踏逃透陶頭騰闘働動同堂導洞童胴道銅峠匿得徳特督篤毒独読凸突届屯豚曇鈍内縄南軟難二尼弐肉日乳入如尿
|
||||
Line 30=任妊忍認寧猫熱年念燃粘悩濃納能脳農把覇波派破婆馬俳廃拝排敗杯背肺輩配倍培媒梅買売賠陪伯博拍泊白舶
|
||||
Line 31=薄迫漠爆縛麦箱肌畑八鉢発髪伐罰抜閥伴判半反帆搬板版犯班畔繁般藩販範煩頒飯晩番盤蛮卑否妃彼悲扉批披
|
||||
Line 32=比泌疲皮碑秘罷肥被費避非飛備尾微美鼻匹必筆姫百俵標氷漂票表評描病秒苗品浜貧賓頻敏瓶不付夫婦富布府
|
||||
Line 33=怖扶敷普浮父符腐膚譜負賦赴附侮武舞部封風伏副復幅服福腹複覆払沸仏物分噴墳憤奮粉紛雰文聞丙併兵塀幣
|
||||
Line 34=平弊柄並閉陛米壁癖別偏変片編辺返遍便勉弁保舗捕歩補穂募墓慕暮母簿倣俸包報奉宝峰崩抱放方法泡砲縫胞
|
||||
Line 35=芳褒訪豊邦飽乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貿防北僕墨撲朴牧没堀奔本翻凡盆摩磨魔麻埋妹枚毎
|
||||
Line 36=幕膜又抹末繭万慢満漫味未魅岬密脈妙民眠務夢無矛霧婿娘名命明盟迷銘鳴滅免綿面模茂妄毛猛盲網耗木黙目
|
||||
Line 37=戻問紋門匁夜野矢厄役約薬訳躍柳愉油癒諭輸唯優勇友幽悠憂有猶由裕誘遊郵雄融夕予余与誉預幼容庸揚揺擁
|
||||
Line 38=曜様洋溶用窯羊葉要謡踊陽養抑欲浴翌翼羅裸来頼雷絡落酪乱卵欄濫覧利吏履理痢裏里離陸律率立略流留硫粒
|
||||
Line 39=隆竜慮旅虜了僚両寮料涼猟療糧良量陵領力緑倫厘林臨輪隣塁涙累類令例冷励礼鈴隷零霊麗齢暦歴列劣烈裂廉
|
||||
Line 40=恋練連錬炉路露労廊朗楼浪漏老郎六録論和話賄惑枠湾腕
|
||||
|
||||
0=24
|
||||
1=24
|
||||
@@ -4092,112 +4072,60 @@ Line 31=蓮呂魯櫓賂婁弄榔牢狼篭聾蝋麓禄肋倭歪脇鷲亙亘鰐
|
||||
1019=24
|
||||
|
||||
[kanji-jis2]
|
||||
Line 0=弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞
|
||||
Line 1=仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥
|
||||
Line 2=倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲僉僊
|
||||
Line 3=傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮
|
||||
Line 4=冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾
|
||||
Line 5=刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼
|
||||
Line 6=劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍
|
||||
Line 7=凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮
|
||||
Line 8=吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨咫哂咤咾咼哘
|
||||
Line 9=哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼
|
||||
Line 10=喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀
|
||||
Line 11=嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜
|
||||
Line 12=圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡
|
||||
Line 13=塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽
|
||||
Line 14=夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩奸妁妝佞侫妣妲姆姨姜
|
||||
Line 15=妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖
|
||||
Line 16=嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢
|
||||
Line 17=寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛
|
||||
Line 18=岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬
|
||||
Line 19=嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀
|
||||
Line 20=幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏廖廣廝廚廛廢廡廨廩廬廱廳廰廴
|
||||
Line 21=廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇
|
||||
Line 22=從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷
|
||||
Line 23=恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵
|
||||
Line 24=惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚
|
||||
Line 25=慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣
|
||||
Line 26=懶懺懴懿懽懼懾戀戈戉戍戌戔戛戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找
|
||||
Line 27=抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍
|
||||
Line 28=搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨
|
||||
Line 29=搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺
|
||||
Line 30=攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆
|
||||
Line 31=旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈
|
||||
Line 32=暎暉暄暘暝曁暹曉暾暼曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸
|
||||
Line 33=朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆
|
||||
Line 34=柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁
|
||||
Line 35=棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔
|
||||
Line 36=楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴
|
||||
Line 37=槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢
|
||||
Line 38=檐檍檠檄檢檣檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹
|
||||
Line 39=飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓
|
||||
Line 40=毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅
|
||||
Line 41=泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕
|
||||
Line 42=渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃
|
||||
Line 43=渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯
|
||||
Line 44=漲滌漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔
|
||||
Line 45=濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋
|
||||
Line 46=烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼
|
||||
Line 47=燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎
|
||||
Line 48=狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻
|
||||
Line 49=珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱瓠瓣
|
||||
Line 50=瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭
|
||||
Line 51=畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰
|
||||
Line 52=痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發
|
||||
Line 53=皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥
|
||||
Line 54=眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮
|
||||
Line 55=矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬磧磚磽磴礇礒
|
||||
Line 56=礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙
|
||||
Line 57=稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊
|
||||
Line 58=竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥
|
||||
Line 59=筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇
|
||||
Line 60=簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫
|
||||
Line 61=粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆紂紜紕紊絅絋紮紲紿紵
|
||||
Line 62=絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤
|
||||
Line 63=緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩
|
||||
Line 64=繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨
|
||||
Line 65=罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜
|
||||
Line 66=耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚
|
||||
Line 67=肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋隋腆脾腓腑胼腱腮腥腦腴膃膈膊
|
||||
Line 68=膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂
|
||||
Line 69=舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬
|
||||
Line 70=苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪
|
||||
Line 71=莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸
|
||||
Line 72=蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡
|
||||
Line 73=蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾
|
||||
Line 74=薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋
|
||||
Line 75=蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥
|
||||
Line 76=蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯
|
||||
Line 77=蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵
|
||||
Line 78=衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪
|
||||
Line 79=褫襁襄褻褶褸襌褝襠襞襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿
|
||||
Line 80=觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦
|
||||
Line 81=誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁
|
||||
Line 82=譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸
|
||||
Line 83=豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍
|
||||
Line 84=贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐
|
||||
Line 85=踟蹂踵踰踴蹊蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡
|
||||
Line 86=躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌
|
||||
Line 87=轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧
|
||||
Line 88=逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤
|
||||
Line 89=扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟
|
||||
Line 90=釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺
|
||||
Line 91=鍄錮錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓
|
||||
Line 92=鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘
|
||||
Line 93=閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞
|
||||
Line 94=陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎
|
||||
Line 95=霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐
|
||||
Line 96=鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰顱顴
|
||||
Line 97=顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌
|
||||
Line 98=饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍
|
||||
Line 99=驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚
|
||||
Line 100=鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆
|
||||
Line 101=鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾
|
||||
Line 102=鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈鵝鵞鵤鵑鵐鵙
|
||||
Line 103=鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁
|
||||
Line 104=麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽
|
||||
Line 105=鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙
|
||||
Line 0=弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤
|
||||
Line 1=俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩
|
||||
Line 2=兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧
|
||||
Line 3=劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀
|
||||
Line 4=听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻
|
||||
Line 5=啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國
|
||||
Line 6=圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤
|
||||
Line 7=壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗
|
||||
Line 8=嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱
|
||||
Line 9=屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵
|
||||
Line 10=帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙
|
||||
Line 11=彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗
|
||||
Line 12=悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮
|
||||
Line 13=懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂
|
||||
Line 14=拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻
|
||||
Line 15=擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶
|
||||
Line 16=昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦
|
||||
Line 17=枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄
|
||||
Line 18=棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭
|
||||
Line 19=樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹
|
||||
Line 20=歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍
|
||||
Line 21=洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉
|
||||
Line 22=溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁
|
||||
Line 23=瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬
|
||||
Line 24=爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯
|
||||
Line 25=琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊
|
||||
Line 26=疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎
|
||||
Line 27=皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦
|
||||
Line 28=砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀
|
||||
Line 29=稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧
|
||||
Line 30=筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡
|
||||
Line 31=粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤
|
||||
Line 32=緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠
|
||||
Line 33=罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛
|
||||
Line 34=肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻
|
||||
Line 35=臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗
|
||||
Line 36=茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚
|
||||
Line 37=蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧
|
||||
Line 38=虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖
|
||||
Line 39=螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲
|
||||
Line 40=褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬
|
||||
Line 41=詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺
|
||||
Line 42=豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋
|
||||
Line 43=跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓
|
||||
Line 44=輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲
|
||||
Line 45=邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕
|
||||
Line 46=鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩
|
||||
Line 47=鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶
|
||||
Line 48=隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟
|
||||
Line 49=韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮
|
||||
Line 50=駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃
|
||||
Line 51=魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃
|
||||
Line 52=鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪
|
||||
Line 53=麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙
|
||||
|
||||
0=24
|
||||
1=24
|
||||
|
||||
@@ -1579,6 +1579,7 @@ No backgrounds available=No backgrounds available
|
||||
EditHelpText=Up/Down:\n change beat\nLeft/Right:\n change snap\nNumber keys:\n add/remove\n tap note\nN and M keys:\n swap tap notes\nCtrl + N/M:\n swap cycled segment\nCtrl + ,/.:\n cycle segments\nCreate hold note:\n Hold a number\n while moving\n Up or Down\nCreate roll note:\n Hold Shift,\n then create a\n hold note.\nSpace bar: Set area\n marker\nT key: Switch Timing\nEnter: Area Menu\nA Key: Alter Menu\nEscape: Main Menu\nF4: Timing Menu\nF1: Show help\nQ/W: Change record hold time.\nE/R: Toggle record holds
|
||||
PlayRecordHelpText=Press START to end
|
||||
Save successful.=Save successful.
|
||||
save_success_no_sm_split_timing=Save successful. No SM saved because split timing was used.
|
||||
Saved as SM and DWI.=Saved as SM and DWI.
|
||||
Saved as SM.=Saved as SM.
|
||||
Switched to=Switched to
|
||||
|
||||
@@ -1684,6 +1684,7 @@ More than %d notes per measure is not allowed. This change has been reverted.=1
|
||||
No backgrounds available=使用できる背景がありません。
|
||||
PlayRecordHelpText=&START;を押して終了
|
||||
Save successful.=保存しました。
|
||||
save_success_no_sm_split_timing=保存しました。譜面ごとに異なるタイミングが使われているため、SM形式は保存されませんでした。
|
||||
Saved as SM and DWI.=SM形式とDWI形式で保存しました。
|
||||
Saved as SM.=SM形式で保存しました。
|
||||
Switched to=切り替え:
|
||||
|
||||
@@ -242,7 +242,7 @@ BottomEdge=SCREEN_BOTTOM
|
||||
RandomBGStartBeat=-1000
|
||||
RandomBGChangeMeasures=4
|
||||
RandomBGChangesWhenBPMChangesAtMeasureStart=true
|
||||
RandomBGEndsAtLastBeat=false
|
||||
RandomBGEndsAtLastBeat=true
|
||||
|
||||
[Banner]
|
||||
# Scroll stuff when you roll over it, DDR Extreme style.
|
||||
@@ -1509,7 +1509,6 @@ AfterSetCommand=%TextBannerAfterSet
|
||||
|
||||
[TextBannerHighScores]
|
||||
Fallback="TextBanner"
|
||||
AfterSetCommand=%TextBannerHighScoreAfterSet
|
||||
|
||||
|
||||
[WheelNotifyIcon]
|
||||
@@ -4279,6 +4278,9 @@ Fallback="ScreenMiniMenu"
|
||||
[ScreenMiniMenuTimingDataInformation]
|
||||
Fallback="ScreenMiniMenu"
|
||||
|
||||
[ScreenMiniMenuTimingDataChangeInformation]
|
||||
Fallback="ScreenMiniMenu"
|
||||
|
||||
[ScreenMiniMenuBackgroundChange]
|
||||
Fallback="ScreenMiniMenu"
|
||||
|
||||
|
||||
@@ -1322,7 +1322,7 @@ LineFlashyCombo="lua,ThemePrefRow('FlashyCombo')"
|
||||
[ScreenOptionsGraphicsSound]
|
||||
|
||||
[ScreenOptionsAdvanced]
|
||||
LineNames="3,4,8,SI,SM,11,13,14,16,28,29,30,32,RollCombo,ECPT"
|
||||
LineNames="3,4,8,SI,SM,11,13,14,15,16,28,29,30,32,RollCombo,ECPT"
|
||||
LineRollCombo="lua,ThemePrefRow('ComboOnRolls')"
|
||||
|
||||
[ScreenAppearanceOptions]
|
||||
@@ -1650,11 +1650,11 @@ ShowStepsDisplay=true
|
||||
#
|
||||
W1NumberP1X=SCREEN_CENTER_X-160+40
|
||||
W1NumberP1Y=SCREEN_TOP+160
|
||||
W1NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
W1NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W1NumberP1OffCommand=
|
||||
W1NumberP2X=SCREEN_CENTER_X+160-40
|
||||
W1NumberP2Y=SCREEN_TOP+160
|
||||
W1NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
W1NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W1NumberP2OffCommand=
|
||||
W1LabelX=SCREEN_CENTER_X
|
||||
W1LabelY=SCREEN_TOP+160
|
||||
@@ -1663,11 +1663,11 @@ W1LabelOffCommand=
|
||||
#
|
||||
W2NumberP1X=SCREEN_CENTER_X-160+40
|
||||
W2NumberP1Y=SCREEN_TOP+180
|
||||
W2NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
W2NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W2NumberP1OffCommand=
|
||||
W2NumberP2X=SCREEN_CENTER_X+160-40
|
||||
W2NumberP2Y=SCREEN_TOP+180
|
||||
W2NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
W2NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W2NumberP2OffCommand=
|
||||
W2LabelX=SCREEN_CENTER_X
|
||||
W2LabelY=SCREEN_TOP+180
|
||||
@@ -1676,11 +1676,11 @@ W2LabelOffCommand=
|
||||
#
|
||||
W3NumberP1X=SCREEN_CENTER_X-160+40
|
||||
W3NumberP1Y=SCREEN_TOP+200
|
||||
W3NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
W3NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W3NumberP1OffCommand=
|
||||
W3NumberP2X=SCREEN_CENTER_X+160-40
|
||||
W3NumberP2Y=SCREEN_TOP+200
|
||||
W3NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
W3NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W3NumberP2OffCommand=
|
||||
W3LabelX=SCREEN_CENTER_X
|
||||
W3LabelY=SCREEN_TOP+200
|
||||
@@ -1689,11 +1689,11 @@ W3LabelOffCommand=
|
||||
#
|
||||
W4NumberP1X=SCREEN_CENTER_X-160+40
|
||||
W4NumberP1Y=SCREEN_TOP+220
|
||||
W4NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
W4NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W4NumberP1OffCommand=
|
||||
W4NumberP2X=SCREEN_CENTER_X+160-40
|
||||
W4NumberP2Y=SCREEN_TOP+220
|
||||
W4NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
W4NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W4NumberP2OffCommand=
|
||||
W4LabelX=SCREEN_CENTER_X
|
||||
W4LabelY=SCREEN_TOP+220
|
||||
@@ -1702,11 +1702,11 @@ W4LabelOffCommand=
|
||||
#
|
||||
W5NumberP1X=SCREEN_CENTER_X-160+40
|
||||
W5NumberP1Y=SCREEN_TOP+240
|
||||
W5NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
W5NumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W5NumberP1OffCommand=
|
||||
W5NumberP2X=SCREEN_CENTER_X+160-40
|
||||
W5NumberP2Y=SCREEN_TOP+240
|
||||
W5NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
W5NumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
W5NumberP2OffCommand=
|
||||
W5LabelX=SCREEN_CENTER_X
|
||||
W5LabelY=SCREEN_TOP+240
|
||||
@@ -1715,11 +1715,11 @@ W5LabelOffCommand=
|
||||
#
|
||||
MissNumberP1X=SCREEN_CENTER_X-160+40
|
||||
MissNumberP1Y=SCREEN_TOP+260
|
||||
MissNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
MissNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
MissNumberP1OffCommand=
|
||||
MissNumberP2X=SCREEN_CENTER_X+160-40
|
||||
MissNumberP2Y=SCREEN_TOP+260
|
||||
MissNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
MissNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
MissNumberP2OffCommand=
|
||||
MissLabelX=SCREEN_CENTER_X
|
||||
MissLabelY=SCREEN_TOP+260
|
||||
@@ -1728,11 +1728,11 @@ MissLabelOffCommand=
|
||||
#
|
||||
HeldNumberP1X=SCREEN_CENTER_X-160+40
|
||||
HeldNumberP1Y=SCREEN_TOP+280
|
||||
HeldNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
HeldNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
HeldNumberP1OffCommand=
|
||||
HeldNumberP2X=SCREEN_CENTER_X+160-40
|
||||
HeldNumberP2Y=SCREEN_TOP+280
|
||||
HeldNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
HeldNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
HeldNumberP2OffCommand=
|
||||
HeldLabelX=SCREEN_CENTER_X
|
||||
HeldLabelY=SCREEN_TOP+280
|
||||
@@ -1741,11 +1741,11 @@ HeldLabelOffCommand=
|
||||
#
|
||||
MaxComboNumberP1X=SCREEN_CENTER_X-160+40
|
||||
MaxComboNumberP1Y=SCREEN_TOP+300
|
||||
MaxComboNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1
|
||||
MaxComboNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
MaxComboNumberP1OffCommand=
|
||||
MaxComboNumberP2X=SCREEN_CENTER_X+160-40
|
||||
MaxComboNumberP2Y=SCREEN_TOP+300
|
||||
MaxComboNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1
|
||||
MaxComboNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;set_mult_attrs_with_diffuse,true
|
||||
MaxComboNumberP2OffCommand=
|
||||
MaxComboLabelX=SCREEN_CENTER_X
|
||||
MaxComboLabelY=SCREEN_TOP+300
|
||||
@@ -1759,11 +1759,11 @@ ScoreLabelOffCommand=
|
||||
#
|
||||
ScoreNumberP1X=SCREEN_CENTER_X-160
|
||||
ScoreNumberP1Y=SCREEN_TOP+320
|
||||
ScoreNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;zoom,0.775
|
||||
ScoreNumberP1OnCommand=diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone( PlayerColor(PLAYER_1) );shadowlength,1;zoom,0.775;set_mult_attrs_with_diffuse,true
|
||||
ScoreNumberP1OffCommand=
|
||||
ScoreNumberP2X=SCREEN_CENTER_X+160
|
||||
ScoreNumberP2Y=SCREEN_TOP+320
|
||||
ScoreNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;zoom,0.775
|
||||
ScoreNumberP2OnCommand=diffuse,PlayerColor(PLAYER_2);strokecolor,ColorDarkTone( PlayerColor(PLAYER_2) );shadowlength,1;zoom,0.775;set_mult_attrs_with_diffuse,true
|
||||
ScoreNumberP2OffCommand=
|
||||
#
|
||||
PercentFrameP1X=SCREEN_CENTER_X-160
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_AVFFT_H
|
||||
#define AVCODEC_AVFFT_H
|
||||
|
||||
typedef float FFTSample;
|
||||
|
||||
typedef struct FFTComplex {
|
||||
FFTSample re, im;
|
||||
} FFTComplex;
|
||||
|
||||
typedef struct FFTContext FFTContext;
|
||||
|
||||
/**
|
||||
* Set up a complex FFT.
|
||||
* @param nbits log2 of the length of the input array
|
||||
* @param inverse if 0 perform the forward transform, if 1 perform the inverse
|
||||
*/
|
||||
FFTContext *av_fft_init(int nbits, int inverse);
|
||||
|
||||
/**
|
||||
* Do the permutation needed BEFORE calling ff_fft_calc().
|
||||
*/
|
||||
void av_fft_permute(FFTContext *s, FFTComplex *z);
|
||||
|
||||
/**
|
||||
* Do a complex FFT with the parameters defined in av_fft_init(). The
|
||||
* input data must be permuted before. No 1.0/sqrt(n) normalization is done.
|
||||
*/
|
||||
void av_fft_calc(FFTContext *s, FFTComplex *z);
|
||||
|
||||
void av_fft_end(FFTContext *s);
|
||||
|
||||
FFTContext *av_mdct_init(int nbits, int inverse, double scale);
|
||||
void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
void av_mdct_end(FFTContext *s);
|
||||
|
||||
/* Real Discrete Fourier Transform */
|
||||
|
||||
enum RDFTransformType {
|
||||
DFT_R2C,
|
||||
IDFT_C2R,
|
||||
IDFT_R2C,
|
||||
DFT_C2R,
|
||||
};
|
||||
|
||||
typedef struct RDFTContext RDFTContext;
|
||||
|
||||
/**
|
||||
* Set up a real FFT.
|
||||
* @param nbits log2 of the length of the input array
|
||||
* @param trans the type of transform
|
||||
*/
|
||||
RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
|
||||
void av_rdft_calc(RDFTContext *s, FFTSample *data);
|
||||
void av_rdft_end(RDFTContext *s);
|
||||
|
||||
/* Discrete Cosine Transform */
|
||||
|
||||
typedef struct DCTContext DCTContext;
|
||||
|
||||
enum DCTTransformType {
|
||||
DCT_II = 0,
|
||||
DCT_III,
|
||||
DCT_I,
|
||||
DST_I,
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up DCT.
|
||||
* @param nbits size of the input array:
|
||||
* (1 << nbits) for DCT-II, DCT-III and DST-I
|
||||
* (1 << nbits) + 1 for DCT-I
|
||||
*
|
||||
* @note the first element of the input of DST-I is ignored
|
||||
*/
|
||||
DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
|
||||
void av_dct_calc(DCTContext *s, FFTSample *data);
|
||||
void av_dct_end (DCTContext *s);
|
||||
|
||||
#endif /* AVCODEC_AVFFT_H */
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* DXVA2 HW acceleration
|
||||
*
|
||||
* copyright (c) 2009 Laurent Aimar
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_DXVA_H
|
||||
#define AVCODEC_DXVA_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <d3d9.h>
|
||||
#include <dxva2api.h>
|
||||
|
||||
#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
|
||||
|
||||
/**
|
||||
* This structure is used to provides the necessary configurations and data
|
||||
* to the DXVA2 FFmpeg HWAccel implementation.
|
||||
*
|
||||
* The application must make it available as AVCodecContext.hwaccel_context.
|
||||
*/
|
||||
struct dxva_context {
|
||||
/**
|
||||
* DXVA2 decoder object
|
||||
*/
|
||||
IDirectXVideoDecoder *decoder;
|
||||
|
||||
/**
|
||||
* DXVA2 configuration used to create the decoder
|
||||
*/
|
||||
const DXVA2_ConfigPictureDecode *cfg;
|
||||
|
||||
/**
|
||||
* The number of surface in the surface array
|
||||
*/
|
||||
unsigned surface_count;
|
||||
|
||||
/**
|
||||
* The array of Direct3D surfaces used to create the decoder
|
||||
*/
|
||||
LPDIRECT3DSURFACE9 *surface;
|
||||
|
||||
/**
|
||||
* A bit field configuring the workarounds needed for using the decoder
|
||||
*/
|
||||
uint64_t workaround;
|
||||
|
||||
/**
|
||||
* Private to the FFmpeg AVHWAccel implementation
|
||||
*/
|
||||
unsigned report_id;
|
||||
};
|
||||
|
||||
#endif /* AVCODEC_DXVA_H */
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* Libav 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* Libav 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 Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This header is provided for compatibility only and will be removed
|
||||
* on next major bump
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_OPT_H
|
||||
#define AVCODEC_OPT_H
|
||||
|
||||
#include "libavcodec/version.h"
|
||||
|
||||
#if FF_API_OPT_H
|
||||
#include "libavutil/opt.h"
|
||||
#endif
|
||||
|
||||
#endif /* AVCODEC_OPT_H */
|
||||
@@ -1,167 +0,0 @@
|
||||
/*
|
||||
* Video Acceleration API (shared data between FFmpeg and the video player)
|
||||
* HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
|
||||
*
|
||||
* Copyright (C) 2008-2009 Splitted-Desktop Systems
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_VAAPI_H
|
||||
#define AVCODEC_VAAPI_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @defgroup VAAPI_Decoding VA API Decoding
|
||||
* @ingroup Decoder
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* This structure is used to share data between the FFmpeg library and
|
||||
* the client video application.
|
||||
* This shall be zero-allocated and available as
|
||||
* AVCodecContext.hwaccel_context. All user members can be set once
|
||||
* during initialization or through each AVCodecContext.get_buffer()
|
||||
* function call. In any case, they must be valid prior to calling
|
||||
* decoding functions.
|
||||
*/
|
||||
struct vaapi_context {
|
||||
/**
|
||||
* Window system dependent data
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user
|
||||
*/
|
||||
void *display;
|
||||
|
||||
/**
|
||||
* Configuration ID
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user
|
||||
*/
|
||||
uint32_t config_id;
|
||||
|
||||
/**
|
||||
* Context ID (video decode pipeline)
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user
|
||||
*/
|
||||
uint32_t context_id;
|
||||
|
||||
/**
|
||||
* VAPictureParameterBuffer ID
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
uint32_t pic_param_buf_id;
|
||||
|
||||
/**
|
||||
* VAIQMatrixBuffer ID
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
uint32_t iq_matrix_buf_id;
|
||||
|
||||
/**
|
||||
* VABitPlaneBuffer ID (for VC-1 decoding)
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
uint32_t bitplane_buf_id;
|
||||
|
||||
/**
|
||||
* Slice parameter/data buffer IDs
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
uint32_t *slice_buf_ids;
|
||||
|
||||
/**
|
||||
* Number of effective slice buffer IDs to send to the HW
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
unsigned int n_slice_buf_ids;
|
||||
|
||||
/**
|
||||
* Size of pre-allocated slice_buf_ids
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
unsigned int slice_buf_ids_alloc;
|
||||
|
||||
/**
|
||||
* Pointer to VASliceParameterBuffers
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
void *slice_params;
|
||||
|
||||
/**
|
||||
* Size of a VASliceParameterBuffer element
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
unsigned int slice_param_size;
|
||||
|
||||
/**
|
||||
* Size of pre-allocated slice_params
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
unsigned int slice_params_alloc;
|
||||
|
||||
/**
|
||||
* Number of slices currently filled in
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
unsigned int slice_count;
|
||||
|
||||
/**
|
||||
* Pointer to slice data buffer base
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
const uint8_t *slice_data;
|
||||
|
||||
/**
|
||||
* Current size of slice data
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set by libavcodec
|
||||
*/
|
||||
uint32_t slice_data_size;
|
||||
};
|
||||
|
||||
/* @} */
|
||||
|
||||
#endif /* AVCODEC_VAAPI_H */
|
||||
@@ -1,168 +0,0 @@
|
||||
/*
|
||||
* VDA HW acceleration
|
||||
*
|
||||
* copyright (c) 2011 Sebastien Zwickert
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_VDA_H
|
||||
#define AVCODEC_VDA_H
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
|
||||
// http://openradar.appspot.com/8026390
|
||||
#undef __GNUC_STDC_INLINE__
|
||||
|
||||
#define Picture QuickdrawPicture
|
||||
#include <VideoDecodeAcceleration/VDADecoder.h>
|
||||
#undef Picture
|
||||
|
||||
/**
|
||||
* This structure is used to store a decoded frame information and data.
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* The PTS of the frame.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
int64_t pts;
|
||||
|
||||
/**
|
||||
* The CoreVideo buffer that contains the decoded data.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
CVPixelBufferRef cv_buffer;
|
||||
|
||||
/**
|
||||
* A pointer to the next frame.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
struct vda_frame *next_frame;
|
||||
} vda_frame;
|
||||
|
||||
/**
|
||||
* This structure is used to provide the necessary configurations and data
|
||||
* to the VDA FFmpeg HWAccel implementation.
|
||||
*
|
||||
* The application must make it available as AVCodecContext.hwaccel_context.
|
||||
*/
|
||||
struct vda_context {
|
||||
/**
|
||||
* VDA decoder object.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
VDADecoder decoder;
|
||||
|
||||
/**
|
||||
* VDA frames queue ordered by presentation timestamp.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
vda_frame *queue;
|
||||
|
||||
/**
|
||||
* Mutex for locking queue operations.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
pthread_mutex_t queue_mutex;
|
||||
|
||||
/**
|
||||
* The frame width.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by user.
|
||||
*/
|
||||
int width;
|
||||
|
||||
/**
|
||||
* The frame height.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by user.
|
||||
*/
|
||||
int height;
|
||||
|
||||
/**
|
||||
* The frame format.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by user.
|
||||
*/
|
||||
int format;
|
||||
|
||||
/**
|
||||
* The pixel format for output image buffers.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by user.
|
||||
*/
|
||||
OSType cv_pix_fmt_type;
|
||||
|
||||
/**
|
||||
* The current bitstream buffer.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
uint8_t *bitstream;
|
||||
|
||||
/**
|
||||
* The current size of the bitstream.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
int bitstream_size;
|
||||
|
||||
/**
|
||||
* The reference size used for fast reallocation.
|
||||
*
|
||||
* - encoding: unused
|
||||
* - decoding: Set/Unset by libavcodec.
|
||||
*/
|
||||
int ref_size;
|
||||
};
|
||||
|
||||
/** Create the video decoder. */
|
||||
int ff_vda_create_decoder(struct vda_context *vda_ctx,
|
||||
uint8_t *extradata,
|
||||
int extradata_size);
|
||||
|
||||
/** Destroy the video decoder. */
|
||||
int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
|
||||
|
||||
/** Return the top frame of the queue. */
|
||||
vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx);
|
||||
|
||||
/** Release the given frame. */
|
||||
void ff_vda_release_vda_frame(vda_frame *frame);
|
||||
|
||||
#endif /* AVCODEC_VDA_H */
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* The Video Decode and Presentation API for UNIX (VDPAU) is used for
|
||||
* hardware-accelerated decoding of MPEG-1/2, H.264 and VC-1.
|
||||
*
|
||||
* Copyright (C) 2008 NVIDIA
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_VDPAU_H
|
||||
#define AVCODEC_VDPAU_H
|
||||
|
||||
/**
|
||||
* @defgroup Decoder VDPAU Decoder and Renderer
|
||||
*
|
||||
* VDPAU hardware acceleration has two modules
|
||||
* - VDPAU decoding
|
||||
* - VDPAU presentation
|
||||
*
|
||||
* The VDPAU decoding module parses all headers using FFmpeg
|
||||
* parsing mechanisms and uses VDPAU for the actual decoding.
|
||||
*
|
||||
* As per the current implementation, the actual decoding
|
||||
* and rendering (API calls) are done as part of the VDPAU
|
||||
* presentation (vo_vdpau.c) module.
|
||||
*
|
||||
* @defgroup VDPAU_Decoding VDPAU Decoding
|
||||
* @ingroup Decoder
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <vdpau/vdpau.h>
|
||||
#include <vdpau/vdpau_x11.h>
|
||||
|
||||
/** @brief The videoSurface is used for rendering. */
|
||||
#define FF_VDPAU_STATE_USED_FOR_RENDER 1
|
||||
|
||||
/**
|
||||
* @brief The videoSurface is needed for reference/prediction.
|
||||
* The codec manipulates this.
|
||||
*/
|
||||
#define FF_VDPAU_STATE_USED_FOR_REFERENCE 2
|
||||
|
||||
/**
|
||||
* @brief This structure is used as a callback between the FFmpeg
|
||||
* decoder (vd_) and presentation (vo_) module.
|
||||
* This is used for defining a video frame containing surface,
|
||||
* picture parameter, bitstream information etc which are passed
|
||||
* between the FFmpeg decoder and its clients.
|
||||
*/
|
||||
struct vdpau_render_state {
|
||||
VdpVideoSurface surface; ///< Used as rendered surface, never changed.
|
||||
|
||||
int state; ///< Holds FF_VDPAU_STATE_* values.
|
||||
|
||||
/** Describe size/location of the compressed video data.
|
||||
Set to 0 when freeing bitstream_buffers. */
|
||||
int bitstream_buffers_allocated;
|
||||
int bitstream_buffers_used;
|
||||
/** The user is responsible for freeing this buffer using av_freep(). */
|
||||
VdpBitstreamBuffer *bitstream_buffers;
|
||||
|
||||
/** picture parameter information for all supported codecs */
|
||||
union VdpPictureInfo {
|
||||
VdpPictureInfoH264 h264;
|
||||
VdpPictureInfoMPEG1Or2 mpeg;
|
||||
VdpPictureInfoVC1 vc1;
|
||||
VdpPictureInfoMPEG4Part2 mpeg4;
|
||||
} info;
|
||||
};
|
||||
|
||||
/* @}*/
|
||||
|
||||
#endif /* AVCODEC_VDPAU_H */
|
||||
@@ -1,130 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_VERSION_H
|
||||
#define AVCODEC_VERSION_H
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 53
|
||||
#define LIBAVCODEC_VERSION_MINOR 61
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
LIBAVCODEC_VERSION_MICRO)
|
||||
#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
LIBAVCODEC_VERSION_MICRO)
|
||||
#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
|
||||
|
||||
#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
|
||||
|
||||
/**
|
||||
* Those FF_API_* defines are not part of public API.
|
||||
* They may change, break or disappear at any time.
|
||||
*/
|
||||
#ifndef FF_API_PALETTE_CONTROL
|
||||
#define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_SAMPLE_FMT
|
||||
#define FF_API_OLD_SAMPLE_FMT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_AUDIOCONVERT
|
||||
#define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_ANTIALIAS_ALGO
|
||||
#define FF_API_ANTIALIAS_ALGO (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_REQUEST_CHANNELS
|
||||
#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 55)
|
||||
#endif
|
||||
#ifndef FF_API_OPT_H
|
||||
#define FF_API_OPT_H (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_THREAD_INIT
|
||||
#define FF_API_THREAD_INIT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_FF_PICT_TYPES
|
||||
#define FF_API_OLD_FF_PICT_TYPES (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_FLAC_GLOBAL_OPTS
|
||||
#define FF_API_FLAC_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_GET_PIX_FMT_NAME
|
||||
#define FF_API_GET_PIX_FMT_NAME (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_ALLOC_CONTEXT
|
||||
#define FF_API_ALLOC_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_AVCODEC_OPEN
|
||||
#define FF_API_AVCODEC_OPEN (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_DRC_SCALE
|
||||
#define FF_API_DRC_SCALE (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_ER
|
||||
#define FF_API_ER (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_AVCODEC_INIT
|
||||
#define FF_API_AVCODEC_INIT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_X264_GLOBAL_OPTS
|
||||
#define FF_API_X264_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_MPEGVIDEO_GLOBAL_OPTS
|
||||
#define FF_API_MPEGVIDEO_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_LAME_GLOBAL_OPTS
|
||||
#define FF_API_LAME_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_SNOW_GLOBAL_OPTS
|
||||
#define FF_API_SNOW_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_MJPEG_GLOBAL_OPTS
|
||||
#define FF_API_MJPEG_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_GET_ALPHA_INFO
|
||||
#define FF_API_GET_ALPHA_INFO (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_PARSE_FRAME
|
||||
#define FF_API_PARSE_FRAME (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_INTERNAL_CONTEXT
|
||||
#define FF_API_INTERNAL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_TIFFENC_COMPLEVEL
|
||||
#define FF_API_TIFFENC_COMPLEVEL (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_DATA_POINTERS
|
||||
#define FF_API_DATA_POINTERS (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_DECODE_AUDIO
|
||||
#define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 55)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_TIMECODE
|
||||
#define FF_API_OLD_TIMECODE (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
|
||||
#ifndef FF_API_AVFRAME_AGE
|
||||
#define FF_API_AVFRAME_AGE (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_ENCODE_AUDIO
|
||||
#define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 55)
|
||||
#endif
|
||||
|
||||
#endif /* AVCODEC_VERSION_H */
|
||||
@@ -1,151 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2003 Ivan Kalvachev
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_XVMC_H
|
||||
#define AVCODEC_XVMC_H
|
||||
|
||||
#include <X11/extensions/XvMC.h>
|
||||
|
||||
#include "avcodec.h"
|
||||
|
||||
#define AV_XVMC_ID 0x1DC711C0 /**< special value to ensure that regular pixel routines haven't corrupted the struct
|
||||
the number is 1337 speak for the letters IDCT MCo (motion compensation) */
|
||||
|
||||
struct xvmc_pix_fmt {
|
||||
/** The field contains the special constant value AV_XVMC_ID.
|
||||
It is used as a test that the application correctly uses the API,
|
||||
and that there is no corruption caused by pixel routines.
|
||||
- application - set during initialization
|
||||
- libavcodec - unchanged
|
||||
*/
|
||||
int xvmc_id;
|
||||
|
||||
/** Pointer to the block array allocated by XvMCCreateBlocks().
|
||||
The array has to be freed by XvMCDestroyBlocks().
|
||||
Each group of 64 values represents one data block of differential
|
||||
pixel information (in MoCo mode) or coefficients for IDCT.
|
||||
- application - set the pointer during initialization
|
||||
- libavcodec - fills coefficients/pixel data into the array
|
||||
*/
|
||||
short* data_blocks;
|
||||
|
||||
/** Pointer to the macroblock description array allocated by
|
||||
XvMCCreateMacroBlocks() and freed by XvMCDestroyMacroBlocks().
|
||||
- application - set the pointer during initialization
|
||||
- libavcodec - fills description data into the array
|
||||
*/
|
||||
XvMCMacroBlock* mv_blocks;
|
||||
|
||||
/** Number of macroblock descriptions that can be stored in the mv_blocks
|
||||
array.
|
||||
- application - set during initialization
|
||||
- libavcodec - unchanged
|
||||
*/
|
||||
int allocated_mv_blocks;
|
||||
|
||||
/** Number of blocks that can be stored at once in the data_blocks array.
|
||||
- application - set during initialization
|
||||
- libavcodec - unchanged
|
||||
*/
|
||||
int allocated_data_blocks;
|
||||
|
||||
/** Indicate that the hardware would interpret data_blocks as IDCT
|
||||
coefficients and perform IDCT on them.
|
||||
- application - set during initialization
|
||||
- libavcodec - unchanged
|
||||
*/
|
||||
int idct;
|
||||
|
||||
/** In MoCo mode it indicates that intra macroblocks are assumed to be in
|
||||
unsigned format; same as the XVMC_INTRA_UNSIGNED flag.
|
||||
- application - set during initialization
|
||||
- libavcodec - unchanged
|
||||
*/
|
||||
int unsigned_intra;
|
||||
|
||||
/** Pointer to the surface allocated by XvMCCreateSurface().
|
||||
It has to be freed by XvMCDestroySurface() on application exit.
|
||||
It identifies the frame and its state on the video hardware.
|
||||
- application - set during initialization
|
||||
- libavcodec - unchanged
|
||||
*/
|
||||
XvMCSurface* p_surface;
|
||||
|
||||
/** Set by the decoder before calling ff_draw_horiz_band(),
|
||||
needed by the XvMCRenderSurface function. */
|
||||
//@{
|
||||
/** Pointer to the surface used as past reference
|
||||
- application - unchanged
|
||||
- libavcodec - set
|
||||
*/
|
||||
XvMCSurface* p_past_surface;
|
||||
|
||||
/** Pointer to the surface used as future reference
|
||||
- application - unchanged
|
||||
- libavcodec - set
|
||||
*/
|
||||
XvMCSurface* p_future_surface;
|
||||
|
||||
/** top/bottom field or frame
|
||||
- application - unchanged
|
||||
- libavcodec - set
|
||||
*/
|
||||
unsigned int picture_structure;
|
||||
|
||||
/** XVMC_SECOND_FIELD - 1st or 2nd field in the sequence
|
||||
- application - unchanged
|
||||
- libavcodec - set
|
||||
*/
|
||||
unsigned int flags;
|
||||
//}@
|
||||
|
||||
/** Number of macroblock descriptions in the mv_blocks array
|
||||
that have already been passed to the hardware.
|
||||
- application - zeroes it on get_buffer().
|
||||
A successful ff_draw_horiz_band() may increment it
|
||||
with filled_mb_block_num or zero both.
|
||||
- libavcodec - unchanged
|
||||
*/
|
||||
int start_mv_blocks_num;
|
||||
|
||||
/** Number of new macroblock descriptions in the mv_blocks array (after
|
||||
start_mv_blocks_num) that are filled by libavcodec and have to be
|
||||
passed to the hardware.
|
||||
- application - zeroes it on get_buffer() or after successful
|
||||
ff_draw_horiz_band().
|
||||
- libavcodec - increment with one of each stored MB
|
||||
*/
|
||||
int filled_mv_blocks_num;
|
||||
|
||||
/** Number of the the next free data block; one data block consists of
|
||||
64 short values in the data_blocks array.
|
||||
All blocks before this one have already been claimed by placing their
|
||||
position into the corresponding block description structure field,
|
||||
that are part of the mv_blocks array.
|
||||
- application - zeroes it on get_buffer().
|
||||
A successful ff_draw_horiz_band() may zero it together
|
||||
with start_mb_blocks_num.
|
||||
- libavcodec - each decoded macroblock increases it by the number
|
||||
of coded blocks it contains.
|
||||
*/
|
||||
int next_free_data_block_num;
|
||||
};
|
||||
|
||||
#endif /* AVCODEC_XVMC_H */
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVDEVICE_AVDEVICE_H
|
||||
#define AVDEVICE_AVDEVICE_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavd
|
||||
* Main libavdevice API header
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lavd Special devices muxing/demuxing library
|
||||
* @{
|
||||
* Libavdevice is a complementary library to @ref libavf "libavformat". It
|
||||
* provides various "special" platform-specific muxers and demuxers, e.g. for
|
||||
* grabbing devices, audio capture and playback etc. As a consequence, the
|
||||
* (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
|
||||
* I/O functions). The filename passed to avformat_open_input() often does not
|
||||
* refer to an actually existing file, but has some special device-specific
|
||||
* meaning - e.g. for the x11grab device it is the display name.
|
||||
*
|
||||
* To use libavdevice, simply call avdevice_register_all() to register all
|
||||
* compiled muxers and demuxers. They all use standard libavformat API.
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include "libavutil/avutil.h"
|
||||
#include "libavformat/avformat.h"
|
||||
|
||||
#define LIBAVDEVICE_VERSION_MAJOR 53
|
||||
#define LIBAVDEVICE_VERSION_MINOR 4
|
||||
#define LIBAVDEVICE_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
|
||||
LIBAVDEVICE_VERSION_MINOR, \
|
||||
LIBAVDEVICE_VERSION_MICRO)
|
||||
#define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
|
||||
LIBAVDEVICE_VERSION_MINOR, \
|
||||
LIBAVDEVICE_VERSION_MICRO)
|
||||
#define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT
|
||||
|
||||
/**
|
||||
* Return the LIBAVDEVICE_VERSION_INT constant.
|
||||
*/
|
||||
unsigned avdevice_version(void);
|
||||
|
||||
/**
|
||||
* Return the libavdevice build-time configuration.
|
||||
*/
|
||||
const char *avdevice_configuration(void);
|
||||
|
||||
/**
|
||||
* Return the libavdevice license.
|
||||
*/
|
||||
const char *avdevice_license(void);
|
||||
|
||||
/**
|
||||
* Initialize libavdevice and register all the input and output devices.
|
||||
* @warning This function is not thread safe.
|
||||
*/
|
||||
void avdevice_register_all(void);
|
||||
|
||||
#endif /* AVDEVICE_AVDEVICE_H */
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_ASRC_ABUFFER_H
|
||||
#define AVFILTER_ASRC_ABUFFER_H
|
||||
|
||||
#include "avfilter.h"
|
||||
|
||||
/**
|
||||
* @file
|
||||
* memory buffer source for audio
|
||||
*/
|
||||
|
||||
/**
|
||||
* Queue an audio buffer to the audio buffer source.
|
||||
*
|
||||
* @param abuffersrc audio source buffer context
|
||||
* @param data pointers to the samples planes
|
||||
* @param linesize linesizes of each audio buffer plane
|
||||
* @param nb_samples number of samples per channel
|
||||
* @param sample_fmt sample format of the audio data
|
||||
* @param ch_layout channel layout of the audio data
|
||||
* @param planar flag to indicate if audio data is planar or packed
|
||||
* @param pts presentation timestamp of the audio buffer
|
||||
* @param flags unused
|
||||
*/
|
||||
int av_asrc_buffer_add_samples(AVFilterContext *abuffersrc,
|
||||
uint8_t *data[8], int linesize[8],
|
||||
int nb_samples, int sample_rate,
|
||||
int sample_fmt, int64_t ch_layout, int planar,
|
||||
int64_t pts, int av_unused flags);
|
||||
|
||||
/**
|
||||
* Queue an audio buffer to the audio buffer source.
|
||||
*
|
||||
* This is similar to av_asrc_buffer_add_samples(), but the samples
|
||||
* are stored in a buffer with known size.
|
||||
*
|
||||
* @param abuffersrc audio source buffer context
|
||||
* @param buf pointer to the samples data, packed is assumed
|
||||
* @param size the size in bytes of the buffer, it must contain an
|
||||
* integer number of samples
|
||||
* @param sample_fmt sample format of the audio data
|
||||
* @param ch_layout channel layout of the audio data
|
||||
* @param pts presentation timestamp of the audio buffer
|
||||
* @param flags unused
|
||||
*/
|
||||
int av_asrc_buffer_add_buffer(AVFilterContext *abuffersrc,
|
||||
uint8_t *buf, int buf_size,
|
||||
int sample_rate,
|
||||
int sample_fmt, int64_t ch_layout, int planar,
|
||||
int64_t pts, int av_unused flags);
|
||||
|
||||
/**
|
||||
* Queue an audio buffer to the audio buffer source.
|
||||
*
|
||||
* @param abuffersrc audio source buffer context
|
||||
* @param samplesref buffer ref to queue
|
||||
* @param flags unused
|
||||
*/
|
||||
int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *abuffersrc,
|
||||
AVFilterBufferRef *samplesref,
|
||||
int av_unused flags);
|
||||
|
||||
#endif /* AVFILTER_ASRC_ABUFFER_H */
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_AVCODEC_H
|
||||
#define AVFILTER_AVCODEC_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* libavcodec/libavfilter gluing utilities
|
||||
*
|
||||
* This should be included in an application ONLY if the installed
|
||||
* libavfilter has been compiled with libavcodec support, otherwise
|
||||
* symbols defined below will not be available.
|
||||
*/
|
||||
|
||||
#include "libavcodec/avcodec.h" // AVFrame
|
||||
#include "avfilter.h"
|
||||
#include "vsrc_buffer.h"
|
||||
|
||||
/**
|
||||
* Copy the frame properties of src to dst, without copying the actual
|
||||
* image data.
|
||||
*/
|
||||
int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Create and return a picref reference from the data and properties
|
||||
* contained in frame.
|
||||
*
|
||||
* @param perms permissions to assign to the new buffer reference
|
||||
*/
|
||||
AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
|
||||
|
||||
/**
|
||||
* Fill an AVFrame with the information stored in picref.
|
||||
*
|
||||
* @param frame an already allocated AVFrame
|
||||
* @param picref a video buffer reference
|
||||
* @return 0 in case of success, a negative AVERROR code in case of
|
||||
* failure
|
||||
*/
|
||||
int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
|
||||
const AVFilterBufferRef *picref);
|
||||
|
||||
/**
|
||||
* Add frame data to buffer_src.
|
||||
*
|
||||
* @param buffer_src pointer to a buffer source context
|
||||
* @param flags a combination of AV_VSRC_BUF_FLAG_* flags
|
||||
* @return >= 0 in case of success, a negative AVERROR code in case of
|
||||
* failure
|
||||
*/
|
||||
int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src,
|
||||
const AVFrame *frame, int flags);
|
||||
|
||||
#endif /* AVFILTER_AVCODEC_H */
|
||||
@@ -1,948 +0,0 @@
|
||||
/*
|
||||
* filter layer
|
||||
* Copyright (c) 2007 Bobby Bingham
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_AVFILTER_H
|
||||
#define AVFILTER_AVFILTER_H
|
||||
|
||||
#include "libavutil/avutil.h"
|
||||
#include "libavutil/log.h"
|
||||
#include "libavutil/samplefmt.h"
|
||||
#include "libavutil/pixfmt.h"
|
||||
#include "libavutil/rational.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
|
||||
|
||||
#ifndef FF_API_OLD_VSINK_API
|
||||
#define FF_API_OLD_VSINK_API (LIBAVFILTER_VERSION_MAJOR < 3)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_ALL_FORMATS_API
|
||||
#define FF_API_OLD_ALL_FORMATS_API (LIBAVFILTER_VERSION_MAJOR < 3)
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "libavfilter/version.h"
|
||||
|
||||
/**
|
||||
* Return the LIBAVFILTER_VERSION_INT constant.
|
||||
*/
|
||||
unsigned avfilter_version(void);
|
||||
|
||||
/**
|
||||
* Return the libavfilter build-time configuration.
|
||||
*/
|
||||
const char *avfilter_configuration(void);
|
||||
|
||||
/**
|
||||
* Return the libavfilter license.
|
||||
*/
|
||||
const char *avfilter_license(void);
|
||||
|
||||
|
||||
typedef struct AVFilterContext AVFilterContext;
|
||||
typedef struct AVFilterLink AVFilterLink;
|
||||
typedef struct AVFilterPad AVFilterPad;
|
||||
|
||||
/**
|
||||
* A reference-counted buffer data type used by the filter system. Filters
|
||||
* should not store pointers to this structure directly, but instead use the
|
||||
* AVFilterBufferRef structure below.
|
||||
*/
|
||||
typedef struct AVFilterBuffer {
|
||||
uint8_t *data[8]; ///< buffer data for each plane/channel
|
||||
int linesize[8]; ///< number of bytes per line
|
||||
|
||||
unsigned refcount; ///< number of references to this buffer
|
||||
|
||||
/** private data to be used by a custom free function */
|
||||
void *priv;
|
||||
/**
|
||||
* A pointer to the function to deallocate this buffer if the default
|
||||
* function is not sufficient. This could, for example, add the memory
|
||||
* back into a memory pool to be reused later without the overhead of
|
||||
* reallocating it from scratch.
|
||||
*/
|
||||
void (*free)(struct AVFilterBuffer *buf);
|
||||
|
||||
int format; ///< media format
|
||||
int w, h; ///< width and height of the allocated buffer
|
||||
} AVFilterBuffer;
|
||||
|
||||
#define AV_PERM_READ 0x01 ///< can read from the buffer
|
||||
#define AV_PERM_WRITE 0x02 ///< can write to the buffer
|
||||
#define AV_PERM_PRESERVE 0x04 ///< nobody else can overwrite the buffer
|
||||
#define AV_PERM_REUSE 0x08 ///< can output the buffer multiple times, with the same contents each time
|
||||
#define AV_PERM_REUSE2 0x10 ///< can output the buffer multiple times, modified each time
|
||||
#define AV_PERM_NEG_LINESIZES 0x20 ///< the buffer requested can have negative linesizes
|
||||
#define AV_PERM_ALIGN 0x40 ///< the buffer must be aligned
|
||||
|
||||
#define AVFILTER_ALIGN 16 //not part of ABI
|
||||
|
||||
/**
|
||||
* Audio specific properties in a reference to an AVFilterBuffer. Since
|
||||
* AVFilterBufferRef is common to different media formats, audio specific
|
||||
* per reference properties must be separated out.
|
||||
*/
|
||||
typedef struct AVFilterBufferRefAudioProps {
|
||||
uint64_t channel_layout; ///< channel layout of audio buffer
|
||||
int nb_samples; ///< number of audio samples per channel
|
||||
int sample_rate; ///< audio buffer sample rate
|
||||
int planar; ///< audio buffer - planar or packed
|
||||
} AVFilterBufferRefAudioProps;
|
||||
|
||||
/**
|
||||
* Video specific properties in a reference to an AVFilterBuffer. Since
|
||||
* AVFilterBufferRef is common to different media formats, video specific
|
||||
* per reference properties must be separated out.
|
||||
*/
|
||||
typedef struct AVFilterBufferRefVideoProps {
|
||||
int w; ///< image width
|
||||
int h; ///< image height
|
||||
AVRational sample_aspect_ratio; ///< sample aspect ratio
|
||||
int interlaced; ///< is frame interlaced
|
||||
int top_field_first; ///< field order
|
||||
enum AVPictureType pict_type; ///< picture type of the frame
|
||||
int key_frame; ///< 1 -> keyframe, 0-> not
|
||||
} AVFilterBufferRefVideoProps;
|
||||
|
||||
/**
|
||||
* A reference to an AVFilterBuffer. Since filters can manipulate the origin of
|
||||
* a buffer to, for example, crop image without any memcpy, the buffer origin
|
||||
* and dimensions are per-reference properties. Linesize is also useful for
|
||||
* image flipping, frame to field filters, etc, and so is also per-reference.
|
||||
*
|
||||
* TODO: add anything necessary for frame reordering
|
||||
*/
|
||||
typedef struct AVFilterBufferRef {
|
||||
AVFilterBuffer *buf; ///< the buffer that this is a reference to
|
||||
uint8_t *data[8]; ///< picture/audio data for each plane
|
||||
int linesize[8]; ///< number of bytes per line
|
||||
int format; ///< media format
|
||||
|
||||
/**
|
||||
* presentation timestamp. The time unit may change during
|
||||
* filtering, as it is specified in the link and the filter code
|
||||
* may need to rescale the PTS accordingly.
|
||||
*/
|
||||
int64_t pts;
|
||||
int64_t pos; ///< byte position in stream, -1 if unknown
|
||||
|
||||
int perms; ///< permissions, see the AV_PERM_* flags
|
||||
|
||||
enum AVMediaType type; ///< media type of buffer data
|
||||
AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
|
||||
AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
|
||||
} AVFilterBufferRef;
|
||||
|
||||
/**
|
||||
* Copy properties of src to dst, without copying the actual data
|
||||
*/
|
||||
static inline void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
|
||||
{
|
||||
// copy common properties
|
||||
dst->pts = src->pts;
|
||||
dst->pos = src->pos;
|
||||
|
||||
switch (src->type) {
|
||||
case AVMEDIA_TYPE_VIDEO: *dst->video = *src->video; break;
|
||||
case AVMEDIA_TYPE_AUDIO: *dst->audio = *src->audio; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new reference to a buffer.
|
||||
*
|
||||
* @param ref an existing reference to the buffer
|
||||
* @param pmask a bitmask containing the allowable permissions in the new
|
||||
* reference
|
||||
* @return a new reference to the buffer with the same properties as the
|
||||
* old, excluding any permissions denied by pmask
|
||||
*/
|
||||
AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask);
|
||||
|
||||
/**
|
||||
* Remove a reference to a buffer. If this is the last reference to the
|
||||
* buffer, the buffer itself is also automatically freed.
|
||||
*
|
||||
* @param ref reference to the buffer, may be NULL
|
||||
*/
|
||||
void avfilter_unref_buffer(AVFilterBufferRef *ref);
|
||||
|
||||
/**
|
||||
* A list of supported formats for one end of a filter link. This is used
|
||||
* during the format negotiation process to try to pick the best format to
|
||||
* use to minimize the number of necessary conversions. Each filter gives a
|
||||
* list of the formats supported by each input and output pad. The list
|
||||
* given for each pad need not be distinct - they may be references to the
|
||||
* same list of formats, as is often the case when a filter supports multiple
|
||||
* formats, but will always output the same format as it is given in input.
|
||||
*
|
||||
* In this way, a list of possible input formats and a list of possible
|
||||
* output formats are associated with each link. When a set of formats is
|
||||
* negotiated over a link, the input and output lists are merged to form a
|
||||
* new list containing only the common elements of each list. In the case
|
||||
* that there were no common elements, a format conversion is necessary.
|
||||
* Otherwise, the lists are merged, and all other links which reference
|
||||
* either of the format lists involved in the merge are also affected.
|
||||
*
|
||||
* For example, consider the filter chain:
|
||||
* filter (a) --> (b) filter (b) --> (c) filter
|
||||
*
|
||||
* where the letters in parenthesis indicate a list of formats supported on
|
||||
* the input or output of the link. Suppose the lists are as follows:
|
||||
* (a) = {A, B}
|
||||
* (b) = {A, B, C}
|
||||
* (c) = {B, C}
|
||||
*
|
||||
* First, the first link's lists are merged, yielding:
|
||||
* filter (a) --> (a) filter (a) --> (c) filter
|
||||
*
|
||||
* Notice that format list (b) now refers to the same list as filter list (a).
|
||||
* Next, the lists for the second link are merged, yielding:
|
||||
* filter (a) --> (a) filter (a) --> (a) filter
|
||||
*
|
||||
* where (a) = {B}.
|
||||
*
|
||||
* Unfortunately, when the format lists at the two ends of a link are merged,
|
||||
* we must ensure that all links which reference either pre-merge format list
|
||||
* get updated as well. Therefore, we have the format list structure store a
|
||||
* pointer to each of the pointers to itself.
|
||||
*/
|
||||
typedef struct AVFilterFormats {
|
||||
unsigned format_count; ///< number of formats
|
||||
int64_t *formats; ///< list of media formats
|
||||
|
||||
unsigned refcount; ///< number of references to this list
|
||||
struct AVFilterFormats ***refs; ///< references to this list
|
||||
} AVFilterFormats;
|
||||
|
||||
/**
|
||||
* Create a list of supported formats. This is intended for use in
|
||||
* AVFilter->query_formats().
|
||||
*
|
||||
* @param fmts list of media formats, terminated by -1. If NULL an
|
||||
* empty list is created.
|
||||
* @return the format list, with no existing references
|
||||
*/
|
||||
AVFilterFormats *avfilter_make_format_list(const int *fmts);
|
||||
AVFilterFormats *avfilter_make_format64_list(const int64_t *fmts);
|
||||
|
||||
/**
|
||||
* Add fmt to the list of media formats contained in *avff.
|
||||
* If *avff is NULL the function allocates the filter formats struct
|
||||
* and puts its pointer in *avff.
|
||||
*
|
||||
* @return a non negative value in case of success, or a negative
|
||||
* value corresponding to an AVERROR code in case of error
|
||||
*/
|
||||
int avfilter_add_format(AVFilterFormats **avff, int64_t fmt);
|
||||
|
||||
#if FF_API_OLD_ALL_FORMATS_API
|
||||
/**
|
||||
* @deprecated Use avfilter_make_all_formats() instead.
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVFilterFormats *avfilter_all_formats(enum AVMediaType type);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return a list of all formats supported by FFmpeg for the given media type.
|
||||
*/
|
||||
AVFilterFormats *avfilter_make_all_formats(enum AVMediaType type);
|
||||
|
||||
/**
|
||||
* A list of all channel layouts supported by libavfilter.
|
||||
*/
|
||||
extern const int64_t avfilter_all_channel_layouts[];
|
||||
|
||||
/**
|
||||
* Return a list of all channel layouts supported by FFmpeg.
|
||||
*/
|
||||
AVFilterFormats *avfilter_make_all_channel_layouts(void);
|
||||
|
||||
/**
|
||||
* Return a list of all audio packing formats.
|
||||
*/
|
||||
AVFilterFormats *avfilter_make_all_packing_formats(void);
|
||||
|
||||
/**
|
||||
* Return a format list which contains the intersection of the formats of
|
||||
* a and b. Also, all the references of a, all the references of b, and
|
||||
* a and b themselves will be deallocated.
|
||||
*
|
||||
* If a and b do not share any common formats, neither is modified, and NULL
|
||||
* is returned.
|
||||
*/
|
||||
AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b);
|
||||
|
||||
/**
|
||||
* Add *ref as a new reference to formats.
|
||||
* That is the pointers will point like in the ASCII art below:
|
||||
* ________
|
||||
* |formats |<--------.
|
||||
* | ____ | ____|___________________
|
||||
* | |refs| | | __|_
|
||||
* | |* * | | | | | | AVFilterLink
|
||||
* | |* *--------->|*ref|
|
||||
* | |____| | | |____|
|
||||
* |________| |________________________
|
||||
*/
|
||||
void avfilter_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref);
|
||||
|
||||
/**
|
||||
* If *ref is non-NULL, remove *ref as a reference to the format list
|
||||
* it currently points to, deallocates that list if this was the last
|
||||
* reference, and sets *ref to NULL.
|
||||
*
|
||||
* Before After
|
||||
* ________ ________ NULL
|
||||
* |formats |<--------. |formats | ^
|
||||
* | ____ | ____|________________ | ____ | ____|________________
|
||||
* | |refs| | | __|_ | |refs| | | __|_
|
||||
* | |* * | | | | | | AVFilterLink | |* * | | | | | | AVFilterLink
|
||||
* | |* *--------->|*ref| | |* | | | |*ref|
|
||||
* | |____| | | |____| | |____| | | |____|
|
||||
* |________| |_____________________ |________| |_____________________
|
||||
*/
|
||||
void avfilter_formats_unref(AVFilterFormats **ref);
|
||||
|
||||
/**
|
||||
*
|
||||
* Before After
|
||||
* ________ ________
|
||||
* |formats |<---------. |formats |<---------.
|
||||
* | ____ | ___|___ | ____ | ___|___
|
||||
* | |refs| | | | | | |refs| | | | | NULL
|
||||
* | |* *--------->|*oldref| | |* *--------->|*newref| ^
|
||||
* | |* * | | |_______| | |* * | | |_______| ___|___
|
||||
* | |____| | | |____| | | | |
|
||||
* |________| |________| |*oldref|
|
||||
* |_______|
|
||||
*/
|
||||
void avfilter_formats_changeref(AVFilterFormats **oldref,
|
||||
AVFilterFormats **newref);
|
||||
|
||||
/**
|
||||
* A filter pad used for either input or output.
|
||||
*/
|
||||
struct AVFilterPad {
|
||||
/**
|
||||
* Pad name. The name is unique among inputs and among outputs, but an
|
||||
* input may have the same name as an output. This may be NULL if this
|
||||
* pad has no need to ever be referenced by name.
|
||||
*/
|
||||
const char *name;
|
||||
|
||||
/**
|
||||
* AVFilterPad type. Can be AVMEDIA_TYPE_VIDEO or AVMEDIA_TYPE_AUDIO.
|
||||
*/
|
||||
enum AVMediaType type;
|
||||
|
||||
/**
|
||||
* Minimum required permissions on incoming buffers. Any buffer with
|
||||
* insufficient permissions will be automatically copied by the filter
|
||||
* system to a new buffer which provides the needed access permissions.
|
||||
*
|
||||
* Input pads only.
|
||||
*/
|
||||
int min_perms;
|
||||
|
||||
/**
|
||||
* Permissions which are not accepted on incoming buffers. Any buffer
|
||||
* which has any of these permissions set will be automatically copied
|
||||
* by the filter system to a new buffer which does not have those
|
||||
* permissions. This can be used to easily disallow buffers with
|
||||
* AV_PERM_REUSE.
|
||||
*
|
||||
* Input pads only.
|
||||
*/
|
||||
int rej_perms;
|
||||
|
||||
/**
|
||||
* Callback called before passing the first slice of a new frame. If
|
||||
* NULL, the filter layer will default to storing a reference to the
|
||||
* picture inside the link structure.
|
||||
*
|
||||
* Input video pads only.
|
||||
*/
|
||||
void (*start_frame)(AVFilterLink *link, AVFilterBufferRef *picref);
|
||||
|
||||
/**
|
||||
* Callback function to get a video buffer. If NULL, the filter system will
|
||||
* use avfilter_default_get_video_buffer().
|
||||
*
|
||||
* Input video pads only.
|
||||
*/
|
||||
AVFilterBufferRef *(*get_video_buffer)(AVFilterLink *link, int perms, int w, int h);
|
||||
|
||||
/**
|
||||
* Callback function to get an audio buffer. If NULL, the filter system will
|
||||
* use avfilter_default_get_audio_buffer().
|
||||
*
|
||||
* Input audio pads only.
|
||||
*/
|
||||
AVFilterBufferRef *(*get_audio_buffer)(AVFilterLink *link, int perms, int nb_samples);
|
||||
|
||||
/**
|
||||
* Callback called after the slices of a frame are completely sent. If
|
||||
* NULL, the filter layer will default to releasing the reference stored
|
||||
* in the link structure during start_frame().
|
||||
*
|
||||
* Input video pads only.
|
||||
*/
|
||||
void (*end_frame)(AVFilterLink *link);
|
||||
|
||||
/**
|
||||
* Slice drawing callback. This is where a filter receives video data
|
||||
* and should do its processing.
|
||||
*
|
||||
* Input video pads only.
|
||||
*/
|
||||
void (*draw_slice)(AVFilterLink *link, int y, int height, int slice_dir);
|
||||
|
||||
/**
|
||||
* Samples filtering callback. This is where a filter receives audio data
|
||||
* and should do its processing.
|
||||
*
|
||||
* Input audio pads only.
|
||||
*/
|
||||
void (*filter_samples)(AVFilterLink *link, AVFilterBufferRef *samplesref);
|
||||
|
||||
/**
|
||||
* Frame poll callback. This returns the number of immediately available
|
||||
* samples. It should return a positive value if the next request_frame()
|
||||
* is guaranteed to return one frame (with no delay).
|
||||
*
|
||||
* Defaults to just calling the source poll_frame() method.
|
||||
*
|
||||
* Output video pads only.
|
||||
*/
|
||||
int (*poll_frame)(AVFilterLink *link);
|
||||
|
||||
/**
|
||||
* Frame request callback. A call to this should result in at least one
|
||||
* frame being output over the given link. This should return zero on
|
||||
* success, and another value on error.
|
||||
*
|
||||
* Output video pads only.
|
||||
*/
|
||||
int (*request_frame)(AVFilterLink *link);
|
||||
|
||||
/**
|
||||
* Link configuration callback.
|
||||
*
|
||||
* For output pads, this should set the following link properties:
|
||||
* video: width, height, sample_aspect_ratio, time_base
|
||||
* audio: sample_rate.
|
||||
*
|
||||
* This should NOT set properties such as format, channel_layout, etc which
|
||||
* are negotiated between filters by the filter system using the
|
||||
* query_formats() callback before this function is called.
|
||||
*
|
||||
* For input pads, this should check the properties of the link, and update
|
||||
* the filter's internal state as necessary.
|
||||
*
|
||||
* For both input and output pads, this should return zero on success,
|
||||
* and another value on error.
|
||||
*/
|
||||
int (*config_props)(AVFilterLink *link);
|
||||
};
|
||||
|
||||
/** default handler for start_frame() for video inputs */
|
||||
void avfilter_default_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
|
||||
|
||||
/** default handler for draw_slice() for video inputs */
|
||||
void avfilter_default_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
|
||||
|
||||
/** default handler for end_frame() for video inputs */
|
||||
void avfilter_default_end_frame(AVFilterLink *link);
|
||||
|
||||
/** default handler for filter_samples() for audio inputs */
|
||||
void avfilter_default_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref);
|
||||
|
||||
/** default handler for get_video_buffer() for video inputs */
|
||||
AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link,
|
||||
int perms, int w, int h);
|
||||
|
||||
/** default handler for get_audio_buffer() for audio inputs */
|
||||
AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link,
|
||||
int perms, int nb_samples);
|
||||
|
||||
/**
|
||||
* Helpers for query_formats() which set all links to the same list of
|
||||
* formats/layouts. If there are no links hooked to this filter, the list
|
||||
* of formats is freed.
|
||||
*/
|
||||
void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats);
|
||||
void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats);
|
||||
void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats);
|
||||
void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats);
|
||||
|
||||
/** Default handler for query_formats() */
|
||||
int avfilter_default_query_formats(AVFilterContext *ctx);
|
||||
|
||||
/** start_frame() handler for filters which simply pass video along */
|
||||
void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
|
||||
|
||||
/** draw_slice() handler for filters which simply pass video along */
|
||||
void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
|
||||
|
||||
/** end_frame() handler for filters which simply pass video along */
|
||||
void avfilter_null_end_frame(AVFilterLink *link);
|
||||
|
||||
/** filter_samples() handler for filters which simply pass audio along */
|
||||
void avfilter_null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref);
|
||||
|
||||
/** get_video_buffer() handler for filters which simply pass video along */
|
||||
AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link,
|
||||
int perms, int w, int h);
|
||||
|
||||
/** get_audio_buffer() handler for filters which simply pass audio along */
|
||||
AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link,
|
||||
int perms, int nb_samples);
|
||||
|
||||
/**
|
||||
* Filter definition. This defines the pads a filter contains, and all the
|
||||
* callback functions used to interact with the filter.
|
||||
*/
|
||||
typedef struct AVFilter {
|
||||
const char *name; ///< filter name
|
||||
|
||||
int priv_size; ///< size of private data to allocate for the filter
|
||||
|
||||
/**
|
||||
* Filter initialization function. Args contains the user-supplied
|
||||
* parameters. FIXME: maybe an AVOption-based system would be better?
|
||||
* opaque is data provided by the code requesting creation of the filter,
|
||||
* and is used to pass data to the filter.
|
||||
*/
|
||||
int (*init)(AVFilterContext *ctx, const char *args, void *opaque);
|
||||
|
||||
/**
|
||||
* Filter uninitialization function. Should deallocate any memory held
|
||||
* by the filter, release any buffer references, etc. This does not need
|
||||
* to deallocate the AVFilterContext->priv memory itself.
|
||||
*/
|
||||
void (*uninit)(AVFilterContext *ctx);
|
||||
|
||||
/**
|
||||
* Queries formats/layouts supported by the filter and its pads, and sets
|
||||
* the in_formats/in_chlayouts for links connected to its output pads,
|
||||
* and out_formats/out_chlayouts for links connected to its input pads.
|
||||
*
|
||||
* @return zero on success, a negative value corresponding to an
|
||||
* AVERROR code otherwise
|
||||
*/
|
||||
int (*query_formats)(AVFilterContext *);
|
||||
|
||||
const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none
|
||||
const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
|
||||
|
||||
/**
|
||||
* A description for the filter. You should use the
|
||||
* NULL_IF_CONFIG_SMALL() macro to define it.
|
||||
*/
|
||||
const char *description;
|
||||
|
||||
/**
|
||||
* Make the filter instance process a command.
|
||||
*
|
||||
* @param cmd the command to process, for handling simplicity all commands must be alphanumeric only
|
||||
* @param arg the argument for the command
|
||||
* @param res a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported.
|
||||
* @param flags if AVFILTER_CMD_FLAG_FAST is set and the command would be
|
||||
* time consuming then a filter should treat it like an unsupported command
|
||||
*
|
||||
* @returns >=0 on success otherwise an error code.
|
||||
* AVERROR(ENOSYS) on unsupported commands
|
||||
*/
|
||||
int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
|
||||
} AVFilter;
|
||||
|
||||
/** An instance of a filter */
|
||||
struct AVFilterContext {
|
||||
const AVClass *av_class; ///< needed for av_log()
|
||||
|
||||
AVFilter *filter; ///< the AVFilter of which this is an instance
|
||||
|
||||
char *name; ///< name of this filter instance
|
||||
|
||||
unsigned input_count; ///< number of input pads
|
||||
AVFilterPad *input_pads; ///< array of input pads
|
||||
AVFilterLink **inputs; ///< array of pointers to input links
|
||||
|
||||
unsigned output_count; ///< number of output pads
|
||||
AVFilterPad *output_pads; ///< array of output pads
|
||||
AVFilterLink **outputs; ///< array of pointers to output links
|
||||
|
||||
void *priv; ///< private data for use by the filter
|
||||
|
||||
struct AVFilterCommand *command_queue;
|
||||
};
|
||||
|
||||
enum AVFilterPacking {
|
||||
AVFILTER_PACKED = 0,
|
||||
AVFILTER_PLANAR,
|
||||
};
|
||||
|
||||
/**
|
||||
* A link between two filters. This contains pointers to the source and
|
||||
* destination filters between which this link exists, and the indexes of
|
||||
* the pads involved. In addition, this link also contains the parameters
|
||||
* which have been negotiated and agreed upon between the filter, such as
|
||||
* image dimensions, format, etc.
|
||||
*/
|
||||
struct AVFilterLink {
|
||||
AVFilterContext *src; ///< source filter
|
||||
AVFilterPad *srcpad; ///< output pad on the source filter
|
||||
|
||||
AVFilterContext *dst; ///< dest filter
|
||||
AVFilterPad *dstpad; ///< input pad on the dest filter
|
||||
|
||||
/** stage of the initialization of the link properties (dimensions, etc) */
|
||||
enum {
|
||||
AVLINK_UNINIT = 0, ///< not started
|
||||
AVLINK_STARTINIT, ///< started, but incomplete
|
||||
AVLINK_INIT ///< complete
|
||||
} init_state;
|
||||
|
||||
enum AVMediaType type; ///< filter media type
|
||||
|
||||
/* These parameters apply only to video */
|
||||
int w; ///< agreed upon image width
|
||||
int h; ///< agreed upon image height
|
||||
AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
|
||||
/* These parameters apply only to audio */
|
||||
uint64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h)
|
||||
#if LIBAVFILTER_VERSION_MAJOR < 3
|
||||
int64_t sample_rate; ///< samples per second
|
||||
#else
|
||||
int sample_rate; ///< samples per second
|
||||
#endif
|
||||
int planar; ///< agreed upon packing mode of audio buffers. true if planar.
|
||||
|
||||
int format; ///< agreed upon media format
|
||||
|
||||
/**
|
||||
* Lists of formats and channel layouts supported by the input and output
|
||||
* filters respectively. These lists are used for negotiating the format
|
||||
* to actually be used, which will be loaded into the format and
|
||||
* channel_layout members, above, when chosen.
|
||||
*
|
||||
*/
|
||||
AVFilterFormats *in_formats;
|
||||
AVFilterFormats *out_formats;
|
||||
|
||||
AVFilterFormats *in_chlayouts;
|
||||
AVFilterFormats *out_chlayouts;
|
||||
AVFilterFormats *in_packing;
|
||||
AVFilterFormats *out_packing;
|
||||
|
||||
/**
|
||||
* The buffer reference currently being sent across the link by the source
|
||||
* filter. This is used internally by the filter system to allow
|
||||
* automatic copying of buffers which do not have sufficient permissions
|
||||
* for the destination. This should not be accessed directly by the
|
||||
* filters.
|
||||
*/
|
||||
AVFilterBufferRef *src_buf;
|
||||
|
||||
AVFilterBufferRef *cur_buf;
|
||||
AVFilterBufferRef *out_buf;
|
||||
|
||||
/**
|
||||
* Define the time base used by the PTS of the frames/samples
|
||||
* which will pass through this link.
|
||||
* During the configuration stage, each filter is supposed to
|
||||
* change only the output timebase, while the timebase of the
|
||||
* input link is assumed to be an unchangeable property.
|
||||
*/
|
||||
AVRational time_base;
|
||||
|
||||
struct AVFilterPool *pool;
|
||||
};
|
||||
|
||||
/**
|
||||
* Link two filters together.
|
||||
*
|
||||
* @param src the source filter
|
||||
* @param srcpad index of the output pad on the source filter
|
||||
* @param dst the destination filter
|
||||
* @param dstpad index of the input pad on the destination filter
|
||||
* @return zero on success
|
||||
*/
|
||||
int avfilter_link(AVFilterContext *src, unsigned srcpad,
|
||||
AVFilterContext *dst, unsigned dstpad);
|
||||
|
||||
/**
|
||||
* Free the link in *link, and set its pointer to NULL.
|
||||
*/
|
||||
void avfilter_link_free(AVFilterLink **link);
|
||||
|
||||
/**
|
||||
* Negotiate the media format, dimensions, etc of all inputs to a filter.
|
||||
*
|
||||
* @param filter the filter to negotiate the properties for its inputs
|
||||
* @return zero on successful negotiation
|
||||
*/
|
||||
int avfilter_config_links(AVFilterContext *filter);
|
||||
|
||||
/**
|
||||
* Request a picture buffer with a specific set of permissions.
|
||||
*
|
||||
* @param link the output link to the filter from which the buffer will
|
||||
* be requested
|
||||
* @param perms the required access permissions
|
||||
* @param w the minimum width of the buffer to allocate
|
||||
* @param h the minimum height of the buffer to allocate
|
||||
* @return A reference to the buffer. This must be unreferenced with
|
||||
* avfilter_unref_buffer when you are finished with it.
|
||||
*/
|
||||
AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms,
|
||||
int w, int h);
|
||||
|
||||
/**
|
||||
* Create a buffer reference wrapped around an already allocated image
|
||||
* buffer.
|
||||
*
|
||||
* @param data pointers to the planes of the image to reference
|
||||
* @param linesize linesizes for the planes of the image to reference
|
||||
* @param perms the required access permissions
|
||||
* @param w the width of the image specified by the data and linesize arrays
|
||||
* @param h the height of the image specified by the data and linesize arrays
|
||||
* @param format the pixel format of the image specified by the data and linesize arrays
|
||||
*/
|
||||
AVFilterBufferRef *
|
||||
avfilter_get_video_buffer_ref_from_arrays(uint8_t * const data[4], const int linesize[4], int perms,
|
||||
int w, int h, enum PixelFormat format);
|
||||
|
||||
/**
|
||||
* Request an audio samples buffer with a specific set of permissions.
|
||||
*
|
||||
* @param link the output link to the filter from which the buffer will
|
||||
* be requested
|
||||
* @param perms the required access permissions
|
||||
* @param nb_samples the number of samples per channel
|
||||
* @return A reference to the samples. This must be unreferenced with
|
||||
* avfilter_unref_buffer when you are finished with it.
|
||||
*/
|
||||
AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms,
|
||||
int nb_samples);
|
||||
|
||||
/**
|
||||
* Create an audio buffer reference wrapped around an already
|
||||
* allocated samples buffer.
|
||||
*
|
||||
* @param data pointers to the samples plane buffers
|
||||
* @param linesize linesize for the samples plane buffers
|
||||
* @param perms the required access permissions
|
||||
* @param nb_samples number of samples per channel
|
||||
* @param sample_fmt the format of each sample in the buffer to allocate
|
||||
* @param channel_layout the channel layout of the buffer
|
||||
* @param planar audio data layout - planar or packed
|
||||
*/
|
||||
AVFilterBufferRef *
|
||||
avfilter_get_audio_buffer_ref_from_arrays(uint8_t *data[8], int linesize[8], int perms,
|
||||
int nb_samples, enum AVSampleFormat sample_fmt,
|
||||
uint64_t channel_layout, int planar);
|
||||
/**
|
||||
* Request an input frame from the filter at the other end of the link.
|
||||
*
|
||||
* @param link the input link
|
||||
* @return zero on success
|
||||
*/
|
||||
int avfilter_request_frame(AVFilterLink *link);
|
||||
|
||||
/**
|
||||
* Poll a frame from the filter chain.
|
||||
*
|
||||
* @param link the input link
|
||||
* @return the number of immediately available frames, a negative
|
||||
* number in case of error
|
||||
*/
|
||||
int avfilter_poll_frame(AVFilterLink *link);
|
||||
|
||||
/**
|
||||
* Notify the next filter of the start of a frame.
|
||||
*
|
||||
* @param link the output link the frame will be sent over
|
||||
* @param picref A reference to the frame about to be sent. The data for this
|
||||
* frame need only be valid once draw_slice() is called for that
|
||||
* portion. The receiving filter will free this reference when
|
||||
* it no longer needs it.
|
||||
*/
|
||||
void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
|
||||
|
||||
/**
|
||||
* Notify the next filter that the current frame has finished.
|
||||
*
|
||||
* @param link the output link the frame was sent over
|
||||
*/
|
||||
void avfilter_end_frame(AVFilterLink *link);
|
||||
|
||||
/**
|
||||
* Send a slice to the next filter.
|
||||
*
|
||||
* Slices have to be provided in sequential order, either in
|
||||
* top-bottom or bottom-top order. If slices are provided in
|
||||
* non-sequential order the behavior of the function is undefined.
|
||||
*
|
||||
* @param link the output link over which the frame is being sent
|
||||
* @param y offset in pixels from the top of the image for this slice
|
||||
* @param h height of this slice in pixels
|
||||
* @param slice_dir the assumed direction for sending slices,
|
||||
* from the top slice to the bottom slice if the value is 1,
|
||||
* from the bottom slice to the top slice if the value is -1,
|
||||
* for other values the behavior of the function is undefined.
|
||||
*/
|
||||
void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
|
||||
|
||||
#define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically
|
||||
#define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw)
|
||||
|
||||
/**
|
||||
* Make the filter instance process a command.
|
||||
* It is recommended to use avfilter_graph_send_command().
|
||||
*/
|
||||
int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags);
|
||||
|
||||
/**
|
||||
* Send a buffer of audio samples to the next filter.
|
||||
*
|
||||
* @param link the output link over which the audio samples are being sent
|
||||
* @param samplesref a reference to the buffer of audio samples being sent. The
|
||||
* receiving filter will free this reference when it no longer
|
||||
* needs it or pass it on to the next filter.
|
||||
*/
|
||||
void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref);
|
||||
|
||||
/** Initialize the filter system. Register all built-in filters. */
|
||||
void avfilter_register_all(void);
|
||||
|
||||
/** Uninitialize the filter system. Unregister all filters. */
|
||||
void avfilter_uninit(void);
|
||||
|
||||
/**
|
||||
* Register a filter. This is only needed if you plan to use
|
||||
* avfilter_get_by_name later to lookup the AVFilter structure by name. A
|
||||
* filter can still by instantiated with avfilter_open even if it is not
|
||||
* registered.
|
||||
*
|
||||
* @param filter the filter to register
|
||||
* @return 0 if the registration was successful, a negative value
|
||||
* otherwise
|
||||
*/
|
||||
int avfilter_register(AVFilter *filter);
|
||||
|
||||
/**
|
||||
* Get a filter definition matching the given name.
|
||||
*
|
||||
* @param name the filter name to find
|
||||
* @return the filter definition, if any matching one is registered.
|
||||
* NULL if none found.
|
||||
*/
|
||||
AVFilter *avfilter_get_by_name(const char *name);
|
||||
|
||||
/**
|
||||
* If filter is NULL, returns a pointer to the first registered filter pointer,
|
||||
* if filter is non-NULL, returns the next pointer after filter.
|
||||
* If the returned pointer points to NULL, the last registered filter
|
||||
* was already reached.
|
||||
*/
|
||||
AVFilter **av_filter_next(AVFilter **filter);
|
||||
|
||||
/**
|
||||
* Create a filter instance.
|
||||
*
|
||||
* @param filter_ctx put here a pointer to the created filter context
|
||||
* on success, NULL on failure
|
||||
* @param filter the filter to create an instance of
|
||||
* @param inst_name Name to give to the new instance. Can be NULL for none.
|
||||
* @return >= 0 in case of success, a negative error code otherwise
|
||||
*/
|
||||
int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);
|
||||
|
||||
/**
|
||||
* Initialize a filter.
|
||||
*
|
||||
* @param filter the filter to initialize
|
||||
* @param args A string of parameters to use when initializing the filter.
|
||||
* The format and meaning of this string varies by filter.
|
||||
* @param opaque Any extra non-string data needed by the filter. The meaning
|
||||
* of this parameter varies by filter.
|
||||
* @return zero on success
|
||||
*/
|
||||
int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque);
|
||||
|
||||
/**
|
||||
* Free a filter context.
|
||||
*
|
||||
* @param filter the filter to free
|
||||
*/
|
||||
void avfilter_free(AVFilterContext *filter);
|
||||
|
||||
/**
|
||||
* Insert a filter in the middle of an existing link.
|
||||
*
|
||||
* @param link the link into which the filter should be inserted
|
||||
* @param filt the filter to be inserted
|
||||
* @param filt_srcpad_idx the input pad on the filter to connect
|
||||
* @param filt_dstpad_idx the output pad on the filter to connect
|
||||
* @return zero on success
|
||||
*/
|
||||
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
|
||||
unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);
|
||||
|
||||
/**
|
||||
* Insert a new pad.
|
||||
*
|
||||
* @param idx Insertion point. Pad is inserted at the end if this point
|
||||
* is beyond the end of the list of pads.
|
||||
* @param count Pointer to the number of pads in the list
|
||||
* @param padidx_off Offset within an AVFilterLink structure to the element
|
||||
* to increment when inserting a new pad causes link
|
||||
* numbering to change
|
||||
* @param pads Pointer to the pointer to the beginning of the list of pads
|
||||
* @param links Pointer to the pointer to the beginning of the list of links
|
||||
* @param newpad The new pad to add. A copy is made when adding.
|
||||
*/
|
||||
void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
|
||||
AVFilterPad **pads, AVFilterLink ***links,
|
||||
AVFilterPad *newpad);
|
||||
|
||||
/** Insert a new input pad for the filter. */
|
||||
static inline void avfilter_insert_inpad(AVFilterContext *f, unsigned index,
|
||||
AVFilterPad *p)
|
||||
{
|
||||
avfilter_insert_pad(index, &f->input_count, offsetof(AVFilterLink, dstpad),
|
||||
&f->input_pads, &f->inputs, p);
|
||||
}
|
||||
|
||||
/** Insert a new output pad for the filter. */
|
||||
static inline void avfilter_insert_outpad(AVFilterContext *f, unsigned index,
|
||||
AVFilterPad *p)
|
||||
{
|
||||
avfilter_insert_pad(index, &f->output_count, offsetof(AVFilterLink, srcpad),
|
||||
&f->output_pads, &f->outputs, p);
|
||||
}
|
||||
|
||||
#endif /* AVFILTER_AVFILTER_H */
|
||||
@@ -1,184 +0,0 @@
|
||||
/*
|
||||
* Filter graphs
|
||||
* copyright (c) 2007 Bobby Bingham
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_AVFILTERGRAPH_H
|
||||
#define AVFILTER_AVFILTERGRAPH_H
|
||||
|
||||
#include "avfilter.h"
|
||||
|
||||
typedef struct AVFilterGraph {
|
||||
unsigned filter_count;
|
||||
AVFilterContext **filters;
|
||||
|
||||
char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
|
||||
} AVFilterGraph;
|
||||
|
||||
/**
|
||||
* Allocate a filter graph.
|
||||
*/
|
||||
AVFilterGraph *avfilter_graph_alloc(void);
|
||||
|
||||
/**
|
||||
* Get a filter instance with name name from graph.
|
||||
*
|
||||
* @return the pointer to the found filter instance or NULL if it
|
||||
* cannot be found.
|
||||
*/
|
||||
AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name);
|
||||
|
||||
/**
|
||||
* Add an existing filter instance to a filter graph.
|
||||
*
|
||||
* @param graphctx the filter graph
|
||||
* @param filter the filter to be added
|
||||
*/
|
||||
int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);
|
||||
|
||||
/**
|
||||
* Create and add a filter instance into an existing graph.
|
||||
* The filter instance is created from the filter filt and inited
|
||||
* with the parameters args and opaque.
|
||||
*
|
||||
* In case of success put in *filt_ctx the pointer to the created
|
||||
* filter instance, otherwise set *filt_ctx to NULL.
|
||||
*
|
||||
* @param name the instance name to give to the created filter instance
|
||||
* @param graph_ctx the filter graph
|
||||
* @return a negative AVERROR error code in case of failure, a non
|
||||
* negative value otherwise
|
||||
*/
|
||||
int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,
|
||||
const char *name, const char *args, void *opaque,
|
||||
AVFilterGraph *graph_ctx);
|
||||
|
||||
/**
|
||||
* Check validity and configure all the links and formats in the graph.
|
||||
*
|
||||
* @param graphctx the filter graph
|
||||
* @param log_ctx context used for logging
|
||||
* @return 0 in case of success, a negative AVERROR code otherwise
|
||||
*/
|
||||
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx);
|
||||
|
||||
/**
|
||||
* Free a graph, destroy its links, and set *graph to NULL.
|
||||
* If *graph is NULL, do nothing.
|
||||
*/
|
||||
void avfilter_graph_free(AVFilterGraph **graph);
|
||||
|
||||
/**
|
||||
* A linked-list of the inputs/outputs of the filter chain.
|
||||
*
|
||||
* This is mainly useful for avfilter_graph_parse(), since this
|
||||
* function may accept a description of a graph with not connected
|
||||
* input/output pads. This struct specifies, per each not connected
|
||||
* pad contained in the graph, the filter context and the pad index
|
||||
* required for establishing a link.
|
||||
*/
|
||||
typedef struct AVFilterInOut {
|
||||
/** unique name for this input/output in the list */
|
||||
char *name;
|
||||
|
||||
/** filter context associated to this input/output */
|
||||
AVFilterContext *filter_ctx;
|
||||
|
||||
/** index of the filt_ctx pad to use for linking */
|
||||
int pad_idx;
|
||||
|
||||
/** next input/input in the list, NULL if this is the last */
|
||||
struct AVFilterInOut *next;
|
||||
} AVFilterInOut;
|
||||
|
||||
/**
|
||||
* Create an AVFilterInOut.
|
||||
* Must be free with avfilter_inout_free().
|
||||
*/
|
||||
AVFilterInOut *avfilter_inout_alloc(void);
|
||||
|
||||
/**
|
||||
* Free the AVFilterInOut in *inout, and set its pointer to NULL.
|
||||
* If *inout is NULL, do nothing.
|
||||
*/
|
||||
void avfilter_inout_free(AVFilterInOut **inout);
|
||||
|
||||
/**
|
||||
* Add a graph described by a string to a graph.
|
||||
*
|
||||
* @param graph the filter graph where to link the parsed graph context
|
||||
* @param filters string to be parsed
|
||||
* @param inputs pointer to a linked list to the inputs of the graph, may be NULL.
|
||||
* If non-NULL, *inputs is updated to contain the list of open inputs
|
||||
* after the parsing, should be freed with avfilter_inout_free().
|
||||
* @param outputs pointer to a linked list to the outputs of the graph, may be NULL.
|
||||
* If non-NULL, *outputs is updated to contain the list of open outputs
|
||||
* after the parsing, should be freed with avfilter_inout_free().
|
||||
* @return non negative on success, a negative AVERROR code on error
|
||||
*/
|
||||
int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
|
||||
AVFilterInOut **inputs, AVFilterInOut **outputs,
|
||||
void *log_ctx);
|
||||
|
||||
/**
|
||||
* Send a command to one or more filter instances.
|
||||
*
|
||||
* @param graph the filter graph
|
||||
* @param target the filter(s) to which the command should be sent
|
||||
* "all" sends to all filters
|
||||
* otherwise it can be a filter or filter instance name
|
||||
* which will send the command to all matching filters.
|
||||
* @param cmd the command to sent, for handling simplicity all commands must be alphanumeric only
|
||||
* @param arg the argument for the command
|
||||
* @param res a buffer with size res_size where the filter(s) can return a response.
|
||||
*
|
||||
* @returns >=0 on success otherwise an error code.
|
||||
* AVERROR(ENOSYS) on unsupported commands
|
||||
*/
|
||||
int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags);
|
||||
|
||||
/**
|
||||
* Queue a command for one or more filter instances.
|
||||
*
|
||||
* @param graph the filter graph
|
||||
* @param target the filter(s) to which the command should be sent
|
||||
* "all" sends to all filters
|
||||
* otherwise it can be a filter or filter instance name
|
||||
* which will send the command to all matching filters.
|
||||
* @param cmd the command to sent, for handling simplicity all commands must be alphanummeric only
|
||||
* @param arg the argument for the command
|
||||
* @param ts time at which the command should be sent to the filter
|
||||
*
|
||||
* @note As this executes commands after this function returns, no return code
|
||||
* from the filter is provided, also AVFILTER_CMD_FLAG_ONE is not supported.
|
||||
*/
|
||||
int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, int flags, double ts);
|
||||
|
||||
|
||||
/**
|
||||
* Dump a graph into a human-readable string representation.
|
||||
*
|
||||
* @param graph the graph to dump
|
||||
* @param options formatting options; currently ignored
|
||||
* @return a string, or NULL in case of memory allocation failure;
|
||||
* the string must be freed using av_free
|
||||
*/
|
||||
char *avfilter_graph_dump(AVFilterGraph *graph, const char *options);
|
||||
|
||||
#endif /* AVFILTER_AVFILTERGRAPH_H */
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_VSINK_BUFFER_H
|
||||
#define AVFILTER_VSINK_BUFFER_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* memory buffer sink API for audio and video
|
||||
*/
|
||||
|
||||
#include "avfilter.h"
|
||||
|
||||
/**
|
||||
* Struct to use for initializing a buffersink context.
|
||||
*/
|
||||
typedef struct {
|
||||
const enum PixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by PIX_FMT_NONE
|
||||
} AVBufferSinkParams;
|
||||
|
||||
/**
|
||||
* Create an AVBufferSinkParams structure.
|
||||
*
|
||||
* Must be freed with av_free().
|
||||
*/
|
||||
AVBufferSinkParams *av_buffersink_params_alloc(void);
|
||||
|
||||
/**
|
||||
* Struct to use for initializing an abuffersink context.
|
||||
*/
|
||||
typedef struct {
|
||||
const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE
|
||||
const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1
|
||||
const int *packing_fmts; ///< list of allowed packing formats
|
||||
} AVABufferSinkParams;
|
||||
|
||||
/**
|
||||
* Create an AVABufferSinkParams structure.
|
||||
*
|
||||
* Must be freed with av_free().
|
||||
*/
|
||||
AVABufferSinkParams *av_abuffersink_params_alloc(void);
|
||||
|
||||
/**
|
||||
* Tell av_buffersink_get_buffer_ref() to read video/samples buffer
|
||||
* reference, but not remove it from the buffer. This is useful if you
|
||||
* need only to read a video/samples buffer, without to fetch it.
|
||||
*/
|
||||
#define AV_BUFFERSINK_FLAG_PEEK 1
|
||||
|
||||
/**
|
||||
* Get an audio/video buffer data from buffer_sink and put it in bufref.
|
||||
*
|
||||
* This function works with both audio and video buffer sinks.
|
||||
*
|
||||
* @param buffer_sink pointer to a buffersink or abuffersink context
|
||||
* @param flags a combination of AV_BUFFERSINK_FLAG_* flags
|
||||
* @return >= 0 in case of success, a negative AVERROR code in case of
|
||||
* failure
|
||||
*/
|
||||
int av_buffersink_get_buffer_ref(AVFilterContext *buffer_sink,
|
||||
AVFilterBufferRef **bufref, int flags);
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of immediately available frames.
|
||||
*/
|
||||
int av_buffersink_poll_frame(AVFilterContext *ctx);
|
||||
|
||||
#if FF_API_OLD_VSINK_API
|
||||
/**
|
||||
* @deprecated Use av_buffersink_get_buffer_ref() instead.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *buffer_sink,
|
||||
AVFilterBufferRef **picref, int flags);
|
||||
#endif
|
||||
|
||||
#endif /* AVFILTER_VSINK_BUFFER_H */
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Version macros.
|
||||
*
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* Libav 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* Libav 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 Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_VERSION_H
|
||||
#define AVFILTER_VERSION_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Libavfilter version macros
|
||||
*/
|
||||
|
||||
#include "libavutil/avutil.h"
|
||||
|
||||
#define LIBAVFILTER_VERSION_MAJOR 2
|
||||
#define LIBAVFILTER_VERSION_MINOR 61
|
||||
#define LIBAVFILTER_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||
LIBAVFILTER_VERSION_MINOR, \
|
||||
LIBAVFILTER_VERSION_MICRO)
|
||||
#define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \
|
||||
LIBAVFILTER_VERSION_MINOR, \
|
||||
LIBAVFILTER_VERSION_MICRO)
|
||||
#define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT
|
||||
|
||||
#endif // AVFILTER_VERSION_H
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008 Vitor Sessak
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_VSRC_BUFFER_H
|
||||
#define AVFILTER_VSRC_BUFFER_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* memory buffer source API for video
|
||||
*/
|
||||
|
||||
#include "avfilter.h"
|
||||
|
||||
/**
|
||||
* Tell av_vsrc_buffer_add_video_buffer_ref() to overwrite the already
|
||||
* cached video buffer with the new added one, otherwise the function
|
||||
* will complain and exit.
|
||||
*/
|
||||
#define AV_VSRC_BUF_FLAG_OVERWRITE 1
|
||||
|
||||
/**
|
||||
* Add video buffer data in picref to buffer_src.
|
||||
*
|
||||
* @param buffer_src pointer to a buffer source context
|
||||
* @param flags a combination of AV_VSRC_BUF_FLAG_* flags
|
||||
* @return >= 0 in case of success, a negative AVERROR code in case of
|
||||
* failure
|
||||
*/
|
||||
int av_vsrc_buffer_add_video_buffer_ref(AVFilterContext *buffer_src,
|
||||
AVFilterBufferRef *picref, int flags);
|
||||
|
||||
#endif /* AVFILTER_VSRC_BUFFER_H */
|
||||
@@ -1,695 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2001 Fabrice Bellard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#ifndef AVFORMAT_AVIO_H
|
||||
#define AVFORMAT_AVIO_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavf_io
|
||||
* Buffered I/O operations
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/common.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/log.h"
|
||||
|
||||
#include "libavformat/version.h"
|
||||
|
||||
|
||||
#define AVIO_SEEKABLE_NORMAL 0x0001 /**< Seeking works like for a local file */
|
||||
|
||||
/**
|
||||
* Callback for checking whether to abort blocking functions.
|
||||
* AVERROR_EXIT is returned in this case by the interrupted
|
||||
* function. During blocking operations, callback is called with
|
||||
* opaque as parameter. If the callback returns 1, the
|
||||
* blocking operation will be aborted.
|
||||
*
|
||||
* No members can be added to this struct without a major bump, if
|
||||
* new elements have been added after this struct in AVFormatContext
|
||||
* or AVIOContext.
|
||||
*/
|
||||
typedef struct {
|
||||
int (*callback)(void*);
|
||||
void *opaque;
|
||||
} AVIOInterruptCB;
|
||||
|
||||
/**
|
||||
* Bytestream IO Context.
|
||||
* New fields can be added to the end with minor version bumps.
|
||||
* Removal, reordering and changes to existing fields require a major
|
||||
* version bump.
|
||||
* sizeof(AVIOContext) must not be used outside libav*.
|
||||
*
|
||||
* @note None of the function pointers in AVIOContext should be called
|
||||
* directly, they should only be set by the client application
|
||||
* when implementing custom I/O. Normally these are set to the
|
||||
* function pointers specified in avio_alloc_context()
|
||||
*/
|
||||
typedef struct {
|
||||
#if !FF_API_OLD_AVIO
|
||||
/**
|
||||
* A class for private options.
|
||||
*
|
||||
* If this AVIOContext is created by avio_open2(), av_class is set and
|
||||
* passes the options down to protocols.
|
||||
*
|
||||
* If this AVIOContext is manually allocated, then av_class may be set by
|
||||
* the caller.
|
||||
*
|
||||
* warning -- this field can be NULL, be sure to not pass this AVIOContext
|
||||
* to any av_opt_* functions in that case.
|
||||
*/
|
||||
AVClass *av_class;
|
||||
#endif
|
||||
unsigned char *buffer; /**< Start of the buffer. */
|
||||
int buffer_size; /**< Maximum buffer size */
|
||||
unsigned char *buf_ptr; /**< Current position in the buffer */
|
||||
unsigned char *buf_end; /**< End of the data, may be less than
|
||||
buffer+buffer_size if the read function returned
|
||||
less data than requested, e.g. for streams where
|
||||
no more data has been received yet. */
|
||||
void *opaque; /**< A private pointer, passed to the read/write/seek/...
|
||||
functions. */
|
||||
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
|
||||
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
|
||||
int64_t (*seek)(void *opaque, int64_t offset, int whence);
|
||||
int64_t pos; /**< position in the file of the current buffer */
|
||||
int must_flush; /**< true if the next seek should flush */
|
||||
int eof_reached; /**< true if eof reached */
|
||||
int write_flag; /**< true if open for writing */
|
||||
#if FF_API_OLD_AVIO
|
||||
attribute_deprecated int is_streamed;
|
||||
#endif
|
||||
int max_packet_size;
|
||||
unsigned long checksum;
|
||||
unsigned char *checksum_ptr;
|
||||
unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
|
||||
int error; /**< contains the error code or 0 if no error happened */
|
||||
/**
|
||||
* Pause or resume playback for network streaming protocols - e.g. MMS.
|
||||
*/
|
||||
int (*read_pause)(void *opaque, int pause);
|
||||
/**
|
||||
* Seek to a given timestamp in stream with the specified stream_index.
|
||||
* Needed for some network streaming protocols which don't support seeking
|
||||
* to byte position.
|
||||
*/
|
||||
int64_t (*read_seek)(void *opaque, int stream_index,
|
||||
int64_t timestamp, int flags);
|
||||
/**
|
||||
* A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
|
||||
*/
|
||||
int seekable;
|
||||
|
||||
/**
|
||||
* max filesize, used to limit allocations
|
||||
* This field is internal to libavformat and access from outside is not allowed.
|
||||
*/
|
||||
int64_t maxsize;
|
||||
} AVIOContext;
|
||||
|
||||
/* unbuffered I/O */
|
||||
|
||||
#if FF_API_OLD_AVIO
|
||||
/**
|
||||
* URL Context.
|
||||
* New fields can be added to the end with minor version bumps.
|
||||
* Removal, reordering and changes to existing fields require a major
|
||||
* version bump.
|
||||
* sizeof(URLContext) must not be used outside libav*.
|
||||
* @deprecated This struct will be made private
|
||||
*/
|
||||
typedef struct URLContext {
|
||||
const AVClass *av_class; ///< information for av_log(). Set by url_open().
|
||||
struct URLProtocol *prot;
|
||||
int flags;
|
||||
int is_streamed; /**< true if streamed (no seek possible), default = false */
|
||||
int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */
|
||||
void *priv_data;
|
||||
char *filename; /**< specified URL */
|
||||
int is_connected;
|
||||
AVIOInterruptCB interrupt_callback;
|
||||
} URLContext;
|
||||
|
||||
#define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
|
||||
#define URL_PROTOCOL_FLAG_NETWORK 2 /*< The protocol uses network */
|
||||
|
||||
/**
|
||||
* @deprecated This struct is to be made private. Use the higher-level
|
||||
* AVIOContext-based API instead.
|
||||
*/
|
||||
typedef struct URLProtocol {
|
||||
const char *name;
|
||||
int (*url_open)(URLContext *h, const char *url, int flags);
|
||||
int (*url_read)(URLContext *h, unsigned char *buf, int size);
|
||||
int (*url_write)(URLContext *h, const unsigned char *buf, int size);
|
||||
int64_t (*url_seek)(URLContext *h, int64_t pos, int whence);
|
||||
int (*url_close)(URLContext *h);
|
||||
struct URLProtocol *next;
|
||||
int (*url_read_pause)(URLContext *h, int pause);
|
||||
int64_t (*url_read_seek)(URLContext *h, int stream_index,
|
||||
int64_t timestamp, int flags);
|
||||
int (*url_get_file_handle)(URLContext *h);
|
||||
int priv_data_size;
|
||||
const AVClass *priv_data_class;
|
||||
int flags;
|
||||
int (*url_check)(URLContext *h, int mask);
|
||||
} URLProtocol;
|
||||
|
||||
typedef struct URLPollEntry {
|
||||
URLContext *handle;
|
||||
int events;
|
||||
int revents;
|
||||
} URLPollEntry;
|
||||
|
||||
/* not implemented */
|
||||
attribute_deprecated int url_poll(URLPollEntry *poll_table, int n, int timeout);
|
||||
|
||||
/**
|
||||
* @name URL open modes
|
||||
* The flags argument to url_open and cosins must be one of the following
|
||||
* constants, optionally ORed with other flags.
|
||||
* @{
|
||||
*/
|
||||
#define URL_RDONLY 1 /**< read-only */
|
||||
#define URL_WRONLY 2 /**< write-only */
|
||||
#define URL_RDWR (URL_RDONLY|URL_WRONLY) /**< read-write */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Use non-blocking mode.
|
||||
* If this flag is set, operations on the context will return
|
||||
* AVERROR(EAGAIN) if they can not be performed immediately.
|
||||
* If this flag is not set, operations on the context will never return
|
||||
* AVERROR(EAGAIN).
|
||||
* Note that this flag does not affect the opening/connecting of the
|
||||
* context. Connecting a protocol will always block if necessary (e.g. on
|
||||
* network protocols) but never hang (e.g. on busy devices).
|
||||
* Warning: non-blocking protocols is work-in-progress; this flag may be
|
||||
* silently ignored.
|
||||
*/
|
||||
#define URL_FLAG_NONBLOCK 8
|
||||
|
||||
typedef int URLInterruptCB(void);
|
||||
extern URLInterruptCB *url_interrupt_cb;
|
||||
|
||||
/**
|
||||
* @defgroup old_url_funcs Old url_* functions
|
||||
* The following functions are deprecated. Use the buffered API based on #AVIOContext instead.
|
||||
* @{
|
||||
* @ingroup lavf_io
|
||||
*/
|
||||
attribute_deprecated int url_open_protocol (URLContext **puc, struct URLProtocol *up,
|
||||
const char *url, int flags);
|
||||
attribute_deprecated int url_alloc(URLContext **h, const char *url, int flags);
|
||||
attribute_deprecated int url_connect(URLContext *h);
|
||||
attribute_deprecated int url_open(URLContext **h, const char *url, int flags);
|
||||
attribute_deprecated int url_read(URLContext *h, unsigned char *buf, int size);
|
||||
attribute_deprecated int url_read_complete(URLContext *h, unsigned char *buf, int size);
|
||||
attribute_deprecated int url_write(URLContext *h, const unsigned char *buf, int size);
|
||||
attribute_deprecated int64_t url_seek(URLContext *h, int64_t pos, int whence);
|
||||
attribute_deprecated int url_close(URLContext *h);
|
||||
attribute_deprecated int64_t url_filesize(URLContext *h);
|
||||
attribute_deprecated int url_get_file_handle(URLContext *h);
|
||||
attribute_deprecated int url_get_max_packet_size(URLContext *h);
|
||||
attribute_deprecated void url_get_filename(URLContext *h, char *buf, int buf_size);
|
||||
attribute_deprecated int av_url_read_pause(URLContext *h, int pause);
|
||||
attribute_deprecated int64_t av_url_read_seek(URLContext *h, int stream_index,
|
||||
int64_t timestamp, int flags);
|
||||
attribute_deprecated void url_set_interrupt_cb(int (*interrupt_cb)(void));
|
||||
|
||||
/**
|
||||
* returns the next registered protocol after the given protocol (the first if
|
||||
* NULL is given), or NULL if protocol is the last one.
|
||||
*/
|
||||
URLProtocol *av_protocol_next(URLProtocol *p);
|
||||
|
||||
/**
|
||||
* Register the URLProtocol protocol.
|
||||
*
|
||||
* @param size the size of the URLProtocol struct referenced
|
||||
*/
|
||||
attribute_deprecated int av_register_protocol2(URLProtocol *protocol, int size);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
typedef attribute_deprecated AVIOContext ByteIOContext;
|
||||
|
||||
attribute_deprecated int init_put_byte(AVIOContext *s,
|
||||
unsigned char *buffer,
|
||||
int buffer_size,
|
||||
int write_flag,
|
||||
void *opaque,
|
||||
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int64_t (*seek)(void *opaque, int64_t offset, int whence));
|
||||
attribute_deprecated AVIOContext *av_alloc_put_byte(
|
||||
unsigned char *buffer,
|
||||
int buffer_size,
|
||||
int write_flag,
|
||||
void *opaque,
|
||||
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int64_t (*seek)(void *opaque, int64_t offset, int whence));
|
||||
|
||||
/**
|
||||
* @defgroup old_avio_funcs Old put_/get_*() functions
|
||||
* The following functions are deprecated. Use the "avio_"-prefixed functions instead.
|
||||
* @{
|
||||
* @ingroup lavf_io
|
||||
*/
|
||||
attribute_deprecated int get_buffer(AVIOContext *s, unsigned char *buf, int size);
|
||||
attribute_deprecated int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size);
|
||||
attribute_deprecated int get_byte(AVIOContext *s);
|
||||
attribute_deprecated unsigned int get_le16(AVIOContext *s);
|
||||
attribute_deprecated unsigned int get_le24(AVIOContext *s);
|
||||
attribute_deprecated unsigned int get_le32(AVIOContext *s);
|
||||
attribute_deprecated uint64_t get_le64(AVIOContext *s);
|
||||
attribute_deprecated unsigned int get_be16(AVIOContext *s);
|
||||
attribute_deprecated unsigned int get_be24(AVIOContext *s);
|
||||
attribute_deprecated unsigned int get_be32(AVIOContext *s);
|
||||
attribute_deprecated uint64_t get_be64(AVIOContext *s);
|
||||
|
||||
attribute_deprecated void put_byte(AVIOContext *s, int b);
|
||||
attribute_deprecated void put_nbyte(AVIOContext *s, int b, int count);
|
||||
attribute_deprecated void put_buffer(AVIOContext *s, const unsigned char *buf, int size);
|
||||
attribute_deprecated void put_le64(AVIOContext *s, uint64_t val);
|
||||
attribute_deprecated void put_be64(AVIOContext *s, uint64_t val);
|
||||
attribute_deprecated void put_le32(AVIOContext *s, unsigned int val);
|
||||
attribute_deprecated void put_be32(AVIOContext *s, unsigned int val);
|
||||
attribute_deprecated void put_le24(AVIOContext *s, unsigned int val);
|
||||
attribute_deprecated void put_be24(AVIOContext *s, unsigned int val);
|
||||
attribute_deprecated void put_le16(AVIOContext *s, unsigned int val);
|
||||
attribute_deprecated void put_be16(AVIOContext *s, unsigned int val);
|
||||
attribute_deprecated void put_tag(AVIOContext *s, const char *tag);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
attribute_deprecated int av_url_read_fpause(AVIOContext *h, int pause);
|
||||
attribute_deprecated int64_t av_url_read_fseek (AVIOContext *h, int stream_index,
|
||||
int64_t timestamp, int flags);
|
||||
|
||||
/**
|
||||
* @defgroup old_url_f_funcs Old url_f* functions
|
||||
* The following functions are deprecated, use the "avio_"-prefixed functions instead.
|
||||
* @{
|
||||
* @ingroup lavf_io
|
||||
*/
|
||||
attribute_deprecated int url_fopen( AVIOContext **s, const char *url, int flags);
|
||||
attribute_deprecated int url_fclose(AVIOContext *s);
|
||||
attribute_deprecated int64_t url_fseek(AVIOContext *s, int64_t offset, int whence);
|
||||
attribute_deprecated int url_fskip(AVIOContext *s, int64_t offset);
|
||||
attribute_deprecated int64_t url_ftell(AVIOContext *s);
|
||||
attribute_deprecated int64_t url_fsize(AVIOContext *s);
|
||||
#define URL_EOF (-1)
|
||||
attribute_deprecated int url_fgetc(AVIOContext *s);
|
||||
attribute_deprecated int url_setbufsize(AVIOContext *s, int buf_size);
|
||||
attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
|
||||
attribute_deprecated void put_flush_packet(AVIOContext *s);
|
||||
attribute_deprecated int url_open_dyn_buf(AVIOContext **s);
|
||||
attribute_deprecated int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
|
||||
attribute_deprecated int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
|
||||
attribute_deprecated int url_fdopen(AVIOContext **s, URLContext *h);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
attribute_deprecated int url_ferror(AVIOContext *s);
|
||||
|
||||
attribute_deprecated int udp_set_remote_url(URLContext *h, const char *uri);
|
||||
attribute_deprecated int udp_get_local_port(URLContext *h);
|
||||
|
||||
attribute_deprecated void init_checksum(AVIOContext *s,
|
||||
unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
|
||||
unsigned long checksum);
|
||||
attribute_deprecated unsigned long get_checksum(AVIOContext *s);
|
||||
attribute_deprecated void put_strz(AVIOContext *s, const char *buf);
|
||||
/** @note unlike fgets, the EOL character is not returned and a whole
|
||||
line is parsed. return NULL if first char read was EOF */
|
||||
attribute_deprecated char *url_fgets(AVIOContext *s, char *buf, int buf_size);
|
||||
/**
|
||||
* @deprecated use avio_get_str instead
|
||||
*/
|
||||
attribute_deprecated char *get_strz(AVIOContext *s, char *buf, int maxlen);
|
||||
/**
|
||||
* @deprecated Use AVIOContext.seekable field directly.
|
||||
*/
|
||||
attribute_deprecated static inline int url_is_streamed(AVIOContext *s)
|
||||
{
|
||||
return !s->seekable;
|
||||
}
|
||||
attribute_deprecated URLContext *url_fileno(AVIOContext *s);
|
||||
|
||||
/**
|
||||
* @deprecated use AVIOContext.max_packet_size directly.
|
||||
*/
|
||||
attribute_deprecated int url_fget_max_packet_size(AVIOContext *s);
|
||||
|
||||
attribute_deprecated int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags);
|
||||
|
||||
/** return the written or read size */
|
||||
attribute_deprecated int url_close_buf(AVIOContext *s);
|
||||
|
||||
/**
|
||||
* Return a non-zero value if the resource indicated by url
|
||||
* exists, 0 otherwise.
|
||||
* @deprecated Use avio_check instead.
|
||||
*/
|
||||
attribute_deprecated int url_exist(const char *url);
|
||||
#endif // FF_API_OLD_AVIO
|
||||
|
||||
/**
|
||||
* Return AVIO_FLAG_* access flags corresponding to the access permissions
|
||||
* of the resource in url, or a negative value corresponding to an
|
||||
* AVERROR code in case of failure. The returned access flags are
|
||||
* masked by the value in flags.
|
||||
*
|
||||
* @note This function is intrinsically unsafe, in the sense that the
|
||||
* checked resource may change its existence or permission status from
|
||||
* one call to another. Thus you should not trust the returned value,
|
||||
* unless you are sure that no other processes are accessing the
|
||||
* checked resource.
|
||||
*/
|
||||
int avio_check(const char *url, int flags);
|
||||
|
||||
#if FF_API_OLD_INTERRUPT_CB
|
||||
/**
|
||||
* The callback is called in blocking functions to test regulary if
|
||||
* asynchronous interruption is needed. AVERROR_EXIT is returned
|
||||
* in this case by the interrupted function. 'NULL' means no interrupt
|
||||
* callback is given.
|
||||
* @deprecated Use interrupt_callback in AVFormatContext/avio_open2
|
||||
* instead.
|
||||
*/
|
||||
attribute_deprecated void avio_set_interrupt_cb(int (*interrupt_cb)(void));
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Allocate and initialize an AVIOContext for buffered I/O. It must be later
|
||||
* freed with av_free().
|
||||
*
|
||||
* @param buffer Memory block for input/output operations via AVIOContext.
|
||||
* The buffer must be allocated with av_malloc() and friends.
|
||||
* @param buffer_size The buffer size is very important for performance.
|
||||
* For protocols with fixed blocksize it should be set to this blocksize.
|
||||
* For others a typical size is a cache page, e.g. 4kb.
|
||||
* @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.
|
||||
* @param opaque An opaque pointer to user-specific data.
|
||||
* @param read_packet A function for refilling the buffer, may be NULL.
|
||||
* @param write_packet A function for writing the buffer contents, may be NULL.
|
||||
* @param seek A function for seeking to specified byte position, may be NULL.
|
||||
*
|
||||
* @return Allocated AVIOContext or NULL on failure.
|
||||
*/
|
||||
AVIOContext *avio_alloc_context(
|
||||
unsigned char *buffer,
|
||||
int buffer_size,
|
||||
int write_flag,
|
||||
void *opaque,
|
||||
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int64_t (*seek)(void *opaque, int64_t offset, int whence));
|
||||
|
||||
void avio_w8(AVIOContext *s, int b);
|
||||
void avio_write(AVIOContext *s, const unsigned char *buf, int size);
|
||||
void avio_wl64(AVIOContext *s, uint64_t val);
|
||||
void avio_wb64(AVIOContext *s, uint64_t val);
|
||||
void avio_wl32(AVIOContext *s, unsigned int val);
|
||||
void avio_wb32(AVIOContext *s, unsigned int val);
|
||||
void avio_wl24(AVIOContext *s, unsigned int val);
|
||||
void avio_wb24(AVIOContext *s, unsigned int val);
|
||||
void avio_wl16(AVIOContext *s, unsigned int val);
|
||||
void avio_wb16(AVIOContext *s, unsigned int val);
|
||||
|
||||
/**
|
||||
* Write a NULL-terminated string.
|
||||
* @return number of bytes written.
|
||||
*/
|
||||
int avio_put_str(AVIOContext *s, const char *str);
|
||||
|
||||
/**
|
||||
* Convert an UTF-8 string to UTF-16LE and write it.
|
||||
* @return number of bytes written.
|
||||
*/
|
||||
int avio_put_str16le(AVIOContext *s, const char *str);
|
||||
|
||||
/**
|
||||
* Passing this as the "whence" parameter to a seek function causes it to
|
||||
* return the filesize without seeking anywhere. Supporting this is optional.
|
||||
* If it is not supported then the seek function will return <0.
|
||||
*/
|
||||
#define AVSEEK_SIZE 0x10000
|
||||
|
||||
/**
|
||||
* Oring this flag as into the "whence" parameter to a seek function causes it to
|
||||
* seek by any means (like reopening and linear reading) or other normally unreasonble
|
||||
* means that can be extreemly slow.
|
||||
* This may be ignored by the seek code.
|
||||
*/
|
||||
#define AVSEEK_FORCE 0x20000
|
||||
|
||||
/**
|
||||
* fseek() equivalent for AVIOContext.
|
||||
* @return new position or AVERROR.
|
||||
*/
|
||||
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
|
||||
|
||||
/**
|
||||
* Skip given number of bytes forward
|
||||
* @return new position or AVERROR.
|
||||
*/
|
||||
int64_t avio_skip(AVIOContext *s, int64_t offset);
|
||||
|
||||
/**
|
||||
* ftell() equivalent for AVIOContext.
|
||||
* @return position or AVERROR.
|
||||
*/
|
||||
static av_always_inline int64_t avio_tell(AVIOContext *s)
|
||||
{
|
||||
return avio_seek(s, 0, SEEK_CUR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filesize.
|
||||
* @return filesize or AVERROR
|
||||
*/
|
||||
int64_t avio_size(AVIOContext *s);
|
||||
|
||||
/**
|
||||
* feof() equivalent for AVIOContext.
|
||||
* @return non zero if and only if end of file
|
||||
*/
|
||||
int url_feof(AVIOContext *s);
|
||||
|
||||
/** @warning currently size is limited */
|
||||
int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
|
||||
|
||||
void avio_flush(AVIOContext *s);
|
||||
|
||||
|
||||
/**
|
||||
* Read size bytes from AVIOContext into buf.
|
||||
* @return number of bytes read or AVERROR
|
||||
*/
|
||||
int avio_read(AVIOContext *s, unsigned char *buf, int size);
|
||||
|
||||
/**
|
||||
* @name Functions for reading from AVIOContext
|
||||
* @{
|
||||
*
|
||||
* @note return 0 if EOF, so you cannot use it if EOF handling is
|
||||
* necessary
|
||||
*/
|
||||
int avio_r8 (AVIOContext *s);
|
||||
unsigned int avio_rl16(AVIOContext *s);
|
||||
unsigned int avio_rl24(AVIOContext *s);
|
||||
unsigned int avio_rl32(AVIOContext *s);
|
||||
uint64_t avio_rl64(AVIOContext *s);
|
||||
unsigned int avio_rb16(AVIOContext *s);
|
||||
unsigned int avio_rb24(AVIOContext *s);
|
||||
unsigned int avio_rb32(AVIOContext *s);
|
||||
uint64_t avio_rb64(AVIOContext *s);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Read a string from pb into buf. The reading will terminate when either
|
||||
* a NULL character was encountered, maxlen bytes have been read, or nothing
|
||||
* more can be read from pb. The result is guaranteed to be NULL-terminated, it
|
||||
* will be truncated if buf is too small.
|
||||
* Note that the string is not interpreted or validated in any way, it
|
||||
* might get truncated in the middle of a sequence for multi-byte encodings.
|
||||
*
|
||||
* @return number of bytes read (is always <= maxlen).
|
||||
* If reading ends on EOF or error, the return value will be one more than
|
||||
* bytes actually read.
|
||||
*/
|
||||
int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen);
|
||||
|
||||
/**
|
||||
* Read a UTF-16 string from pb and convert it to UTF-8.
|
||||
* The reading will terminate when either a null or invalid character was
|
||||
* encountered or maxlen bytes have been read.
|
||||
* @return number of bytes read (is always <= maxlen)
|
||||
*/
|
||||
int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen);
|
||||
int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);
|
||||
|
||||
|
||||
/**
|
||||
* @name URL open modes
|
||||
* The flags argument to avio_open must be one of the following
|
||||
* constants, optionally ORed with other flags.
|
||||
* @{
|
||||
*/
|
||||
#define AVIO_FLAG_READ 1 /**< read-only */
|
||||
#define AVIO_FLAG_WRITE 2 /**< write-only */
|
||||
#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE) /**< read-write pseudo flag */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Use non-blocking mode.
|
||||
* If this flag is set, operations on the context will return
|
||||
* AVERROR(EAGAIN) if they can not be performed immediately.
|
||||
* If this flag is not set, operations on the context will never return
|
||||
* AVERROR(EAGAIN).
|
||||
* Note that this flag does not affect the opening/connecting of the
|
||||
* context. Connecting a protocol will always block if necessary (e.g. on
|
||||
* network protocols) but never hang (e.g. on busy devices).
|
||||
* Warning: non-blocking protocols is work-in-progress; this flag may be
|
||||
* silently ignored.
|
||||
*/
|
||||
#define AVIO_FLAG_NONBLOCK 8
|
||||
|
||||
/**
|
||||
* Create and initialize a AVIOContext for accessing the
|
||||
* resource indicated by url.
|
||||
* @note When the resource indicated by url has been opened in
|
||||
* read+write mode, the AVIOContext can be used only for writing.
|
||||
*
|
||||
* @param s Used to return the pointer to the created AVIOContext.
|
||||
* In case of failure the pointed to value is set to NULL.
|
||||
* @param flags flags which control how the resource indicated by url
|
||||
* is to be opened
|
||||
* @return 0 in case of success, a negative value corresponding to an
|
||||
* AVERROR code in case of failure
|
||||
*/
|
||||
int avio_open(AVIOContext **s, const char *url, int flags);
|
||||
|
||||
/**
|
||||
* Create and initialize a AVIOContext for accessing the
|
||||
* resource indicated by url.
|
||||
* @note When the resource indicated by url has been opened in
|
||||
* read+write mode, the AVIOContext can be used only for writing.
|
||||
*
|
||||
* @param s Used to return the pointer to the created AVIOContext.
|
||||
* In case of failure the pointed to value is set to NULL.
|
||||
* @param flags flags which control how the resource indicated by url
|
||||
* is to be opened
|
||||
* @param int_cb an interrupt callback to be used at the protocols level
|
||||
* @param options A dictionary filled with protocol-private options. On return
|
||||
* this parameter will be destroyed and replaced with a dict containing options
|
||||
* that were not found. May be NULL.
|
||||
* @return 0 in case of success, a negative value corresponding to an
|
||||
* AVERROR code in case of failure
|
||||
*/
|
||||
int avio_open2(AVIOContext **s, const char *url, int flags,
|
||||
const AVIOInterruptCB *int_cb, AVDictionary **options);
|
||||
|
||||
/**
|
||||
* Close the resource accessed by the AVIOContext s and free it.
|
||||
* This function can only be used if s was opened by avio_open().
|
||||
*
|
||||
* @return 0 on success, an AVERROR < 0 on error.
|
||||
*/
|
||||
int avio_close(AVIOContext *s);
|
||||
|
||||
/**
|
||||
* Open a write only memory stream.
|
||||
*
|
||||
* @param s new IO context
|
||||
* @return zero if no error.
|
||||
*/
|
||||
int avio_open_dyn_buf(AVIOContext **s);
|
||||
|
||||
/**
|
||||
* Return the written size and a pointer to the buffer. The buffer
|
||||
* must be freed with av_free().
|
||||
* Padding of FF_INPUT_BUFFER_PADDING_SIZE is added to the buffer.
|
||||
*
|
||||
* @param s IO context
|
||||
* @param pbuffer pointer to a byte buffer
|
||||
* @return the length of the byte buffer
|
||||
*/
|
||||
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
|
||||
|
||||
/**
|
||||
* Iterate through names of available protocols.
|
||||
* @note it is recommanded to use av_protocol_next() instead of this
|
||||
*
|
||||
* @param opaque A private pointer representing current protocol.
|
||||
* It must be a pointer to NULL on first iteration and will
|
||||
* be updated by successive calls to avio_enum_protocols.
|
||||
* @param output If set to 1, iterate over output protocols,
|
||||
* otherwise over input protocols.
|
||||
*
|
||||
* @return A static string containing the name of current protocol or NULL
|
||||
*/
|
||||
const char *avio_enum_protocols(void **opaque, int output);
|
||||
|
||||
/**
|
||||
* Pause and resume playing - only meaningful if using a network streaming
|
||||
* protocol (e.g. MMS).
|
||||
* @param pause 1 for pause, 0 for resume
|
||||
*/
|
||||
int avio_pause(AVIOContext *h, int pause);
|
||||
|
||||
/**
|
||||
* Seek to a given timestamp relative to some component stream.
|
||||
* Only meaningful if using a network streaming protocol (e.g. MMS.).
|
||||
* @param stream_index The stream index that the timestamp is relative to.
|
||||
* If stream_index is (-1) the timestamp should be in AV_TIME_BASE
|
||||
* units from the beginning of the presentation.
|
||||
* If a stream_index >= 0 is used and the protocol does not support
|
||||
* seeking based on component streams, the call will fail.
|
||||
* @param timestamp timestamp in AVStream.time_base units
|
||||
* or if there is no stream specified then in AV_TIME_BASE units.
|
||||
* @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE
|
||||
* and AVSEEK_FLAG_ANY. The protocol may silently ignore
|
||||
* AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will
|
||||
* fail if used and not supported.
|
||||
* @return >= 0 on success
|
||||
* @see AVInputFormat::read_seek
|
||||
*/
|
||||
int64_t avio_seek_time(AVIOContext *h, int stream_index,
|
||||
int64_t timestamp, int flags);
|
||||
|
||||
#endif /* AVFORMAT_AVIO_H */
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Version macros.
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFORMAT_VERSION_H
|
||||
#define AVFORMAT_VERSION_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup libavf
|
||||
* Libavformat version macros
|
||||
*/
|
||||
|
||||
#include "libavutil/avutil.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 53
|
||||
#define LIBAVFORMAT_VERSION_MINOR 32
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
LIBAVFORMAT_VERSION_MICRO)
|
||||
#define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
LIBAVFORMAT_VERSION_MICRO)
|
||||
#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
|
||||
|
||||
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
|
||||
|
||||
/**
|
||||
* Those FF_API_* defines are not part of public API.
|
||||
* They may change, break or disappear at any time.
|
||||
*/
|
||||
#ifndef FF_API_OLD_METADATA2
|
||||
#define FF_API_OLD_METADATA2 (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_AVIO
|
||||
#define FF_API_OLD_AVIO (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_DUMP_FORMAT
|
||||
#define FF_API_DUMP_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_PARSE_DATE
|
||||
#define FF_API_PARSE_DATE (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_FIND_INFO_TAG
|
||||
#define FF_API_FIND_INFO_TAG (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_PKT_DUMP
|
||||
#define FF_API_PKT_DUMP (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_GUESS_IMG2_CODEC
|
||||
#define FF_API_GUESS_IMG2_CODEC (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_SDP_CREATE
|
||||
#define FF_API_SDP_CREATE (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_ALLOC_OUTPUT_CONTEXT
|
||||
#define FF_API_ALLOC_OUTPUT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_FORMAT_PARAMETERS
|
||||
#define FF_API_FORMAT_PARAMETERS (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_FLAG_RTP_HINT
|
||||
#define FF_API_FLAG_RTP_HINT (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_AVSTREAM_QUALITY
|
||||
#define FF_API_AVSTREAM_QUALITY (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_LOOP_INPUT
|
||||
#define FF_API_LOOP_INPUT (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_LOOP_OUTPUT
|
||||
#define FF_API_LOOP_OUTPUT (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_TIMESTAMP
|
||||
#define FF_API_TIMESTAMP (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_FILESIZE
|
||||
#define FF_API_FILESIZE (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_MUXRATE
|
||||
#define FF_API_MUXRATE (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_RTSP_URL_OPTIONS
|
||||
#define FF_API_RTSP_URL_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_NEW_STREAM
|
||||
#define FF_API_NEW_STREAM (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_PRELOAD
|
||||
#define FF_API_PRELOAD (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_STREAM_COPY
|
||||
#define FF_API_STREAM_COPY (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_SEEK_PUBLIC
|
||||
#define FF_API_SEEK_PUBLIC (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_REORDER_PRIVATE
|
||||
#define FF_API_REORDER_PRIVATE (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_INTERRUPT_CB
|
||||
#define FF_API_OLD_INTERRUPT_CB (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_SET_PTS_INFO
|
||||
#define FF_API_SET_PTS_INFO (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_CLOSE_INPUT_FILE
|
||||
#define FF_API_CLOSE_INPUT_FILE (LIBAVFORMAT_VERSION_MAJOR < 55)
|
||||
#endif
|
||||
|
||||
#endif /* AVFORMAT_VERSION_H */
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Mans Rullgard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_ADLER32_H
|
||||
#define AVUTIL_ADLER32_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "attributes.h"
|
||||
|
||||
/**
|
||||
* @ingroup lavu_crypto
|
||||
* Calculate the Adler32 checksum of a buffer.
|
||||
*
|
||||
* Passing the return value to a subsequent av_adler32_update() call
|
||||
* allows the checksum of multiple buffers to be calculated as though
|
||||
* they were concatenated.
|
||||
*
|
||||
* @param adler initial checksum value
|
||||
* @param buf pointer to input buffer
|
||||
* @param len size of input buffer
|
||||
* @return updated checksum
|
||||
*/
|
||||
unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
|
||||
unsigned int len) av_pure;
|
||||
|
||||
#endif /* AVUTIL_ADLER32_H */
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2007 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_AES_H
|
||||
#define AVUTIL_AES_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @defgroup lavu_aes AES
|
||||
* @ingroup lavu_crypto
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern const int av_aes_size;
|
||||
|
||||
struct AVAES;
|
||||
|
||||
/**
|
||||
* Initialize an AVAES context.
|
||||
* @param key_bits 128, 192 or 256
|
||||
* @param decrypt 0 for encryption, 1 for decryption
|
||||
*/
|
||||
int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);
|
||||
|
||||
/**
|
||||
* Encrypt or decrypt a buffer using a previously initialized context.
|
||||
* @param count number of 16 byte blocks
|
||||
* @param dst destination array, can be equal to src
|
||||
* @param src source array, can be equal to dst
|
||||
* @param iv initialization vector for CBC mode, if NULL then ECB will be used
|
||||
* @param decrypt 0 for encryption, 1 for decryption
|
||||
*/
|
||||
void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_AES_H */
|
||||
@@ -1,162 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Macro definitions for various function/variable attributes
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_ATTRIBUTES_H
|
||||
#define AVUTIL_ATTRIBUTES_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y)
|
||||
#else
|
||||
# define AV_GCC_VERSION_AT_LEAST(x,y) 0
|
||||
#endif
|
||||
|
||||
#ifndef av_always_inline
|
||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
||||
# define av_always_inline __attribute__((always_inline)) inline
|
||||
#else
|
||||
# define av_always_inline inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_noreturn
|
||||
#if AV_GCC_VERSION_AT_LEAST(2,5)
|
||||
# define av_noreturn __attribute__((noreturn))
|
||||
#else
|
||||
# define av_noreturn
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_noinline
|
||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
||||
# define av_noinline __attribute__((noinline))
|
||||
#else
|
||||
# define av_noinline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_pure
|
||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
||||
# define av_pure __attribute__((pure))
|
||||
#else
|
||||
# define av_pure
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_const
|
||||
#if AV_GCC_VERSION_AT_LEAST(2,6)
|
||||
# define av_const __attribute__((const))
|
||||
#else
|
||||
# define av_const
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_cold
|
||||
#if AV_GCC_VERSION_AT_LEAST(4,3)
|
||||
# define av_cold __attribute__((cold))
|
||||
#else
|
||||
# define av_cold
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_flatten
|
||||
#if AV_GCC_VERSION_AT_LEAST(4,1)
|
||||
# define av_flatten __attribute__((flatten))
|
||||
#else
|
||||
# define av_flatten
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef attribute_deprecated
|
||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
||||
# define attribute_deprecated __attribute__((deprecated))
|
||||
#else
|
||||
# define attribute_deprecated
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Disable warnings about deprecated features
|
||||
* This is useful for sections of code kept for backward compatibility and
|
||||
* scheduled for removal.
|
||||
*/
|
||||
#ifndef AV_NOWARN_DEPRECATED
|
||||
#if AV_GCC_VERSION_AT_LEAST(4,6)
|
||||
# define AV_NOWARN_DEPRECATED(code) \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
|
||||
code \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
# define AV_NOWARN_DEPRECATED(code) code
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef av_unused
|
||||
#if defined(__GNUC__)
|
||||
# define av_unused __attribute__((unused))
|
||||
#else
|
||||
# define av_unused
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Mark a variable as used and prevent the compiler from optimizing it
|
||||
* away. This is useful for variables accessed only from inline
|
||||
* assembler without the compiler being aware.
|
||||
*/
|
||||
#ifndef av_used
|
||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
||||
# define av_used __attribute__((used))
|
||||
#else
|
||||
# define av_used
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_alias
|
||||
#if AV_GCC_VERSION_AT_LEAST(3,3)
|
||||
# define av_alias __attribute__((may_alias))
|
||||
#else
|
||||
# define av_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef av_uninit
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
|
||||
# define av_uninit(x) x=x
|
||||
#else
|
||||
# define av_uninit(x) x
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define av_builtin_constant_p __builtin_constant_p
|
||||
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
|
||||
#else
|
||||
# define av_builtin_constant_p(x) 0
|
||||
# define av_printf_format(fmtpos, attrpos)
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_ATTRIBUTES_H */
|
||||
@@ -1,147 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006 Michael Niedermayer <[email protected]>
|
||||
* Copyright (c) 2008 Peter Ross
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_AUDIOCONVERT_H
|
||||
#define AVUTIL_AUDIOCONVERT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
* audio conversion routines
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_audio
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup channel_masks Audio channel masks
|
||||
* @{
|
||||
*/
|
||||
#define AV_CH_FRONT_LEFT 0x00000001
|
||||
#define AV_CH_FRONT_RIGHT 0x00000002
|
||||
#define AV_CH_FRONT_CENTER 0x00000004
|
||||
#define AV_CH_LOW_FREQUENCY 0x00000008
|
||||
#define AV_CH_BACK_LEFT 0x00000010
|
||||
#define AV_CH_BACK_RIGHT 0x00000020
|
||||
#define AV_CH_FRONT_LEFT_OF_CENTER 0x00000040
|
||||
#define AV_CH_FRONT_RIGHT_OF_CENTER 0x00000080
|
||||
#define AV_CH_BACK_CENTER 0x00000100
|
||||
#define AV_CH_SIDE_LEFT 0x00000200
|
||||
#define AV_CH_SIDE_RIGHT 0x00000400
|
||||
#define AV_CH_TOP_CENTER 0x00000800
|
||||
#define AV_CH_TOP_FRONT_LEFT 0x00001000
|
||||
#define AV_CH_TOP_FRONT_CENTER 0x00002000
|
||||
#define AV_CH_TOP_FRONT_RIGHT 0x00004000
|
||||
#define AV_CH_TOP_BACK_LEFT 0x00008000
|
||||
#define AV_CH_TOP_BACK_CENTER 0x00010000
|
||||
#define AV_CH_TOP_BACK_RIGHT 0x00020000
|
||||
#define AV_CH_STEREO_LEFT 0x20000000 ///< Stereo downmix.
|
||||
#define AV_CH_STEREO_RIGHT 0x40000000 ///< See AV_CH_STEREO_LEFT.
|
||||
#define AV_CH_WIDE_LEFT 0x0000000080000000ULL
|
||||
#define AV_CH_WIDE_RIGHT 0x0000000100000000ULL
|
||||
#define AV_CH_SURROUND_DIRECT_LEFT 0x0000000200000000ULL
|
||||
#define AV_CH_SURROUND_DIRECT_RIGHT 0x0000000400000000ULL
|
||||
|
||||
/** Channel mask value used for AVCodecContext.request_channel_layout
|
||||
to indicate that the user requests the channel order of the decoder output
|
||||
to be the native codec channel order. */
|
||||
#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @defgroup channel_mask_c Audio channel convenience macros
|
||||
* @{
|
||||
* */
|
||||
#define AV_CH_LAYOUT_MONO (AV_CH_FRONT_CENTER)
|
||||
#define AV_CH_LAYOUT_STEREO (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_2POINT1 (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)
|
||||
#define AV_CH_LAYOUT_2_1 (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_SURROUND (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
|
||||
#define AV_CH_LAYOUT_3POINT1 (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)
|
||||
#define AV_CH_LAYOUT_4POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_4POINT1 (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)
|
||||
#define AV_CH_LAYOUT_2_2 (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
|
||||
#define AV_CH_LAYOUT_QUAD (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1 (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
|
||||
#define AV_CH_LAYOUT_5POINT0_BACK (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1_BACK (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
|
||||
#define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
|
||||
#define AV_CH_LAYOUT_7POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return a channel layout id that matches name, 0 if no match.
|
||||
* name can be one or several of the following notations,
|
||||
* separated by '+' or '|':
|
||||
* - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,
|
||||
* 5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);
|
||||
* - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,
|
||||
* SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);
|
||||
* - a number of channels, in decimal, optionnally followed by 'c', yielding
|
||||
* the default channel layout for that number of channels (@see
|
||||
* av_get_default_channel_layout);
|
||||
* - a channel layout mask, in hexadecimal starting with "0x" (see the
|
||||
* AV_CH_* macros).
|
||||
+ Example: "stereo+FC" = "2+FC" = "2c+1c" = "0x7"
|
||||
*/
|
||||
uint64_t av_get_channel_layout(const char *name);
|
||||
|
||||
/**
|
||||
* Return a description of a channel layout.
|
||||
* If nb_channels is <= 0, it is guessed from the channel_layout.
|
||||
*
|
||||
* @param buf put here the string containing the channel layout
|
||||
* @param buf_size size in bytes of the buffer
|
||||
*/
|
||||
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
|
||||
|
||||
/**
|
||||
* Return the number of channels in the channel layout.
|
||||
*/
|
||||
int av_get_channel_layout_nb_channels(uint64_t channel_layout);
|
||||
|
||||
/**
|
||||
* Return default channel layout for a given number of channels.
|
||||
*/
|
||||
int64_t av_get_default_channel_layout(int nb_channels);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_AUDIOCONVERT_H */
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2010 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* simple assert() macros that are a bit more flexible than ISO C assert().
|
||||
* @author Michael Niedermayer <[email protected]>
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_AVASSERT_H
|
||||
#define AVUTIL_AVASSERT_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "avutil.h"
|
||||
#include "log.h"
|
||||
|
||||
/**
|
||||
* assert() equivalent, that is always enabled.
|
||||
*/
|
||||
#define av_assert0(cond) do { \
|
||||
if (!(cond)) { \
|
||||
av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n", \
|
||||
AV_STRINGIFY(cond), __FILE__, __LINE__); \
|
||||
abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
/**
|
||||
* assert() equivalent, that does not lie in speed critical code.
|
||||
* These asserts() thus can be enabled without fearing speedloss.
|
||||
*/
|
||||
#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
|
||||
#define av_assert1(cond) av_assert0(cond)
|
||||
#else
|
||||
#define av_assert1(cond) ((void)0)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* assert() equivalent, that does lie in speed critical code.
|
||||
*/
|
||||
#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1
|
||||
#define av_assert2(cond) av_assert0(cond)
|
||||
#else
|
||||
#define av_assert2(cond) ((void)0)
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_AVASSERT_H */
|
||||
@@ -1,6 +0,0 @@
|
||||
/* Generated by ffconf */
|
||||
#ifndef AVUTIL_AVCONFIG_H
|
||||
#define AVUTIL_AVCONFIG_H
|
||||
#define AV_HAVE_BIGENDIAN 0
|
||||
#define AV_HAVE_FAST_UNALIGNED 1
|
||||
#endif /* AVUTIL_AVCONFIG_H */
|
||||
@@ -1,209 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Mans Rullgard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_AVSTRING_H
|
||||
#define AVUTIL_AVSTRING_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "attributes.h"
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_string
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return non-zero if pfx is a prefix of str. If it is, *ptr is set to
|
||||
* the address of the first character in str after the prefix.
|
||||
*
|
||||
* @param str input string
|
||||
* @param pfx prefix to test
|
||||
* @param ptr updated if the prefix is matched inside str
|
||||
* @return non-zero if the prefix matches, zero otherwise
|
||||
*/
|
||||
int av_strstart(const char *str, const char *pfx, const char **ptr);
|
||||
|
||||
/**
|
||||
* Return non-zero if pfx is a prefix of str independent of case. If
|
||||
* it is, *ptr is set to the address of the first character in str
|
||||
* after the prefix.
|
||||
*
|
||||
* @param str input string
|
||||
* @param pfx prefix to test
|
||||
* @param ptr updated if the prefix is matched inside str
|
||||
* @return non-zero if the prefix matches, zero otherwise
|
||||
*/
|
||||
int av_stristart(const char *str, const char *pfx, const char **ptr);
|
||||
|
||||
/**
|
||||
* Locate the first case-independent occurrence in the string haystack
|
||||
* of the string needle. A zero-length string needle is considered to
|
||||
* match at the start of haystack.
|
||||
*
|
||||
* This function is a case-insensitive version of the standard strstr().
|
||||
*
|
||||
* @param haystack string to search in
|
||||
* @param needle string to search for
|
||||
* @return pointer to the located match within haystack
|
||||
* or a null pointer if no match
|
||||
*/
|
||||
char *av_stristr(const char *haystack, const char *needle);
|
||||
|
||||
/**
|
||||
* Copy the string src to dst, but no more than size - 1 bytes, and
|
||||
* null-terminate dst.
|
||||
*
|
||||
* This function is the same as BSD strlcpy().
|
||||
*
|
||||
* @param dst destination buffer
|
||||
* @param src source string
|
||||
* @param size size of destination buffer
|
||||
* @return the length of src
|
||||
*
|
||||
* @warning since the return value is the length of src, src absolutely
|
||||
* _must_ be a properly 0-terminated string, otherwise this will read beyond
|
||||
* the end of the buffer and possibly crash.
|
||||
*/
|
||||
size_t av_strlcpy(char *dst, const char *src, size_t size);
|
||||
|
||||
/**
|
||||
* Append the string src to the string dst, but to a total length of
|
||||
* no more than size - 1 bytes, and null-terminate dst.
|
||||
*
|
||||
* This function is similar to BSD strlcat(), but differs when
|
||||
* size <= strlen(dst).
|
||||
*
|
||||
* @param dst destination buffer
|
||||
* @param src source string
|
||||
* @param size size of destination buffer
|
||||
* @return the total length of src and dst
|
||||
*
|
||||
* @warning since the return value use the length of src and dst, these
|
||||
* absolutely _must_ be a properly 0-terminated strings, otherwise this
|
||||
* will read beyond the end of the buffer and possibly crash.
|
||||
*/
|
||||
size_t av_strlcat(char *dst, const char *src, size_t size);
|
||||
|
||||
/**
|
||||
* Append output to a string, according to a format. Never write out of
|
||||
* the destination buffer, and always put a terminating 0 within
|
||||
* the buffer.
|
||||
* @param dst destination buffer (string to which the output is
|
||||
* appended)
|
||||
* @param size total size of the destination buffer
|
||||
* @param fmt printf-compatible format string, specifying how the
|
||||
* following parameters are used
|
||||
* @return the length of the string that would have been generated
|
||||
* if enough space had been available
|
||||
*/
|
||||
size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4);
|
||||
|
||||
/**
|
||||
* Print arguments following specified format into a large enough auto
|
||||
* allocated buffer. It is similar to GNU asprintf().
|
||||
* @param fmt printf-compatible format string, specifying how the
|
||||
* following parameters are used.
|
||||
* @return the allocated string
|
||||
* @note You have to free the string yourself with av_free().
|
||||
*/
|
||||
char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2);
|
||||
|
||||
/**
|
||||
* Convert a number to a av_malloced string.
|
||||
*/
|
||||
char *av_d2str(double d);
|
||||
|
||||
/**
|
||||
* Unescape the given string until a non escaped terminating char,
|
||||
* and return the token corresponding to the unescaped string.
|
||||
*
|
||||
* The normal \ and ' escaping is supported. Leading and trailing
|
||||
* whitespaces are removed, unless they are escaped with '\' or are
|
||||
* enclosed between ''.
|
||||
*
|
||||
* @param buf the buffer to parse, buf will be updated to point to the
|
||||
* terminating char
|
||||
* @param term a 0-terminated list of terminating chars
|
||||
* @return the malloced unescaped string, which must be av_freed by
|
||||
* the user, NULL in case of allocation failure
|
||||
*/
|
||||
char *av_get_token(const char **buf, const char *term);
|
||||
|
||||
/**
|
||||
* Split the string into several tokens which can be accessed by
|
||||
* successive calls to av_strtok().
|
||||
*
|
||||
* A token is defined as a sequence of characters not belonging to the
|
||||
* set specified in delim.
|
||||
*
|
||||
* On the first call to av_strtok(), s should point to the string to
|
||||
* parse, and the value of saveptr is ignored. In subsequent calls, s
|
||||
* should be NULL, and saveptr should be unchanged since the previous
|
||||
* call.
|
||||
*
|
||||
* This function is similar to strtok_r() defined in POSIX.1.
|
||||
*
|
||||
* @param s the string to parse, may be NULL
|
||||
* @param delim 0-terminated list of token delimiters, must be non-NULL
|
||||
* @param saveptr user-provided pointer which points to stored
|
||||
* information necessary for av_strtok() to continue scanning the same
|
||||
* string. saveptr is updated to point to the next character after the
|
||||
* first delimiter found, or to NULL if the string was terminated
|
||||
* @return the found token, or NULL when no token is found
|
||||
*/
|
||||
char *av_strtok(char *s, const char *delim, char **saveptr);
|
||||
|
||||
/**
|
||||
* Locale-independent conversion of ASCII characters to uppercase.
|
||||
*/
|
||||
static inline int av_toupper(int c)
|
||||
{
|
||||
if (c >= 'a' && c <= 'z')
|
||||
c ^= 0x20;
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Locale-independent conversion of ASCII characters to lowercase.
|
||||
*/
|
||||
static inline int av_tolower(int c)
|
||||
{
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
c ^= 0x20;
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Locale-independent case-insensitive compare.
|
||||
* @note This means only ASCII-range characters are case-insensitive
|
||||
*/
|
||||
int av_strcasecmp(const char *a, const char *b);
|
||||
|
||||
/**
|
||||
* Locale-independent case-insensitive compare.
|
||||
* @note This means only ASCII-range characters are case-insensitive
|
||||
*/
|
||||
int av_strncasecmp(const char *a, const char *b, size_t n);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_AVSTRING_H */
|
||||
@@ -1,349 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_AVUTIL_H
|
||||
#define AVUTIL_AVUTIL_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* external API header
|
||||
*/
|
||||
|
||||
/**
|
||||
* @mainpage
|
||||
*
|
||||
* @section libav_intro Introduction
|
||||
*
|
||||
* This document describe the usage of the different libraries
|
||||
* provided by FFmpeg.
|
||||
*
|
||||
* @li @ref libavc "libavcodec" encoding/decoding library
|
||||
* @li @subpage libavfilter graph based frame editing library
|
||||
* @li @ref libavf "libavformat" I/O and muxing/demuxing library
|
||||
* @li @ref lavd "libavdevice" special devices muxing/demuxing library
|
||||
* @li @ref lavu "libavutil" common utility library
|
||||
* @li @subpage libpostproc post processing library
|
||||
* @li @subpage libswscale color conversion and scaling library
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lavu Common utility functions
|
||||
*
|
||||
* @brief
|
||||
* libavutil contains the code shared across all the other FFmpeg
|
||||
* libraries
|
||||
*
|
||||
* @note In order to use the functions provided by avutil you must include
|
||||
* the specific header.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup lavu_crypto Crypto and Hashing
|
||||
*
|
||||
* @{
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_math Maths
|
||||
* @{
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_string String Manipulation
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_mem Memory Management
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_data Data Structures
|
||||
* @{
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_audio Audio related
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_error Error Codes
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_misc Other
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup lavu_internal Internal
|
||||
*
|
||||
* Not exported functions, for internal usage only
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup preproc_misc Preprocessor String Macros
|
||||
*
|
||||
* String manipulation macros
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define AV_STRINGIFY(s) AV_TOSTRING(s)
|
||||
#define AV_TOSTRING(s) #s
|
||||
|
||||
#define AV_GLUE(a, b) a ## b
|
||||
#define AV_JOIN(a, b) AV_GLUE(a, b)
|
||||
|
||||
#define AV_PRAGMA(s) _Pragma(#s)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup version_utils Library Version Macros
|
||||
*
|
||||
* Useful to check and match library version in order to maintain
|
||||
* backward compatibility.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
|
||||
#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
|
||||
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @defgroup lavu_ver Version and Build diagnostics
|
||||
*
|
||||
* Macros and function useful to check at compiletime and at runtime
|
||||
* which version of libavutil is in use.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 51
|
||||
#define LIBAVUTIL_VERSION_MINOR 35
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
LIBAVUTIL_VERSION_MINOR, \
|
||||
LIBAVUTIL_VERSION_MICRO)
|
||||
#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
|
||||
LIBAVUTIL_VERSION_MINOR, \
|
||||
LIBAVUTIL_VERSION_MICRO)
|
||||
#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
|
||||
|
||||
#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @defgroup depr_guards Deprecation guards
|
||||
* Those FF_API_* defines are not part of public API.
|
||||
* They may change, break or disappear at any time.
|
||||
*
|
||||
* They are used mostly internally to mark code that will be removed
|
||||
* on the next major version.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#ifndef FF_API_OLD_EVAL_NAMES
|
||||
#define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 52)
|
||||
#endif
|
||||
#ifndef FF_API_GET_BITS_PER_SAMPLE_FMT
|
||||
#define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR < 52)
|
||||
#endif
|
||||
#ifndef FF_API_FIND_OPT
|
||||
#define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR < 52)
|
||||
#endif
|
||||
#ifndef FF_API_AV_FIFO_PEEK
|
||||
#define FF_API_AV_FIFO_PEEK (LIBAVUTIL_VERSION_MAJOR < 52)
|
||||
#endif
|
||||
#ifndef FF_API_OLD_AVOPTIONS
|
||||
#define FF_API_OLD_AVOPTIONS (LIBAVUTIL_VERSION_MAJOR < 52)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_ver
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return the LIBAVUTIL_VERSION_INT constant.
|
||||
*/
|
||||
unsigned avutil_version(void);
|
||||
|
||||
/**
|
||||
* Return the libavutil build-time configuration.
|
||||
*/
|
||||
const char *avutil_configuration(void);
|
||||
|
||||
/**
|
||||
* Return the libavutil license.
|
||||
*/
|
||||
const char *avutil_license(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_media Media Type
|
||||
* @brief Media Type
|
||||
*/
|
||||
|
||||
enum AVMediaType {
|
||||
AVMEDIA_TYPE_UNKNOWN = -1, ///< Usually treated as AVMEDIA_TYPE_DATA
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
AVMEDIA_TYPE_AUDIO,
|
||||
AVMEDIA_TYPE_DATA, ///< Opaque data information usually continuous
|
||||
AVMEDIA_TYPE_SUBTITLE,
|
||||
AVMEDIA_TYPE_ATTACHMENT, ///< Opaque data information usually sparse
|
||||
AVMEDIA_TYPE_NB
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a string describing the media_type enum, NULL if media_type
|
||||
* is unknown.
|
||||
*/
|
||||
const char *av_get_media_type_string(enum AVMediaType media_type);
|
||||
|
||||
/**
|
||||
* @defgroup lavu_const Constants
|
||||
* @{
|
||||
*
|
||||
* @defgroup lavu_enc Encoding specific
|
||||
*
|
||||
* @note those definition should move to avcodec
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define FF_LAMBDA_SHIFT 7
|
||||
#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
|
||||
#define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda
|
||||
#define FF_LAMBDA_MAX (256*128-1)
|
||||
|
||||
#define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @defgroup lavu_time Timestamp specific
|
||||
*
|
||||
* FFmpeg internal timebase and timestamp definitions
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Undefined timestamp value
|
||||
*
|
||||
* Usually reported by demuxer that work on containers that do not provide
|
||||
* either pts or dts.
|
||||
*/
|
||||
|
||||
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
|
||||
|
||||
/**
|
||||
* Internal time base represented as integer
|
||||
*/
|
||||
|
||||
#define AV_TIME_BASE 1000000
|
||||
|
||||
/**
|
||||
* Internal time base represented as fractional value
|
||||
*/
|
||||
|
||||
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
* @defgroup lavu_picture Image related
|
||||
*
|
||||
* AVPicture types, pixel formats and basic image planes manipulation.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum AVPictureType {
|
||||
AV_PICTURE_TYPE_NONE = 0, ///< Undefined
|
||||
AV_PICTURE_TYPE_I, ///< Intra
|
||||
AV_PICTURE_TYPE_P, ///< Predicted
|
||||
AV_PICTURE_TYPE_B, ///< Bi-dir predicted
|
||||
AV_PICTURE_TYPE_S, ///< S(GMC)-VOP MPEG4
|
||||
AV_PICTURE_TYPE_SI, ///< Switching Intra
|
||||
AV_PICTURE_TYPE_SP, ///< Switching Predicted
|
||||
AV_PICTURE_TYPE_BI, ///< BI type
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a single letter to describe the given picture type
|
||||
* pict_type.
|
||||
*
|
||||
* @param[in] pict_type the picture type @return a single character
|
||||
* representing the picture type, '?' if pict_type is unknown
|
||||
*/
|
||||
char av_get_picture_type_char(enum AVPictureType pict_type);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "error.h"
|
||||
#include "mathematics.h"
|
||||
#include "rational.h"
|
||||
#include "intfloat_readwrite.h"
|
||||
#include "log.h"
|
||||
#include "pixfmt.h"
|
||||
|
||||
/**
|
||||
* Return x default pointer in case p is NULL.
|
||||
*/
|
||||
static inline void *av_x_if_null(const void *p, const void *x)
|
||||
{
|
||||
return (void *)(intptr_t)(p ? p : x);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_AVUTIL_H */
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006 Ryan Martell. ([email protected])
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_BASE64_H
|
||||
#define AVUTIL_BASE64_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @defgroup lavu_base64 Base64
|
||||
* @ingroup lavu_crypto
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Decode a base64-encoded string.
|
||||
*
|
||||
* @param out buffer for decoded data
|
||||
* @param in null-terminated input string
|
||||
* @param out_size size in bytes of the out buffer, must be at
|
||||
* least 3/4 of the length of in
|
||||
* @return number of bytes written, or a negative value in case of
|
||||
* invalid input
|
||||
*/
|
||||
int av_base64_decode(uint8_t *out, const char *in, int out_size);
|
||||
|
||||
/**
|
||||
* Encode data to base64 and null-terminate.
|
||||
*
|
||||
* @param out buffer for encoded data
|
||||
* @param out_size size in bytes of the output buffer, must be at
|
||||
* least AV_BASE64_SIZE(in_size)
|
||||
* @param in_size size in bytes of the 'in' buffer
|
||||
* @return 'out' or NULL in case of error
|
||||
*/
|
||||
char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
|
||||
|
||||
/**
|
||||
* Calculate the output size needed to base64-encode x bytes.
|
||||
*/
|
||||
#define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_BASE64_H */
|
||||
@@ -1,136 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Nicolas George
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_BPRINT_H
|
||||
#define AVUTIL_BPRINT_H
|
||||
|
||||
#include "attributes.h"
|
||||
|
||||
/**
|
||||
* Define a structure with extra padding to a fixed size
|
||||
* This helps ensuring binary compatibility with future versions.
|
||||
*/
|
||||
#define FF_PAD_STRUCTURE(size, ...) \
|
||||
__VA_ARGS__ \
|
||||
char reserved_padding[size - sizeof(struct { __VA_ARGS__ })];
|
||||
|
||||
/**
|
||||
* Buffer to print data progressively
|
||||
*
|
||||
* The string buffer grows as necessary and is always 0-terminated.
|
||||
* The content of the string is never accessed, and thus is
|
||||
* encoding-agnostic and can even hold binary data.
|
||||
*
|
||||
* Small buffers are kept in the structure itself, and thus require no
|
||||
* memory allocation at all (unless the contents of the buffer is needed
|
||||
* after the structure goes out of scope). This is almost as lightweight as
|
||||
* declaring a local "char buf[512]".
|
||||
*
|
||||
* The length of the string can go beyond the allocated size: the buffer is
|
||||
* then truncated, but the functions still keep account of the actual total
|
||||
* length.
|
||||
*
|
||||
* In other words, buf->len can be greater than buf->size and records the
|
||||
* total length of what would have been to the buffer if there had been
|
||||
* enough memory.
|
||||
*
|
||||
* Append operations do not need to be tested for failure: if a memory
|
||||
* allocation fails, data stop being appended to the buffer, but the length
|
||||
* is still updated. This situation can be tested with
|
||||
* av_bprint_is_complete().
|
||||
*
|
||||
* The size_max field determines several possible behaviours:
|
||||
*
|
||||
* size_max = -1 (= UINT_MAX) or any large value will let the buffer be
|
||||
* reallocated as necessary, with an amortized linear cost.
|
||||
*
|
||||
* size_max = 0 prevents writing anything to the buffer: only the total
|
||||
* length is computed. The write operations can then possibly be repeated in
|
||||
* a buffer with exactly the necessary size
|
||||
* (using size_init = size_max = len + 1).
|
||||
*
|
||||
* size_max = 1 is automatically replaced by the exact size available in the
|
||||
* structure itself, thus ensuring no dynamic memory allocation. The
|
||||
* internal buffer is large enough to hold a reasonable paragraph of text,
|
||||
* such as the current paragraph.
|
||||
*/
|
||||
typedef struct AVBPrint {
|
||||
FF_PAD_STRUCTURE(1024,
|
||||
char *str; /** string so far */
|
||||
unsigned len; /** length so far */
|
||||
unsigned size; /** allocated memory */
|
||||
unsigned size_max; /** maximum allocated memory */
|
||||
char reserved_internal_buffer[1];
|
||||
)
|
||||
} AVBPrint;
|
||||
|
||||
/**
|
||||
* Init a print buffer.
|
||||
*
|
||||
* @param buf buffer to init
|
||||
* @param size_init initial size (including the final 0)
|
||||
* @param size_max maximum size;
|
||||
* 0 means do not write anything, just count the length;
|
||||
* 1 is replaced by the maximum value for automatic storage
|
||||
*/
|
||||
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max);
|
||||
|
||||
/**
|
||||
* Convenience macros for special values for size_max.
|
||||
*/
|
||||
#define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1)
|
||||
#define AV_BPRINT_SIZE_AUTOMATIC 1
|
||||
#define AV_BPRINT_SIZE_COUNT_ONLY 0
|
||||
|
||||
/**
|
||||
* Append a formated string to a print buffer.
|
||||
*/
|
||||
void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3);
|
||||
|
||||
/**
|
||||
* Append char c n times to a print buffer.
|
||||
*/
|
||||
void av_bprint_chars(AVBPrint *buf, char c, unsigned n);
|
||||
|
||||
/**
|
||||
* Test if the print buffer is complete (not truncated).
|
||||
*
|
||||
* It may have been truncated due to a memory allocation failure
|
||||
* or the size_max limit (compare size and size_max if necessary).
|
||||
*/
|
||||
static inline int av_bprint_is_complete(AVBPrint *buf)
|
||||
{
|
||||
return buf->len < buf->size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalize a print buffer.
|
||||
*
|
||||
* The print buffer can no longer be used afterwards,
|
||||
* but the len and size fields are still valid.
|
||||
*
|
||||
* @arg[out] ret_str if not NULL, used to return a permanent copy of the
|
||||
* buffer contents, or NULL if memory allocation fails;
|
||||
* if NULL, the buffer is discarded and freed
|
||||
* @return 0 for success or error code (probably AVERROR(ENOMEM))
|
||||
*/
|
||||
int av_bprint_finalize(AVBPrint *buf, char **ret_str);
|
||||
|
||||
#endif /* AVUTIL_BPRINT_H */
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* byte swapping routines
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_BSWAP_H
|
||||
#define AVUTIL_BSWAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "libavutil/avconfig.h"
|
||||
#include "attributes.h"
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if ARCH_ARM
|
||||
# include "arm/bswap.h"
|
||||
#elif ARCH_AVR32
|
||||
# include "avr32/bswap.h"
|
||||
#elif ARCH_BFIN
|
||||
# include "bfin/bswap.h"
|
||||
#elif ARCH_SH4
|
||||
# include "sh4/bswap.h"
|
||||
#elif ARCH_X86
|
||||
# include "x86/bswap.h"
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_AV_CONFIG_H */
|
||||
|
||||
#define AV_BSWAP16C(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff))
|
||||
#define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16))
|
||||
#define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32))
|
||||
|
||||
#define AV_BSWAPC(s, x) AV_BSWAP##s##C(x)
|
||||
|
||||
#ifndef av_bswap16
|
||||
static av_always_inline av_const uint16_t av_bswap16(uint16_t x)
|
||||
{
|
||||
x= (x>>8) | (x<<8);
|
||||
return x;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef av_bswap32
|
||||
static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
|
||||
{
|
||||
return AV_BSWAP32C(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef av_bswap64
|
||||
static inline uint64_t av_const av_bswap64(uint64_t x)
|
||||
{
|
||||
return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
|
||||
}
|
||||
#endif
|
||||
|
||||
// be2ne ... big-endian to native-endian
|
||||
// le2ne ... little-endian to native-endian
|
||||
|
||||
#if AV_HAVE_BIGENDIAN
|
||||
#define av_be2ne16(x) (x)
|
||||
#define av_be2ne32(x) (x)
|
||||
#define av_be2ne64(x) (x)
|
||||
#define av_le2ne16(x) av_bswap16(x)
|
||||
#define av_le2ne32(x) av_bswap32(x)
|
||||
#define av_le2ne64(x) av_bswap64(x)
|
||||
#define AV_BE2NEC(s, x) (x)
|
||||
#define AV_LE2NEC(s, x) AV_BSWAPC(s, x)
|
||||
#else
|
||||
#define av_be2ne16(x) av_bswap16(x)
|
||||
#define av_be2ne32(x) av_bswap32(x)
|
||||
#define av_be2ne64(x) av_bswap64(x)
|
||||
#define av_le2ne16(x) (x)
|
||||
#define av_le2ne32(x) (x)
|
||||
#define av_le2ne64(x) (x)
|
||||
#define AV_BE2NEC(s, x) AV_BSWAPC(s, x)
|
||||
#define AV_LE2NEC(s, x) (x)
|
||||
#endif
|
||||
|
||||
#define AV_BE2NE16C(x) AV_BE2NEC(16, x)
|
||||
#define AV_BE2NE32C(x) AV_BE2NEC(32, x)
|
||||
#define AV_BE2NE64C(x) AV_BE2NEC(64, x)
|
||||
#define AV_LE2NE16C(x) AV_LE2NEC(16, x)
|
||||
#define AV_LE2NE32C(x) AV_LE2NEC(32, x)
|
||||
#define AV_LE2NE64C(x) AV_LE2NEC(64, x)
|
||||
|
||||
#endif /* AVUTIL_BSWAP_H */
|
||||
@@ -1,400 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* common internal and external API header
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_COMMON_H
|
||||
#define AVUTIL_COMMON_H
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "attributes.h"
|
||||
#include "libavutil/avconfig.h"
|
||||
|
||||
#if AV_HAVE_BIGENDIAN
|
||||
# define AV_NE(be, le) (be)
|
||||
#else
|
||||
# define AV_NE(be, le) (le)
|
||||
#endif
|
||||
|
||||
//rounded division & shift
|
||||
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
|
||||
/* assume b>0 */
|
||||
#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
|
||||
#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
|
||||
#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
|
||||
#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
|
||||
#define FFSIGN(a) ((a) > 0 ? 1 : -1)
|
||||
|
||||
#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
|
||||
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
|
||||
#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
|
||||
|
||||
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
|
||||
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))
|
||||
|
||||
/* misc math functions */
|
||||
extern const uint8_t ff_log2_tab[256];
|
||||
|
||||
extern const uint8_t av_reverse[256];
|
||||
|
||||
static av_always_inline av_const int av_log2_c(unsigned int v)
|
||||
{
|
||||
int n = 0;
|
||||
if (v & 0xffff0000) {
|
||||
v >>= 16;
|
||||
n += 16;
|
||||
}
|
||||
if (v & 0xff00) {
|
||||
v >>= 8;
|
||||
n += 8;
|
||||
}
|
||||
n += ff_log2_tab[v];
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
static av_always_inline av_const int av_log2_16bit_c(unsigned int v)
|
||||
{
|
||||
int n = 0;
|
||||
if (v & 0xff00) {
|
||||
v >>= 8;
|
||||
n += 8;
|
||||
}
|
||||
n += ff_log2_tab[v];
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "config.h"
|
||||
# include "intmath.h"
|
||||
#endif
|
||||
|
||||
/* Pull in unguarded fallback defines at the end of this file. */
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
* Clip a signed integer value into the amin-amax range.
|
||||
* @param a value to clip
|
||||
* @param amin minimum value of the clip range
|
||||
* @param amax maximum value of the clip range
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
|
||||
{
|
||||
if (a < amin) return amin;
|
||||
else if (a > amax) return amax;
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clip a signed integer value into the 0-255 range.
|
||||
* @param a value to clip
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const uint8_t av_clip_uint8_c(int a)
|
||||
{
|
||||
if (a&(~0xFF)) return (-a)>>31;
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clip a signed integer value into the -128,127 range.
|
||||
* @param a value to clip
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const int8_t av_clip_int8_c(int a)
|
||||
{
|
||||
if ((a+0x80) & ~0xFF) return (a>>31) ^ 0x7F;
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clip a signed integer value into the 0-65535 range.
|
||||
* @param a value to clip
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const uint16_t av_clip_uint16_c(int a)
|
||||
{
|
||||
if (a&(~0xFFFF)) return (-a)>>31;
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clip a signed integer value into the -32768,32767 range.
|
||||
* @param a value to clip
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const int16_t av_clip_int16_c(int a)
|
||||
{
|
||||
if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clip a signed 64-bit integer value into the -2147483648,2147483647 range.
|
||||
* @param a value to clip
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
|
||||
{
|
||||
if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clip a signed integer to an unsigned power of two range.
|
||||
* @param a value to clip
|
||||
* @param p bit position to clip at
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
|
||||
{
|
||||
if (a & ~((1<<p) - 1)) return -a >> 31 & ((1<<p) - 1);
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clip a float value into the amin-amax range.
|
||||
* @param a value to clip
|
||||
* @param amin minimum value of the clip range
|
||||
* @param amax maximum value of the clip range
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
|
||||
{
|
||||
if (a < amin) return amin;
|
||||
else if (a > amax) return amax;
|
||||
else return a;
|
||||
}
|
||||
|
||||
/** Compute ceil(log2(x)).
|
||||
* @param x value used to compute ceil(log2(x))
|
||||
* @return computed ceiling of log2(x)
|
||||
*/
|
||||
static av_always_inline av_const int av_ceil_log2_c(int x)
|
||||
{
|
||||
return av_log2((x - 1) << 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count number of bits set to one in x
|
||||
* @param x value to count bits of
|
||||
* @return the number of bits set to one in x
|
||||
*/
|
||||
static av_always_inline av_const int av_popcount_c(uint32_t x)
|
||||
{
|
||||
x -= (x >> 1) & 0x55555555;
|
||||
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
|
||||
x = (x + (x >> 4)) & 0x0F0F0F0F;
|
||||
x += x >> 8;
|
||||
return (x + (x >> 16)) & 0x3F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count number of bits set to one in x
|
||||
* @param x value to count bits of
|
||||
* @return the number of bits set to one in x
|
||||
*/
|
||||
static av_always_inline av_const int av_popcount64_c(uint64_t x)
|
||||
{
|
||||
return av_popcount(x) + av_popcount(x >> 32);
|
||||
}
|
||||
|
||||
#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
|
||||
#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
|
||||
|
||||
/**
|
||||
* Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
|
||||
*
|
||||
* @param val Output value, must be an lvalue of type uint32_t.
|
||||
* @param GET_BYTE Expression reading one byte from the input.
|
||||
* Evaluated up to 7 times (4 for the currently
|
||||
* assigned Unicode range). With a memory buffer
|
||||
* input, this could be *ptr++.
|
||||
* @param ERROR Expression to be evaluated on invalid input,
|
||||
* typically a goto statement.
|
||||
*/
|
||||
#define GET_UTF8(val, GET_BYTE, ERROR)\
|
||||
val= GET_BYTE;\
|
||||
{\
|
||||
int ones= 7 - av_log2(val ^ 255);\
|
||||
if(ones==1)\
|
||||
ERROR\
|
||||
val&= 127>>ones;\
|
||||
while(--ones > 0){\
|
||||
int tmp= GET_BYTE - 128;\
|
||||
if(tmp>>6)\
|
||||
ERROR\
|
||||
val= (val<<6) + tmp;\
|
||||
}\
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form.
|
||||
*
|
||||
* @param val Output value, must be an lvalue of type uint32_t.
|
||||
* @param GET_16BIT Expression returning two bytes of UTF-16 data converted
|
||||
* to native byte order. Evaluated one or two times.
|
||||
* @param ERROR Expression to be evaluated on invalid input,
|
||||
* typically a goto statement.
|
||||
*/
|
||||
#define GET_UTF16(val, GET_16BIT, ERROR)\
|
||||
val = GET_16BIT;\
|
||||
{\
|
||||
unsigned int hi = val - 0xD800;\
|
||||
if (hi < 0x800) {\
|
||||
val = GET_16BIT - 0xDC00;\
|
||||
if (val > 0x3FFU || hi > 0x3FFU)\
|
||||
ERROR\
|
||||
val += (hi<<10) + 0x10000;\
|
||||
}\
|
||||
}\
|
||||
|
||||
/**
|
||||
* @def PUT_UTF8(val, tmp, PUT_BYTE)
|
||||
* Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).
|
||||
* @param val is an input-only argument and should be of type uint32_t. It holds
|
||||
* a UCS-4 encoded Unicode character that is to be converted to UTF-8. If
|
||||
* val is given as a function it is executed only once.
|
||||
* @param tmp is a temporary variable and should be of type uint8_t. It
|
||||
* represents an intermediate value during conversion that is to be
|
||||
* output by PUT_BYTE.
|
||||
* @param PUT_BYTE writes the converted UTF-8 bytes to any proper destination.
|
||||
* It could be a function or a statement, and uses tmp as the input byte.
|
||||
* For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be
|
||||
* executed up to 4 times for values in the valid UTF-8 range and up to
|
||||
* 7 times in the general case, depending on the length of the converted
|
||||
* Unicode character.
|
||||
*/
|
||||
#define PUT_UTF8(val, tmp, PUT_BYTE)\
|
||||
{\
|
||||
int bytes, shift;\
|
||||
uint32_t in = val;\
|
||||
if (in < 0x80) {\
|
||||
tmp = in;\
|
||||
PUT_BYTE\
|
||||
} else {\
|
||||
bytes = (av_log2(in) + 4) / 5;\
|
||||
shift = (bytes - 1) * 6;\
|
||||
tmp = (256 - (256 >> bytes)) | (in >> shift);\
|
||||
PUT_BYTE\
|
||||
while (shift >= 6) {\
|
||||
shift -= 6;\
|
||||
tmp = 0x80 | ((in >> shift) & 0x3f);\
|
||||
PUT_BYTE\
|
||||
}\
|
||||
}\
|
||||
}
|
||||
|
||||
/**
|
||||
* @def PUT_UTF16(val, tmp, PUT_16BIT)
|
||||
* Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes).
|
||||
* @param val is an input-only argument and should be of type uint32_t. It holds
|
||||
* a UCS-4 encoded Unicode character that is to be converted to UTF-16. If
|
||||
* val is given as a function it is executed only once.
|
||||
* @param tmp is a temporary variable and should be of type uint16_t. It
|
||||
* represents an intermediate value during conversion that is to be
|
||||
* output by PUT_16BIT.
|
||||
* @param PUT_16BIT writes the converted UTF-16 data to any proper destination
|
||||
* in desired endianness. It could be a function or a statement, and uses tmp
|
||||
* as the input byte. For example, PUT_BYTE could be "*output++ = tmp;"
|
||||
* PUT_BYTE will be executed 1 or 2 times depending on input character.
|
||||
*/
|
||||
#define PUT_UTF16(val, tmp, PUT_16BIT)\
|
||||
{\
|
||||
uint32_t in = val;\
|
||||
if (in < 0x10000) {\
|
||||
tmp = in;\
|
||||
PUT_16BIT\
|
||||
} else {\
|
||||
tmp = 0xD800 | ((in - 0x10000) >> 10);\
|
||||
PUT_16BIT\
|
||||
tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
|
||||
PUT_16BIT\
|
||||
}\
|
||||
}\
|
||||
|
||||
|
||||
|
||||
#include "mem.h"
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "internal.h"
|
||||
#endif /* HAVE_AV_CONFIG_H */
|
||||
|
||||
#endif /* AVUTIL_COMMON_H */
|
||||
|
||||
/*
|
||||
* The following definitions are outside the multiple inclusion guard
|
||||
* to ensure they are immediately available in intmath.h.
|
||||
*/
|
||||
|
||||
#ifndef av_log2
|
||||
# define av_log2 av_log2_c
|
||||
#endif
|
||||
#ifndef av_log2_16bit
|
||||
# define av_log2_16bit av_log2_16bit_c
|
||||
#endif
|
||||
#ifndef av_ceil_log2
|
||||
# define av_ceil_log2 av_ceil_log2_c
|
||||
#endif
|
||||
#ifndef av_clip
|
||||
# define av_clip av_clip_c
|
||||
#endif
|
||||
#ifndef av_clip_uint8
|
||||
# define av_clip_uint8 av_clip_uint8_c
|
||||
#endif
|
||||
#ifndef av_clip_int8
|
||||
# define av_clip_int8 av_clip_int8_c
|
||||
#endif
|
||||
#ifndef av_clip_uint16
|
||||
# define av_clip_uint16 av_clip_uint16_c
|
||||
#endif
|
||||
#ifndef av_clip_int16
|
||||
# define av_clip_int16 av_clip_int16_c
|
||||
#endif
|
||||
#ifndef av_clipl_int32
|
||||
# define av_clipl_int32 av_clipl_int32_c
|
||||
#endif
|
||||
#ifndef av_clip_uintp2
|
||||
# define av_clip_uintp2 av_clip_uintp2_c
|
||||
#endif
|
||||
#ifndef av_clipf
|
||||
# define av_clipf av_clipf_c
|
||||
#endif
|
||||
#ifndef av_popcount
|
||||
# define av_popcount av_popcount_c
|
||||
#endif
|
||||
#ifndef av_popcount64
|
||||
# define av_popcount64 av_popcount64_c
|
||||
#endif
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_CPU_H
|
||||
#define AVUTIL_CPU_H
|
||||
|
||||
#define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */
|
||||
|
||||
/* lower 16 bits - CPU features */
|
||||
#define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX
|
||||
#define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext
|
||||
#define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW
|
||||
#define AV_CPU_FLAG_SSE 0x0008 ///< SSE functions
|
||||
#define AV_CPU_FLAG_SSE2 0x0010 ///< PIV SSE2 functions
|
||||
#define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster
|
||||
#define AV_CPU_FLAG_3DNOWEXT 0x0020 ///< AMD 3DNowExt
|
||||
#define AV_CPU_FLAG_SSE3 0x0040 ///< Prescott SSE3 functions
|
||||
#define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster
|
||||
#define AV_CPU_FLAG_SSSE3 0x0080 ///< Conroe SSSE3 functions
|
||||
#define AV_CPU_FLAG_ATOM 0x10000000 ///< Atom processor, some SSSE3 instructions are slower
|
||||
#define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions
|
||||
#define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions
|
||||
#define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
|
||||
#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions
|
||||
#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
|
||||
#define AV_CPU_FLAG_IWMMXT 0x0100 ///< XScale IWMMXT
|
||||
#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
|
||||
|
||||
/**
|
||||
* Return the flags which specify extensions supported by the CPU.
|
||||
*/
|
||||
int av_get_cpu_flags(void);
|
||||
|
||||
|
||||
/**
|
||||
* Disables cpu detection and forces the specified flags.
|
||||
*/
|
||||
void av_force_cpu_flags(int flags);
|
||||
|
||||
|
||||
/* The following CPU-specific functions shall not be called directly. */
|
||||
int ff_get_cpu_flags_arm(void);
|
||||
int ff_get_cpu_flags_ppc(void);
|
||||
int ff_get_cpu_flags_x86(void);
|
||||
|
||||
#endif /* AVUTIL_CPU_H */
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_CRC_H
|
||||
#define AVUTIL_CRC_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "attributes.h"
|
||||
|
||||
typedef uint32_t AVCRC;
|
||||
|
||||
typedef enum {
|
||||
AV_CRC_8_ATM,
|
||||
AV_CRC_16_ANSI,
|
||||
AV_CRC_16_CCITT,
|
||||
AV_CRC_32_IEEE,
|
||||
AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */
|
||||
AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */
|
||||
}AVCRCId;
|
||||
|
||||
int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
|
||||
const AVCRC *av_crc_get_table(AVCRCId crc_id);
|
||||
uint32_t av_crc(const AVCRC *ctx, uint32_t start_crc, const uint8_t *buffer, size_t length) av_pure;
|
||||
|
||||
#endif /* AVUTIL_CRC_H */
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Public dictionary API.
|
||||
* @deprecated
|
||||
* AVDictionary is provided for compatibility with libav. It is both in
|
||||
* implementation as well as API inefficient. It does not scale and is
|
||||
* extremely slow with large dictionaries.
|
||||
* It is recommended that new code uses our tree container from tree.c/h
|
||||
* where applicable, which uses AVL trees to achieve O(log n) performance.
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_DICT_H
|
||||
#define AVUTIL_DICT_H
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_dict AVDictionary
|
||||
* @ingroup lavu_data
|
||||
*
|
||||
* @brief Simple key:value store
|
||||
*
|
||||
* @{
|
||||
* Dictionaries are used for storing key:value pairs. To create
|
||||
* an AVDictionary, simply pass an address of a NULL pointer to
|
||||
* av_dict_set(). NULL can be used as an empty dictionary wherever
|
||||
* a pointer to an AVDictionary is required.
|
||||
* Use av_dict_get() to retrieve an entry or iterate over all
|
||||
* entries and finally av_dict_free() to free the dictionary
|
||||
* and all its contents.
|
||||
*
|
||||
* @code
|
||||
* AVDictionary *d = NULL; // "create" an empty dictionary
|
||||
* av_dict_set(&d, "foo", "bar", 0); // add an entry
|
||||
*
|
||||
* char *k = av_strdup("key"); // if your strings are already allocated,
|
||||
* char *v = av_strdup("value"); // you can avoid copying them like this
|
||||
* av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
|
||||
*
|
||||
* AVDictionaryEntry *t = NULL;
|
||||
* while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) {
|
||||
* <....> // iterate over all entries in d
|
||||
* }
|
||||
*
|
||||
* av_dict_free(&d);
|
||||
* @endcode
|
||||
*
|
||||
*/
|
||||
|
||||
#define AV_DICT_MATCH_CASE 1
|
||||
#define AV_DICT_IGNORE_SUFFIX 2
|
||||
#define AV_DICT_DONT_STRDUP_KEY 4 /**< Take ownership of a key that's been
|
||||
allocated with av_malloc() and children. */
|
||||
#define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been
|
||||
allocated with av_malloc() and chilren. */
|
||||
#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries.
|
||||
#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
|
||||
delimiter is added, the strings are simply concatenated. */
|
||||
|
||||
typedef struct {
|
||||
char *key;
|
||||
char *value;
|
||||
} AVDictionaryEntry;
|
||||
|
||||
typedef struct AVDictionary AVDictionary;
|
||||
|
||||
/**
|
||||
* Get a dictionary entry with matching key.
|
||||
*
|
||||
* @param prev Set to the previous matching element to find the next.
|
||||
* If set to NULL the first matching element is returned.
|
||||
* @param flags Allows case as well as suffix-insensitive comparisons.
|
||||
* @return Found entry or NULL, changing key or value leads to undefined behavior.
|
||||
*/
|
||||
AVDictionaryEntry *
|
||||
av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
|
||||
|
||||
/**
|
||||
* Set the given entry in *pm, overwriting an existing entry.
|
||||
*
|
||||
* @param pm pointer to a pointer to a dictionary struct. If *pm is NULL
|
||||
* a dictionary struct is allocated and put in *pm.
|
||||
* @param key entry key to add to *pm (will be av_strduped depending on flags)
|
||||
* @param value entry value to add to *pm (will be av_strduped depending on flags).
|
||||
* Passing a NULL value will cause an existing tag to be deleted.
|
||||
* @return >= 0 on success otherwise an error code <0
|
||||
*/
|
||||
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
|
||||
|
||||
/**
|
||||
* Copy entries from one AVDictionary struct into another.
|
||||
* @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,
|
||||
* this function will allocate a struct for you and put it in *dst
|
||||
* @param src pointer to source AVDictionary struct
|
||||
* @param flags flags to use when setting entries in *dst
|
||||
* @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
|
||||
*/
|
||||
void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags);
|
||||
|
||||
/**
|
||||
* Free all the memory allocated for an AVDictionary struct
|
||||
* and all keys and values.
|
||||
*/
|
||||
void av_dict_free(AVDictionary **m);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif // AVUTIL_DICT_H
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* error code definitions
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_ERROR_H
|
||||
#define AVUTIL_ERROR_H
|
||||
|
||||
#include <errno.h>
|
||||
#include "avutil.h"
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_error
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/* error handling */
|
||||
#if EDOM > 0
|
||||
#define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions.
|
||||
#define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value.
|
||||
#else
|
||||
/* Some platforms have E* and errno already negated. */
|
||||
#define AVERROR(e) (e)
|
||||
#define AVUNERROR(e) (e)
|
||||
#endif
|
||||
|
||||
#define AVERROR_BSF_NOT_FOUND (-MKTAG(0xF8,'B','S','F')) ///< Bitstream filter not found
|
||||
#define AVERROR_BUG (-MKTAG( 'B','U','G','!')) ///< Internal bug, also see AVERROR_BUG2
|
||||
#define AVERROR_DECODER_NOT_FOUND (-MKTAG(0xF8,'D','E','C')) ///< Decoder not found
|
||||
#define AVERROR_DEMUXER_NOT_FOUND (-MKTAG(0xF8,'D','E','M')) ///< Demuxer not found
|
||||
#define AVERROR_ENCODER_NOT_FOUND (-MKTAG(0xF8,'E','N','C')) ///< Encoder not found
|
||||
#define AVERROR_EOF (-MKTAG( 'E','O','F',' ')) ///< End of file
|
||||
#define AVERROR_EXIT (-MKTAG( 'E','X','I','T')) ///< Immediate exit was requested; the called function should not be restarted
|
||||
#define AVERROR_FILTER_NOT_FOUND (-MKTAG(0xF8,'F','I','L')) ///< Filter not found
|
||||
#define AVERROR_INVALIDDATA (-MKTAG( 'I','N','D','A')) ///< Invalid data found when processing input
|
||||
#define AVERROR_MUXER_NOT_FOUND (-MKTAG(0xF8,'M','U','X')) ///< Muxer not found
|
||||
#define AVERROR_OPTION_NOT_FOUND (-MKTAG(0xF8,'O','P','T')) ///< Option not found
|
||||
#define AVERROR_PATCHWELCOME (-MKTAG( 'P','A','W','E')) ///< Not yet implemented in FFmpeg, patches welcome
|
||||
#define AVERROR_PROTOCOL_NOT_FOUND (-MKTAG(0xF8,'P','R','O')) ///< Protocol not found
|
||||
#define AVERROR_STREAM_NOT_FOUND (-MKTAG(0xF8,'S','T','R')) ///< Stream not found
|
||||
|
||||
/**
|
||||
* This is semantically identical to AVERROR_BUG
|
||||
* it has been introduced in Libav after our AVERROR_BUG and with a modified value.
|
||||
*/
|
||||
#define AVERROR_BUG2 (-MKTAG( 'B','U','G',' '))
|
||||
#define AVERROR_UNKNOWN (-MKTAG( 'U','N','K','N')) ///< Unknown error, typically from an external library
|
||||
|
||||
/**
|
||||
* Put a description of the AVERROR code errnum in errbuf.
|
||||
* In case of failure the global variable errno is set to indicate the
|
||||
* error. Even in case of failure av_strerror() will print a generic
|
||||
* error message indicating the errnum provided to errbuf.
|
||||
*
|
||||
* @param errnum error code to describe
|
||||
* @param errbuf buffer to which description is written
|
||||
* @param errbuf_size the size in bytes of errbuf
|
||||
* @return 0 on success, a negative value if a description for errnum
|
||||
* cannot be found
|
||||
*/
|
||||
int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_ERROR_H */
|
||||
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* simple arithmetic expression evaluator
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_EVAL_H
|
||||
#define AVUTIL_EVAL_H
|
||||
|
||||
#include "avutil.h"
|
||||
|
||||
typedef struct AVExpr AVExpr;
|
||||
|
||||
/**
|
||||
* Parse and evaluate an expression.
|
||||
* Note, this is significantly slower than av_expr_eval().
|
||||
*
|
||||
* @param res a pointer to a double where is put the result value of
|
||||
* the expression, or NAN in case of error
|
||||
* @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)"
|
||||
* @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {"PI", "E", 0}
|
||||
* @param const_values a zero terminated array of values for the identifiers from const_names
|
||||
* @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers
|
||||
* @param funcs1 NULL terminated array of function pointers for functions which take 1 argument
|
||||
* @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers
|
||||
* @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments
|
||||
* @param opaque a pointer which will be passed to all functions from funcs1 and funcs2
|
||||
* @param log_ctx parent logging context
|
||||
* @return 0 in case of success, a negative value corresponding to an
|
||||
* AVERROR code otherwise
|
||||
*/
|
||||
int av_expr_parse_and_eval(double *res, const char *s,
|
||||
const char * const *const_names, const double *const_values,
|
||||
const char * const *func1_names, double (* const *funcs1)(void *, double),
|
||||
const char * const *func2_names, double (* const *funcs2)(void *, double, double),
|
||||
void *opaque, int log_offset, void *log_ctx);
|
||||
|
||||
/**
|
||||
* Parse an expression.
|
||||
*
|
||||
* @param expr a pointer where is put an AVExpr containing the parsed
|
||||
* value in case of successful parsing, or NULL otherwise.
|
||||
* The pointed to AVExpr must be freed with av_expr_free() by the user
|
||||
* when it is not needed anymore.
|
||||
* @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)"
|
||||
* @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {"PI", "E", 0}
|
||||
* @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers
|
||||
* @param funcs1 NULL terminated array of function pointers for functions which take 1 argument
|
||||
* @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers
|
||||
* @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments
|
||||
* @param log_ctx parent logging context
|
||||
* @return 0 in case of success, a negative value corresponding to an
|
||||
* AVERROR code otherwise
|
||||
*/
|
||||
int av_expr_parse(AVExpr **expr, const char *s,
|
||||
const char * const *const_names,
|
||||
const char * const *func1_names, double (* const *funcs1)(void *, double),
|
||||
const char * const *func2_names, double (* const *funcs2)(void *, double, double),
|
||||
int log_offset, void *log_ctx);
|
||||
|
||||
/**
|
||||
* Evaluate a previously parsed expression.
|
||||
*
|
||||
* @param const_values a zero terminated array of values for the identifiers from av_expr_parse() const_names
|
||||
* @param opaque a pointer which will be passed to all functions from funcs1 and funcs2
|
||||
* @return the value of the expression
|
||||
*/
|
||||
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque);
|
||||
|
||||
/**
|
||||
* Free a parsed expression previously created with av_expr_parse().
|
||||
*/
|
||||
void av_expr_free(AVExpr *e);
|
||||
|
||||
#if FF_API_OLD_EVAL_NAMES
|
||||
/**
|
||||
* @deprecated Deprecated in favor of av_expr_parse_and_eval().
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_parse_and_eval_expr(double *res, const char *s,
|
||||
const char * const *const_names, const double *const_values,
|
||||
const char * const *func1_names, double (* const *funcs1)(void *, double),
|
||||
const char * const *func2_names, double (* const *funcs2)(void *, double, double),
|
||||
void *opaque, int log_offset, void *log_ctx);
|
||||
|
||||
/**
|
||||
* @deprecated Deprecated in favor of av_expr_parse().
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_parse_expr(AVExpr **expr, const char *s,
|
||||
const char * const *const_names,
|
||||
const char * const *func1_names, double (* const *funcs1)(void *, double),
|
||||
const char * const *func2_names, double (* const *funcs2)(void *, double, double),
|
||||
int log_offset, void *log_ctx);
|
||||
/**
|
||||
* @deprecated Deprecated in favor of av_expr_eval().
|
||||
*/
|
||||
attribute_deprecated
|
||||
double av_eval_expr(AVExpr *e, const double *const_values, void *opaque);
|
||||
|
||||
/**
|
||||
* @deprecated Deprecated in favor of av_expr_free().
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_free_expr(AVExpr *e);
|
||||
#endif /* FF_API_OLD_EVAL_NAMES */
|
||||
|
||||
/**
|
||||
* Parse the string in numstr and return its value as a double. If
|
||||
* the string is empty, contains only whitespaces, or does not contain
|
||||
* an initial substring that has the expected syntax for a
|
||||
* floating-point number, no conversion is performed. In this case,
|
||||
* returns a value of zero and the value returned in tail is the value
|
||||
* of numstr.
|
||||
*
|
||||
* @param numstr a string representing a number, may contain one of
|
||||
* the International System number postfixes, for example 'K', 'M',
|
||||
* 'G'. If 'i' is appended after the postfix, powers of 2 are used
|
||||
* instead of powers of 10. The 'B' postfix multiplies the value for
|
||||
* 8, and can be appended after another postfix or used alone. This
|
||||
* allows using for example 'KB', 'MiB', 'G' and 'B' as postfix.
|
||||
* @param tail if non-NULL puts here the pointer to the char next
|
||||
* after the last parsed character
|
||||
*/
|
||||
double av_strtod(const char *numstr, char **tail);
|
||||
|
||||
#endif /* AVUTIL_EVAL_H */
|
||||
@@ -1,143 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* a very simple circular buffer FIFO implementation
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_FIFO_H
|
||||
#define AVUTIL_FIFO_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "avutil.h"
|
||||
|
||||
typedef struct AVFifoBuffer {
|
||||
uint8_t *buffer;
|
||||
uint8_t *rptr, *wptr, *end;
|
||||
uint32_t rndx, wndx;
|
||||
} AVFifoBuffer;
|
||||
|
||||
/**
|
||||
* Initialize an AVFifoBuffer.
|
||||
* @param size of FIFO
|
||||
* @return AVFifoBuffer or NULL in case of memory allocation failure
|
||||
*/
|
||||
AVFifoBuffer *av_fifo_alloc(unsigned int size);
|
||||
|
||||
/**
|
||||
* Free an AVFifoBuffer.
|
||||
* @param f AVFifoBuffer to free
|
||||
*/
|
||||
void av_fifo_free(AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
|
||||
* @param f AVFifoBuffer to reset
|
||||
*/
|
||||
void av_fifo_reset(AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Return the amount of data in bytes in the AVFifoBuffer, that is the
|
||||
* amount of data you can read from it.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @return size
|
||||
*/
|
||||
int av_fifo_size(AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Return the amount of space in bytes in the AVFifoBuffer, that is the
|
||||
* amount of data you can write into it.
|
||||
* @param f AVFifoBuffer to write into
|
||||
* @return size
|
||||
*/
|
||||
int av_fifo_space(AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Feed data from an AVFifoBuffer to a user-supplied callback.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @param buf_size number of bytes to read
|
||||
* @param func generic read function
|
||||
* @param dest data destination
|
||||
*/
|
||||
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
|
||||
|
||||
/**
|
||||
* Feed data from a user-supplied callback to an AVFifoBuffer.
|
||||
* @param f AVFifoBuffer to write to
|
||||
* @param src data source; non-const since it may be used as a
|
||||
* modifiable context by the function defined in func
|
||||
* @param size number of bytes to write
|
||||
* @param func generic write function; the first parameter is src,
|
||||
* the second is dest_buf, the third is dest_buf_size.
|
||||
* func must return the number of bytes written to dest_buf, or <= 0 to
|
||||
* indicate no more data available to write.
|
||||
* If func is NULL, src is interpreted as a simple byte array for source data.
|
||||
* @return the number of bytes written to the FIFO
|
||||
*/
|
||||
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
|
||||
|
||||
/**
|
||||
* Resize an AVFifoBuffer.
|
||||
* In case of reallocation failure, the old FIFO is kept unchanged.
|
||||
*
|
||||
* @param f AVFifoBuffer to resize
|
||||
* @param size new AVFifoBuffer size in bytes
|
||||
* @return <0 for failure, >=0 otherwise
|
||||
*/
|
||||
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);
|
||||
|
||||
/**
|
||||
* Read and discard the specified amount of data from an AVFifoBuffer.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @param size amount of data to read in bytes
|
||||
*/
|
||||
void av_fifo_drain(AVFifoBuffer *f, int size);
|
||||
|
||||
/**
|
||||
* Return a pointer to the data stored in a FIFO buffer at a certain offset.
|
||||
* The FIFO buffer is not modified.
|
||||
*
|
||||
* @param f AVFifoBuffer to peek at, f must be non-NULL
|
||||
* @param offs an offset in bytes, its absolute value must be less
|
||||
* than the used buffer size or the returned pointer will
|
||||
* point outside to the buffer data.
|
||||
* The used buffer size can be checked with av_fifo_size().
|
||||
*/
|
||||
static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs)
|
||||
{
|
||||
uint8_t *ptr = f->rptr + offs;
|
||||
if (ptr >= f->end)
|
||||
ptr = f->buffer + (ptr - f->end);
|
||||
else if (ptr < f->buffer)
|
||||
ptr = f->end - (f->buffer - ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
#if FF_API_AV_FIFO_PEEK
|
||||
/**
|
||||
* @deprecated Use av_fifo_peek2() instead.
|
||||
*/
|
||||
attribute_deprecated
|
||||
static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs)
|
||||
{
|
||||
return *av_fifo_peek2(f, offs);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_FIFO_H */
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_FILE_H
|
||||
#define AVUTIL_FILE_H
|
||||
|
||||
#include "avutil.h"
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Misc file utilities.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Read the file with name filename, and put its content in a newly
|
||||
* allocated buffer or map it with mmap() when available.
|
||||
* In case of success set *bufptr to the read or mmapped buffer, and
|
||||
* *size to the size in bytes of the buffer in *bufptr.
|
||||
* The returned buffer must be released with av_file_unmap().
|
||||
*
|
||||
* @param log_offset loglevel offset used for logging
|
||||
* @param log_ctx context used for logging
|
||||
* @return a non negative number in case of success, a negative value
|
||||
* corresponding to an AVERROR error code in case of failure
|
||||
*/
|
||||
int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
|
||||
int log_offset, void *log_ctx);
|
||||
|
||||
/**
|
||||
* Unmap or free the buffer bufptr created by av_file_map().
|
||||
*
|
||||
* @param size size in bytes of bufptr, must be the same as returned
|
||||
* by av_file_map()
|
||||
*/
|
||||
void av_file_unmap(uint8_t *bufptr, size_t size);
|
||||
|
||||
/**
|
||||
* Wrapper to work around the lack of mkstemp() on mingw.
|
||||
* Also, tries to create file in /tmp first, if possible.
|
||||
* *prefix can be a character constant; *filename will be allocated internally.
|
||||
* @return file descriptor of opened file (or -1 on error)
|
||||
* and opened file name in **filename.
|
||||
*/
|
||||
int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
|
||||
|
||||
#endif /* AVUTIL_FILE_H */
|
||||
@@ -1,138 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_IMGUTILS_H
|
||||
#define AVUTIL_IMGUTILS_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* misc image utilities
|
||||
*
|
||||
* @addtogroup lavu_picture
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "avutil.h"
|
||||
#include "pixdesc.h"
|
||||
|
||||
/**
|
||||
* Compute the max pixel step for each plane of an image with a
|
||||
* format described by pixdesc.
|
||||
*
|
||||
* The pixel step is the distance in bytes between the first byte of
|
||||
* the group of bytes which describe a pixel component and the first
|
||||
* byte of the successive group in the same plane for the same
|
||||
* component.
|
||||
*
|
||||
* @param max_pixsteps an array which is filled with the max pixel step
|
||||
* for each plane. Since a plane may contain different pixel
|
||||
* components, the computed max_pixsteps[plane] is relative to the
|
||||
* component in the plane with the max pixel step.
|
||||
* @param max_pixstep_comps an array which is filled with the component
|
||||
* for each plane which has the max pixel step. May be NULL.
|
||||
*/
|
||||
void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
|
||||
const AVPixFmtDescriptor *pixdesc);
|
||||
|
||||
/**
|
||||
* Compute the size of an image line with format pix_fmt and width
|
||||
* width for the plane plane.
|
||||
*
|
||||
* @return the computed size in bytes
|
||||
*/
|
||||
int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane);
|
||||
|
||||
/**
|
||||
* Fill plane linesizes for an image with pixel format pix_fmt and
|
||||
* width width.
|
||||
*
|
||||
* @param linesizes array to be filled with the linesize for each plane
|
||||
* @return >= 0 in case of success, a negative error code otherwise
|
||||
*/
|
||||
int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width);
|
||||
|
||||
/**
|
||||
* Fill plane data pointers for an image with pixel format pix_fmt and
|
||||
* height height.
|
||||
*
|
||||
* @param data pointers array to be filled with the pointer for each image plane
|
||||
* @param ptr the pointer to a buffer which will contain the image
|
||||
* @param linesizes the array containing the linesize for each
|
||||
* plane, should be filled by av_image_fill_linesizes()
|
||||
* @return the size in bytes required for the image buffer, a negative
|
||||
* error code in case of failure
|
||||
*/
|
||||
int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
|
||||
uint8_t *ptr, const int linesizes[4]);
|
||||
|
||||
/**
|
||||
* Allocate an image with size w and h and pixel format pix_fmt, and
|
||||
* fill pointers and linesizes accordingly.
|
||||
* The allocated image buffer has to be freed by using
|
||||
* av_freep(&pointers[0]).
|
||||
*
|
||||
* @param align the value to use for buffer size alignment
|
||||
* @return the size in bytes required for the image buffer, a negative
|
||||
* error code in case of failure
|
||||
*/
|
||||
int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
|
||||
int w, int h, enum PixelFormat pix_fmt, int align);
|
||||
|
||||
/**
|
||||
* Copy image plane from src to dst.
|
||||
* That is, copy "height" number of lines of "bytewidth" bytes each.
|
||||
* The first byte of each successive line is separated by *_linesize
|
||||
* bytes.
|
||||
*
|
||||
* @param dst_linesize linesize for the image plane in dst
|
||||
* @param src_linesize linesize for the image plane in src
|
||||
*/
|
||||
void av_image_copy_plane(uint8_t *dst, int dst_linesize,
|
||||
const uint8_t *src, int src_linesize,
|
||||
int bytewidth, int height);
|
||||
|
||||
/**
|
||||
* Copy image in src_data to dst_data.
|
||||
*
|
||||
* @param dst_linesizes linesizes for the image in dst_data
|
||||
* @param src_linesizes linesizes for the image in src_data
|
||||
*/
|
||||
void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
|
||||
const uint8_t *src_data[4], const int src_linesizes[4],
|
||||
enum PixelFormat pix_fmt, int width, int height);
|
||||
|
||||
/**
|
||||
* Check if the given dimension of an image is valid, meaning that all
|
||||
* bytes of the image can be addressed with a signed int.
|
||||
*
|
||||
* @param w the width of the picture
|
||||
* @param h the height of the picture
|
||||
* @param log_offset the offset to sum to the log level for logging with log_ctx
|
||||
* @param log_ctx the parent logging context, it may be NULL
|
||||
* @return >= 0 if valid, a negative error code otherwise
|
||||
*/
|
||||
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);
|
||||
|
||||
int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
#endif /* AVUTIL_IMGUTILS_H */
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Mans Rullgard
|
||||
*
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* Libav 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* Libav 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 Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_INTFLOAT_H
|
||||
#define AVUTIL_INTFLOAT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "attributes.h"
|
||||
|
||||
union av_intfloat32 {
|
||||
uint32_t i;
|
||||
float f;
|
||||
};
|
||||
|
||||
union av_intfloat64 {
|
||||
uint64_t i;
|
||||
double f;
|
||||
};
|
||||
|
||||
/**
|
||||
* Reinterpret a 32-bit integer as a float.
|
||||
*/
|
||||
static av_always_inline float av_int2float(uint32_t i)
|
||||
{
|
||||
union av_intfloat32 v = { .i = i };
|
||||
return v.f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinterpret a float as a 32-bit integer.
|
||||
*/
|
||||
static av_always_inline uint32_t av_float2int(float f)
|
||||
{
|
||||
union av_intfloat32 v = { .f = f };
|
||||
return v.i;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinterpret a 64-bit integer as a double.
|
||||
*/
|
||||
static av_always_inline double av_int2double(uint64_t i)
|
||||
{
|
||||
union av_intfloat64 v = { .i = i };
|
||||
return v.f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinterpret a double as a 64-bit integer.
|
||||
*/
|
||||
static av_always_inline uint64_t av_double2int(double f)
|
||||
{
|
||||
union av_intfloat64 v = { .f = f };
|
||||
return v.i;
|
||||
}
|
||||
|
||||
#endif /* AVUTIL_INTFLOAT_H */
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2005 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_INTFLOAT_READWRITE_H
|
||||
#define AVUTIL_INTFLOAT_READWRITE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "attributes.h"
|
||||
|
||||
/* IEEE 80 bits extended float */
|
||||
typedef struct AVExtFloat {
|
||||
uint8_t exponent[2];
|
||||
uint8_t mantissa[8];
|
||||
} AVExtFloat;
|
||||
|
||||
attribute_deprecated double av_int2dbl(int64_t v) av_const;
|
||||
attribute_deprecated float av_int2flt(int32_t v) av_const;
|
||||
attribute_deprecated double av_ext2dbl(const AVExtFloat ext) av_const;
|
||||
attribute_deprecated int64_t av_dbl2int(double d) av_const;
|
||||
attribute_deprecated int32_t av_flt2int(float d) av_const;
|
||||
attribute_deprecated AVExtFloat av_dbl2ext(double d) av_const;
|
||||
|
||||
#endif /* AVUTIL_INTFLOAT_READWRITE_H */
|
||||
@@ -1,522 +0,0 @@
|
||||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_INTREADWRITE_H
|
||||
#define AVUTIL_INTREADWRITE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "libavutil/avconfig.h"
|
||||
#include "attributes.h"
|
||||
#include "bswap.h"
|
||||
|
||||
typedef union {
|
||||
uint64_t u64;
|
||||
uint32_t u32[2];
|
||||
uint16_t u16[4];
|
||||
uint8_t u8 [8];
|
||||
double f64;
|
||||
float f32[2];
|
||||
} av_alias av_alias64;
|
||||
|
||||
typedef union {
|
||||
uint32_t u32;
|
||||
uint16_t u16[2];
|
||||
uint8_t u8 [4];
|
||||
float f32;
|
||||
} av_alias av_alias32;
|
||||
|
||||
typedef union {
|
||||
uint16_t u16;
|
||||
uint8_t u8 [2];
|
||||
} av_alias av_alias16;
|
||||
|
||||
/*
|
||||
* Arch-specific headers can provide any combination of
|
||||
* AV_[RW][BLN](16|24|32|64) and AV_(COPY|SWAP|ZERO)(64|128) macros.
|
||||
* Preprocessor symbols must be defined, even if these are implemented
|
||||
* as inline functions.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if ARCH_ARM
|
||||
# include "arm/intreadwrite.h"
|
||||
#elif ARCH_AVR32
|
||||
# include "avr32/intreadwrite.h"
|
||||
#elif ARCH_MIPS
|
||||
# include "mips/intreadwrite.h"
|
||||
#elif ARCH_PPC
|
||||
# include "ppc/intreadwrite.h"
|
||||
#elif ARCH_TOMI
|
||||
# include "tomi/intreadwrite.h"
|
||||
#elif ARCH_X86
|
||||
# include "x86/intreadwrite.h"
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_AV_CONFIG_H */
|
||||
|
||||
/*
|
||||
* Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers.
|
||||
*/
|
||||
|
||||
#if AV_HAVE_BIGENDIAN
|
||||
|
||||
# if defined(AV_RN16) && !defined(AV_RB16)
|
||||
# define AV_RB16(p) AV_RN16(p)
|
||||
# elif !defined(AV_RN16) && defined(AV_RB16)
|
||||
# define AV_RN16(p) AV_RB16(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN16) && !defined(AV_WB16)
|
||||
# define AV_WB16(p, v) AV_WN16(p, v)
|
||||
# elif !defined(AV_WN16) && defined(AV_WB16)
|
||||
# define AV_WN16(p, v) AV_WB16(p, v)
|
||||
# endif
|
||||
|
||||
# if defined(AV_RN24) && !defined(AV_RB24)
|
||||
# define AV_RB24(p) AV_RN24(p)
|
||||
# elif !defined(AV_RN24) && defined(AV_RB24)
|
||||
# define AV_RN24(p) AV_RB24(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN24) && !defined(AV_WB24)
|
||||
# define AV_WB24(p, v) AV_WN24(p, v)
|
||||
# elif !defined(AV_WN24) && defined(AV_WB24)
|
||||
# define AV_WN24(p, v) AV_WB24(p, v)
|
||||
# endif
|
||||
|
||||
# if defined(AV_RN32) && !defined(AV_RB32)
|
||||
# define AV_RB32(p) AV_RN32(p)
|
||||
# elif !defined(AV_RN32) && defined(AV_RB32)
|
||||
# define AV_RN32(p) AV_RB32(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN32) && !defined(AV_WB32)
|
||||
# define AV_WB32(p, v) AV_WN32(p, v)
|
||||
# elif !defined(AV_WN32) && defined(AV_WB32)
|
||||
# define AV_WN32(p, v) AV_WB32(p, v)
|
||||
# endif
|
||||
|
||||
# if defined(AV_RN64) && !defined(AV_RB64)
|
||||
# define AV_RB64(p) AV_RN64(p)
|
||||
# elif !defined(AV_RN64) && defined(AV_RB64)
|
||||
# define AV_RN64(p) AV_RB64(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN64) && !defined(AV_WB64)
|
||||
# define AV_WB64(p, v) AV_WN64(p, v)
|
||||
# elif !defined(AV_WN64) && defined(AV_WB64)
|
||||
# define AV_WN64(p, v) AV_WB64(p, v)
|
||||
# endif
|
||||
|
||||
#else /* AV_HAVE_BIGENDIAN */
|
||||
|
||||
# if defined(AV_RN16) && !defined(AV_RL16)
|
||||
# define AV_RL16(p) AV_RN16(p)
|
||||
# elif !defined(AV_RN16) && defined(AV_RL16)
|
||||
# define AV_RN16(p) AV_RL16(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN16) && !defined(AV_WL16)
|
||||
# define AV_WL16(p, v) AV_WN16(p, v)
|
||||
# elif !defined(AV_WN16) && defined(AV_WL16)
|
||||
# define AV_WN16(p, v) AV_WL16(p, v)
|
||||
# endif
|
||||
|
||||
# if defined(AV_RN24) && !defined(AV_RL24)
|
||||
# define AV_RL24(p) AV_RN24(p)
|
||||
# elif !defined(AV_RN24) && defined(AV_RL24)
|
||||
# define AV_RN24(p) AV_RL24(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN24) && !defined(AV_WL24)
|
||||
# define AV_WL24(p, v) AV_WN24(p, v)
|
||||
# elif !defined(AV_WN24) && defined(AV_WL24)
|
||||
# define AV_WN24(p, v) AV_WL24(p, v)
|
||||
# endif
|
||||
|
||||
# if defined(AV_RN32) && !defined(AV_RL32)
|
||||
# define AV_RL32(p) AV_RN32(p)
|
||||
# elif !defined(AV_RN32) && defined(AV_RL32)
|
||||
# define AV_RN32(p) AV_RL32(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN32) && !defined(AV_WL32)
|
||||
# define AV_WL32(p, v) AV_WN32(p, v)
|
||||
# elif !defined(AV_WN32) && defined(AV_WL32)
|
||||
# define AV_WN32(p, v) AV_WL32(p, v)
|
||||
# endif
|
||||
|
||||
# if defined(AV_RN64) && !defined(AV_RL64)
|
||||
# define AV_RL64(p) AV_RN64(p)
|
||||
# elif !defined(AV_RN64) && defined(AV_RL64)
|
||||
# define AV_RN64(p) AV_RL64(p)
|
||||
# endif
|
||||
|
||||
# if defined(AV_WN64) && !defined(AV_WL64)
|
||||
# define AV_WL64(p, v) AV_WN64(p, v)
|
||||
# elif !defined(AV_WN64) && defined(AV_WL64)
|
||||
# define AV_WN64(p, v) AV_WL64(p, v)
|
||||
# endif
|
||||
|
||||
#endif /* !AV_HAVE_BIGENDIAN */
|
||||
|
||||
/*
|
||||
* Define AV_[RW]N helper macros to simplify definitions not provided
|
||||
* by per-arch headers.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && !defined(__TI_COMPILER_VERSION__)
|
||||
|
||||
union unaligned_64 { uint64_t l; } __attribute__((packed)) av_alias;
|
||||
union unaligned_32 { uint32_t l; } __attribute__((packed)) av_alias;
|
||||
union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
|
||||
|
||||
# define AV_RN(s, p) (((const union unaligned_##s *) (p))->l)
|
||||
# define AV_WN(s, p, v) ((((union unaligned_##s *) (p))->l) = (v))
|
||||
|
||||
#elif defined(__DECC)
|
||||
|
||||
# define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
|
||||
# define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v))
|
||||
|
||||
#elif AV_HAVE_FAST_UNALIGNED
|
||||
|
||||
# define AV_RN(s, p) (((const av_alias##s*)(p))->u##s)
|
||||
# define AV_WN(s, p, v) (((av_alias##s*)(p))->u##s = (v))
|
||||
|
||||
#else
|
||||
|
||||
#ifndef AV_RB16
|
||||
# define AV_RB16(x) \
|
||||
((((const uint8_t*)(x))[0] << 8) | \
|
||||
((const uint8_t*)(x))[1])
|
||||
#endif
|
||||
#ifndef AV_WB16
|
||||
# define AV_WB16(p, d) do { \
|
||||
((uint8_t*)(p))[1] = (d); \
|
||||
((uint8_t*)(p))[0] = (d)>>8; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL16
|
||||
# define AV_RL16(x) \
|
||||
((((const uint8_t*)(x))[1] << 8) | \
|
||||
((const uint8_t*)(x))[0])
|
||||
#endif
|
||||
#ifndef AV_WL16
|
||||
# define AV_WL16(p, d) do { \
|
||||
((uint8_t*)(p))[0] = (d); \
|
||||
((uint8_t*)(p))[1] = (d)>>8; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB32
|
||||
# define AV_RB32(x) \
|
||||
(((uint32_t)((const uint8_t*)(x))[0] << 24) | \
|
||||
(((const uint8_t*)(x))[1] << 16) | \
|
||||
(((const uint8_t*)(x))[2] << 8) | \
|
||||
((const uint8_t*)(x))[3])
|
||||
#endif
|
||||
#ifndef AV_WB32
|
||||
# define AV_WB32(p, d) do { \
|
||||
((uint8_t*)(p))[3] = (d); \
|
||||
((uint8_t*)(p))[2] = (d)>>8; \
|
||||
((uint8_t*)(p))[1] = (d)>>16; \
|
||||
((uint8_t*)(p))[0] = (d)>>24; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL32
|
||||
# define AV_RL32(x) \
|
||||
(((uint32_t)((const uint8_t*)(x))[3] << 24) | \
|
||||
(((const uint8_t*)(x))[2] << 16) | \
|
||||
(((const uint8_t*)(x))[1] << 8) | \
|
||||
((const uint8_t*)(x))[0])
|
||||
#endif
|
||||
#ifndef AV_WL32
|
||||
# define AV_WL32(p, d) do { \
|
||||
((uint8_t*)(p))[0] = (d); \
|
||||
((uint8_t*)(p))[1] = (d)>>8; \
|
||||
((uint8_t*)(p))[2] = (d)>>16; \
|
||||
((uint8_t*)(p))[3] = (d)>>24; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB64
|
||||
# define AV_RB64(x) \
|
||||
(((uint64_t)((const uint8_t*)(x))[0] << 56) | \
|
||||
((uint64_t)((const uint8_t*)(x))[1] << 48) | \
|
||||
((uint64_t)((const uint8_t*)(x))[2] << 40) | \
|
||||
((uint64_t)((const uint8_t*)(x))[3] << 32) | \
|
||||
((uint64_t)((const uint8_t*)(x))[4] << 24) | \
|
||||
((uint64_t)((const uint8_t*)(x))[5] << 16) | \
|
||||
((uint64_t)((const uint8_t*)(x))[6] << 8) | \
|
||||
(uint64_t)((const uint8_t*)(x))[7])
|
||||
#endif
|
||||
#ifndef AV_WB64
|
||||
# define AV_WB64(p, d) do { \
|
||||
((uint8_t*)(p))[7] = (d); \
|
||||
((uint8_t*)(p))[6] = (d)>>8; \
|
||||
((uint8_t*)(p))[5] = (d)>>16; \
|
||||
((uint8_t*)(p))[4] = (d)>>24; \
|
||||
((uint8_t*)(p))[3] = (d)>>32; \
|
||||
((uint8_t*)(p))[2] = (d)>>40; \
|
||||
((uint8_t*)(p))[1] = (d)>>48; \
|
||||
((uint8_t*)(p))[0] = (d)>>56; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL64
|
||||
# define AV_RL64(x) \
|
||||
(((uint64_t)((const uint8_t*)(x))[7] << 56) | \
|
||||
((uint64_t)((const uint8_t*)(x))[6] << 48) | \
|
||||
((uint64_t)((const uint8_t*)(x))[5] << 40) | \
|
||||
((uint64_t)((const uint8_t*)(x))[4] << 32) | \
|
||||
((uint64_t)((const uint8_t*)(x))[3] << 24) | \
|
||||
((uint64_t)((const uint8_t*)(x))[2] << 16) | \
|
||||
((uint64_t)((const uint8_t*)(x))[1] << 8) | \
|
||||
(uint64_t)((const uint8_t*)(x))[0])
|
||||
#endif
|
||||
#ifndef AV_WL64
|
||||
# define AV_WL64(p, d) do { \
|
||||
((uint8_t*)(p))[0] = (d); \
|
||||
((uint8_t*)(p))[1] = (d)>>8; \
|
||||
((uint8_t*)(p))[2] = (d)>>16; \
|
||||
((uint8_t*)(p))[3] = (d)>>24; \
|
||||
((uint8_t*)(p))[4] = (d)>>32; \
|
||||
((uint8_t*)(p))[5] = (d)>>40; \
|
||||
((uint8_t*)(p))[6] = (d)>>48; \
|
||||
((uint8_t*)(p))[7] = (d)>>56; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#if AV_HAVE_BIGENDIAN
|
||||
# define AV_RN(s, p) AV_RB##s(p)
|
||||
# define AV_WN(s, p, v) AV_WB##s(p, v)
|
||||
#else
|
||||
# define AV_RN(s, p) AV_RL##s(p)
|
||||
# define AV_WN(s, p, v) AV_WL##s(p, v)
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_FAST_UNALIGNED */
|
||||
|
||||
#ifndef AV_RN16
|
||||
# define AV_RN16(p) AV_RN(16, p)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RN32
|
||||
# define AV_RN32(p) AV_RN(32, p)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RN64
|
||||
# define AV_RN64(p) AV_RN(64, p)
|
||||
#endif
|
||||
|
||||
#ifndef AV_WN16
|
||||
# define AV_WN16(p, v) AV_WN(16, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_WN32
|
||||
# define AV_WN32(p, v) AV_WN(32, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_WN64
|
||||
# define AV_WN64(p, v) AV_WN(64, p, v)
|
||||
#endif
|
||||
|
||||
#if AV_HAVE_BIGENDIAN
|
||||
# define AV_RB(s, p) AV_RN##s(p)
|
||||
# define AV_WB(s, p, v) AV_WN##s(p, v)
|
||||
# define AV_RL(s, p) av_bswap##s(AV_RN##s(p))
|
||||
# define AV_WL(s, p, v) AV_WN##s(p, av_bswap##s(v))
|
||||
#else
|
||||
# define AV_RB(s, p) av_bswap##s(AV_RN##s(p))
|
||||
# define AV_WB(s, p, v) AV_WN##s(p, av_bswap##s(v))
|
||||
# define AV_RL(s, p) AV_RN##s(p)
|
||||
# define AV_WL(s, p, v) AV_WN##s(p, v)
|
||||
#endif
|
||||
|
||||
#define AV_RB8(x) (((const uint8_t*)(x))[0])
|
||||
#define AV_WB8(p, d) do { ((uint8_t*)(p))[0] = (d); } while(0)
|
||||
|
||||
#define AV_RL8(x) AV_RB8(x)
|
||||
#define AV_WL8(p, d) AV_WB8(p, d)
|
||||
|
||||
#ifndef AV_RB16
|
||||
# define AV_RB16(p) AV_RB(16, p)
|
||||
#endif
|
||||
#ifndef AV_WB16
|
||||
# define AV_WB16(p, v) AV_WB(16, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL16
|
||||
# define AV_RL16(p) AV_RL(16, p)
|
||||
#endif
|
||||
#ifndef AV_WL16
|
||||
# define AV_WL16(p, v) AV_WL(16, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB32
|
||||
# define AV_RB32(p) AV_RB(32, p)
|
||||
#endif
|
||||
#ifndef AV_WB32
|
||||
# define AV_WB32(p, v) AV_WB(32, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL32
|
||||
# define AV_RL32(p) AV_RL(32, p)
|
||||
#endif
|
||||
#ifndef AV_WL32
|
||||
# define AV_WL32(p, v) AV_WL(32, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB64
|
||||
# define AV_RB64(p) AV_RB(64, p)
|
||||
#endif
|
||||
#ifndef AV_WB64
|
||||
# define AV_WB64(p, v) AV_WB(64, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL64
|
||||
# define AV_RL64(p) AV_RL(64, p)
|
||||
#endif
|
||||
#ifndef AV_WL64
|
||||
# define AV_WL64(p, v) AV_WL(64, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB24
|
||||
# define AV_RB24(x) \
|
||||
((((const uint8_t*)(x))[0] << 16) | \
|
||||
(((const uint8_t*)(x))[1] << 8) | \
|
||||
((const uint8_t*)(x))[2])
|
||||
#endif
|
||||
#ifndef AV_WB24
|
||||
# define AV_WB24(p, d) do { \
|
||||
((uint8_t*)(p))[2] = (d); \
|
||||
((uint8_t*)(p))[1] = (d)>>8; \
|
||||
((uint8_t*)(p))[0] = (d)>>16; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL24
|
||||
# define AV_RL24(x) \
|
||||
((((const uint8_t*)(x))[2] << 16) | \
|
||||
(((const uint8_t*)(x))[1] << 8) | \
|
||||
((const uint8_t*)(x))[0])
|
||||
#endif
|
||||
#ifndef AV_WL24
|
||||
# define AV_WL24(p, d) do { \
|
||||
((uint8_t*)(p))[0] = (d); \
|
||||
((uint8_t*)(p))[1] = (d)>>8; \
|
||||
((uint8_t*)(p))[2] = (d)>>16; \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The AV_[RW]NA macros access naturally aligned data
|
||||
* in a type-safe way.
|
||||
*/
|
||||
|
||||
#define AV_RNA(s, p) (((const av_alias##s*)(p))->u##s)
|
||||
#define AV_WNA(s, p, v) (((av_alias##s*)(p))->u##s = (v))
|
||||
|
||||
#ifndef AV_RN16A
|
||||
# define AV_RN16A(p) AV_RNA(16, p)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RN32A
|
||||
# define AV_RN32A(p) AV_RNA(32, p)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RN64A
|
||||
# define AV_RN64A(p) AV_RNA(64, p)
|
||||
#endif
|
||||
|
||||
#ifndef AV_WN16A
|
||||
# define AV_WN16A(p, v) AV_WNA(16, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_WN32A
|
||||
# define AV_WN32A(p, v) AV_WNA(32, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_WN64A
|
||||
# define AV_WN64A(p, v) AV_WNA(64, p, v)
|
||||
#endif
|
||||
|
||||
/* Parameters for AV_COPY*, AV_SWAP*, AV_ZERO* must be
|
||||
* naturally aligned. They may be implemented using MMX,
|
||||
* so emms_c() must be called before using any float code
|
||||
* afterwards.
|
||||
*/
|
||||
|
||||
#define AV_COPY(n, d, s) \
|
||||
(((av_alias##n*)(d))->u##n = ((const av_alias##n*)(s))->u##n)
|
||||
|
||||
#ifndef AV_COPY16
|
||||
# define AV_COPY16(d, s) AV_COPY(16, d, s)
|
||||
#endif
|
||||
|
||||
#ifndef AV_COPY32
|
||||
# define AV_COPY32(d, s) AV_COPY(32, d, s)
|
||||
#endif
|
||||
|
||||
#ifndef AV_COPY64
|
||||
# define AV_COPY64(d, s) AV_COPY(64, d, s)
|
||||
#endif
|
||||
|
||||
#ifndef AV_COPY128
|
||||
# define AV_COPY128(d, s) \
|
||||
do { \
|
||||
AV_COPY64(d, s); \
|
||||
AV_COPY64((char*)(d)+8, (char*)(s)+8); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#define AV_SWAP(n, a, b) FFSWAP(av_alias##n, *(av_alias##n*)(a), *(av_alias##n*)(b))
|
||||
|
||||
#ifndef AV_SWAP64
|
||||
# define AV_SWAP64(a, b) AV_SWAP(64, a, b)
|
||||
#endif
|
||||
|
||||
#define AV_ZERO(n, d) (((av_alias##n*)(d))->u##n = 0)
|
||||
|
||||
#ifndef AV_ZERO16
|
||||
# define AV_ZERO16(d) AV_ZERO(16, d)
|
||||
#endif
|
||||
|
||||
#ifndef AV_ZERO32
|
||||
# define AV_ZERO32(d) AV_ZERO(32, d)
|
||||
#endif
|
||||
|
||||
#ifndef AV_ZERO64
|
||||
# define AV_ZERO64(d) AV_ZERO(64, d)
|
||||
#endif
|
||||
|
||||
#ifndef AV_ZERO128
|
||||
# define AV_ZERO128(d) \
|
||||
do { \
|
||||
AV_ZERO64(d); \
|
||||
AV_ZERO64((char*)(d)+8); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_INTREADWRITE_H */
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Lagged Fibonacci PRNG
|
||||
* Copyright (c) 2008 Michael Niedermayer
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_LFG_H
|
||||
#define AVUTIL_LFG_H
|
||||
|
||||
typedef struct {
|
||||
unsigned int state[64];
|
||||
int index;
|
||||
} AVLFG;
|
||||
|
||||
void av_lfg_init(AVLFG *c, unsigned int seed);
|
||||
|
||||
/**
|
||||
* Get the next random unsigned 32-bit number using an ALFG.
|
||||
*
|
||||
* Please also consider a simple LCG like state= state*1664525+1013904223,
|
||||
* it may be good enough and faster for your specific use case.
|
||||
*/
|
||||
static inline unsigned int av_lfg_get(AVLFG *c){
|
||||
c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
|
||||
return c->state[c->index++ & 63];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next random unsigned 32-bit number using a MLFG.
|
||||
*
|
||||
* Please also consider av_lfg_get() above, it is faster.
|
||||
*/
|
||||
static inline unsigned int av_mlfg_get(AVLFG *c){
|
||||
unsigned int a= c->state[(c->index-55) & 63];
|
||||
unsigned int b= c->state[(c->index-24) & 63];
|
||||
return c->state[c->index++ & 63] = 2*a*b+a+b;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next two numbers generated by a Box-Muller Gaussian
|
||||
* generator using the random numbers issued by lfg.
|
||||
*
|
||||
* @param out array where the two generated numbers are placed
|
||||
*/
|
||||
void av_bmg_get(AVLFG *lfg, double out[2]);
|
||||
|
||||
#endif /* AVUTIL_LFG_H */
|
||||
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* copyright (c) 2006 Michael Niedermayer <[email protected]>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_LOG_H
|
||||
#define AVUTIL_LOG_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "avutil.h"
|
||||
#include "attributes.h"
|
||||
|
||||
/**
|
||||
* Describe the class of an AVClass context structure. That is an
|
||||
* arbitrary struct of which the first field is a pointer to an
|
||||
* AVClass struct (e.g. AVCodecContext, AVFormatContext etc.).
|
||||
*/
|
||||
typedef struct AVClass {
|
||||
/**
|
||||
* The name of the class; usually it is the same name as the
|
||||
* context structure type to which the AVClass is associated.
|
||||
*/
|
||||
const char* class_name;
|
||||
|
||||
/**
|
||||
* A pointer to a function which returns the name of a context
|
||||
* instance ctx associated with the class.
|
||||
*/
|
||||
const char* (*item_name)(void* ctx);
|
||||
|
||||
/**
|
||||
* a pointer to the first option specified in the class if any or NULL
|
||||
*
|
||||
* @see av_set_default_options()
|
||||
*/
|
||||
const struct AVOption *option;
|
||||
|
||||
/**
|
||||
* LIBAVUTIL_VERSION with which this structure was created.
|
||||
* This is used to allow fields to be added without requiring major
|
||||
* version bumps everywhere.
|
||||
*/
|
||||
|
||||
int version;
|
||||
|
||||
/**
|
||||
* Offset in the structure where log_level_offset is stored.
|
||||
* 0 means there is no such variable
|
||||
*/
|
||||
int log_level_offset_offset;
|
||||
|
||||
/**
|
||||
* Offset in the structure where a pointer to the parent context for loging is stored.
|
||||
* for example a decoder that uses eval.c could pass its AVCodecContext to eval as such
|
||||
* parent context. And a av_log() implementation could then display the parent context
|
||||
* can be NULL of course
|
||||
*/
|
||||
int parent_log_context_offset;
|
||||
|
||||
/**
|
||||
* Return next AVOptions-enabled child or NULL
|
||||
*/
|
||||
void* (*child_next)(void *obj, void *prev);
|
||||
|
||||
/**
|
||||
* Return an AVClass corresponding to next potential
|
||||
* AVOptions-enabled child.
|
||||
*
|
||||
* The difference between child_next and this is that
|
||||
* child_next iterates over _already existing_ objects, while
|
||||
* child_class_next iterates over _all possible_ children.
|
||||
*/
|
||||
const struct AVClass* (*child_class_next)(const struct AVClass *prev);
|
||||
} AVClass;
|
||||
|
||||
/* av_log API */
|
||||
|
||||
#define AV_LOG_QUIET -8
|
||||
|
||||
/**
|
||||
* Something went really wrong and we will crash now.
|
||||
*/
|
||||
#define AV_LOG_PANIC 0
|
||||
|
||||
/**
|
||||
* Something went wrong and recovery is not possible.
|
||||
* For example, no header was found for a format which depends
|
||||
* on headers or an illegal combination of parameters is used.
|
||||
*/
|
||||
#define AV_LOG_FATAL 8
|
||||
|
||||
/**
|
||||
* Something went wrong and cannot losslessly be recovered.
|
||||
* However, not all future data is affected.
|
||||
*/
|
||||
#define AV_LOG_ERROR 16
|
||||
|
||||
/**
|
||||
* Something somehow does not look correct. This may or may not
|
||||
* lead to problems. An example would be the use of '-vstrict -2'.
|
||||
*/
|
||||
#define AV_LOG_WARNING 24
|
||||
|
||||
#define AV_LOG_INFO 32
|
||||
#define AV_LOG_VERBOSE 40
|
||||
|
||||
/**
|
||||
* Stuff which is only useful for libav* developers.
|
||||
*/
|
||||
#define AV_LOG_DEBUG 48
|
||||
|
||||
/**
|
||||
* Send the specified message to the log if the level is less than or equal
|
||||
* to the current av_log_level. By default, all logging messages are sent to
|
||||
* stderr. This behavior can be altered by setting a different av_vlog callback
|
||||
* function.
|
||||
*
|
||||
* @param avcl A pointer to an arbitrary struct of which the first field is a
|
||||
* pointer to an AVClass struct.
|
||||
* @param level The importance level of the message, lower values signifying
|
||||
* higher importance.
|
||||
* @param fmt The format string (printf-compatible) that specifies how
|
||||
* subsequent arguments are converted to output.
|
||||
* @see av_vlog
|
||||
*/
|
||||
void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
|
||||
|
||||
void av_vlog(void *avcl, int level, const char *fmt, va_list);
|
||||
int av_log_get_level(void);
|
||||
void av_log_set_level(int);
|
||||
void av_log_set_callback(void (*)(void*, int, const char*, va_list));
|
||||
void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
|
||||
const char* av_default_item_name(void* ctx);
|
||||
|
||||
/**
|
||||
* Format a line of log the same way as the default callback.
|
||||
* @param line buffer to receive the formated line
|
||||
* @param line_size size of the buffer
|
||||
* @param print_prefix used to store whether the prefix must be printed;
|
||||
* must point to a persistent integer initially set to 1
|
||||
*/
|
||||
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
|
||||
char *line, int line_size, int *print_prefix);
|
||||
|
||||
/**
|
||||
* av_dlog macros
|
||||
* Useful to print debug messages that shouldn't get compiled in normally.
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
# define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
|
||||
#else
|
||||
# define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Skip repeated messages, this requires the user app to use av_log() instead of
|
||||
* (f)printf as the 2 would otherwise interfere and lead to
|
||||
* "Last message repeated x times" messages below (f)printf messages with some
|
||||
* bad luck.
|
||||
* Also to receive the last, "last repeated" line if any, the user app must
|
||||
* call av_log(NULL, AV_LOG_QUIET, "%s", ""); at the end
|
||||
*/
|
||||
#define AV_LOG_SKIP_REPEATED 1
|
||||
void av_log_set_flags(int arg);
|
||||
|
||||
#endif /* AVUTIL_LOG_H */
|
||||