25 Commits

Author SHA1 Message Date
Urs Fleisch
c840222a39 Version 1.13.1 2023-07-01 07:43:27 +02:00
Urs Fleisch
39e712796f ID3v2: Map "TSST" to "DISCSUBTITLE" property (#1087) (#1088) 2023-05-26 13:12:19 +02:00
Urs Fleisch
97203503b0 Do not miss frames when an extended header is present (#1081) 2023-03-18 08:08:37 +01:00
Urs Fleisch
e21640bf10 MP4: Detect atoms with invalid length or type (#1077) 2023-03-18 08:07:46 +01:00
Ziemowit Łąski
a31356e330 Update FindCppUnit.cmake (#1076)
* Update FindCppUnit.cmake

Require a more modern cppunit to fix tagib build breakage.

* Update FindCppUnit.cmake
2022-12-21 14:14:35 +01:00
Rosen Penev
9ef9514bfa clang: remove const return (#1074)
Found with readability-const-return-type

Signed-off-by: Rosen Penev <rosenp@gmail.com>

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-12-10 11:30:21 +01:00
dabrain34
967c0eefed cmake: generate pc files with the use of prefix (#1071) 2022-12-04 13:27:58 +01:00
Rosen Penev
abbf880872 clang-tidy: use member initializer
Found with cppcoreguidelines-prefer-member-initializer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 07:04:42 +01:00
Rosen Penev
e49724ae5f clang-tidy: remove unused declaration
Found with bugprone-forward-declaration-namespace

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 07:04:42 +01:00
Rosen Penev
9427d8f3ba clang-tidy: use patentheses in macros
Found with bugprone-macro-parentheses

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 07:04:42 +01:00
Rosen Penev
f40290dcaf clang-tidy: don't assign in if
Found with bugprone-assignment-in-if-condition

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 07:04:42 +01:00
Rosen Penev
983a35f5ae clang-tidy: avoid C casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 07:04:42 +01:00
Rosen Penev
4dc6bdcd28 clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 07:04:42 +01:00
Rosen Penev
c963d1189a clang-tidy: no else after return
Found with readability-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-27 06:35:33 +01:00
Rosen Penev
1ac61ffe19 clang-tidy: remove pointless return in void func
Found with readability-redundant-control-flow

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-27 06:35:33 +01:00
Rosen Penev
a564d743f8 clang-tidy: remove duplicate include
Found with readability-duplicate-include

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-27 06:35:33 +01:00
Rosen Penev
8c4d663393 clang-tidy: simplify booleans
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-27 06:35:33 +01:00
Urs Fleisch
bc5e56d3eb Fix parsing of TXXX frame without description (#1069) 2022-11-21 21:42:01 +01:00
Ryan Schmidt
8aa7dd81d8 Fix macOS dylib install name to be absolute path
Closes #1065
2022-10-28 18:04:34 +02:00
Urs Fleisch
15ff32b685 Version 1.13 2022-10-26 15:44:33 +02:00
Urs Fleisch
084108a908 Document replacements for deprecated functions (#1001) 2022-10-26 15:42:49 +02:00
Urs Fleisch
decc0fa50a Fix Doxygen API documentation
Since the Doxygen output changed quite a bit since the styling was adapted for
TagLib, the API documentation generated with Doxygen 1.9.1 has several problems:

- In the namespaces and classes lists, the nodes cannot be expanded,
  'N' and 'C' characters are prepended to the namespaces and classes instead
  of displaying icons.
- Class members are only accessible for the letter 'a'.
- No "Deprecated" sections are displayed (only the "TAGLIB_DEPRECATED"
  definition in the signature).
- Some things are strangely styled (e.g. an empty box on the left of the
  "Introduction" title).

Now most of the custom styling is removed to get it running again and to avoid
nasty surprises with doxygen changes.
2022-10-24 07:06:23 +02:00
Urs Fleisch
02c7e34681 MSVC: Disable warnings for internal invocations of API functions
https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/taglib/msvc-disable-deprecated-warnings.patch
from Uwe Klotz (uklotzde)
2022-10-23 15:37:06 +02:00
Urs Fleisch
5f079d6992 Use GitHub Actions instead of Travis CI 2022-10-23 11:01:26 +02:00
Daniel Chabrowski
2e90ec0ef0 FileStream: seek only when length exceeds buffer size 2022-10-09 19:50:12 +02:00
178 changed files with 843 additions and 999 deletions

54
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Build
on: [push, pull_request, workflow_dispatch]
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
cmake_extra_args: '-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ubuntu
run: sudo apt install -y libcppunit-dev zlib1g-dev
if: matrix.os == 'ubuntu-latest'
- name: Set up macOS
run: brew install cppunit
if: matrix.os == 'macos-latest'
- name: Set up Windows
run: vcpkg install cppunit --triplet x64-windows
if: matrix.os == 'windows-latest'
- name: Configure
run: >
cmake -B${{github.workspace}}/build
-DBUILD_SHARED_LIBS=ON -DVISIBILITY_HIDDEN=ON
-DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DBUILD_BINDINGS=ON
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
${{ matrix.cmake_extra_args }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -V --no-tests=error
if: matrix.os != 'windows-latest'
- name: Test Windows
working-directory: ${{github.workspace}}/build
run: |
$env:Path += ";$env:VCPKG_INSTALLATION_ROOT\packages\cppunit_x64-windows\bin;$PWD\taglib\Release"
ctest -C ${{env.BUILD_TYPE}} -V --no-tests=error
if: matrix.os == 'windows-latest'

3
.gitignore vendored
View File

@@ -3,6 +3,7 @@ cmake_uninstall.cmake
Makefile
CTestTestfile.cmake
CMakeFiles/
CMakeLists.txt.user*
*.so
*.so.*
*.dylib
@@ -12,6 +13,7 @@ CMakeFiles/
*.suo
*.user
.*
!.github/workflows/
*~
/CMakeCache.txt
/Doxyfile
@@ -49,6 +51,7 @@ taglib.xcodeproj
CMakeScripts
/.clang-format
/compile_commands.json
/build/
.clangd
.cache
.idea

View File

@@ -1,32 +0,0 @@
language: cpp
sudo: false
os:
- linux
- osx
dist: trusty
compiler:
- gcc
- clang
arch:
- ppc64le
addons:
apt:
packages:
- libcppunit-dev
- zlib1g-dev
matrix:
exclude:
- os: osx
compiler: gcc
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install cppunit; fi
script: cmake -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BINDINGS=ON -DCMAKE_CXX_FLAGS="-std=c++11" . && make && make check

View File

@@ -53,10 +53,17 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
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)
if(MSVC)
if(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()
# Disable warnings for internal invocations of API functions
# that have been marked with TAGLIB_DEPRECATED
# https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")
endif()
# Read version information from file taglib/toolkit/taglib.h into variables
@@ -86,7 +93,7 @@ endif()
# 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 20)
set(TAGLIB_SOVERSION_REVISION 0)
set(TAGLIB_SOVERSION_REVISION 1)
set(TAGLIB_SOVERSION_AGE 19)
math(EXPR TAGLIB_SOVERSION_MAJOR "${TAGLIB_SOVERSION_CURRENT} - ${TAGLIB_SOVERSION_AGE}")
@@ -108,7 +115,7 @@ if(WITH_ZLIB)
set(HAVE_ZLIB 0)
endif()
endif()
if(NOT HAVE_ZLIB AND ZLIB_SOURCE)
set(HAVE_ZLIB 1)
set(HAVE_ZLIB_SOURCE 1)
@@ -162,7 +169,6 @@ if(BUILD_EXAMPLES)
endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
file(COPY doc/taglib.png DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/doc/html)
add_custom_target(docs doxygen)
# uninstall target

View File

@@ -1,37 +1,79 @@
# Doxyfile 1.3.4
# Doxyfile 1.9.1
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = TagLib
PROJECT_NUMBER = ${TAGLIB_LIB_VERSION_STRING}
PROJECT_BRIEF =
PROJECT_LOGO = @CMAKE_SOURCE_DIR@/doc/taglib.svg
OUTPUT_DIRECTORY = doc
CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
OUTPUT_TEXT_DIRECTION = None
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
JAVADOC_BANNER = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
OPTIMIZE_OUTPUT_SLICE = NO
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 5
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 1
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_PRIV_VIRTUAL = NO
EXTRACT_PACKAGE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
RESOLVE_UNNAMED_PARAMS = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
@@ -39,170 +81,267 @@ HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
HIDE_COMPOUND_REFERENCE= NO
SHOW_INCLUDE_FILES = YES
SHOW_GROUPED_MEMB_INC = NO
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = NO
GENERATE_TESTLIST = NO
GENERATE_BUGLIST = NO
GENERATE_DEPRECATEDLIST= NO
ENABLED_SECTIONS =
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = @CMAKE_SOURCE_DIR@/taglib
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.h \
*.hh \
*.H
RECURSIVE = YES
EXCLUDE =
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# configuration options related to source browsing
# Configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
CLANG_ASSISTED_PARSING = NO
CLANG_ADD_INC_PATHS = YES
CLANG_OPTIONS =
CLANG_DATABASE_PATH =
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER = @CMAKE_SOURCE_DIR@/doc/api-header.html
HTML_FOOTER = @CMAKE_SOURCE_DIR@/doc/api-footer.html
HTML_STYLESHEET = @CMAKE_SOURCE_DIR@/doc/taglib-api.css
HTML_ALIGN_MEMBERS = YES
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
HTML_DYNAMIC_MENUS = YES
HTML_DYNAMIC_SECTIONS = NO
HTML_INDEX_NUM_ENTRIES = 100
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = YES
ENUM_VALUES_PER_LINE = 4
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
GENERATE_TREEVIEW = NO
ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
HTML_FORMULA_FORMAT = png
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
FORMULA_MACROFILE =
USE_MATHJAX = NO
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2
MATHJAX_EXTENSIONS =
MATHJAX_CODEFILE =
SEARCHENGINE = NO
SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO
SEARCHENGINE_URL =
SEARCHDATA_FILE = searchdata.xml
EXTERNAL_SEARCH_ID =
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
LATEX_MAKEINDEX_CMD = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = letter
EXTRA_PACKAGES =
LATEX_HEADER =
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
LATEX_EXTRA_STYLESHEET =
LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_SOURCE_CODE = NO
LATEX_BIB_STYLE = plain
LATEX_TIMESTAMP = NO
LATEX_EMOJI_DIRECTORY =
#---------------------------------------------------------------------------
# configuration options related to the RTF output
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_SOURCE_CODE = NO
#---------------------------------------------------------------------------
# configuration options related to the man page output
# Configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_SUBDIR =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
# Configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
XML_NS_MEMB_FILE_SCOPE = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DO_NOT_DOCUMENT \
DOXYGEN
EXPAND_AS_DEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
# Configuration options related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
EXTERNAL_PAGES = YES
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
UML_LIMIT_NUM_FIELDS = 10
DOT_UML_DETAILS = NO
DOT_WRAP_THRESHOLD = 17
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = svg
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 100
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

15
NEWS
View File

@@ -1,3 +1,16 @@
TagLib 1.13.1 (Jul 1, 2023)
===========================
* Fixed parsing of TXXX frames without description.
* Detect MP4 atoms with invalid length or type.
* Do not miss ID3v2 frames when an extended header is present.
* Use property "DISCSUBTITLE" for ID3v2 "TSST" frame.
* Build system improvements: Use absolute path for macOS dylib install name,
support --define-prefix when using pkg-config, fixed minimum required
CppUnit version.
* Code clean up using clang-tidy.
TagLib 1.13 (Oct 27, 2022)
==========================
* Added interface StreamTypeResolver to support streams which cannot be
@@ -11,7 +24,7 @@
BUILD_TESTS, GNUInstallDirs, FeatureSummary, tests with BUILD_SHARED_LIBS,
cross compilation with Buildroot, systems without HAVE_GCC_ATOMIC, Clang.
* Fixed heap-buffer-overflows when handling ASF, APE, FLAC, ID3v2, MP4, MPC
tags.
tags.
* Fixed detection of invalid file by extension when correct type can be
detected by contents.
* Fixed unnecessary creation of map entries in APE and FLAC tags if looked up

View File

@@ -1,6 +1,6 @@
# TagLib
[![Build Status](https://travis-ci.org/taglib/taglib.svg?branch=master)](https://travis-ci.org/taglib/taglib)
[![Build Status](../../actions/workflows/build.yml/badge.svg)](../../actions)
### TagLib Audio Metadata Library
@@ -23,4 +23,3 @@ licenses if you are considering using TagLib in your project.
[FLAC]: https://xiph.org/flac/
[GNU Lesser General Public License]: https://www.gnu.org/licenses/lgpl.html
[Mozilla Public License]: https://www.mozilla.org/MPL/MPL-1.1.html

View File

@@ -58,7 +58,7 @@ set_target_properties(tag_c PROPERTIES
VERSION 0.0.0
SOVERSION 0
DEFINE_SYMBOL MAKE_TAGLIB_C_LIB
INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}
INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
)
install(TARGETS tag_c
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
@@ -69,7 +69,7 @@ install(TARGETS tag_c
)
if(NOT BUILD_FRAMEWORK)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()

View File

@@ -1,12 +1,11 @@
prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=${CMAKE_INSTALL_PREFIX}
libdir=${CMAKE_INSTALL_FULL_LIBDIR}
includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: TagLib C Bindings
Description: Audio meta-data library (C bindings)
Requires: taglib
Version: ${TAGLIB_LIB_VERSION_STRING}
Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -ltag_c
Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}/taglib
Version: @TAGLIB_LIB_VERSION_STRING@
Libs: -L${libdir} -ltag_c
Cflags: -I${includedir}/taglib

View File

@@ -8,7 +8,7 @@
include (MacroEnsureVersion)
if(NOT CPPUNIT_MIN_VERSION)
SET(CPPUNIT_MIN_VERSION 1.12.0)
SET(CPPUNIT_MIN_VERSION 1.14.0)
endif(NOT CPPUNIT_MIN_VERSION)
FIND_PROGRAM(CPPUNIT_CONFIG_EXECUTABLE cppunit-config )
@@ -56,7 +56,7 @@ IF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
macro_ensure_version( ${CPPUNIT_MIN_VERSION} ${CPPUNIT_INSTALLED_VERSION} CPPUNIT_INSTALLED_VERSION_OK )
IF(NOT CPPUNIT_INSTALLED_VERSION_OK)
MESSAGE ("** CppUnit version is too old: found ${CPPUNIT_INSTALLED_VERSION} installed, ${CPPUNIT_MIN_VERSION} or major is required")
MESSAGE ("** CppUnit version is too old: found ${CPPUNIT_INSTALLED_VERSION} installed, ${CPPUNIT_MIN_VERSION} or newer is required")
SET(CppUnit_FOUND FALSE)
ENDIF(NOT CPPUNIT_INSTALLED_VERSION_OK)

View File

@@ -1,4 +1,2 @@
</div>
</div>
</body>
</html>

View File

@@ -1,41 +1,38 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>$title ($projectname)</title>
<link href="taglib-api.css" rel="stylesheet" type="text/css">
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="container">
<table border="0" width="100%">
<tr>
<td width="1">
<img src="taglib.png">
</td>
<td>
<div id="intro">
<table border="0" height="119" cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top"><h1>TagLib $projectnumber ($title)</h1></td></tr>
<tr>
<td valign="bottom">
<div id="links">
<a href="index.html">Home</a>
<a href="inherits.html">Class&nbsp;Hierarchy</a>
<a href="namespaces.html">Namespaces</a>
<a href="annotated.html">Classes</a>
<a href="files.html">Headers</a>
<a href="namespacemembers.html">Namespace&nbsp;Members</a>
<a href="functions.html">Class&nbsp;Members</a>
<a href="globals.html">File&nbsp;Members</a>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<div id="text">
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo" width="200px"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
&#160;<span id="projectnumber">$projectnumber</span>
</div>
<div id="projectbrief">$projectbrief</div>
</td>
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<td>$searchbox</td>
</tr>
</tbody>
</table>
</div>

View File

@@ -1,395 +0,0 @@
body {
font-family: sans-serif;
background: white;
color: black;
margin: 0px;
padding: 15px;
}
a:link {
font-weight: bold;
text-decoration: none;
color: gray;
}
a:visited {
font-weight: bold;
text-decoration: none;
color: gray;
}
a:hover {
color: #cccccc;
text-decoration: underline;
}
a:active {
color: #cccccc;
text-decoration: underline;
}
img {
border-style: none;
}
h1 {
font-family: sans-serif;
}
h2 {
font-family: sans-serif;
}
h3 {
font-family: sans-serif;
}
/* container */
#container {
position: absolute;
border-width: thin;
border-style: solid;
width: 95%;
}
/* intro */
#intro {
padding: 5px;
margin: 0px;
background: #cccccc;
border-width: medium;
border-style: solid;
}
#intro h1 {
margin: 5px;
padding: 5px;
}
/* links */
#links {
font-size: x-small;
vertical-align: bottom;
}
#links a {
border-width: thin;
border-style: dotted;
border-color: white;
/* margin: 0px 10px 0px 0px; */
margin: 1px;
padding: 3px;
line-height: 230%
}
#links a:hover {
color: black;
text-decoration: underline;
}
#links h3 {
outline-width: thin;
border-style: solid;
padding: 2px;
margin: 3px 0px 3px 0px;
}
/* menu */
#menu h3 {
text-align: center;
}
/* text */
#text {
margin: 0px;
padding: 5px 5px 0px 5px;
float: left;
}
#text h3 {
border-width: thin;
border-style: solid;
padding: 2px;
margin: 3px 0px 3px 0px;
}
#text li {
margin: 0px 0px 10px 0px;
}
#text ul {
margin: 5px;
padding: 0px 0px 0px 20px;
}
#leftcolumn {
float: left;
width: 300px;
margin: 0px 10px 0px 0px;
padding: 0px;
}
#rightcolumn {
float: right;
width: 210px;
margin: 0px;
padding: 0px;
}
/* vspacer */
.vspacer {
height: 10px;
}
.silver {
border-width: thin;
border-color: black;
border-style: solid;
background: #cccccc;
}
a.code {
text-decoration: none;
font-weight: normal;
color: #4444ee
}
a.codeRef {
font-weight: normal;
color: #4444ee
}
div.fragment {
width: 98%;
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
padding-left: 4px;
margin: 4px;
}
div.ah {
background-color: black;
font-weight: bold; color: #ffffff;
margin-bottom: 3px;
margin-top: 3px
}
#text td {
width: auto;
}
div.memdoc {
margin-top: 0px;
margin-bottom: 20px;
padding: 10px 10px 10px 40px;
}
div.memproto {
border: thin solid black;
background-color: #f2f2ff;
width: 100%;
margin-top: 20px;
padding-top: 10px;
padding-bottom: 10px;
}
td.paramtype {
color: #602020;
}
table.memname {
font-weight: bold;
}
div.groupHeader {
margin-left: 16px;
margin-top: 12px;
margin-bottom: 6px;
font-weight: bold
}
div.groupText {
margin-left: 16px;
font-style: italic;
font-size: smaller
}
body {
background: white;
color: black;
margin-right: 20px;
margin-left: 20px;
}
td.indexkey {
background-color: #eeeeff;
font-weight: bold;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px
}
td.indexvalue {
background-color: #eeeeff;
font-style: italic;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px
}
tr.memlist {
background-color: #f0f0f0;
}
p.formulaDsp {
text-align: center;
}
img.formulaDsp {
}
img.formulaInl {
vertical-align: middle;
}
span.keyword {
color: #008000
}
span.keywordtype {
color: #604020
}
span.keywordflow {
color: #e08000
}
span.comment {
color: #800000
}
span.preprocessor {
color: #806020
}
span.stringliteral {
color: #002080
}
span.charliteral {
color: #008080
}
.mdTable {
border: 1px solid #868686;
background-color: #f2f2ff;
}
.mdRow {
padding: 8px 20px;
}
.mdescLeft {
font-size: smaller;
font-family: Arial, Helvetica, sans-serif;
background-color: #FAFAFA;
padding-left: 8px;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.mdescRight {
font-size: smaller;
font-family: Arial, Helvetica, sans-serif;
font-style: italic;
background-color: #FAFAFA;
padding-left: 4px;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
padding-bottom: 0px;
padding-right: 8px;
}
.memItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
}
.memItemRight {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 13px;
}
.search {
color: #0000ee;
font-weight: bold;
}
form.search {
margin-bottom: 0px;
margin-top: 0px;
}
input.search {
font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #eeeeff;
}
td.tiny {
font-size: 75%;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

58
doc/taglib.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: TagLib
Description: Audio meta-data library

View File

@@ -344,7 +344,7 @@ endif()
set_target_properties(tag PROPERTIES
VERSION ${TAGLIB_SOVERSION_MAJOR}.${TAGLIB_SOVERSION_MINOR}.${TAGLIB_SOVERSION_PATCH}
SOVERSION ${TAGLIB_SOVERSION_MAJOR}
INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}
INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
DEFINE_SYMBOL MAKE_TAGLIB_LIB
LINK_INTERFACE_LIBRARIES ""
PUBLIC_HEADER "${tag_HDRS}"

View File

@@ -49,7 +49,7 @@ using namespace TagLib;
namespace
{
enum { ApeAPEIndex = 0, ApeID3v1Index = 1 };
}
} // namespace
class APE::File::FilePrivate
{

View File

@@ -229,7 +229,7 @@ namespace TagLib {
class FilePrivate;
FilePrivate *d;
};
}
}
} // namespace APE
} // namespace TagLib
#endif

View File

@@ -167,7 +167,7 @@ namespace TagLib {
FooterPrivate *d;
};
}
}
} // namespace APE
} // namespace TagLib
#endif

View File

@@ -257,7 +257,7 @@ void APE::Item::parse(const ByteVector &data)
const ByteVector value = data.mid(8 + d->key.size() + 1, valueLength);
setReadOnly(flags & 1);
setType(ItemTypes((flags >> 1) & 3));
setType(static_cast<ItemTypes>((flags >> 1) & 3));
if(Text == d->type)
d->text = StringList(ByteVectorList::split(value, '\0'), String::UTF8);

View File

@@ -31,9 +31,7 @@
#include "tstringlist.h"
namespace TagLib {
namespace APE {
//! An implementation of APE-items
/*!
@@ -215,10 +213,7 @@ namespace TagLib {
class ItemPrivate;
ItemPrivate *d;
};
}
}
} // namespace APE
} // namespace TagLib
#endif

View File

@@ -140,7 +140,7 @@ namespace
return header.toUShort(4, false);
}
}
} // namespace
void APE::Properties::read(File *file, long streamLength)
{

View File

@@ -53,7 +53,7 @@ namespace TagLib {
* Create an instance of APE::Properties with the data read from the
* APE::File \a file.
*
* \deprecated
* \deprecated Use Properties(File *, long, ReadStyle).
*/
TAGLIB_DEPRECATED Properties(File *file, ReadStyle style = Average);
@@ -74,7 +74,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;
@@ -137,7 +137,7 @@ namespace TagLib {
class PropertiesPrivate;
PropertiesPrivate *d;
};
}
}
} // namespace APE
} // namespace TagLib
#endif

View File

@@ -202,7 +202,7 @@ namespace TagLib {
class TagPrivate;
TagPrivate *d;
};
}
}
} // namespace APE
} // namespace TagLib
#endif

View File

@@ -185,7 +185,7 @@ String ASF::Attribute::parse(ASF::File &f, int kind)
if(kind == 0) {
nameLength = readWORD(&f);
name = readString(&f, nameLength);
d->type = ASF::Attribute::AttributeTypes(readWORD(&f));
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&f));
size = readWORD(&f);
}
// metadata & metadata library
@@ -197,7 +197,7 @@ String ASF::Attribute::parse(ASF::File &f, int kind)
}
d->stream = readWORD(&f);
nameLength = readWORD(&f);
d->type = ASF::Attribute::AttributeTypes(readWORD(&f));
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&f));
size = readDWORD(&f);
name = readString(&f, nameLength);
}

View File

@@ -33,10 +33,8 @@
namespace TagLib
{
namespace ASF
{
class File;
class Picture;
@@ -201,8 +199,7 @@ namespace TagLib
class AttributePrivate;
AttributePrivate *d;
};
}
}
} // namespace ASF
} // namespace TagLib
#endif

View File

@@ -33,10 +33,8 @@
#include "asftag.h"
namespace TagLib {
//! An implementation of ASF (WMA) metadata
namespace ASF {
/*!
* This implements and provides an interface for ASF files to the
* TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing
@@ -130,9 +128,7 @@ namespace TagLib {
class FilePrivate;
FilePrivate *d;
};
}
}
} // namespace ASF
} // namespace TagLib
#endif

View File

@@ -172,7 +172,6 @@ void ASF::Picture::parse(const ByteVector& bytes)
d->picture = bytes.mid(pos, dataLen);
d->valid = true;
return;
}
ASF::Picture ASF::Picture::fromInvalid()

View File

@@ -216,7 +216,7 @@ namespace TagLib
class PicturePrivate;
PicturePrivate *d;
};
}
}
} // namespace ASF
} // namespace TagLib
#endif // ASFPICTURE_H

View File

@@ -31,9 +31,7 @@
#include "taglib_export.h"
namespace TagLib {
namespace ASF {
//! An implementation of ASF audio properties
class TAGLIB_EXPORT Properties : public AudioProperties
{
@@ -86,7 +84,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;
@@ -178,9 +176,6 @@ namespace TagLib {
class PropertiesPrivate;
PropertiesPrivate *d;
};
}
}
} // namespace ASF
} // namespace TagLib
#endif

View File

@@ -152,7 +152,8 @@ namespace TagLib {
virtual bool isEmpty() const;
/*!
* \deprecated
* \deprecated Use attributeListMap() const, contains(), removeItem(),
* attribute(), setAttribute(), addAttribute().
*/
AttributeListMap &attributeListMap();
@@ -205,6 +206,6 @@ namespace TagLib {
class TagPrivate;
TagPrivate *d;
};
}
}
} // namespace ASF
} // namespace TagLib
#endif

View File

@@ -95,9 +95,9 @@ namespace TagLib
return data;
}
}
}
}
} // namespace
} // namespace ASF
} // namespace TagLib
#endif

View File

@@ -122,6 +122,6 @@ namespace TagLib {
AudioPropertiesPrivate *d;
};
}
} // namespace TagLib
#endif

View File

@@ -278,7 +278,7 @@ namespace TagLib {
* \note You generally shouldn't use this method, but instead the constructor
* directly.
*
* \deprecated
* \deprecated Use FileRef(FileName, bool, AudioProperties::ReadStyle).
*/
static File *create(FileName fileName,
bool readAudioProperties = true,

View File

@@ -238,7 +238,7 @@ namespace TagLib {
* when
*
* \see ID3v2FrameFactory
* \deprecated This value should be passed in via the constructor
* \deprecated This value should be passed in via the constructor.
*/
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
@@ -337,7 +337,7 @@ namespace TagLib {
class FilePrivate;
FilePrivate *d;
};
}
}
} // namespace FLAC
} // namespace TagLib
#endif

View File

@@ -37,8 +37,8 @@ public:
};
FLAC::MetadataBlock::MetadataBlock()
: d(0)
{
d = 0;
}
FLAC::MetadataBlock::~MetadataBlock()

View File

@@ -31,9 +31,7 @@
#include "taglib_export.h"
namespace TagLib {
namespace FLAC {
class TAGLIB_EXPORT MetadataBlock
{
public:
@@ -67,9 +65,6 @@ namespace TagLib {
class MetadataBlockPrivate;
MetadataBlockPrivate *d;
};
}
}
} // namespace FLAC
} // namespace TagLib
#endif

View File

@@ -79,7 +79,7 @@ bool FLAC::Picture::parse(const ByteVector &data)
}
unsigned int pos = 0;
d->type = FLAC::Picture::Type(data.toUInt(pos));
d->type = static_cast<FLAC::Picture::Type>(data.toUInt(pos));
pos += 4;
unsigned int mimeTypeLength = data.toUInt(pos);
pos += 4;

View File

@@ -33,9 +33,7 @@
#include "flacmetadatablock.h"
namespace TagLib {
namespace FLAC {
class TAGLIB_EXPORT Picture : public MetadataBlock
{
public:
@@ -200,9 +198,6 @@ namespace TagLib {
};
typedef List<Picture> PictureList;
}
}
} // namespace FLAC
} // namespace TagLib
#endif

View File

@@ -70,7 +70,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;
@@ -118,7 +118,7 @@ namespace TagLib {
*
* \note This method is just an alias of bitsPerSample().
*
* \deprecated
* \deprecated Use bitsPerSample().
*/
TAGLIB_DEPRECATED int sampleWidth() const;
@@ -142,7 +142,7 @@ namespace TagLib {
class PropertiesPrivate;
PropertiesPrivate *d;
};
}
}
} // namespace FLAC
} // namespace TagLib
#endif

View File

@@ -32,9 +32,7 @@
#include "flacmetadatablock.h"
namespace TagLib {
namespace FLAC {
class TAGLIB_EXPORT UnknownMetadataBlock : public MetadataBlock
{
public:
@@ -73,9 +71,6 @@ namespace TagLib {
class UnknownMetadataBlockPrivate;
UnknownMetadataBlockPrivate *d;
};
}
}
} // namespace FLAC
} // namespace TagLib
#endif

View File

@@ -103,7 +103,7 @@ namespace TagLib {
class FilePrivate;
FilePrivate *d;
};
}
}
} // namespace IT
} // namespace TagLib
#endif

View File

@@ -101,7 +101,7 @@ namespace TagLib {
class PropertiesPrivate;
PropertiesPrivate *d;
};
}
}
} // namespace IT
} // namespace TagLib
#endif

View File

@@ -34,9 +34,7 @@
#include "modproperties.h"
namespace TagLib {
namespace Mod {
class TAGLIB_EXPORT File : public TagLib::Mod::FileBase
{
public:
@@ -106,9 +104,6 @@ namespace TagLib {
class FilePrivate;
FilePrivate *d;
};
}
}
} // namespace Mod
} // namespace TagLib
#endif

View File

@@ -35,9 +35,7 @@
#include <algorithm>
namespace TagLib {
namespace Mod {
class TAGLIB_EXPORT FileBase : public TagLib::File
{
protected:
@@ -58,9 +56,6 @@ namespace TagLib {
bool readU16B(unsigned short &number);
bool readU32B(unsigned long &number);
};
}
}
} // namespace Mod
} // namespace TagLib
#endif

View File

@@ -30,9 +30,7 @@
#include "audioproperties.h"
namespace TagLib {
namespace Mod {
class TAGLIB_EXPORT Properties : public AudioProperties
{
public:
@@ -63,9 +61,6 @@ namespace TagLib {
class PropertiesPrivate;
PropertiesPrivate *d;
};
}
}
} // namespace Mod
} // namespace TagLib
#endif

View File

@@ -29,9 +29,7 @@
#include "tag.h"
namespace TagLib {
namespace Mod {
/*!
* Tags for module files (Mod, S3M, IT, XM).
*
@@ -186,9 +184,6 @@ namespace TagLib {
class TagPrivate;
TagPrivate *d;
};
}
}
} // namespace Mod
} // namespace TagLib
#endif

View File

@@ -38,10 +38,10 @@ const char *const MP4::Atom::containers[11] = {
};
MP4::Atom::Atom(File *file)
: offset(file->tell())
{
children.setAutoDelete(true);
offset = file->tell();
ByteVector header = file->readBlock(8);
if(header.size() != 8) {
// The atom header must be 8 bytes long, otherwise there is either
@@ -73,7 +73,7 @@ MP4::Atom::Atom(File *file)
}
}
if(length < 8) {
if(length < 8 || length > file->length() - offset) {
debug("MP4: Invalid atom size");
length = 0;
file->seek(0, File::End);
@@ -81,6 +81,14 @@ MP4::Atom::Atom(File *file)
}
name = header.mid(4, 4);
for(int i = 0; i < 4; ++i) {
const char ch = name.at(i);
if((ch < ' ' || ch > '~') && ch != '\251') {
debug("MP4: Invalid atom type");
length = 0;
file->seek(0, File::End);
}
}
for(int i = 0; i < numContainers; i++) {
if(name == containers[i]) {

View File

@@ -34,9 +34,7 @@
#include "tlist.h"
namespace TagLib {
namespace MP4 {
class Atom;
typedef TagLib::List<Atom *> AtomList;
@@ -101,10 +99,8 @@ namespace TagLib {
AtomList path(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
AtomList atoms;
};
}
}
} // namespace MP4
} // namespace TagLib
#endif

View File

@@ -32,9 +32,7 @@
#include "mp4atom.h"
namespace TagLib {
namespace MP4 {
class TAGLIB_EXPORT CoverArt
{
public:
@@ -76,9 +74,6 @@ namespace TagLib {
};
typedef List<CoverArt> CoverArtList;
}
}
} // namespace MP4
} // namespace TagLib
#endif

View File

@@ -33,10 +33,8 @@
#include "mp4tag.h"
namespace TagLib {
//! An implementation of MP4 (AAC, ALAC, ...) metadata
namespace MP4 {
class Atoms;
/*!
@@ -157,9 +155,6 @@ namespace TagLib {
class FilePrivate;
FilePrivate *d;
};
}
}
} // namespace MP4
} // namespace TagLib
#endif

View File

@@ -31,9 +31,7 @@
#include "taglib_export.h"
namespace TagLib {
namespace MP4 {
class TAGLIB_EXPORT Item
{
public:
@@ -85,9 +83,6 @@ namespace TagLib {
class ItemPrivate;
ItemPrivate *d;
};
}
}
} // namespace MP4
} // namespace TagLib
#endif

View File

@@ -30,9 +30,7 @@
#include "audioproperties.h"
namespace TagLib {
namespace MP4 {
class Atoms;
class File;
@@ -55,7 +53,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;
@@ -112,9 +110,6 @@ namespace TagLib {
class PropertiesPrivate;
PropertiesPrivate *d;
};
}
}
} // namespace MP4
} // namespace TagLib
#endif

View File

@@ -144,7 +144,7 @@ MP4::Tag::parseData2(const MP4::Atom *atom, int expectedFlags, bool freeForm)
debug("MP4: Unexpected atom \"" + name + "\", expecting \"name\"");
return result;
}
result.append(AtomData(AtomDataType(flags), data.mid(pos + 12, length - 12)));
result.append(AtomData(static_cast<AtomDataType>(flags), data.mid(pos + 12, length - 12)));
}
else {
if(name != "data") {
@@ -152,7 +152,7 @@ MP4::Tag::parseData2(const MP4::Atom *atom, int expectedFlags, bool freeForm)
return result;
}
if(expectedFlags == -1 || flags == expectedFlags) {
result.append(AtomData(AtomDataType(flags), data.mid(pos + 16, length - 16)));
result.append(AtomData(static_cast<AtomDataType>(flags), data.mid(pos + 16, length - 16)));
}
}
pos += length;
@@ -316,7 +316,7 @@ MP4::Tag::parseCovr(const MP4::Atom *atom)
}
if(flags == TypeJPEG || flags == TypePNG || flags == TypeBMP ||
flags == TypeGIF || flags == TypeImplicit) {
value.append(MP4::CoverArt(MP4::CoverArt::Format(flags),
value.append(MP4::CoverArt(static_cast<MP4::CoverArt::Format>(flags),
data.mid(pos + 16, length - 16)));
}
else {

View File

@@ -36,11 +36,9 @@
#include "mp4item.h"
namespace TagLib {
namespace MP4 {
/*!
* \deprecated
* \deprecated Use ItemMap.
*/
TAGLIB_DEPRECATED typedef TagLib::Map<String, Item> ItemListMap;
typedef TagLib::Map<String, Item> ItemMap;
@@ -72,7 +70,7 @@ namespace TagLib {
virtual bool isEmpty() const;
/*!
* \deprecated Use the item() and setItem() API instead
* \deprecated Use the item() and setItem() API instead.
*/
TAGLIB_DEPRECATED ItemMap &itemListMap();
@@ -161,9 +159,6 @@ namespace TagLib {
class TagPrivate;
TagPrivate *d;
};
}
}
} // namespace MP4
} // namespace TagLib
#endif

View File

@@ -41,7 +41,7 @@ using namespace TagLib;
namespace
{
enum { MPCAPEIndex = 0, MPCID3v1Index = 1 };
}
} // namespace
class MPC::File::FilePrivate
{

View File

@@ -195,7 +195,7 @@ namespace TagLib {
void strip(int tags = AllTags);
/*!
* \deprecated
* \deprecated Use strip().
* \see strip
*/
TAGLIB_DEPRECATED void remove(int tags = AllTags);
@@ -232,7 +232,7 @@ namespace TagLib {
class FilePrivate;
FilePrivate *d;
};
}
}
} // namespace MPC
} // namespace TagLib
#endif

View File

@@ -72,7 +72,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;
@@ -152,7 +152,7 @@ namespace TagLib {
class PropertiesPrivate;
PropertiesPrivate *d;
};
}
}
} // namespace MPC
} // namespace TagLib
#endif

View File

@@ -60,7 +60,7 @@ namespace TagLib {
* will be returned.
*/
int TAGLIB_EXPORT genreIndex(const String &name);
}
}
} // namespace ID3v1
} // namespace TagLib
#endif

View File

@@ -36,7 +36,7 @@ namespace
{
const ID3v1::StringHandler defaultStringHandler;
const ID3v1::StringHandler *stringHandler = &defaultStringHandler;
}
} // namespace
class ID3v1::Tag::TagPrivate
{
@@ -112,9 +112,9 @@ ByteVector ID3v1::Tag::render() const
data.append(stringHandler->render(d->album).resize(30));
data.append(stringHandler->render(d->year).resize(4));
data.append(stringHandler->render(d->comment).resize(28));
data.append(char(0));
data.append(char(d->track));
data.append(char(d->genre));
data.append(static_cast<char>(0));
data.append(static_cast<char>(d->track));
data.append(static_cast<char>(d->genre));
return data;
}

View File

@@ -196,7 +196,7 @@ namespace TagLib {
class TagPrivate;
TagPrivate *d;
};
}
}
} // namespace ID3v1
} // namespace TagLib
#endif

View File

@@ -133,7 +133,7 @@ void AttachedPictureFrame::parseFields(const ByteVector &data)
return;
}
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
int pos = 1;
@@ -156,10 +156,10 @@ ByteVector AttachedPictureFrame::renderFields() const
String::Type encoding = checkTextEncoding(d->description, d->textEncoding);
data.append(char(encoding));
data.append(static_cast<char>(encoding));
data.append(d->mimeType.data(String::Latin1));
data.append(textDelimiter(String::Latin1));
data.append(char(d->type));
data.append(static_cast<char>(d->type));
data.append(d->description.data(encoding));
data.append(textDelimiter(encoding));
data.append(d->data);
@@ -189,7 +189,7 @@ void AttachedPictureFrameV22::parseFields(const ByteVector &data)
return;
}
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
int pos = 1;

View File

@@ -224,7 +224,7 @@ namespace TagLib {
AttachedPictureFrameV22(const ByteVector &data, Header *h);
friend class FrameFactory;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -124,7 +124,7 @@ void ChapterFrame::setElementID(const ByteVector &eID)
{
d->elementID = eID;
if(d->elementID.endsWith(char(0)))
if(d->elementID.endsWith(static_cast<char>(0)))
d->elementID = d->elementID.mid(0, d->elementID.size() - 1);
}

View File

@@ -243,7 +243,7 @@ namespace TagLib {
class ChapterFramePrivate;
ChapterFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -150,7 +150,7 @@ void CommentsFrame::parseFields(const ByteVector &data)
return;
}
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
d->language = data.mid(1, 3);
int byteAlign = d->textEncoding == String::Latin1 || d->textEncoding == String::UTF8 ? 1 : 2;
@@ -177,7 +177,7 @@ ByteVector CommentsFrame::renderFields() const
encoding = checkTextEncoding(d->description, encoding);
encoding = checkTextEncoding(d->text, encoding);
v.append(char(encoding));
v.append(static_cast<char>(encoding));
v.append(d->language.size() == 3 ? d->language : "XXX");
v.append(d->description.data(encoding));
v.append(textDelimiter(encoding));

View File

@@ -174,6 +174,6 @@ namespace TagLib {
CommentsFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -104,7 +104,7 @@ void EventTimingCodesFrame::parseFields(const ByteVector &data)
return;
}
d->timestampFormat = TimestampFormat(data[0]);
d->timestampFormat = static_cast<TimestampFormat>(data[0]);
int pos = 1;
d->synchedEvents.clear();
@@ -120,12 +120,12 @@ ByteVector EventTimingCodesFrame::renderFields() const
{
ByteVector v;
v.append(char(d->timestampFormat));
v.append(static_cast<char>(d->timestampFormat));
for(SynchedEventList::ConstIterator it = d->synchedEvents.begin();
it != d->synchedEvents.end();
++it) {
const SynchedEvent &entry = *it;
v.append(char(entry.type));
v.append(static_cast<char>(entry.type));
v.append(ByteVector::fromUInt(entry.time));
}

View File

@@ -180,6 +180,6 @@ namespace TagLib {
EventTimingCodesFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -142,7 +142,7 @@ void GeneralEncapsulatedObjectFrame::parseFields(const ByteVector &data)
return;
}
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
int pos = 1;
@@ -163,7 +163,7 @@ ByteVector GeneralEncapsulatedObjectFrame::renderFields() const
ByteVector data;
data.append(char(encoding));
data.append(static_cast<char>(encoding));
data.append(d->mimeType.data(String::Latin1));
data.append(textDelimiter(String::Latin1));
data.append(d->fileName.data(encoding));

View File

@@ -173,7 +173,7 @@ namespace TagLib {
class GeneralEncapsulatedObjectFramePrivate;
GeneralEncapsulatedObjectFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -123,7 +123,7 @@ void OwnershipFrame::parseFields(const ByteVector &data)
}
// Get the text encoding
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
pos += 1;
// Read the price paid this is a null terminate string
@@ -155,7 +155,7 @@ ByteVector OwnershipFrame::renderFields() const
ByteVector v;
v.append(char(encoding));
v.append(static_cast<char>(encoding));
v.append(d->pricePaid.data(String::Latin1));
v.append(textDelimiter(String::Latin1));
v.append(d->datePurchased.data(String::Latin1));

View File

@@ -146,6 +146,6 @@ namespace TagLib {
OwnershipFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -77,6 +77,6 @@ namespace TagLib {
PodcastFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -102,7 +102,7 @@ void PopularimeterFrame::setCounter(unsigned int s)
void PopularimeterFrame::parseFields(const ByteVector &data)
{
int pos = 0, size = int(data.size());
int pos = 0, size = static_cast<int>(data.size());
d->email = readStringField(data, String::Latin1, &pos);
@@ -122,7 +122,7 @@ ByteVector PopularimeterFrame::renderFields() const
data.append(d->email.data(String::Latin1));
data.append(textDelimiter(String::Latin1));
data.append(char(d->rating));
data.append(static_cast<char>(d->rating));
data.append(ByteVector::fromUInt(d->counter));
return data;

View File

@@ -127,6 +127,6 @@ namespace TagLib {
PopularimeterFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -106,6 +106,6 @@ namespace TagLib {
PrivateFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -121,7 +121,7 @@ void RelativeVolumeFrame::setVolumeAdjustmentIndex(short index)
float RelativeVolumeFrame::volumeAdjustment(ChannelType type) const
{
return d->channels.contains(type) ? float(d->channels[type].volumeAdjustment) / float(512) : 0;
return d->channels.contains(type) ? static_cast<float>(d->channels[type].volumeAdjustment) / static_cast<float>(512) : 0;
}
float RelativeVolumeFrame::volumeAdjustment() const
@@ -131,7 +131,7 @@ float RelativeVolumeFrame::volumeAdjustment() const
void RelativeVolumeFrame::setVolumeAdjustment(float adjustment, ChannelType type)
{
d->channels[type].volumeAdjustment = short(adjustment * float(512));
d->channels[type].volumeAdjustment = static_cast<short>(adjustment * static_cast<float>(512));
}
void RelativeVolumeFrame::setVolumeAdjustment(float adjustment)
@@ -182,7 +182,7 @@ void RelativeVolumeFrame::parseFields(const ByteVector &data)
while(pos <= static_cast<int>(data.size()) - 4) {
ChannelType type = ChannelType(data[pos]);
ChannelType type = static_cast<ChannelType>(data[pos]);
pos += 1;
ChannelData &channel = d->channels[type];
@@ -212,9 +212,9 @@ ByteVector RelativeVolumeFrame::renderFields() const
ChannelType type = (*it).first;
const ChannelData &channel = (*it).second;
data.append(char(type));
data.append(static_cast<char>(type));
data.append(ByteVector::fromShort(channel.volumeAdjustment));
data.append(char(channel.peakVolume.bitsRepresentingPeak));
data.append(static_cast<char>(channel.peakVolume.bitsRepresentingPeak));
data.append(channel.peakVolume.peakVolume);
}

View File

@@ -269,6 +269,6 @@ namespace TagLib {
RelativeVolumeFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -150,10 +150,10 @@ void SynchronizedLyricsFrame::parseFields(const ByteVector &data)
return;
}
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
d->language = data.mid(1, 3);
d->timestampFormat = TimestampFormat(data[4]);
d->type = Type(data[5]);
d->timestampFormat = static_cast<TimestampFormat>(data[4]);
d->type = static_cast<Type>(data[5]);
int pos = 6;
@@ -212,10 +212,10 @@ ByteVector SynchronizedLyricsFrame::renderFields() const
encoding = checkTextEncoding(it->text, encoding);
}
v.append(char(encoding));
v.append(static_cast<char>(encoding));
v.append(d->language.size() == 3 ? d->language : "XXX");
v.append(char(d->timestampFormat));
v.append(char(d->type));
v.append(static_cast<char>(d->timestampFormat));
v.append(static_cast<char>(d->type));
v.append(d->description.data(encoding));
v.append(textDelimiter(encoding));
for(SynchedTextList::ConstIterator it = d->synchedText.begin();

View File

@@ -226,6 +226,6 @@ namespace TagLib {
SynchronizedLyricsFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -254,7 +254,7 @@ namespace TagLib {
class TableOfContentsFramePrivate;
TableOfContentsFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -194,7 +194,7 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
// read the string data type (the first byte of the field data)
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
// split the byte array into chunks based on the string type (two byte delimiter
// for unicode encodings)
@@ -220,7 +220,7 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
unsigned short firstBom = 0;
for(ByteVectorList::ConstIterator it = l.begin(); it != l.end(); it++) {
if(!(*it).isEmpty()) {
if(!it->isEmpty() || (it == l.begin() && frameID() == "TXXX")) {
if(d->textEncoding == String::Latin1) {
d->fieldList.append(Tag::latin1StringHandler()->parse(*it));
}
@@ -254,7 +254,7 @@ ByteVector TextIdentificationFrame::renderFields() const
ByteVector v;
v.append(char(encoding));
v.append(static_cast<char>(encoding));
for(StringList::ConstIterator it = d->fieldList.begin(); it != d->fieldList.end(); it++) {

View File

@@ -308,6 +308,6 @@ namespace TagLib {
UserTextIdentificationFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -134,7 +134,7 @@ ByteVector UniqueFileIdentifierFrame::renderFields() const
ByteVector data;
data.append(d->owner.data(String::Latin1));
data.append(char(0));
data.append(static_cast<char>(0));
data.append(d->identifier);
return data;

View File

@@ -117,7 +117,7 @@ namespace TagLib {
class UniqueFileIdentifierFramePrivate;
UniqueFileIdentifierFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -74,6 +74,6 @@ namespace TagLib {
UnknownFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -147,7 +147,7 @@ void UnsynchronizedLyricsFrame::parseFields(const ByteVector &data)
return;
}
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
d->language = data.mid(1, 3);
int byteAlign
@@ -177,7 +177,7 @@ ByteVector UnsynchronizedLyricsFrame::renderFields() const
ByteVector v;
v.append(char(encoding));
v.append(static_cast<char>(encoding));
v.append(d->language.size() == 3 ? d->language : "XXX");
v.append(d->description.data(encoding));
v.append(textDelimiter(encoding));

View File

@@ -174,6 +174,6 @@ namespace TagLib {
UnsynchronizedLyricsFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -201,7 +201,7 @@ void UserUrlLinkFrame::parseFields(const ByteVector &data)
int pos = 0;
d->textEncoding = String::Type(data[0]);
d->textEncoding = static_cast<String::Type>(data[0]);
pos += 1;
if(d->textEncoding == String::Latin1 || d->textEncoding == String::UTF8) {
@@ -230,7 +230,7 @@ ByteVector UserUrlLinkFrame::renderFields() const
String::Type encoding = checkTextEncoding(d->description, d->textEncoding);
v.append(char(encoding));
v.append(static_cast<char>(encoding));
v.append(d->description.data(encoding));
v.append(textDelimiter(encoding));
v.append(url().data(String::Latin1));

View File

@@ -185,6 +185,6 @@ namespace TagLib {
UserUrlLinkFramePrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -18,7 +18,7 @@ namespace TagLib {
v3 = 3, //<! ID3v2.3
v4 = 4 //<! ID3v2.4
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -88,6 +88,6 @@ namespace TagLib {
ExtendedHeaderPrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -77,6 +77,6 @@ namespace TagLib {
FooterPrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -373,6 +373,7 @@ namespace
std::make_pair("TSO2", "ALBUMARTISTSORT"), // non-standard, used by iTunes
std::make_pair("TSRC", "ISRC"),
std::make_pair("TSSE", "ENCODING"),
std::make_pair("TSST", "DISCSUBTITLE"),
// URL frames
std::make_pair("WCOP", "COPYRIGHTURL"),
std::make_pair("WOAF", "FILEWEBPAGE"),
@@ -815,7 +816,7 @@ bool Frame::Header::dataLengthIndicator() const
ByteVector Frame::Header::render() const
{
ByteVector flags(2, char(0)); // just blank for the moment
ByteVector flags(2, static_cast<char>(0)); // just blank for the moment
ByteVector v = d->frameID +
(d->version == 3

View File

@@ -505,7 +505,7 @@ namespace TagLib {
ByteVector render() const;
/*!
* \deprecated
* \deprecated Use fileAlterPreservation().
*/
TAGLIB_DEPRECATED bool frameAlterPreservation() const;
@@ -517,7 +517,7 @@ namespace TagLib {
HeaderPrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -348,13 +348,13 @@ void FrameFactory::rebuildAggregateFrames(ID3v2::Tag *tag) const
tdat &&
tdat->data().size() >= 5)
{
String date(tdat->data().mid(1), String::Type(tdat->data()[0]));
String date(tdat->data().mid(1), static_cast<String::Type>(tdat->data()[0]));
if(date.length() == 4) {
tdrc->setText(tdrc->toString() + '-' + date.substr(2, 2) + '-' + date.substr(0, 2));
if(tag->frameList("TIME").size() == 1) {
UnknownFrame *timeframe = dynamic_cast<UnknownFrame *>(tag->frameList("TIME").front());
if(timeframe && timeframe->data().size() >= 5) {
String time(timeframe->data().mid(1), String::Type(timeframe->data()[0]));
String time(timeframe->data().mid(1), static_cast<String::Type>(timeframe->data()[0]));
if(time.length() == 4) {
tdrc->setText(tdrc->toString() + 'T' + time.substr(0, 2) + ':' + time.substr(2, 2));
}

View File

@@ -87,7 +87,7 @@ namespace TagLib {
TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, unsigned int version = 4) const;
/*!
* \deprecated
* \deprecated Use createFrame(const ByteVector &, const Header *) const.
*/
// BIC: remove
Frame *createFrame(const ByteVector &data, Header *tagHeader) const;
@@ -163,7 +163,7 @@ namespace TagLib {
FrameFactoryPrivate *d;
};
}
}
} // namespace ID3v2
} // namespace TagLib
#endif

View File

@@ -160,8 +160,8 @@ ByteVector Header::render() const
// add the version number -- we always render a 2.4.0 tag regardless of what
// the tag originally was.
v.append(char(majorVersion()));
v.append(char(0));
v.append(static_cast<char>(majorVersion()));
v.append(static_cast<char>(0));
// Currently we don't actually support writing extended headers, footers or
// unsynchronized tags, make sure that the flags are set accordingly.
@@ -178,7 +178,7 @@ ByteVector Header::render() const
flags[5] = d->experimentalIndicator;
flags[4] = d->footerPresent;
v.append(char(flags.to_ulong()));
v.append(static_cast<char>(flags.to_ulong()));
// add the size
v.append(SynchData::fromUInt(d->tagSize));

Some files were not shown because too many files have changed in this diff Show More