mirror of
https://github.com/taglib/taglib.git
synced 2026-06-07 06:50:32 -04:00
Compare commits
120 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36d9c94f1f | ||
|
|
b53c08c067 | ||
|
|
0ea8e44df7 | ||
|
|
27332c35ac | ||
|
|
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 |
41
.gitignore
vendored
Normal file
41
.gitignore
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
cmake_install.cmake
|
||||
Makefile
|
||||
CMakeFiles/
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
*.vcproj
|
||||
*.ncb
|
||||
*.sln
|
||||
*.suo
|
||||
*.user
|
||||
.*
|
||||
*~
|
||||
/CMakeCache.txt
|
||||
/Doxyfile
|
||||
/config.h
|
||||
/taglib.pc
|
||||
/tests/test_runner
|
||||
/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!
|
||||
|
||||
114
CMakeLists.txt
114
CMakeLists.txt
@@ -2,81 +2,93 @@ 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(BUILD_TESTS "Build the test suite" OFF)
|
||||
OPTION(BUILD_EXAMPLES "Build the examples" 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)
|
||||
OPTION(WITH_ASF "Enable ASF tag reading/writing code" OFF)
|
||||
OPTION(WITH_MP4 "Enable MP4 tag reading/writing code" 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 "0")
|
||||
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()
|
||||
|
||||
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 "7")
|
||||
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 11)
|
||||
set(TAGLIB_SOVERSION_REVISION 0)
|
||||
set(TAGLIB_SOVERSION_AGE 10)
|
||||
|
||||
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)
|
||||
add_subdirectory(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)
|
||||
|
||||
30
INSTALL
30
INSTALL
@@ -9,10 +9,31 @@ 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 [...]
|
||||
cmake -DBUILD_EXAMPLES=ON [...]
|
||||
|
||||
See http://www.cmake.org/cmake/help/runningcmake.html for generic help on
|
||||
running CMake.
|
||||
|
||||
Mac OS X Framework
|
||||
------------------
|
||||
|
||||
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;i368;x86_64"
|
||||
|
||||
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. The test suite has a custom target
|
||||
@@ -20,6 +41,3 @@ in the build system, so you can run the tests using make:
|
||||
|
||||
make check
|
||||
|
||||
See http://www.cmake.org/cmake/help/runningcmake.html for generic help on
|
||||
running CMake.
|
||||
|
||||
|
||||
8
NEWS
8
NEWS
@@ -1,3 +1,11 @@
|
||||
TagLib 1.8 (In Development)
|
||||
===========================
|
||||
|
||||
* Support for writing ID3v2.3 tags.
|
||||
* Added methods for checking if WMA and MP4 files are DRM-protected.
|
||||
* Started using atomic int operations for reference counting.
|
||||
* Find APE tags even if there's a Lyrics3v2 tag present (BUG:254223).
|
||||
|
||||
TagLib 1.7 (Mar 11, 2011)
|
||||
=========================
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -86,14 +86,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;
|
||||
}
|
||||
|
||||
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,317 @@
|
||||
|
||||
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
|
||||
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/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/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/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)
|
||||
@@ -92,6 +92,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;
|
||||
|
||||
@@ -91,6 +91,14 @@ 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.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true,
|
||||
Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
*/
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
INSTALL( FILES asffile.h asfproperties.h asftag.h asfattribute.h asfpicture.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
|
||||
@@ -27,8 +27,6 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
|
||||
#include <taglib.h>
|
||||
#include <tdebug.h>
|
||||
#include "asfattribute.h"
|
||||
@@ -353,4 +351,3 @@ void ASF::Attribute::setStream(int value)
|
||||
d->stream = value;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
|
||||
#include <tdebug.h>
|
||||
#include <tbytevectorlist.h>
|
||||
#include <tstring.h>
|
||||
@@ -69,6 +67,9 @@ static ByteVector extendedContentDescriptionGuid("\x40\xA4\xD0\xD2\x07\xE3\xD2\x
|
||||
static ByteVector headerExtensionGuid("\xb5\x03\xbf_.\xa9\xcf\x11\x8e\xe3\x00\xc0\x0c Se", 16);
|
||||
static ByteVector metadataGuid("\xEA\xCB\xF8\xC5\xAF[wH\204g\xAA\214D\xFAL\xCA", 16);
|
||||
static ByteVector metadataLibraryGuid("\224\034#D\230\224\321I\241A\x1d\x13NEpT", 16);
|
||||
static ByteVector contentEncryptionGuid("\xFB\xB3\x11\x22\x23\xBD\xD2\x11\xB4\xB7\x00\xA0\xC9\x55\xFC\x6E", 16);
|
||||
static ByteVector extendedContentEncryptionGuid("\x14\xE6\x8A\x29\x22\x26 \x17\x4C\xB9\x35\xDA\xE0\x7E\xE9\x28\x9C", 16);
|
||||
static ByteVector advancedContentEncryptionGuid("\xB6\x9B\x07\x7A\xA4\xDA\x12\x4E\xA5\xCA\x91\xD3\x8D\xC1\x1A\x8D", 16);
|
||||
|
||||
class ASF::File::BaseObject
|
||||
{
|
||||
@@ -366,6 +367,13 @@ ASF::File::File(FileName file, bool readProperties, Properties::ReadStyle proper
|
||||
read(readProperties, propertiesStyle);
|
||||
}
|
||||
|
||||
ASF::File::File(IOStream *stream, bool readProperties, Properties::ReadStyle propertiesStyle)
|
||||
: TagLib::File(stream)
|
||||
{
|
||||
d = new FilePrivate;
|
||||
read(readProperties, propertiesStyle);
|
||||
}
|
||||
|
||||
ASF::File::~File()
|
||||
{
|
||||
for(unsigned int i = 0; i < d->objects.size(); i++) {
|
||||
@@ -446,6 +454,11 @@ void ASF::File::read(bool /*readProperties*/, Properties::ReadStyle /*properties
|
||||
obj = new HeaderExtensionObject();
|
||||
}
|
||||
else {
|
||||
if(guid == contentEncryptionGuid ||
|
||||
guid == extendedContentEncryptionGuid ||
|
||||
guid == advancedContentEncryptionGuid) {
|
||||
d->properties->setEncrypted(true);
|
||||
}
|
||||
obj = new UnknownObject(guid);
|
||||
}
|
||||
obj->parse(this, size);
|
||||
@@ -592,4 +605,3 @@ ByteVector ASF::File::renderString(const String &str, bool includeLength)
|
||||
return data;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,6 +57,16 @@ namespace TagLib {
|
||||
*/
|
||||
File(FileName file, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
|
||||
/*!
|
||||
* Contructs an ASF 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 In the current implementation, both \a readProperties and
|
||||
* \a propertiesStyle are ignored.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
*/
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
|
||||
#include <taglib.h>
|
||||
#include <tdebug.h>
|
||||
#include "asfattribute.h"
|
||||
@@ -182,4 +180,3 @@ ASF::Picture ASF::Picture::fromInvalid()
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
|
||||
#include <tdebug.h>
|
||||
#include <tstring.h>
|
||||
#include "asfproperties.h"
|
||||
@@ -38,11 +36,12 @@ using namespace TagLib;
|
||||
class ASF::Properties::PropertiesPrivate
|
||||
{
|
||||
public:
|
||||
PropertiesPrivate(): length(0), bitrate(0), sampleRate(0), channels(0) {}
|
||||
PropertiesPrivate(): length(0), bitrate(0), sampleRate(0), channels(0), encrypted(false) {}
|
||||
int length;
|
||||
int bitrate;
|
||||
int sampleRate;
|
||||
int channels;
|
||||
bool encrypted;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -80,6 +79,11 @@ int ASF::Properties::channels() const
|
||||
return d->channels;
|
||||
}
|
||||
|
||||
bool ASF::Properties::isEncrypted() const
|
||||
{
|
||||
return d->encrypted;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -104,4 +108,8 @@ void ASF::Properties::setChannels(int length)
|
||||
d->channels = length;
|
||||
}
|
||||
|
||||
#endif
|
||||
void ASF::Properties::setEncrypted(bool encrypted)
|
||||
{
|
||||
d->encrypted = encrypted;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,12 +54,14 @@ namespace TagLib {
|
||||
virtual int bitrate() const;
|
||||
virtual int sampleRate() const;
|
||||
virtual int channels() const;
|
||||
bool isEncrypted() const;
|
||||
|
||||
#ifndef DO_NOT_DOCUMENT
|
||||
void setLength(int value);
|
||||
void setBitrate(int value);
|
||||
void setSampleRate(int value);
|
||||
void setChannels(int value);
|
||||
void setEncrypted(bool value);
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
|
||||
#include "asftag.h"
|
||||
|
||||
using namespace TagLib;
|
||||
@@ -198,4 +196,3 @@ bool ASF::Tag::isEmpty() const
|
||||
d->attributeListMap.isEmpty();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
#include "aifffile.h"
|
||||
#include "wavfile.h"
|
||||
#include "apefile.h"
|
||||
#include "modfile.h"
|
||||
#include "s3mfile.h"
|
||||
#include "itfile.h"
|
||||
#include "xmfile.h"
|
||||
|
||||
using namespace TagLib;
|
||||
|
||||
@@ -147,21 +151,24 @@ StringList FileRef::defaultFileExtensions()
|
||||
l.append("wv");
|
||||
l.append("spx");
|
||||
l.append("tta");
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
l.append("m4a");
|
||||
l.append("m4b");
|
||||
l.append("m4p");
|
||||
l.append("3g2");
|
||||
l.append("mp4");
|
||||
#endif
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
l.append("wma");
|
||||
l.append("asf");
|
||||
#endif
|
||||
l.append("aif");
|
||||
l.append("aiff");
|
||||
l.append("wav");
|
||||
l.append("ape");
|
||||
l.append("mod");
|
||||
l.append("module"); // alias for "mod"
|
||||
l.append("nst"); // alias for "mod"
|
||||
l.append("wow"); // alias for "mod"
|
||||
l.append("s3m");
|
||||
l.append("it");
|
||||
l.append("xm");
|
||||
|
||||
return l;
|
||||
}
|
||||
@@ -246,20 +253,25 @@ File *FileRef::create(FileName fileName, bool readAudioProperties,
|
||||
return new Ogg::Speex::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(ext == "TTA")
|
||||
return new TrueAudio::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
if(ext == "M4A" || ext == "M4B" || ext == "M4P" || ext == "MP4" || ext == "3G2")
|
||||
return new MP4::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
#endif
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
if(ext == "WMA" || ext == "ASF")
|
||||
return new ASF::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
#endif
|
||||
if(ext == "AIF" || ext == "AIFF")
|
||||
return new RIFF::AIFF::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(ext == "WAV")
|
||||
return new RIFF::WAV::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(ext == "APE")
|
||||
return new APE::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
// module, nst and wow are possible but uncommon extensions
|
||||
if(ext == "MOD" || ext == "MODULE" || ext == "NST" || ext == "WOW")
|
||||
return new Mod::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(ext == "S3M")
|
||||
return new S3M::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(ext == "IT")
|
||||
return new IT::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(ext == "XM")
|
||||
return new XM::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user