mirror of
https://github.com/taglib/taglib.git
synced 2026-06-07 14:59:24 -04:00
Compare commits
291 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa34afda79 | ||
|
|
942ec58de5 | ||
|
|
082a36147b | ||
|
|
f11b206fe8 | ||
|
|
e37f6ed752 | ||
|
|
d2f20e8d2a | ||
|
|
f194a55c0f | ||
|
|
719187794e | ||
|
|
74b94613a0 | ||
|
|
33d0be110b | ||
|
|
df12b4ffc6 | ||
|
|
d16c24ae21 | ||
|
|
1c35918834 | ||
|
|
d163f36d35 | ||
|
|
590cd4c9f6 | ||
|
|
6c0227ee13 | ||
|
|
9bb57fe0a7 | ||
|
|
3fecdbf428 | ||
|
|
356c7a5d6e | ||
|
|
4b4f70253b | ||
|
|
8b61a06fda | ||
|
|
6801ac2515 | ||
|
|
29d17bb8e9 | ||
|
|
fe8053c7d5 | ||
|
|
eb63ee8ec6 | ||
|
|
e86e5f906b | ||
|
|
60e82e6694 | ||
|
|
fc6e02da35 | ||
|
|
4140c5f2eb | ||
|
|
fc3fc10f60 | ||
|
|
3bc123aed6 | ||
|
|
3b392f2402 | ||
|
|
8ff0feb28e | ||
|
|
61ed295af8 | ||
|
|
09af2a7b57 | ||
|
|
050ff3835d | ||
|
|
674ae0fa6d | ||
|
|
411d318f34 | ||
|
|
fbb1c7e554 | ||
|
|
fd818857e0 | ||
|
|
930168f990 | ||
|
|
291d925fc1 | ||
|
|
7c4c455a40 | ||
|
|
f429d6f406 | ||
|
|
c68fe9ad7b | ||
|
|
81aac3a590 | ||
|
|
7279b4fb7b | ||
|
|
b0ac79c60e | ||
|
|
382aec46f7 | ||
|
|
b5ad68d64b | ||
|
|
52e96e48c5 | ||
|
|
5bcfecb6cc | ||
|
|
2c2a486313 | ||
|
|
06597123b8 | ||
|
|
e5ede410bc | ||
|
|
dafb3af742 | ||
|
|
089643f115 | ||
|
|
26f458b87f | ||
|
|
c22791318c | ||
|
|
5081e3cf4f | ||
|
|
1bde4cea09 | ||
|
|
0907e86a94 | ||
|
|
742a3a1dbb | ||
|
|
04a4a6b8d4 | ||
|
|
b216b448c5 | ||
|
|
4f8a6fdfaf | ||
|
|
32a4ac6599 | ||
|
|
ca26a9ad3e | ||
|
|
bd03e352cc | ||
|
|
69ac59f5f0 | ||
|
|
2297a6d531 | ||
|
|
2a4850f211 | ||
|
|
3c7b05a900 | ||
|
|
8e67b40bdc | ||
|
|
76222cb1eb | ||
|
|
138dfca682 | ||
|
|
c4163a26e8 | ||
|
|
4496efe33b | ||
|
|
3a760b060c | ||
|
|
dcdf4fd954 | ||
|
|
ab8a0ee893 | ||
|
|
77d61c6eca | ||
|
|
f5a2518273 | ||
|
|
6e6d823992 | ||
|
|
f859fcf82a | ||
|
|
37c87e0317 | ||
|
|
0a3b998ca5 | ||
|
|
fa0656e3c6 | ||
|
|
b05c3161c7 | ||
|
|
79670beca1 | ||
|
|
9fd22023cd | ||
|
|
b8d5246f88 | ||
|
|
05b5e06928 | ||
|
|
d28cc83fb4 | ||
|
|
495a028da3 | ||
|
|
23d303a896 | ||
|
|
6c054af3ed | ||
|
|
70c3264279 | ||
|
|
cfa5ac6569 | ||
|
|
de51307de7 | ||
|
|
140f4a57e2 | ||
|
|
8a8e9b702c | ||
|
|
d6215365a1 | ||
|
|
2185d52f56 | ||
|
|
48aaaf8dc4 | ||
|
|
d2c43d7174 | ||
|
|
cdfb447042 | ||
|
|
2d00b690de | ||
|
|
51675f3399 | ||
|
|
fa662a23db | ||
|
|
dc628204c0 | ||
|
|
9564956a7f | ||
|
|
1f2248d24b | ||
|
|
06424598bb | ||
|
|
7b3f279294 | ||
|
|
a8632f710f | ||
|
|
0c8e5bbec8 | ||
|
|
a5e45f196b | ||
|
|
e4d955d6ef | ||
|
|
18ae797df4 | ||
|
|
d11189b975 | ||
|
|
67d896e6a7 | ||
|
|
ea41cd8903 | ||
|
|
d904281c6b | ||
|
|
40bf52e70f | ||
|
|
b981b6dde7 | ||
|
|
c237998983 | ||
|
|
5ff810e98d | ||
|
|
7875d02a8f | ||
|
|
baafb3e290 | ||
|
|
c4cef55158 | ||
|
|
0eaf3a3fbd | ||
|
|
292a377d1e | ||
|
|
6ea8599313 | ||
|
|
772bc9f7c4 | ||
|
|
0c2ca20ec2 | ||
|
|
2d31075047 | ||
|
|
837c9ef288 | ||
|
|
0356249368 | ||
|
|
5647b2e293 | ||
|
|
686bcf55a9 | ||
|
|
fa8159a9d0 | ||
|
|
58db919e43 | ||
|
|
b262180857 | ||
|
|
bec3875b94 | ||
|
|
ce53d13af1 | ||
|
|
4868bb5690 | ||
|
|
7cc36db760 | ||
|
|
028f831417 | ||
|
|
303af305db | ||
|
|
22b57f4463 | ||
|
|
11c993e9f0 | ||
|
|
3b14dc3e94 | ||
|
|
ad7645f8e9 | ||
|
|
fb2decb7de | ||
|
|
3a837e7fc7 | ||
|
|
0730076a0f | ||
|
|
364a840d83 | ||
|
|
e9cd383139 | ||
|
|
a41b32bbb2 | ||
|
|
98d6b97798 | ||
|
|
019fe4843f | ||
|
|
bb25953767 | ||
|
|
4795831b4a | ||
|
|
19484c059d | ||
|
|
10ea76ff11 | ||
|
|
5f84bbf61a | ||
|
|
8b647e5fa7 | ||
|
|
0341079b92 | ||
|
|
1a53bfd71a | ||
|
|
6aa41d8180 | ||
|
|
101a624c46 | ||
|
|
3b4e4357e6 | ||
|
|
3baf0a413d | ||
|
|
68c6a7da7a | ||
|
|
2fd10b5fd5 | ||
|
|
a50886c3c7 | ||
|
|
2119494cd1 | ||
|
|
843070ba18 | ||
|
|
57bf96d169 | ||
|
|
937d69f91d | ||
|
|
f3447ae38d | ||
|
|
89861cf77a | ||
|
|
a04d7d0bbc | ||
|
|
39e8cbbefb | ||
|
|
6b063862c3 | ||
|
|
aec8880592 | ||
|
|
dd846904cb | ||
|
|
c7fd4cd2fc | ||
|
|
57526c6c37 | ||
|
|
af92db9dc0 | ||
|
|
2d6274a36a | ||
|
|
9c27c45eb8 | ||
|
|
e71806b6df | ||
|
|
0b34d4f8ee | ||
|
|
26613473cf | ||
|
|
561cfdb0ec | ||
|
|
e810f2f61f | ||
|
|
7236ef4d0f | ||
|
|
b2517aa4a0 | ||
|
|
e202c658f0 | ||
|
|
7448bb353b | ||
|
|
aeb528ade2 | ||
|
|
d1cb8ae09d | ||
|
|
4b44f25048 | ||
|
|
4b754b1bc6 | ||
|
|
b3d44394bf | ||
|
|
5477ede3ea | ||
|
|
03534170fa | ||
|
|
b30b8c4ab5 | ||
|
|
e09c2c5a19 | ||
|
|
6afb7c04b3 | ||
|
|
0143c3ee63 | ||
|
|
a31b0bcf8c | ||
|
|
5ad69f6f2a | ||
|
|
b63508ec3e | ||
|
|
fe356c31b4 | ||
|
|
eec5e33e0d | ||
|
|
868ce3dd21 | ||
|
|
1e6d645ce9 | ||
|
|
65fb9733b9 | ||
|
|
f75f5ac9bb | ||
|
|
812826fe3a | ||
|
|
3192334006 | ||
|
|
9b2bb4af34 | ||
|
|
54e9656474 | ||
|
|
f6dbd32ed3 | ||
|
|
5332fb5cf8 | ||
|
|
c3c88b4f55 | ||
|
|
8eb32577bd | ||
|
|
0ed2477dfa | ||
|
|
b3646a0734 | ||
|
|
8ed9b0da2c | ||
|
|
93564a2daa | ||
|
|
0a790f0017 | ||
|
|
a224e7cd6d | ||
|
|
088dbfa832 | ||
|
|
a04da3f159 | ||
|
|
dc062a0844 | ||
|
|
efeccbf726 | ||
|
|
6b7ed4a5d5 | ||
|
|
adb0984c87 | ||
|
|
a38d2b2995 | ||
|
|
b5b8387aee | ||
|
|
c337694165 | ||
|
|
b2e3a477e9 | ||
|
|
81734919d2 | ||
|
|
d03ef3c312 | ||
|
|
e92ed0a830 | ||
|
|
65ca29b3e2 | ||
|
|
26c130c387 | ||
|
|
8b59bb5957 | ||
|
|
b53a577e38 | ||
|
|
0b0cbc2e34 | ||
|
|
4cda0eeb7b | ||
|
|
2fa8c93776 | ||
|
|
266200d77e | ||
|
|
aa84b8b674 | ||
|
|
ee920a461c | ||
|
|
1596dc7c69 | ||
|
|
f3d3af9355 | ||
|
|
9653796640 | ||
|
|
a4a097d2f8 | ||
|
|
5eda17aa96 | ||
|
|
8878c9158c | ||
|
|
3715b96477 | ||
|
|
aa57db3a39 | ||
|
|
f9d38129b8 | ||
|
|
0c6e2a0aa9 | ||
|
|
e16829190a | ||
|
|
7a6647cb99 | ||
|
|
97cd58bc65 | ||
|
|
8f42d5b594 | ||
|
|
158152cb46 | ||
|
|
71e224fed8 | ||
|
|
80decd737d | ||
|
|
d169a670e0 | ||
|
|
a6cb74ad5d | ||
|
|
27aa8cc293 | ||
|
|
d3df66f196 | ||
|
|
1453a7b157 | ||
|
|
e8d0551c9a | ||
|
|
061b381ea8 | ||
|
|
1802237c75 | ||
|
|
4bdcc9662e | ||
|
|
41f1828719 | ||
|
|
223b85d345 | ||
|
|
ee49b781eb | ||
|
|
065fcd5077 | ||
|
|
38219b88b3 | ||
|
|
0cdfa793e9 |
44
.gitignore
vendored
Normal file
44
.gitignore
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
cmake_install.cmake
|
||||
cmake_uninstall.cmake
|
||||
Makefile
|
||||
CTestTestfile.cmake
|
||||
CMakeFiles/
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
*.vcproj
|
||||
*.ncb
|
||||
*.sln
|
||||
*.suo
|
||||
*.user
|
||||
.*
|
||||
*~
|
||||
/CMakeCache.txt
|
||||
/Doxyfile
|
||||
/config.h
|
||||
/taglib.pc
|
||||
/tests/test_runner
|
||||
/tests/Testing
|
||||
/taglib_config.h
|
||||
/taglib-config
|
||||
/bindings/c/taglib_c.pc
|
||||
/bindings/c/Debug
|
||||
/bindings/c/MinSizeRel
|
||||
/bindings/c/Release
|
||||
/bindings/c/tag_c.dir/Debug
|
||||
/bindings/c/tag_c.dir/MinSizeRel
|
||||
/bindings/c/tag_c.dir/Release
|
||||
/examples/framelist
|
||||
/examples/strip-id3v1
|
||||
/examples/tagreader
|
||||
/examples/tagreader_c
|
||||
/examples/tagwriter
|
||||
/doc/html
|
||||
/taglib/Debug
|
||||
/taglib/MinSizeRel
|
||||
/taglib/Release
|
||||
/taglib/tag.dir/Debug
|
||||
/taglib/tag.dir/MinSizeRel
|
||||
/taglib/tag.dir/Release
|
||||
/ALL_BUILD.dir
|
||||
/ZERO_CHECK.dir
|
||||
4
AUTHORS
4
AUTHORS
@@ -1,11 +1,15 @@
|
||||
Scott Wheeler <wheeler@kde.org>
|
||||
Author, maintainer
|
||||
Lukas Lalinsky <lalinsky@gmail.com>
|
||||
Implementation of multiple new file formats, many bug fixes, maintainer
|
||||
Ismael Orenstein <orenstein@kde.org>
|
||||
Xing header implementation
|
||||
Allan Sandfeld Jensen <kde@carewolf.org>
|
||||
FLAC metadata implementation
|
||||
Teemu Tervo <teemu.tervo@gmx.net>
|
||||
Numerous bug reports and fixes
|
||||
Mathias Panzenböck <grosser.meister.morti@gmx.net>
|
||||
Mod, S3M, IT and XM metadata implementations
|
||||
|
||||
Please send all patches and questions to taglib-devel@kde.org rather than to
|
||||
individual developers!
|
||||
|
||||
128
CMakeLists.txt
128
CMakeLists.txt
@@ -2,81 +2,107 @@ project(taglib)
|
||||
|
||||
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
|
||||
|
||||
OPTION(ENABLE_STATIC "Make static version of libtag" OFF)
|
||||
option(ENABLE_STATIC "Make static version of libtag" OFF)
|
||||
if(ENABLE_STATIC)
|
||||
add_definitions(-DTAGLIB_STATIC)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
else()
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
OPTION(ENABLE_STATIC_RUNTIME "Visual Studio, link with runtime statically" OFF)
|
||||
|
||||
OPTION(BUILD_TESTS "Build the test suite" OFF)
|
||||
OPTION(BUILD_EXAMPLES "Build the examples" OFF)
|
||||
option(VISIBILITY_HIDDEN "Build with -fvisibility=hidden" OFF)
|
||||
if(VISIBILITY_HIDDEN)
|
||||
add_definitions (-fvisibility=hidden)
|
||||
endif()
|
||||
|
||||
OPTION(NO_ITUNES_HACKS "Disable workarounds for iTunes bugs" OFF)
|
||||
OPTION(WITH_ASF "Enable ASF tag reading/writing code" OFF)
|
||||
OPTION(WITH_MP4 "Enable MP4 tag reading/writing code" OFF)
|
||||
option(BUILD_TESTS "Build the test suite" OFF)
|
||||
option(BUILD_EXAMPLES "Build the examples" OFF)
|
||||
|
||||
option(NO_ITUNES_HACKS "Disable workarounds for iTunes bugs" OFF)
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
set(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/")
|
||||
|
||||
#add some KDE specific stuff
|
||||
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
|
||||
set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE)
|
||||
#
|
||||
## the following are directories where stuff will be installed to
|
||||
set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The subdirectory to the binaries prefix (default prefix/bin)" FORCE)
|
||||
set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
|
||||
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE)
|
||||
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
|
||||
set(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Base directory for executables and libraries" FORCE)
|
||||
set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The subdirectory to the binaries prefix (default prefix/bin)" FORCE)
|
||||
set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
|
||||
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
|
||||
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-check-new -fno-common")
|
||||
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(MSVC)
|
||||
if (MSVC_VERSION GREATER 1399)
|
||||
# If using Visual C++ 2005 (MSVC80) and greater (MSVC_VERSION=1400)
|
||||
add_definitions(/D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t-)
|
||||
endif (MSVC_VERSION GREATER 1399)
|
||||
endif(MSVC)
|
||||
if (WIN32)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
endif (WIN32)
|
||||
if(APPLE)
|
||||
option(BUILD_FRAMEWORK "Build an OS X framework" OFF)
|
||||
set(FRAMEWORK_INSTALL_DIR "/Library/Frameworks" CACHE STRING "Directory to install frameworks to.")
|
||||
endif()
|
||||
|
||||
SET(TAGLIB_LIB_MAJOR_VERSION "1")
|
||||
SET(TAGLIB_LIB_MINOR_VERSION "7")
|
||||
SET(TAGLIB_LIB_PATCH_VERSION "2")
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
endif()
|
||||
if (MSVC AND ENABLE_STATIC_RUNTIME)
|
||||
foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
endforeach(flag_var)
|
||||
endif()
|
||||
|
||||
SET(TAGLIB_LIB_VERSION_STRING "${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}")
|
||||
set(TAGLIB_LIB_MAJOR_VERSION "1")
|
||||
set(TAGLIB_LIB_MINOR_VERSION "8")
|
||||
set(TAGLIB_LIB_PATCH_VERSION "0")
|
||||
|
||||
set(TAGLIB_LIB_VERSION_STRING "${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}")
|
||||
|
||||
# 1. If the library source code has changed at all since the last update, then increment revision.
|
||||
# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
|
||||
# 3. If any interfaces have been added since the last public release, then increment age.
|
||||
# 4. If any interfaces have been removed since the last public release, then set age to 0.
|
||||
set(TAGLIB_SOVERSION_CURRENT 13)
|
||||
set(TAGLIB_SOVERSION_REVISION 0)
|
||||
set(TAGLIB_SOVERSION_AGE 12)
|
||||
|
||||
math(EXPR TAGLIB_SOVERSION_MAJOR "${TAGLIB_SOVERSION_CURRENT} - ${TAGLIB_SOVERSION_AGE}")
|
||||
math(EXPR TAGLIB_SOVERSION_MINOR "${TAGLIB_SOVERSION_AGE}")
|
||||
math(EXPR TAGLIB_SOVERSION_PATCH "${TAGLIB_SOVERSION_REVISION}")
|
||||
|
||||
include(ConfigureChecks.cmake)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib-config )
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/taglib-config DESTINATION ${BIN_INSTALL_DIR})
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT WIN32 AND NOT BUILD_FRAMEWORK)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc )
|
||||
endif(NOT WIN32)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
configure_file(config-taglib.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
|
||||
configure_file(config-taglib.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
if(WITH_ASF)
|
||||
set(TAGLIB_WITH_ASF TRUE)
|
||||
endif(WITH_ASF)
|
||||
endif()
|
||||
if(WITH_MP4)
|
||||
set(TAGLIB_WITH_MP4 TRUE)
|
||||
endif(WITH_MP4)
|
||||
configure_file(taglib/taglib_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_config.h )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_config.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
|
||||
endif()
|
||||
|
||||
ADD_SUBDIRECTORY( taglib )
|
||||
configure_file(taglib/taglib_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_config.h)
|
||||
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ADD_SUBDIRECTORY(examples)
|
||||
add_subdirectory(taglib)
|
||||
add_subdirectory(bindings)
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif(BUILD_TESTS)
|
||||
add_subdirectory(examples)
|
||||
|
||||
ADD_SUBDIRECTORY(bindings)
|
||||
if(NOT WIN32)
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
|
||||
endif(NOT WIN32)
|
||||
|
||||
INSTALL( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/taglib-config DESTINATION ${BIN_INSTALL_DIR})
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
file(COPY doc/taglib.png DESTINATION doc)
|
||||
ADD_CUSTOM_TARGET(docs doxygen)
|
||||
add_custom_target(docs doxygen)
|
||||
|
||||
# uninstall target
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
# NOTE: only add something here if it is really needed by all of kdelibs.
|
||||
# Otherwise please prefer adding to the relevant config-foo.h.cmake file,
|
||||
# and the CMakeLists.txt that generates it (or a separate ConfigureChecks.make file if you prefer)
|
||||
# to minimize recompilations and increase modularity.
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckSymbolExists)
|
||||
@@ -11,18 +6,18 @@ include(CheckLibraryExists)
|
||||
include(CheckTypeSize)
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
#check for libz using the cmake supplied FindZLIB.cmake
|
||||
FIND_PACKAGE(ZLIB)
|
||||
# check for libz using the cmake supplied FindZLIB.cmake
|
||||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
set(HAVE_ZLIB 1)
|
||||
else()
|
||||
set(HAVE_ZLIB 0)
|
||||
endif()
|
||||
|
||||
IF(ZLIB_FOUND)
|
||||
SET(HAVE_ZLIB 1)
|
||||
ELSE(ZLIB_FOUND)
|
||||
SET(HAVE_ZLIB 0)
|
||||
ENDIF(ZLIB_FOUND)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||
find_package(CppUnit)
|
||||
if(NOT CppUnit_FOUND AND BUILD_TESTS)
|
||||
message(STATUS "CppUnit not found, disabling tests.")
|
||||
set(BUILD_TESTS OFF)
|
||||
endif()
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||
FIND_PACKAGE(CppUnit)
|
||||
IF (NOT CppUnit_FOUND AND BUILD_TESTS)
|
||||
MESSAGE(STATUS "CppUnit not found, disabling tests.")
|
||||
SET(BUILD_TESTS OFF)
|
||||
ENDIF(NOT CppUnit_FOUND AND BUILD_TESTS)
|
||||
|
||||
63
INSTALL
63
INSTALL
@@ -9,17 +9,62 @@ This can be done using the following commands:
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Some file formats in TagLib are not enabled by default, you can compile
|
||||
support for MP4 and WMA using the following options:
|
||||
In order to build the included examples, use the BUILD_EXAMPLES option:
|
||||
|
||||
cmake -DWITH_MP4=ON -DWITH_ASF=ON [...]
|
||||
|
||||
If you want to run the test suite to make sure TagLib works properly on your
|
||||
system, you need to have cppunit installed. The test suite has a custom target
|
||||
in the build system, so you can run the tests using make:
|
||||
|
||||
make check
|
||||
cmake -DBUILD_EXAMPLES=ON [...]
|
||||
|
||||
See http://www.cmake.org/cmake/help/runningcmake.html for generic help on
|
||||
running CMake.
|
||||
|
||||
Mac OS X
|
||||
--------
|
||||
|
||||
On Mac OS X, you might want to build a framework that can be easily integrated
|
||||
into your application. If you set the BUILD_FRAMEWORK option on, it will compile
|
||||
TagLib as a framework. For example, the following command can be used to build
|
||||
an Universal Binary framework with Mac OS X 10.4 as the deployment target:
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_FRAMEWORK=ON \
|
||||
-DCMAKE_C_COMPILER=/usr/bin/gcc-4.0 \
|
||||
-DCMAKE_CXX_COMPILER=/usr/bin/c++-4.0 \
|
||||
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk/ \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 \
|
||||
-DCMAKE_OSX_ARCHITECTURES="ppc;i386;x86_64"
|
||||
|
||||
For a 10.6 Snow Leopard static library with both 32-bit and 64-bit code, use:
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 \
|
||||
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
|
||||
-DENABLE_STATIC=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="<folder you want to build to>"
|
||||
|
||||
After 'make', and 'make install', add libtag.a to your XCode project, and add
|
||||
the include folder to the project's User Header Search Paths.
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
For building a static library on Windows with Visual Studio 2010, cd to
|
||||
the TagLib folder then:
|
||||
|
||||
cmake -DENABLE_STATIC=ON -DENABLE_STATIC_RUNTIME=ON -G "Visual Studio 10" ...
|
||||
|
||||
Including ENABLE_STATIC_RUNTIME=ON indicates you want TagLib built using the
|
||||
static runtime library, rather than the DLL form of the runtime.
|
||||
CMake will create a Visual Studio solution, taglib.sln that you can open and
|
||||
build as normal.
|
||||
|
||||
Unit Tests
|
||||
----------
|
||||
|
||||
If you want to run the test suite to make sure TagLib works properly on your
|
||||
system, you need to have cppunit installed. To build the tests, include
|
||||
the option -DBUILD_TESTS=on when running cmake.
|
||||
|
||||
The test suite has a custom target in the build system, so you can run
|
||||
the tests using make:
|
||||
|
||||
make check
|
||||
|
||||
|
||||
33
NEWS
33
NEWS
@@ -1,3 +1,36 @@
|
||||
TagLib 1.8 (Sep 6, 2012)
|
||||
==============================
|
||||
|
||||
1.8:
|
||||
|
||||
* Added support for OWNE ID3 frames.
|
||||
* Changed key validation in the new PropertyMap API.
|
||||
* ID3v1::Tag::setStringHandler will no londer delete the previous handler,
|
||||
the caller is responsible for this.
|
||||
* File objects will also no longer delete the passed IOStream objects. It
|
||||
should be done in the caller code after the File object is no longer
|
||||
used.
|
||||
* Added ID3v2::Tag::setLatin1StringHandler for custom handling of
|
||||
latin1-encoded text in ID3v2 frames.
|
||||
* Fixed validation of ID3v2 frame IDs (IDs with '0' were ignored).
|
||||
|
||||
1.8 BETA:
|
||||
|
||||
* New API for accessing tags by name.
|
||||
* New abstract I/O stream layer to allow custom I/O handlers.
|
||||
* Support for writing ID3v2.3 tags.
|
||||
* Support for various module file formats (MOD, S3M, IT, XM).
|
||||
* Support for MP4 and ASF is now enabled by default.
|
||||
* Started using atomic int operations for reference counting.
|
||||
* Added methods for checking if WMA and MP4 files are DRM-protected.
|
||||
* Added taglib_free to the C bindings.
|
||||
* New method to allow removing pictures from FLAC files.
|
||||
* Support for reading audio properties from ALAC and Musepack SV8 files.
|
||||
* Added replay-gain information to Musepack audio properties.
|
||||
* Support for APEv2 binary tags.
|
||||
* Many AudioProperties subclasses now provide information about the total number of samples.
|
||||
* Various small bug fixes.
|
||||
|
||||
TagLib 1.7.2 (Apr 20, 2012)
|
||||
===========================
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
ADD_SUBDIRECTORY( c )
|
||||
add_subdirectory(c)
|
||||
|
||||
@@ -2,5 +2,5 @@ There are a few other people that have done bindings externally that I have
|
||||
been made aware of. I have not personally reviewed these bindings, but I'm
|
||||
listing them here so that those who find them useful are able to find them:
|
||||
|
||||
- Ruby - http://www.hakubi.us/ruby-taglib/
|
||||
- Python - http://namingmuse.berlios.de/
|
||||
http://developer.kde.org/~wheeler/taglib.html#bindings
|
||||
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/toolkit
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/asf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/vorbis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mp4
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2/frames
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/wavpack
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/speex
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/trueaudio
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/toolkit
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/asf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/vorbis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mp4
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/mpeg/id3v2/frames
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/wavpack
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/ogg/speex
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../taglib/trueaudio
|
||||
)
|
||||
|
||||
set(tag_c_HDRS tag_c.h)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc )
|
||||
########### next target ###############
|
||||
add_library(tag_c tag_c.cpp ${tag_c_HDRS})
|
||||
|
||||
ADD_LIBRARY(tag_c SHARED tag_c.cpp)
|
||||
if(ENABLE_STATIC)
|
||||
set_target_properties(tag_c PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC)
|
||||
endif(ENABLE_STATIC)
|
||||
|
||||
TARGET_LINK_LIBRARIES(tag_c tag )
|
||||
target_link_libraries(tag_c tag)
|
||||
set_target_properties(tag_c PROPERTIES PUBLIC_HEADER "${tag_c_HDRS}")
|
||||
if(BUILD_FRAMEWORK)
|
||||
set_target_properties(tag_c PROPERTIES FRAMEWORK TRUE)
|
||||
endif()
|
||||
|
||||
# On Solaris we need to explicitly add the C++ standard and runtime
|
||||
# libraries to the libs used by the C bindings, because those C bindings
|
||||
# themselves won't pull in the C++ libs -- and if a C application is
|
||||
# using the C bindings then we get link errors.
|
||||
CHECK_LIBRARY_EXISTS(Crun __RTTI___ "" HAVE_CRUN_LIB)
|
||||
IF(HAVE_CRUN_LIB)
|
||||
check_library_exists(Crun __RTTI___ "" HAVE_CRUN_LIB)
|
||||
if(HAVE_CRUN_LIB)
|
||||
# Which libraries to link depends critically on which
|
||||
# STL version is going to be used by your application
|
||||
# and which runtime is in use. While Crun is pretty much
|
||||
@@ -40,27 +40,29 @@ IF(HAVE_CRUN_LIB)
|
||||
# team supports stdcxx (Apache RogueWave stdcxx 4.1.3).
|
||||
|
||||
# According to http://bugs.kde.org/show_bug.cgi?id=215225 the library can have the following two names:
|
||||
FIND_LIBRARY(ROGUEWAVE_STDCXX_LIBRARY NAMES stdcxx4 stdcxx)
|
||||
IF(NOT ROGUEWAVE_STDCXX_LIBRARY)
|
||||
MESSAGE(FATAL_ERROR "Did not find supported STL library (tried stdcxx4 and stdcxx)")
|
||||
ENDIF(NOT ROGUEWAVE_STDCXX_LIBRARY)
|
||||
TARGET_LINK_LIBRARIES(tag_c ${ROGUEWAVE_STDCXX_LIBRARY} Crun)
|
||||
ENDIF(HAVE_CRUN_LIB)
|
||||
find_library(ROGUEWAVE_STDCXX_LIBRARY NAMES stdcxx4 stdcxx)
|
||||
if(NOT ROGUEWAVE_STDCXX_LIBRARY)
|
||||
message(FATAL_ERROR "Did not find supported STL library (tried stdcxx4 and stdcxx)")
|
||||
endif()
|
||||
target_link_libraries(tag_c ${ROGUEWAVE_STDCXX_LIBRARY} Crun)
|
||||
endif()
|
||||
|
||||
SET_TARGET_PROPERTIES(tag_c PROPERTIES
|
||||
set_target_properties(tag_c PROPERTIES
|
||||
VERSION 0.0.0
|
||||
SOVERSION 0
|
||||
DEFINE_SYMBOL MAKE_TAGLIB_C_LIB
|
||||
INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
|
||||
)
|
||||
INSTALL(TARGETS tag_c
|
||||
)
|
||||
install(TARGETS tag_c
|
||||
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/taglib
|
||||
)
|
||||
|
||||
if(NOT WIN32 AND NOT BUILD_FRAMEWORK)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
|
||||
endif()
|
||||
|
||||
########### install files ###############
|
||||
|
||||
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
|
||||
INSTALL( FILES tag_c.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "tag_c.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fileref.h>
|
||||
#include <tfile.h>
|
||||
@@ -42,6 +40,8 @@
|
||||
#include <string.h>
|
||||
#include <id3v2framefactory.h>
|
||||
|
||||
#include "tag_c.h"
|
||||
|
||||
using namespace TagLib;
|
||||
|
||||
static List<char *> strings;
|
||||
@@ -58,6 +58,11 @@ void taglib_set_string_management_enabled(BOOL management)
|
||||
stringManagementEnabled = bool(management);
|
||||
}
|
||||
|
||||
void taglib_free(void* pointer)
|
||||
{
|
||||
free(pointer);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TagLib::File wrapper
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -86,14 +91,10 @@ TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type)
|
||||
return reinterpret_cast<TagLib_File *>(new Ogg::Speex::File(filename));
|
||||
case TagLib_File_TrueAudio:
|
||||
return reinterpret_cast<TagLib_File *>(new TrueAudio::File(filename));
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
case TagLib_File_MP4:
|
||||
return reinterpret_cast<TagLib_File *>(new MP4::File(filename));
|
||||
#endif
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
case TagLib_File_ASF:
|
||||
return reinterpret_cast<TagLib_File *>(new ASF::File(filename));
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@@ -108,7 +109,7 @@ void taglib_file_free(TagLib_File *file)
|
||||
|
||||
BOOL taglib_file_is_valid(const TagLib_File *file)
|
||||
{
|
||||
return reinterpret_cast<const File *>(file)->isValid();
|
||||
return reinterpret_cast<const File *>(file)->isValid();
|
||||
}
|
||||
|
||||
TagLib_Tag *taglib_file_tag(const TagLib_File *file)
|
||||
|
||||
@@ -79,6 +79,11 @@ TAGLIB_C_EXPORT void taglib_set_strings_unicode(BOOL unicode);
|
||||
*/
|
||||
TAGLIB_C_EXPORT void taglib_set_string_management_enabled(BOOL management);
|
||||
|
||||
/*!
|
||||
* Explicitly free a string returned from TagLib
|
||||
*/
|
||||
TAGLIB_C_EXPORT void taglib_free(void* pointer);
|
||||
|
||||
/*******************************************************************************
|
||||
* File API
|
||||
******************************************************************************/
|
||||
@@ -99,7 +104,7 @@ typedef enum {
|
||||
/*!
|
||||
* Creates a TagLib file based on \a filename. TagLib will try to guess the file
|
||||
* type.
|
||||
*
|
||||
*
|
||||
* \returns NULL if the file type cannot be determined or the file cannot
|
||||
* be opened.
|
||||
*/
|
||||
|
||||
21
cmake_uninstall.cmake.in
Normal file
21
cmake_uninstall.cmake.in
Normal file
@@ -0,0 +1,21 @@
|
||||
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach (file ${files})
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if (EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT ${rm_retval} EQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif ()
|
||||
else ()
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif ()
|
||||
endforeach()
|
||||
@@ -1,11 +1,11 @@
|
||||
/* config-taglib.h. Generated by cmake from config-taglib.h.cmake */
|
||||
|
||||
/* NOTE: only add something here if it is really needed by all of kdelibs.
|
||||
Otherwise please prefer adding to the relevant config-foo.h.cmake file,
|
||||
to minimize recompilations and increase modularity. */
|
||||
/* Define if you have libz */
|
||||
#cmakedefine HAVE_ZLIB 1
|
||||
|
||||
#cmakedefine NO_ITUNES_HACKS 1
|
||||
#cmakedefine WITH_ASF 1
|
||||
#cmakedefine WITH_MP4 1
|
||||
|
||||
#cmakedefine TESTS_DIR "@TESTS_DIR@"
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
These are only necessary at build-time when building the entire kdesupport module; they do not need to be installed on a running system.
|
||||
|
||||
It can be regenerated by using something like the following from the taglib/taglib directory:
|
||||
|
||||
for file in `find -type f -name "*\.h"`;
|
||||
do
|
||||
dir=`dirname $file`
|
||||
strippeddir=`echo $dir | cut -c 3-`
|
||||
base=`basename $file`
|
||||
if test -z $strippeddir
|
||||
then
|
||||
echo "#include \"../taglib/$base\"" > ../include/$base
|
||||
else
|
||||
echo "#include \"../taglib/$strippeddir/$base\"" > ../include/$base
|
||||
fi
|
||||
done
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/riff/aiff/aifffile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/riff/aiff/aiffproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ape/apefooter.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ape/apeitem.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ape/apetag.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/asf/asfattribute.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/asf/asffile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/asf/asfproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/asf/asftag.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/attachedpictureframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/audioproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/commentsframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/fileref.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/flac/flacfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/flac/flacproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v1/id3v1genres.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v1/id3v1tag.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/id3v2extendedheader.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/id3v2footer.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/id3v2frame.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/id3v2framefactory.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/id3v2header.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/id3v2synchdata.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/id3v2tag.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mp4/mp4atom.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mp4/mp4coverart.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mp4/mp4file.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mp4/mp4item.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mp4/mp4properties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mp4/mp4tag.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpc/mpcfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpc/mpcproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/mpegfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/mpegheader.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/mpegproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/oggfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/flac/oggflacfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/oggpage.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/oggpageheader.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/popularimeterframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/privateframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/relativevolumeframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/riff/rifffile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/speex/speexfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/speex/speexproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/tag.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/taglib.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/taglib_export.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/tagunion.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tbytevector.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tbytevectorlist.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tdebug.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/textidentificationframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tlist.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tmap.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/trueaudio/trueaudiofile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/trueaudio/trueaudioproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tstring.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/tstringlist.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/toolkit/unicode.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/unknownframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/id3v2/frames/urllinkframe.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/vorbis/vorbisfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/vorbis/vorbisproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/riff/wav/wavfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/wavpack/wavpackfile.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/wavpack/wavpackproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/riff/wav/wavproperties.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/mpeg/xingheader.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../taglib/ogg/xiphcomment.h"
|
||||
@@ -1,219 +1,321 @@
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/toolkit
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mp4
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg/vorbis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg/speex
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2/frames
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ape
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wavpack
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/trueaudio
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/riff
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/riff/aiff
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/riff/wav
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/toolkit
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mp4
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg/vorbis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ogg/speex
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v2/frames
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mpeg/id3v1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ape
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wavpack
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/trueaudio
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/riff
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/riff/aiff
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/riff/wav
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mod
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/s3m
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/it
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xm
|
||||
)
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
endif(ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
ADD_SUBDIRECTORY( toolkit )
|
||||
ADD_SUBDIRECTORY( asf )
|
||||
ADD_SUBDIRECTORY( mpeg )
|
||||
ADD_SUBDIRECTORY( ogg )
|
||||
ADD_SUBDIRECTORY( flac )
|
||||
ADD_SUBDIRECTORY( ape )
|
||||
ADD_SUBDIRECTORY( mpc )
|
||||
ADD_SUBDIRECTORY( mp4 )
|
||||
ADD_SUBDIRECTORY( wavpack )
|
||||
ADD_SUBDIRECTORY( trueaudio )
|
||||
ADD_SUBDIRECTORY( riff )
|
||||
|
||||
########### next target ###############
|
||||
|
||||
SET(mpeg_SRCS
|
||||
mpeg/mpegfile.cpp
|
||||
mpeg/mpegproperties.cpp
|
||||
mpeg/mpegheader.cpp
|
||||
mpeg/xingheader.cpp
|
||||
set(tag_HDRS
|
||||
tag.h
|
||||
fileref.h
|
||||
audioproperties.h
|
||||
taglib_export.h
|
||||
${CMAKE_BINARY_DIR}/taglib_config.h
|
||||
toolkit/taglib.h
|
||||
toolkit/tstring.h
|
||||
toolkit/tlist.h
|
||||
toolkit/tlist.tcc
|
||||
toolkit/tstringlist.h
|
||||
toolkit/tbytevector.h
|
||||
toolkit/tbytevectorlist.h
|
||||
toolkit/tbytevectorstream.h
|
||||
toolkit/tiostream.h
|
||||
toolkit/tfile.h
|
||||
toolkit/tfilestream.h
|
||||
toolkit/tmap.h
|
||||
toolkit/tmap.tcc
|
||||
toolkit/tpropertymap.h
|
||||
mpeg/mpegfile.h
|
||||
mpeg/mpegproperties.h
|
||||
mpeg/mpegheader.h
|
||||
mpeg/xingheader.h
|
||||
mpeg/id3v1/id3v1tag.h
|
||||
mpeg/id3v1/id3v1genres.h
|
||||
mpeg/id3v2/id3v2extendedheader.h
|
||||
mpeg/id3v2/id3v2frame.h
|
||||
mpeg/id3v2/id3v2header.h
|
||||
mpeg/id3v2/id3v2synchdata.h
|
||||
mpeg/id3v2/id3v2footer.h
|
||||
mpeg/id3v2/id3v2framefactory.h
|
||||
mpeg/id3v2/id3v2tag.h
|
||||
mpeg/id3v2/frames/attachedpictureframe.h
|
||||
mpeg/id3v2/frames/commentsframe.h
|
||||
mpeg/id3v2/frames/generalencapsulatedobjectframe.h
|
||||
mpeg/id3v2/frames/ownershipframe.h
|
||||
mpeg/id3v2/frames/popularimeterframe.h
|
||||
mpeg/id3v2/frames/privateframe.h
|
||||
mpeg/id3v2/frames/relativevolumeframe.h
|
||||
mpeg/id3v2/frames/textidentificationframe.h
|
||||
mpeg/id3v2/frames/uniquefileidentifierframe.h
|
||||
mpeg/id3v2/frames/unknownframe.h
|
||||
mpeg/id3v2/frames/unsynchronizedlyricsframe.h
|
||||
mpeg/id3v2/frames/urllinkframe.h
|
||||
ogg/oggfile.h
|
||||
ogg/oggpage.h
|
||||
ogg/oggpageheader.h
|
||||
ogg/xiphcomment.h
|
||||
ogg/vorbis/vorbisfile.h
|
||||
ogg/vorbis/vorbisproperties.h
|
||||
ogg/flac/oggflacfile.h
|
||||
ogg/speex/speexfile.h
|
||||
ogg/speex/speexproperties.h
|
||||
flac/flacfile.h
|
||||
flac/flacpicture.h
|
||||
flac/flacproperties.h
|
||||
flac/flacmetadatablock.h
|
||||
ape/apefile.h
|
||||
ape/apeproperties.h
|
||||
ape/apetag.h
|
||||
ape/apefooter.h
|
||||
ape/apeitem.h
|
||||
mpc/mpcfile.h
|
||||
mpc/mpcproperties.h
|
||||
wavpack/wavpackfile.h
|
||||
wavpack/wavpackproperties.h
|
||||
trueaudio/trueaudiofile.h
|
||||
trueaudio/trueaudioproperties.h
|
||||
riff/rifffile.h
|
||||
riff/aiff/aifffile.h
|
||||
riff/aiff/aiffproperties.h
|
||||
riff/wav/wavfile.h
|
||||
riff/wav/wavproperties.h
|
||||
asf/asffile.h
|
||||
asf/asfproperties.h
|
||||
asf/asftag.h
|
||||
asf/asfattribute.h
|
||||
asf/asfpicture.h
|
||||
mp4/mp4file.h
|
||||
mp4/mp4atom.h
|
||||
mp4/mp4tag.h
|
||||
mp4/mp4item.h
|
||||
mp4/mp4properties.h
|
||||
mp4/mp4coverart.h
|
||||
mod/modfilebase.h
|
||||
mod/modfile.h
|
||||
mod/modtag.h
|
||||
mod/modproperties.h
|
||||
it/itfile.h
|
||||
it/itproperties.h
|
||||
s3m/s3mfile.h
|
||||
s3m/s3mproperties.h
|
||||
xm/xmfile.h
|
||||
xm/xmproperties.h
|
||||
)
|
||||
|
||||
SET(id3v1_SRCS
|
||||
mpeg/id3v1/id3v1tag.cpp
|
||||
mpeg/id3v1/id3v1genres.cpp
|
||||
set(mpeg_SRCS
|
||||
mpeg/mpegfile.cpp
|
||||
mpeg/mpegproperties.cpp
|
||||
mpeg/mpegheader.cpp
|
||||
mpeg/xingheader.cpp
|
||||
)
|
||||
|
||||
|
||||
SET(id3v2_SRCS
|
||||
mpeg/id3v2/id3v2framefactory.cpp
|
||||
mpeg/id3v2/id3v2synchdata.cpp
|
||||
mpeg/id3v2/id3v2tag.cpp
|
||||
mpeg/id3v2/id3v2header.cpp
|
||||
mpeg/id3v2/id3v2frame.cpp
|
||||
mpeg/id3v2/id3v2footer.cpp
|
||||
mpeg/id3v2/id3v2extendedheader.cpp
|
||||
set(id3v1_SRCS
|
||||
mpeg/id3v1/id3v1tag.cpp
|
||||
mpeg/id3v1/id3v1genres.cpp
|
||||
)
|
||||
|
||||
set(id3v2_SRCS
|
||||
mpeg/id3v2/id3v2framefactory.cpp
|
||||
mpeg/id3v2/id3v2synchdata.cpp
|
||||
mpeg/id3v2/id3v2tag.cpp
|
||||
mpeg/id3v2/id3v2header.cpp
|
||||
mpeg/id3v2/id3v2frame.cpp
|
||||
mpeg/id3v2/id3v2footer.cpp
|
||||
mpeg/id3v2/id3v2extendedheader.cpp
|
||||
)
|
||||
|
||||
SET(frames_SRCS
|
||||
mpeg/id3v2/frames/attachedpictureframe.cpp
|
||||
mpeg/id3v2/frames/commentsframe.cpp
|
||||
mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp
|
||||
mpeg/id3v2/frames/popularimeterframe.cpp
|
||||
mpeg/id3v2/frames/privateframe.cpp
|
||||
mpeg/id3v2/frames/relativevolumeframe.cpp
|
||||
mpeg/id3v2/frames/textidentificationframe.cpp
|
||||
mpeg/id3v2/frames/uniquefileidentifierframe.cpp
|
||||
mpeg/id3v2/frames/unknownframe.cpp
|
||||
mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp
|
||||
mpeg/id3v2/frames/urllinkframe.cpp
|
||||
set(frames_SRCS
|
||||
mpeg/id3v2/frames/attachedpictureframe.cpp
|
||||
mpeg/id3v2/frames/commentsframe.cpp
|
||||
mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp
|
||||
mpeg/id3v2/frames/ownershipframe.cpp
|
||||
mpeg/id3v2/frames/popularimeterframe.cpp
|
||||
mpeg/id3v2/frames/privateframe.cpp
|
||||
mpeg/id3v2/frames/relativevolumeframe.cpp
|
||||
mpeg/id3v2/frames/textidentificationframe.cpp
|
||||
mpeg/id3v2/frames/uniquefileidentifierframe.cpp
|
||||
mpeg/id3v2/frames/unknownframe.cpp
|
||||
mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp
|
||||
mpeg/id3v2/frames/urllinkframe.cpp
|
||||
)
|
||||
|
||||
SET(ogg_SRCS
|
||||
ogg/oggfile.cpp
|
||||
ogg/oggpage.cpp
|
||||
ogg/oggpageheader.cpp
|
||||
ogg/xiphcomment.cpp
|
||||
set(ogg_SRCS
|
||||
ogg/oggfile.cpp
|
||||
ogg/oggpage.cpp
|
||||
ogg/oggpageheader.cpp
|
||||
ogg/xiphcomment.cpp
|
||||
)
|
||||
|
||||
SET(vorbis_SRCS
|
||||
ogg/vorbis/vorbisfile.cpp
|
||||
ogg/vorbis/vorbisproperties.cpp
|
||||
set(vorbis_SRCS
|
||||
ogg/vorbis/vorbisfile.cpp
|
||||
ogg/vorbis/vorbisproperties.cpp
|
||||
)
|
||||
|
||||
|
||||
SET(flacs_SRCS
|
||||
flac/flacfile.cpp
|
||||
flac/flacpicture.cpp
|
||||
flac/flacproperties.cpp
|
||||
flac/flacmetadatablock.cpp
|
||||
flac/flacunknownmetadatablock.cpp
|
||||
set(flacs_SRCS
|
||||
flac/flacfile.cpp
|
||||
flac/flacpicture.cpp
|
||||
flac/flacproperties.cpp
|
||||
flac/flacmetadatablock.cpp
|
||||
flac/flacunknownmetadatablock.cpp
|
||||
)
|
||||
|
||||
SET(oggflacs_SRCS
|
||||
ogg/flac/oggflacfile.cpp
|
||||
set(oggflacs_SRCS
|
||||
ogg/flac/oggflacfile.cpp
|
||||
)
|
||||
|
||||
SET(mpc_SRCS
|
||||
mpc/mpcfile.cpp
|
||||
mpc/mpcproperties.cpp
|
||||
set(mpc_SRCS
|
||||
mpc/mpcfile.cpp
|
||||
mpc/mpcproperties.cpp
|
||||
)
|
||||
|
||||
IF(WITH_MP4)
|
||||
SET(mp4_SRCS
|
||||
mp4/mp4file.cpp
|
||||
mp4/mp4atom.cpp
|
||||
mp4/mp4tag.cpp
|
||||
mp4/mp4item.cpp
|
||||
mp4/mp4properties.cpp
|
||||
mp4/mp4coverart.cpp
|
||||
)
|
||||
ELSE(WITH_MP4)
|
||||
SET(mp4_SRCS)
|
||||
ENDIF(WITH_MP4)
|
||||
|
||||
SET(ape_SRCS
|
||||
ape/apetag.cpp
|
||||
ape/apefooter.cpp
|
||||
ape/apeitem.cpp
|
||||
ape/apefile.cpp
|
||||
ape/apeproperties.cpp
|
||||
set(mp4_SRCS
|
||||
mp4/mp4file.cpp
|
||||
mp4/mp4atom.cpp
|
||||
mp4/mp4tag.cpp
|
||||
mp4/mp4item.cpp
|
||||
mp4/mp4properties.cpp
|
||||
mp4/mp4coverart.cpp
|
||||
)
|
||||
|
||||
SET(wavpack_SRCS
|
||||
wavpack/wavpackfile.cpp
|
||||
wavpack/wavpackproperties.cpp
|
||||
set(ape_SRCS
|
||||
ape/apetag.cpp
|
||||
ape/apefooter.cpp
|
||||
ape/apeitem.cpp
|
||||
ape/apefile.cpp
|
||||
ape/apeproperties.cpp
|
||||
)
|
||||
|
||||
SET(speex_SRCS
|
||||
ogg/speex/speexfile.cpp
|
||||
ogg/speex/speexproperties.cpp
|
||||
set(wavpack_SRCS
|
||||
wavpack/wavpackfile.cpp
|
||||
wavpack/wavpackproperties.cpp
|
||||
)
|
||||
|
||||
SET(trueaudio_SRCS
|
||||
trueaudio/trueaudiofile.cpp
|
||||
trueaudio/trueaudioproperties.cpp
|
||||
set(speex_SRCS
|
||||
ogg/speex/speexfile.cpp
|
||||
ogg/speex/speexproperties.cpp
|
||||
)
|
||||
|
||||
IF(WITH_ASF)
|
||||
SET(asf_SRCS
|
||||
asf/asftag.cpp
|
||||
asf/asffile.cpp
|
||||
asf/asfproperties.cpp
|
||||
asf/asfattribute.cpp
|
||||
asf/asfpicture.cpp
|
||||
)
|
||||
ELSE(WITH_ASF)
|
||||
SET(asf_SRCS)
|
||||
ENDIF(WITH_ASF)
|
||||
|
||||
SET(riff_SRCS
|
||||
riff/rifffile.cpp
|
||||
set(trueaudio_SRCS
|
||||
trueaudio/trueaudiofile.cpp
|
||||
trueaudio/trueaudioproperties.cpp
|
||||
)
|
||||
|
||||
SET(aiff_SRCS
|
||||
riff/aiff/aifffile.cpp
|
||||
riff/aiff/aiffproperties.cpp
|
||||
set(asf_SRCS
|
||||
asf/asftag.cpp
|
||||
asf/asffile.cpp
|
||||
asf/asfproperties.cpp
|
||||
asf/asfattribute.cpp
|
||||
asf/asfpicture.cpp
|
||||
)
|
||||
|
||||
SET(wav_SRCS
|
||||
riff/wav/wavfile.cpp
|
||||
riff/wav/wavproperties.cpp
|
||||
set(riff_SRCS
|
||||
riff/rifffile.cpp
|
||||
)
|
||||
|
||||
SET(toolkit_SRCS
|
||||
toolkit/tstring.cpp
|
||||
toolkit/tstringlist.cpp
|
||||
toolkit/tbytevector.cpp
|
||||
toolkit/tbytevectorlist.cpp
|
||||
toolkit/tfile.cpp
|
||||
toolkit/tdebug.cpp
|
||||
toolkit/unicode.cpp
|
||||
set(aiff_SRCS
|
||||
riff/aiff/aifffile.cpp
|
||||
riff/aiff/aiffproperties.cpp
|
||||
)
|
||||
|
||||
SET(tag_LIB_SRCS ${mpeg_SRCS} ${id3v1_SRCS} ${id3v2_SRCS} ${frames_SRCS} ${ogg_SRCS}
|
||||
${vorbis_SRCS} ${oggflacs_SRCS} ${mpc_SRCS} ${ape_SRCS} ${toolkit_SRCS} ${flacs_SRCS}
|
||||
${wavpack_SRCS} ${speex_SRCS} ${trueaudio_SRCS} ${riff_SRCS} ${aiff_SRCS} ${wav_SRCS}
|
||||
${mp4_SRCS} ${asf_SRCS}
|
||||
tag.cpp
|
||||
tagunion.cpp
|
||||
fileref.cpp
|
||||
audioproperties.cpp
|
||||
set(wav_SRCS
|
||||
riff/wav/wavfile.cpp
|
||||
riff/wav/wavproperties.cpp
|
||||
)
|
||||
|
||||
set(mod_SRCS
|
||||
mod/modfilebase.cpp
|
||||
mod/modfile.cpp
|
||||
mod/modtag.cpp
|
||||
mod/modproperties.cpp
|
||||
)
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
add_library(tag STATIC ${tag_LIB_SRCS})
|
||||
set_target_properties(tag PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC)
|
||||
else(ENABLE_STATIC)
|
||||
add_library(tag SHARED ${tag_LIB_SRCS})
|
||||
endif(ENABLE_STATIC)
|
||||
set(s3m_SRCS
|
||||
s3m/s3mfile.cpp
|
||||
s3m/s3mproperties.cpp
|
||||
)
|
||||
|
||||
set(it_SRCS
|
||||
it/itfile.cpp
|
||||
it/itproperties.cpp
|
||||
)
|
||||
|
||||
set(xm_SRCS
|
||||
xm/xmfile.cpp
|
||||
xm/xmproperties.cpp
|
||||
)
|
||||
|
||||
set(toolkit_SRCS
|
||||
toolkit/tstring.cpp
|
||||
toolkit/tstringlist.cpp
|
||||
toolkit/tbytevector.cpp
|
||||
toolkit/tbytevectorlist.cpp
|
||||
toolkit/tbytevectorstream.cpp
|
||||
toolkit/tiostream.cpp
|
||||
toolkit/tfile.cpp
|
||||
toolkit/tfilestream.cpp
|
||||
toolkit/tdebug.cpp
|
||||
toolkit/tpropertymap.cpp
|
||||
toolkit/unicode.cpp
|
||||
)
|
||||
|
||||
set(tag_LIB_SRCS
|
||||
${mpeg_SRCS} ${id3v1_SRCS} ${id3v2_SRCS} ${frames_SRCS} ${ogg_SRCS}
|
||||
${vorbis_SRCS} ${oggflacs_SRCS} ${mpc_SRCS} ${ape_SRCS} ${toolkit_SRCS} ${flacs_SRCS}
|
||||
${wavpack_SRCS} ${speex_SRCS} ${trueaudio_SRCS} ${riff_SRCS} ${aiff_SRCS} ${wav_SRCS}
|
||||
${asf_SRCS} ${mp4_SRCS} ${mod_SRCS} ${s3m_SRCS} ${it_SRCS} ${xm_SRCS}
|
||||
tag.cpp
|
||||
tagunion.cpp
|
||||
fileref.cpp
|
||||
audioproperties.cpp
|
||||
)
|
||||
|
||||
add_library(tag ${tag_LIB_SRCS} ${tag_HDRS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(tag )
|
||||
if(ZLIB_FOUND)
|
||||
TARGET_LINK_LIBRARIES(tag ${ZLIB_LIBRARIES})
|
||||
endif(ZLIB_FOUND)
|
||||
target_link_libraries(tag ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
SET_TARGET_PROPERTIES(tag PROPERTIES
|
||||
VERSION ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
|
||||
SOVERSION ${TAGLIB_LIB_MAJOR_VERSION}
|
||||
INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
|
||||
DEFINE_SYMBOL MAKE_TAGLIB_LIB
|
||||
LINK_INTERFACE_LIBRARIES ""
|
||||
set_target_properties(tag PROPERTIES
|
||||
VERSION ${TAGLIB_SOVERSION_MAJOR}.${TAGLIB_SOVERSION_MINOR}.${TAGLIB_SOVERSION_PATCH}
|
||||
SOVERSION ${TAGLIB_SOVERSION_MAJOR}
|
||||
INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
|
||||
DEFINE_SYMBOL MAKE_TAGLIB_LIB
|
||||
LINK_INTERFACE_LIBRARIES ""
|
||||
PUBLIC_HEADER "${tag_HDRS}"
|
||||
)
|
||||
INSTALL(TARGETS tag
|
||||
if(BUILD_FRAMEWORK)
|
||||
set_target_properties(tag PROPERTIES FRAMEWORK TRUE)
|
||||
endif()
|
||||
|
||||
install(TARGETS tag
|
||||
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/taglib
|
||||
)
|
||||
|
||||
INSTALL( FILES tag.h fileref.h audioproperties.h taglib_export.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
INSTALL( FILES apefile.h apeproperties.h apetag.h apefooter.h apeitem.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <tdebug.h>
|
||||
#include <tagunion.h>
|
||||
#include <id3v1tag.h>
|
||||
#include <tpropertymap.h>
|
||||
|
||||
#include "apefile.h"
|
||||
|
||||
@@ -46,7 +47,7 @@ using namespace TagLib;
|
||||
|
||||
namespace
|
||||
{
|
||||
enum { APEIndex, ID3v1Index };
|
||||
enum { ApeAPEIndex, ApeID3v1Index };
|
||||
}
|
||||
|
||||
class APE::File::FilePrivate
|
||||
@@ -92,6 +93,13 @@ APE::File::File(FileName file, bool readProperties,
|
||||
read(readProperties, propertiesStyle);
|
||||
}
|
||||
|
||||
APE::File::File(IOStream *stream, bool readProperties,
|
||||
Properties::ReadStyle propertiesStyle) : TagLib::File(stream)
|
||||
{
|
||||
d = new FilePrivate;
|
||||
read(readProperties, propertiesStyle);
|
||||
}
|
||||
|
||||
APE::File::~File()
|
||||
{
|
||||
delete d;
|
||||
@@ -102,6 +110,33 @@ TagLib::Tag *APE::File::tag() const
|
||||
return &d->tag;
|
||||
}
|
||||
|
||||
PropertyMap APE::File::properties() const
|
||||
{
|
||||
if(d->hasAPE)
|
||||
return d->tag.access<APE::Tag>(ApeAPEIndex, false)->properties();
|
||||
if(d->hasID3v1)
|
||||
return d->tag.access<ID3v1::Tag>(ApeID3v1Index, false)->properties();
|
||||
return PropertyMap();
|
||||
}
|
||||
|
||||
void APE::File::removeUnsupportedProperties(const StringList &properties)
|
||||
{
|
||||
if(d->hasAPE)
|
||||
d->tag.access<APE::Tag>(ApeAPEIndex, false)->removeUnsupportedProperties(properties);
|
||||
if(d->hasID3v1)
|
||||
d->tag.access<ID3v1::Tag>(ApeID3v1Index, false)->removeUnsupportedProperties(properties);
|
||||
}
|
||||
|
||||
PropertyMap APE::File::setProperties(const PropertyMap &properties)
|
||||
{
|
||||
if(d->hasAPE)
|
||||
return d->tag.access<APE::Tag>(ApeAPEIndex, false)->setProperties(properties);
|
||||
else if(d->hasID3v1)
|
||||
return d->tag.access<ID3v1::Tag>(ApeID3v1Index, false)->setProperties(properties);
|
||||
else
|
||||
return d->tag.access<APE::Tag>(ApeAPEIndex, true)->setProperties(properties);
|
||||
}
|
||||
|
||||
APE::Properties *APE::File::audioProperties() const
|
||||
{
|
||||
return d->properties;
|
||||
@@ -178,23 +213,23 @@ bool APE::File::save()
|
||||
|
||||
ID3v1::Tag *APE::File::ID3v1Tag(bool create)
|
||||
{
|
||||
return d->tag.access<ID3v1::Tag>(ID3v1Index, create);
|
||||
return d->tag.access<ID3v1::Tag>(ApeID3v1Index, create);
|
||||
}
|
||||
|
||||
APE::Tag *APE::File::APETag(bool create)
|
||||
{
|
||||
return d->tag.access<APE::Tag>(APEIndex, create);
|
||||
return d->tag.access<APE::Tag>(ApeAPEIndex, create);
|
||||
}
|
||||
|
||||
void APE::File::strip(int tags)
|
||||
{
|
||||
if(tags & ID3v1) {
|
||||
d->tag.set(ID3v1Index, 0);
|
||||
d->tag.set(ApeID3v1Index, 0);
|
||||
APETag(true);
|
||||
}
|
||||
|
||||
if(tags & APE) {
|
||||
d->tag.set(APEIndex, 0);
|
||||
d->tag.set(ApeAPEIndex, 0);
|
||||
|
||||
if(!ID3v1Tag())
|
||||
APETag(true);
|
||||
@@ -212,7 +247,7 @@ void APE::File::read(bool readProperties, Properties::ReadStyle /* propertiesSty
|
||||
d->ID3v1Location = findID3v1();
|
||||
|
||||
if(d->ID3v1Location >= 0) {
|
||||
d->tag.set(ID3v1Index, new ID3v1::Tag(this, d->ID3v1Location));
|
||||
d->tag.set(ApeID3v1Index, new ID3v1::Tag(this, d->ID3v1Location));
|
||||
d->hasID3v1 = true;
|
||||
}
|
||||
|
||||
@@ -221,7 +256,7 @@ void APE::File::read(bool readProperties, Properties::ReadStyle /* propertiesSty
|
||||
d->APELocation = findAPE();
|
||||
|
||||
if(d->APELocation >= 0) {
|
||||
d->tag.set(APEIndex, new APE::Tag(this, d->APELocation));
|
||||
d->tag.set(ApeAPEIndex, new APE::Tag(this, d->APELocation));
|
||||
d->APESize = APETag()->footer()->completeTagSize();
|
||||
d->APELocation = d->APELocation + APETag()->footer()->size() - d->APESize;
|
||||
d->hasAPE = true;
|
||||
|
||||
@@ -91,6 +91,17 @@ namespace TagLib {
|
||||
File(FileName file, bool readProperties = true,
|
||||
Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
|
||||
/*!
|
||||
* Contructs an WavPack file from \a file. If \a readProperties is true the
|
||||
* file's audio properties will also be read using \a propertiesStyle. If
|
||||
* false, \a propertiesStyle is ignored.
|
||||
*
|
||||
* \note TagLib will *not* take ownership of the stream, the caller is
|
||||
* responsible for deleting it after the File object.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true,
|
||||
Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
*/
|
||||
@@ -102,6 +113,25 @@ namespace TagLib {
|
||||
*/
|
||||
virtual TagLib::Tag *tag() const;
|
||||
|
||||
/*!
|
||||
* Implements the unified property interface -- export function.
|
||||
* If the file contains both an APE and an ID3v1 tag, only APE
|
||||
* will be converted to the PropertyMap.
|
||||
*/
|
||||
PropertyMap properties() const;
|
||||
|
||||
/*!
|
||||
* Removes unsupported properties. Forwards to the actual Tag's
|
||||
* removeUnsupportedProperties() function.
|
||||
*/
|
||||
void removeUnsupportedProperties(const StringList &properties);
|
||||
|
||||
/*!
|
||||
* Implements the unified property interface -- import function.
|
||||
* As for the export, only one tag is taken into account. If the file
|
||||
* has no tag at all, APE will be created.
|
||||
*/
|
||||
PropertyMap setProperties(const PropertyMap &);
|
||||
/*!
|
||||
* Returns the APE::Properties for this file. If no audio properties
|
||||
* were read then this will return a null pointer.
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
using namespace TagLib;
|
||||
using namespace APE;
|
||||
|
||||
class Footer::FooterPrivate
|
||||
class APE::Footer::FooterPrivate
|
||||
{
|
||||
public:
|
||||
FooterPrivate() : version(0),
|
||||
@@ -64,12 +64,12 @@ public:
|
||||
// static members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TagLib::uint Footer::size()
|
||||
TagLib::uint APE::Footer::size()
|
||||
{
|
||||
return FooterPrivate::size;
|
||||
}
|
||||
|
||||
ByteVector Footer::fileIdentifier()
|
||||
ByteVector APE::Footer::fileIdentifier()
|
||||
{
|
||||
return ByteVector::fromCString("APETAGEX");
|
||||
}
|
||||
@@ -78,63 +78,63 @@ ByteVector Footer::fileIdentifier()
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Footer::Footer()
|
||||
APE::Footer::Footer()
|
||||
{
|
||||
d = new FooterPrivate;
|
||||
}
|
||||
|
||||
Footer::Footer(const ByteVector &data)
|
||||
APE::Footer::Footer(const ByteVector &data)
|
||||
{
|
||||
d = new FooterPrivate;
|
||||
parse(data);
|
||||
}
|
||||
|
||||
Footer::~Footer()
|
||||
APE::Footer::~Footer()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
TagLib::uint Footer::version() const
|
||||
TagLib::uint APE::Footer::version() const
|
||||
{
|
||||
return d->version;
|
||||
}
|
||||
|
||||
bool Footer::headerPresent() const
|
||||
bool APE::Footer::headerPresent() const
|
||||
{
|
||||
return d->headerPresent;
|
||||
}
|
||||
|
||||
bool Footer::footerPresent() const
|
||||
bool APE::Footer::footerPresent() const
|
||||
{
|
||||
return d->footerPresent;
|
||||
}
|
||||
|
||||
bool Footer::isHeader() const
|
||||
bool APE::Footer::isHeader() const
|
||||
{
|
||||
return d->isHeader;
|
||||
}
|
||||
|
||||
void Footer::setHeaderPresent(bool b) const
|
||||
void APE::Footer::setHeaderPresent(bool b) const
|
||||
{
|
||||
d->headerPresent = b;
|
||||
}
|
||||
|
||||
TagLib::uint Footer::itemCount() const
|
||||
TagLib::uint APE::Footer::itemCount() const
|
||||
{
|
||||
return d->itemCount;
|
||||
}
|
||||
|
||||
void Footer::setItemCount(uint s)
|
||||
void APE::Footer::setItemCount(uint s)
|
||||
{
|
||||
d->itemCount = s;
|
||||
}
|
||||
|
||||
TagLib::uint Footer::tagSize() const
|
||||
TagLib::uint APE::Footer::tagSize() const
|
||||
{
|
||||
return d->tagSize;
|
||||
}
|
||||
|
||||
TagLib::uint Footer::completeTagSize() const
|
||||
TagLib::uint APE::Footer::completeTagSize() const
|
||||
{
|
||||
if(d->headerPresent)
|
||||
return d->tagSize + d->size;
|
||||
@@ -142,22 +142,22 @@ TagLib::uint Footer::completeTagSize() const
|
||||
return d->tagSize;
|
||||
}
|
||||
|
||||
void Footer::setTagSize(uint s)
|
||||
void APE::Footer::setTagSize(uint s)
|
||||
{
|
||||
d->tagSize = s;
|
||||
}
|
||||
|
||||
void Footer::setData(const ByteVector &data)
|
||||
void APE::Footer::setData(const ByteVector &data)
|
||||
{
|
||||
parse(data);
|
||||
}
|
||||
|
||||
ByteVector Footer::renderFooter() const
|
||||
ByteVector APE::Footer::renderFooter() const
|
||||
{
|
||||
return render(false);
|
||||
}
|
||||
|
||||
ByteVector Footer::renderHeader() const
|
||||
ByteVector APE::Footer::renderHeader() const
|
||||
{
|
||||
if (!d->headerPresent) return ByteVector();
|
||||
|
||||
@@ -168,7 +168,7 @@ ByteVector Footer::renderHeader() const
|
||||
// protected members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Footer::parse(const ByteVector &data)
|
||||
void APE::Footer::parse(const ByteVector &data)
|
||||
{
|
||||
if(data.size() < size())
|
||||
return;
|
||||
@@ -197,7 +197,7 @@ void Footer::parse(const ByteVector &data)
|
||||
|
||||
}
|
||||
|
||||
ByteVector Footer::render(bool isHeader) const
|
||||
ByteVector APE::Footer::render(bool isHeader) const
|
||||
{
|
||||
ByteVector v;
|
||||
|
||||
|
||||
@@ -62,6 +62,18 @@ APE::Item::Item(const String &key, const StringList &values)
|
||||
d->text = values;
|
||||
}
|
||||
|
||||
APE::Item::Item(const String &key, const ByteVector &value, bool binary)
|
||||
{
|
||||
d = new ItemPrivate;
|
||||
d->key = key;
|
||||
if(binary) {
|
||||
d->type = Binary;
|
||||
d->value = value;
|
||||
}
|
||||
else
|
||||
d->text.append(value);
|
||||
}
|
||||
|
||||
APE::Item::Item(const Item &item)
|
||||
{
|
||||
d = new ItemPrivate(*item.d);
|
||||
@@ -104,6 +116,17 @@ String APE::Item::key() const
|
||||
return d->key;
|
||||
}
|
||||
|
||||
ByteVector APE::Item::binaryData() const
|
||||
{
|
||||
return d->value;
|
||||
}
|
||||
|
||||
void APE::Item::setBinaryData(const ByteVector &value)
|
||||
{
|
||||
d->type = Binary;
|
||||
d->value = value;
|
||||
}
|
||||
|
||||
ByteVector APE::Item::value() const
|
||||
{
|
||||
// This seems incorrect as it won't be actually rendering the value to keep it
|
||||
@@ -119,27 +142,50 @@ void APE::Item::setKey(const String &key)
|
||||
|
||||
void APE::Item::setValue(const String &value)
|
||||
{
|
||||
d->type = Text;
|
||||
d->text = value;
|
||||
}
|
||||
|
||||
void APE::Item::setValues(const StringList &value)
|
||||
{
|
||||
d->type = Text;
|
||||
d->text = value;
|
||||
}
|
||||
|
||||
void APE::Item::appendValue(const String &value)
|
||||
{
|
||||
d->type = Text;
|
||||
d->text.append(value);
|
||||
}
|
||||
|
||||
void APE::Item::appendValues(const StringList &values)
|
||||
{
|
||||
d->type = Text;
|
||||
d->text.append(values);
|
||||
}
|
||||
|
||||
int APE::Item::size() const
|
||||
{
|
||||
return 8 + d->key.size() + 1 + d->value.size();
|
||||
// SFB: Why is d->key.size() used when size() returns the length in UniChars and not UTF-8?
|
||||
int result = 8 + d->key.size() /* d->key.data(String::UTF8).size() */ + 1;
|
||||
switch (d->type) {
|
||||
case Text:
|
||||
if(d->text.size()) {
|
||||
StringList::ConstIterator it = d->text.begin();
|
||||
|
||||
result += it->data(String::UTF8).size();
|
||||
it++;
|
||||
for(; it != d->text.end(); ++it)
|
||||
result += 1 + it->data(String::UTF8).size();
|
||||
}
|
||||
break;
|
||||
|
||||
case Binary:
|
||||
case Locator:
|
||||
result += d->value.size();
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
StringList APE::Item::toStringList() const
|
||||
@@ -161,12 +207,12 @@ bool APE::Item::isEmpty() const
|
||||
{
|
||||
switch(d->type) {
|
||||
case Text:
|
||||
case Binary:
|
||||
if(d->text.isEmpty())
|
||||
return true;
|
||||
if(d->text.size() == 1 && d->text.front().isEmpty())
|
||||
return true;
|
||||
return false;
|
||||
case Binary:
|
||||
case Locator:
|
||||
return d->value.isEmpty();
|
||||
default:
|
||||
@@ -193,7 +239,7 @@ void APE::Item::parse(const ByteVector &data)
|
||||
setReadOnly(flags & 1);
|
||||
setType(ItemTypes((flags >> 1) & 3));
|
||||
|
||||
if(int(d->type) < 2)
|
||||
if(Text == d->type)
|
||||
d->text = StringList(ByteVectorList::split(d->value, '\0'), String::UTF8);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,16 +59,22 @@ namespace TagLib {
|
||||
Item();
|
||||
|
||||
/*!
|
||||
* Constructs an item with \a key and \a value.
|
||||
* Constructs a text item with \a key and \a value.
|
||||
*/
|
||||
// BIC: Remove this, StringList has a constructor from a single string
|
||||
Item(const String &key, const String &value);
|
||||
|
||||
/*!
|
||||
* Constructs an item with \a key and \a values.
|
||||
* Constructs a text item with \a key and \a values.
|
||||
*/
|
||||
Item(const String &key, const StringList &values);
|
||||
|
||||
/*!
|
||||
* Constructs an item with \a key and \a value.
|
||||
* If \a binary is true a Binary item will be created, otherwise \a value will be interpreted as text
|
||||
*/
|
||||
Item(const String &key, const ByteVector &value, bool binary);
|
||||
|
||||
/*!
|
||||
* Construct an item as a copy of \a item.
|
||||
*/
|
||||
@@ -91,12 +97,20 @@ namespace TagLib {
|
||||
|
||||
/*!
|
||||
* Returns the binary value.
|
||||
*
|
||||
* \deprecated This will be removed in the next binary incompatible version
|
||||
* as it is not kept in sync with the things that are set using setValue()
|
||||
* and friends.
|
||||
* If the item type is not \a Binary, the returned contents are undefined
|
||||
*/
|
||||
ByteVector binaryData() const;
|
||||
|
||||
/*!
|
||||
* Set the binary value to \a value
|
||||
* The item's type will also be set to \a Binary
|
||||
*/
|
||||
void setBinaryData(const ByteVector &value);
|
||||
|
||||
#ifndef DO_NOT_DOCUMENT
|
||||
/* Remove in next binary incompatible release */
|
||||
ByteVector value() const;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Sets the key for the item to \a key.
|
||||
@@ -104,14 +118,14 @@ namespace TagLib {
|
||||
void setKey(const String &key);
|
||||
|
||||
/*!
|
||||
* Sets the value of the item to \a value and clears any previous contents.
|
||||
* Sets the text value of the item to \a value and clears any previous contents.
|
||||
*
|
||||
* \see toString()
|
||||
*/
|
||||
void setValue(const String &value);
|
||||
|
||||
/*!
|
||||
* Sets the value of the item to the list of values in \a value and clears
|
||||
* Sets the text value of the item to the list of values in \a value and clears
|
||||
* any previous contents.
|
||||
*
|
||||
* \see toStringList()
|
||||
@@ -119,14 +133,14 @@ namespace TagLib {
|
||||
void setValues(const StringList &values);
|
||||
|
||||
/*!
|
||||
* Appends \a value to create (or extend) the current list of values.
|
||||
* Appends \a value to create (or extend) the current list of text values.
|
||||
*
|
||||
* \see toString()
|
||||
*/
|
||||
void appendValue(const String &value);
|
||||
|
||||
/*!
|
||||
* Appends \a values to extend the current list of values.
|
||||
* Appends \a values to extend the current list of text values.
|
||||
*
|
||||
* \see toStringList()
|
||||
*/
|
||||
@@ -143,14 +157,13 @@ namespace TagLib {
|
||||
*/
|
||||
String toString() const;
|
||||
|
||||
/*!
|
||||
* \deprecated
|
||||
* \see values
|
||||
*/
|
||||
#ifndef DO_NOT_DOCUMENT
|
||||
/* Remove in next binary incompatible release */
|
||||
StringList toStringList() const;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Returns the list of values.
|
||||
* Returns the list of text values.
|
||||
*/
|
||||
StringList values() const;
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
channels(0),
|
||||
version(0),
|
||||
bitsPerSample(0),
|
||||
sampleFrames(0),
|
||||
file(file),
|
||||
streamLength(streamLength) {}
|
||||
|
||||
@@ -55,6 +56,7 @@ public:
|
||||
int channels;
|
||||
int version;
|
||||
int bitsPerSample;
|
||||
uint sampleFrames;
|
||||
File *file;
|
||||
long streamLength;
|
||||
};
|
||||
@@ -104,6 +106,11 @@ int APE::Properties::bitsPerSample() const
|
||||
return d->bitsPerSample;
|
||||
}
|
||||
|
||||
TagLib::uint APE::Properties::sampleFrames() const
|
||||
{
|
||||
return d->sampleFrames;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -137,7 +144,7 @@ long APE::Properties::findDescriptor()
|
||||
long ID3v2OriginalSize = 0;
|
||||
bool hasID3v2 = false;
|
||||
if(ID3v2Location >= 0) {
|
||||
ID3v2::Tag tag(d->file, ID3v2Location, 0);
|
||||
ID3v2::Tag tag(d->file, ID3v2Location);
|
||||
ID3v2OriginalSize = tag.header()->completeTagSize();
|
||||
if(tag.header()->tagSize() > 0)
|
||||
hasID3v2 = true;
|
||||
@@ -192,8 +199,8 @@ void APE::Properties::analyzeCurrent()
|
||||
uint totalFrames = header.mid(12, 4).toUInt(false);
|
||||
uint blocksPerFrame = header.mid(4, 4).toUInt(false);
|
||||
uint finalFrameBlocks = header.mid(8, 4).toUInt(false);
|
||||
uint totalBlocks = totalFrames > 0 ? (totalFrames - 1) * blocksPerFrame + finalFrameBlocks : 0;
|
||||
d->length = d->sampleRate > 0 ? totalBlocks / d->sampleRate : 0;
|
||||
d->sampleFrames = totalFrames > 0 ? (totalFrames - 1) * blocksPerFrame + finalFrameBlocks : 0;
|
||||
d->length = d->sampleRate > 0 ? d->sampleFrames / d->sampleRate : 0;
|
||||
d->bitrate = d->length > 0 ? ((d->streamLength * 8L) / d->length) / 1000 : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ namespace TagLib {
|
||||
* Returns number of bits per sample.
|
||||
*/
|
||||
int bitsPerSample() const;
|
||||
uint sampleFrames() const;
|
||||
|
||||
/*!
|
||||
* Returns APE version.
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <tfile.h>
|
||||
#include <tstring.h>
|
||||
#include <tmap.h>
|
||||
#include <tpropertymap.h>
|
||||
|
||||
#include "apetag.h"
|
||||
#include "apefooter.h"
|
||||
@@ -47,7 +48,7 @@ class APE::Tag::TagPrivate
|
||||
public:
|
||||
TagPrivate() : file(0), footerLocation(-1), tagLength(0) {}
|
||||
|
||||
File *file;
|
||||
TagLib::File *file;
|
||||
long footerLocation;
|
||||
long tagLength;
|
||||
|
||||
@@ -65,7 +66,7 @@ APE::Tag::Tag() : TagLib::Tag()
|
||||
d = new TagPrivate;
|
||||
}
|
||||
|
||||
APE::Tag::Tag(File *file, long footerLocation) : TagLib::Tag()
|
||||
APE::Tag::Tag(TagLib::File *file, long footerLocation) : TagLib::Tag()
|
||||
{
|
||||
d = new TagPrivate;
|
||||
d->file = file;
|
||||
@@ -174,6 +175,103 @@ void APE::Tag::setTrack(uint i)
|
||||
addValue("TRACK", String::number(i), true);
|
||||
}
|
||||
|
||||
// conversions of tag keys between what we use in PropertyMap and what's usual
|
||||
// for APE tags
|
||||
static const TagLib::uint keyConversionsSize = 5; //usual, APE
|
||||
static const char *keyConversions[][2] = {{"TRACKNUMBER", "TRACK" },
|
||||
{"DATE", "YEAR" },
|
||||
{"ALBUMARTIST", "ALBUM ARTIST"},
|
||||
{"DISCNUMBER", "DISC" },
|
||||
{"REMIXER", "MIXARTIST" }};
|
||||
|
||||
PropertyMap APE::Tag::properties() const
|
||||
{
|
||||
PropertyMap properties;
|
||||
ItemListMap::ConstIterator it = itemListMap().begin();
|
||||
for(; it != itemListMap().end(); ++it) {
|
||||
String tagName = it->first.upper();
|
||||
// if the item is Binary or Locator, or if the key is an invalid string,
|
||||
// add to unsupportedData
|
||||
if(it->second.type() != Item::Text || tagName.isNull())
|
||||
properties.unsupportedData().append(it->first);
|
||||
else {
|
||||
// Some tags need to be handled specially
|
||||
for(uint i = 0; i < keyConversionsSize; ++i)
|
||||
if(tagName == keyConversions[i][1])
|
||||
tagName = keyConversions[i][0];
|
||||
properties[tagName].append(it->second.toStringList());
|
||||
}
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
void APE::Tag::removeUnsupportedProperties(const StringList &properties)
|
||||
{
|
||||
StringList::ConstIterator it = properties.begin();
|
||||
for(; it != properties.end(); ++it)
|
||||
removeItem(*it);
|
||||
}
|
||||
|
||||
PropertyMap APE::Tag::setProperties(const PropertyMap &origProps)
|
||||
{
|
||||
PropertyMap properties(origProps); // make a local copy that can be modified
|
||||
|
||||
// see comment in properties()
|
||||
for(uint i = 0; i < keyConversionsSize; ++i)
|
||||
if(properties.contains(keyConversions[i][0])) {
|
||||
properties.insert(keyConversions[i][1], properties[keyConversions[i][0]]);
|
||||
properties.erase(keyConversions[i][0]);
|
||||
}
|
||||
|
||||
// first check if tags need to be removed completely
|
||||
StringList toRemove;
|
||||
ItemListMap::ConstIterator remIt = itemListMap().begin();
|
||||
for(; remIt != itemListMap().end(); ++remIt) {
|
||||
String key = remIt->first.upper();
|
||||
// only remove if a) key is valid, b) type is text, c) key not contained in new properties
|
||||
if(!key.isNull() && remIt->second.type() == APE::Item::Text && !properties.contains(key))
|
||||
toRemove.append(remIt->first);
|
||||
}
|
||||
|
||||
for (StringList::Iterator removeIt = toRemove.begin(); removeIt != toRemove.end(); removeIt++)
|
||||
removeItem(*removeIt);
|
||||
|
||||
// now sync in the "forward direction"
|
||||
PropertyMap::ConstIterator it = properties.begin();
|
||||
PropertyMap invalid;
|
||||
for(; it != properties.end(); ++it) {
|
||||
const String &tagName = it->first;
|
||||
if(!checkKey(tagName))
|
||||
invalid.insert(it->first, it->second);
|
||||
else if(!(itemListMap().contains(tagName)) || !(itemListMap()[tagName].values() == it->second)) {
|
||||
if(it->second.size() == 0)
|
||||
removeItem(tagName);
|
||||
else {
|
||||
StringList::ConstIterator valueIt = it->second.begin();
|
||||
addValue(tagName, *valueIt, true);
|
||||
++valueIt;
|
||||
for(; valueIt != it->second.end(); ++valueIt)
|
||||
addValue(tagName, *valueIt, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return invalid;
|
||||
}
|
||||
|
||||
bool APE::Tag::checkKey(const String &key)
|
||||
{
|
||||
if(key.size() < 2 || key.size() > 16)
|
||||
return false;
|
||||
for(String::ConstIterator it = key.begin(); it != key.end(); it++)
|
||||
// only allow printable ASCII including space (32..127)
|
||||
if (*it < 32 || *it >= 128)
|
||||
return false;
|
||||
String upperKey = key.upper();
|
||||
if (upperKey=="ID3" || upperKey=="TAG" || upperKey=="OGGS" || upperKey=="MP+")
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
APE::Footer *APE::Tag::footer() const
|
||||
{
|
||||
return &d->footer;
|
||||
@@ -195,17 +293,31 @@ void APE::Tag::addValue(const String &key, const String &value, bool replace)
|
||||
{
|
||||
if(replace)
|
||||
removeItem(key);
|
||||
if(!value.isEmpty()) {
|
||||
if(d->itemListMap.contains(key) || !replace)
|
||||
d->itemListMap[key.upper()].appendValue(value);
|
||||
if(!key.isEmpty() && !value.isEmpty()) {
|
||||
if(!replace && d->itemListMap.contains(key)) {
|
||||
// Text items may contain more than one value
|
||||
if(APE::Item::Text == d->itemListMap.begin()->second.type())
|
||||
d->itemListMap[key.upper()].appendValue(value);
|
||||
// Binary or locator items may have only one value
|
||||
else
|
||||
setItem(key, Item(key, value));
|
||||
}
|
||||
else
|
||||
setItem(key, Item(key, value));
|
||||
}
|
||||
}
|
||||
|
||||
void APE::Tag::setData(const String &key, const ByteVector &value)
|
||||
{
|
||||
removeItem(key);
|
||||
if(!key.isEmpty() && !value.isEmpty())
|
||||
setItem(key, Item(key, value, true));
|
||||
}
|
||||
|
||||
void APE::Tag::setItem(const String &key, const Item &item)
|
||||
{
|
||||
d->itemListMap.insert(key.upper(), item);
|
||||
if(!key.isEmpty())
|
||||
d->itemListMap.insert(key.upper(), item);
|
||||
}
|
||||
|
||||
bool APE::Tag::isEmpty() const
|
||||
|
||||
@@ -103,6 +103,37 @@ namespace TagLib {
|
||||
virtual void setYear(uint i);
|
||||
virtual void setTrack(uint i);
|
||||
|
||||
/*!
|
||||
* Implements the unified tag dictionary interface -- export function.
|
||||
* APE tags are perfectly compatible with the dictionary interface because they
|
||||
* support both arbitrary tag names and multiple values. Currently only
|
||||
* APE items of type *Text* are handled by the dictionary interface; all *Binary*
|
||||
* and *Locator* items will be put into the unsupportedData list and can be
|
||||
* deleted on request using removeUnsupportedProperties(). The same happens
|
||||
* to Text items if their key is invalid for PropertyMap (which should actually
|
||||
* never happen).
|
||||
*
|
||||
* The only conversion done by this export function is to rename the APE tags
|
||||
* TRACK to TRACKNUMBER, YEAR to DATE, and ALBUM ARTIST to ALBUMARTIST, respectively,
|
||||
* in order to be compliant with the names used in other formats.
|
||||
*/
|
||||
PropertyMap properties() const;
|
||||
|
||||
void removeUnsupportedProperties(const StringList &properties);
|
||||
|
||||
/*!
|
||||
* Implements the unified tag dictionary interface -- import function. The same
|
||||
* comments as for the export function apply; additionally note that the APE tag
|
||||
* specification requires keys to have between 2 and 16 printable ASCII characters
|
||||
* with the exception of the fixed strings "ID3", "TAG", "OGGS", and "MP+".
|
||||
*/
|
||||
PropertyMap setProperties(const PropertyMap &);
|
||||
|
||||
/*!
|
||||
* Check if the given String is a valid APE tag key.
|
||||
*/
|
||||
static bool checkKey(const String&);
|
||||
|
||||
/*!
|
||||
* Returns a pointer to the tag's footer.
|
||||
*/
|
||||
@@ -128,12 +159,19 @@ namespace TagLib {
|
||||
void removeItem(const String &key);
|
||||
|
||||
/*!
|
||||
* Adds to the item specified by \a key the data \a value. If \a replace
|
||||
* Adds to the text item specified by \a key the data \a value. If \a replace
|
||||
* is true, then all of the other values on the same key will be removed
|
||||
* first.
|
||||
* first. If a binary item exists for \a key it will be removed first.
|
||||
*/
|
||||
void addValue(const String &key, const String &value, bool replace = true);
|
||||
|
||||
/*!
|
||||
* Set the binary data for the key specified by \a item to \a value
|
||||
* This will convert the item to type \a Binary if it isn't already and
|
||||
* all of the other values on the same key will be removed.
|
||||
*/
|
||||
void setData(const String &key, const ByteVector &value);
|
||||
|
||||
/*!
|
||||
* Sets the \a key item to the value of \a item. If an item with the \a key is already
|
||||
* present, it will be replaced.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
INSTALL( FILES asffile.h asfproperties.h asftag.h asfattribute.h asfpicture.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user