diff -Nru libmp3splt-0.9.0/aclocal.m4 libmp3splt-0.9.2/aclocal.m4 --- libmp3splt-0.9.0/aclocal.m4 2013-07-20 07:09:15.000000000 +0000 +++ libmp3splt-0.9.2/aclocal.m4 2014-11-09 16:48:16.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.13.3 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -1406,7 +1406,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1427,7 +1427,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1446,7 +1449,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -9674,6 +9680,61 @@ fi[]dnl ])# PKG_CHECK_MODULES + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -9686,10 +9747,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.3], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -9705,7 +9766,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.3])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -10072,6 +10133,12 @@ # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -10180,6 +10247,48 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -10188,7 +10297,6 @@ m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -10406,6 +10514,70 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. diff -Nru libmp3splt-0.9.0/AUTHORS libmp3splt-0.9.2/AUTHORS --- libmp3splt-0.9.0/AUTHORS 2012-10-07 14:33:17.000000000 +0000 +++ libmp3splt-0.9.2/AUTHORS 2014-10-12 09:57:55.000000000 +0000 @@ -17,6 +17,9 @@ and others ... +Thanks to Sebastian Gesemann for writing pcutmp3. +Bit reservoir handling in mp3splt is heavily inspired from pcutmp3. + Homepage : http://mp3splt.sourceforge.net/ diff -Nru libmp3splt-0.9.0/autogen.sh libmp3splt-0.9.2/autogen.sh --- libmp3splt-0.9.0/autogen.sh 2012-09-12 20:18:31.000000000 +0000 +++ libmp3splt-0.9.2/autogen.sh 2014-03-22 23:57:40.000000000 +0000 @@ -46,7 +46,7 @@ #we run aclocal, autoconf and automake #info: the 'sed' is an ugly hack for libtool version compatibility because aclocal.m4 is shipped in 'make dist' echo -n "1/6 Running autopoint... " \ -&& autopoint -f && echo "done" \ +&& autopoint --ver 0.13.1 -f && echo "done" \ && echo -n "2/6 Running aclocal... " \ && aclocal -I m4 $WIN_ACLOCAL_FLAGS $ACLOCAL_FLAGS && echo "done" \ && if test "x$win" = x;then sed "s/lt_dlcaller_register/lt_dlcaller_set_data/" aclocal.m4 > libmp3splt_aclocal.m4 && mv libmp3splt_aclocal.m4 aclocal.m4;fi \ @@ -67,6 +67,11 @@ && echo -n "6/6 Running automake... " \ && automake -a -c && echo "done" +if ! test -z $win ;then + touch libltdl/config/config.rpath + automake -a -c +fi + if test "x$HAS_MSGFMT" = xyes;then echo -n "Formatting language files with msgfmt... " && \ diff -Nru libmp3splt-0.9.0/ChangeLog libmp3splt-0.9.2/ChangeLog --- libmp3splt-0.9.0/ChangeLog 2013-07-20 06:04:18.000000000 +0000 +++ libmp3splt-0.9.2/ChangeLog 2014-11-09 15:02:26.000000000 +0000 @@ -2,6 +2,37 @@ - C library error messages not translated on windows : won't fix +libmp3splt version 0.9.2 +------------------------------------------------------------- + +- added bit reservoir handling for gapless playback option +- added @d to output format which is equal to: last directory of the input filename or the filename itself if no directory +- fixed bug #170 - included stdlib.h in src/plugins.c for getenv() because otherwise segfault on RHEL 5.6 64bits + +libmp3splt version 0.9.1b +------------------------------------------------------------- + +- bug fix: make sure to separate artist and performer in CUE files for use of @p and @a +- bug fix on CUE: from INDEX format MM:SS:FF, handle FF as frames instead of hundreths +- bug fix: issue when having input file inside several recursive symlinks +- small improvement on CUE: also accept INDEX 1 and not only INDEX 01 + +libmp3splt version 0.9.1a +------------------------------------------------------------- + +- FLAC: fixed an important bug not allowing to split some files + +libmp3splt version 0.9.1 +------------------------------------------------------------- +- FLAC internal cue sheets support +- simple MP3 chapter marks support (with no overlap) +- added #161 FLAC option to compute and write MD5 sum in the STREAMINFO metadata block +- fixed bug #159 with some FLAC files being detected as MP3; also look for the file extension + when detecting a file for a plugin +- fixed bug '#160 ---last cue splitpoint--- created at 99 59 99 for mp3 files >100mins' (libmp3splt) +- fixed bug with FLAC & pretend to split option +- patch #8 to fix Werror=format-security in snprintf + libmp3splt version 0.9 ------------------------------------------------------------- - experimental FLAC support added - stdin and stdout are not yet implemented diff -Nru libmp3splt-0.9.0/configure libmp3splt-0.9.2/configure --- libmp3splt-0.9.0/configure 2013-07-20 07:09:19.000000000 +0000 +++ libmp3splt-0.9.2/configure 2014-11-09 16:48:20.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libmp3splt 0.9.0. +# Generated by GNU Autoconf 2.69 for libmp3splt 0.9.2. # # Report bugs to . # @@ -593,8 +593,8 @@ # Identity of this package. PACKAGE_NAME='libmp3splt' PACKAGE_TARNAME='libmp3splt' -PACKAGE_VERSION='0.9.0' -PACKAGE_STRING='libmp3splt 0.9.0' +PACKAGE_VERSION='0.9.2' +PACKAGE_STRING='libmp3splt 0.9.2' PACKAGE_BUGREPORT='m@ioalex.net' PACKAGE_URL='' @@ -1444,7 +1444,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libmp3splt 0.9.0 to adapt to many kinds of systems. +\`configure' configures libmp3splt 0.9.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1514,7 +1514,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libmp3splt 0.9.0:";; + short | recursive ) echo "Configuration of libmp3splt 0.9.2:";; esac cat <<\_ACEOF @@ -1685,7 +1685,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libmp3splt configure 0.9.0 +libmp3splt configure 0.9.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2154,7 +2154,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libmp3splt $as_me 0.9.0, which was +It was created by libmp3splt $as_me 0.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2531,7 +2531,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version='1.13' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3017,7 +3017,7 @@ # Define the identity of the package. PACKAGE='libmp3splt' - VERSION='0.9.0' + VERSION='0.9.2' cat >>confdefs.h <<_ACEOF @@ -3068,6 +3068,48 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + ac_config_headers="$ac_config_headers config.h" @@ -3098,7 +3140,7 @@ LIBMP3SPLT_MINOR_VERSION=9 -LIBMP3SPLT_MICRO_VERSION=0 +LIBMP3SPLT_MICRO_VERSION=2 ################################################# @@ -3893,6 +3935,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -8673,7 +8774,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -8698,7 +8799,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -8717,7 +8821,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -16766,7 +16873,7 @@ echo echo "---------------------------------------------------------" -echo "Configuration for libmp3splt version "0.9.0" :" +echo "Configuration for libmp3splt version "0.9.2" :" echo echo " install path: $prefix" echo @@ -17442,7 +17549,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libmp3splt $as_me 0.9.0, which was +This file was extended by libmp3splt $as_me 0.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17508,7 +17615,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libmp3splt config.status 0.9.0 +libmp3splt config.status 0.9.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru libmp3splt-0.9.0/configure.ac libmp3splt-0.9.2/configure.ac --- libmp3splt-0.9.0/configure.ac 2013-07-20 07:09:10.000000000 +0000 +++ libmp3splt-0.9.2/configure.ac 2014-11-09 16:48:11.000000000 +0000 @@ -4,7 +4,7 @@ # * for mp3/ogg splitting without decoding # * # * Copyright (c) 2002-2005 M. Trotta - -# * Copyright (c) 2005-2013 Munteanu Alexandru - m@ioalex.net +# * Copyright (c) 2005-2014 Munteanu Alexandru - m@ioalex.net # * # * http://mp3splt.sourceforge.net # * @@ -36,7 +36,7 @@ #inspired from gtk sources m4_define([libmp3splt_major_version], [0]) m4_define([libmp3splt_minor_version], [9]) -m4_define([libmp3splt_micro_version], [0]) +m4_define([libmp3splt_micro_version], [2]) m4_define([libmp3splt_version], [libmp3splt_major_version.libmp3splt_minor_version.libmp3splt_micro_version]) diff -Nru libmp3splt-0.9.0/debian/changelog libmp3splt-0.9.2/debian/changelog --- libmp3splt-0.9.0/debian/changelog 2016-08-07 15:21:57.000000000 +0000 +++ libmp3splt-0.9.2/debian/changelog 2016-08-15 08:10:37.000000000 +0000 @@ -1,3 +1,15 @@ +libmp3splt (0.9.2-0ubuntu0~ppa1) xenial; urgency=medium + + * New upstream version + + -- Dominik Stadler (Ubuntu key) Mon, 15 Aug 2016 10:04:04 +0200 + +libmp3splt (0.9.2) trusty; urgency=low + + * New version + + -- Alexandru Munteanu Fri, 9 May 2014 00:00:00 +0100 + libmp3splt (0.9.0-0ubuntu0~ppa5) xenial; urgency=medium * Re-upload for Xenial. @@ -28,6 +40,13 @@ -- Dominik Stadler (Ubuntu key) Fri, 13 Sep 2013 22:26:12 +0200 +libmp3splt (0.9.0) trusty; urgency=low + + * Non-maintainer upload. + * Empty dependency_libs (Closes: #621639). + + -- Luk Claes Wed, 22 Jun 2011 19:49:00 +0200 + libmp3splt (0.7.2-2) unstable; urgency=low * Move Depends/Recommends on the -plugins packages to the mp3splt* @@ -72,13 +91,6 @@ -- Ryan Niebur Mon, 04 Jun 2012 00:23:11 -0700 -libmp3splt (0.5.6-1.1) unstable; urgency=low - - * Non-maintainer upload. - * Empty dependency_libs (Closes: #621639). - - -- Luk Claes Wed, 22 Jun 2011 19:49:00 +0200 - libmp3splt (0.5.6-1) unstable; urgency=low * New Upstream Version diff -Nru libmp3splt-0.9.0/debian/control libmp3splt-0.9.2/debian/control --- libmp3splt-0.9.0/debian/control 2016-08-07 15:22:35.000000000 +0000 +++ libmp3splt-0.9.2/debian/control 2016-08-15 08:12:00.000000000 +0000 @@ -1,7 +1,7 @@ Source: libmp3splt Priority: optional Maintainer: Ryan Niebur -Build-Depends: debhelper (>= 7.0.50), libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libpcre3-dev, libflac-dev +Build-Depends: debhelper (>= 7.0.50), gawk, libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libpcre3-dev, libflac-dev, doxygen, graphviz Standards-Version: 3.9.3 Section: libs Homepage: http://mp3splt.sourceforge.net/ @@ -14,7 +14,7 @@ Architecture: any Conflicts: libmp3splt, libmp3splt-mp3, libmp3splt-ogg Replaces: libmp3splt, libmp3splt-mp3, libmp3splt-ogg -Depends: libmp3splt0 (= ${binary:Version}), ${misc:Depends}, libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libflac-dev +Depends: libmp3splt0 (= ${binary:Version}), ${misc:Depends}, libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libpcre3-dev, libflac-dev Description: development files for libmp3splt0 Mp3Splt-project is a utility to split mp3, ogg and flac files selecting a begin and an end time position, without decoding. It's very useful to diff -Nru libmp3splt-0.9.0/debian/control.in libmp3splt-0.9.2/debian/control.in --- libmp3splt-0.9.0/debian/control.in 2013-09-15 09:45:03.000000000 +0000 +++ libmp3splt-0.9.2/debian/control.in 2016-08-15 08:06:06.000000000 +0000 @@ -1,7 +1,7 @@ Source: libmp3splt Priority: optional Maintainer: Ryan Niebur -Build-Depends: ###BUILDDEPS###, libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libpcre3-dev, libflac-dev +Build-Depends: ###BUILDDEPS###, gawk, libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libpcre3-dev, libflac-dev, doxygen, graphviz Standards-Version: 3.9.3 Section: libs Homepage: http://mp3splt.sourceforge.net/ @@ -14,7 +14,7 @@ Architecture: any Conflicts: libmp3splt, libmp3splt-mp3, libmp3splt-ogg Replaces: libmp3splt, libmp3splt-mp3, libmp3splt-ogg -Depends: libmp3splt###SONAME### (= ${binary:Version}), ${misc:Depends}, libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libflac-dev +Depends: libmp3splt###SONAME### (= ${binary:Version}), ${misc:Depends}, libogg-dev, libvorbis-dev, libmad0-dev, libltdl3-dev, libid3tag0-dev, libpcre3-dev, libflac-dev Description: development files for libmp3splt###SONAME### ###DESCRIPTION### . diff -Nru libmp3splt-0.9.0/debian/copyright libmp3splt-0.9.2/debian/copyright --- libmp3splt-0.9.0/debian/copyright 2013-09-13 20:24:24.000000000 +0000 +++ libmp3splt-0.9.2/debian/copyright 2016-08-15 08:00:51.000000000 +0000 @@ -2,7 +2,7 @@ Source: http://mp3splt.sourceforge.net/ Files: * -Copyright: 2005-2012 Munteanu Alexandru - , 2002-2005 M. Trotta - +Copyright: 2005-2014 Munteanu Alexandru - , 2002-2005 M. Trotta - License: GPL-2+ Files: ./src/socket_manager.c ./src/audacity.c ./src/audacity.h diff -Nru libmp3splt-0.9.0/debian/patches/fix-informations-spelling libmp3splt-0.9.2/debian/patches/fix-informations-spelling --- libmp3splt-0.9.0/debian/patches/fix-informations-spelling 2013-09-13 20:32:56.000000000 +0000 +++ libmp3splt-0.9.2/debian/patches/fix-informations-spelling 2016-08-15 08:11:19.000000000 +0000 @@ -4,18 +4,18 @@ Index: libmp3splt/po/cs.po =================================================================== ---- libmp3splt.orig/po/cs.po 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/po/cs.po 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/po/cs.po 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/po/cs.po 2016-08-15 10:11:08.442742328 +0200 @@ -36,7 +36,7 @@ - #: src/cue.c:513 + #: src/cue.c:518 #, c-format -msgid " reading informations from CUE file %s ...\n" +msgid " reading information from CUE file %s ...\n" msgstr " Čtou se informace ze souboru CUE %s …\n" - #: src/cue.c:587 src/cddb.c:133 -@@ -467,7 +467,7 @@ + #: src/cue.c:592 src/cddb.c:133 +@@ -521,7 +521,7 @@ #: src/cddb.c:63 #, c-format @@ -23,8 +23,8 @@ +msgid " reading information from CDDB file %s ...\n" msgstr " Čtou se informace ze souboru CDDB %s …\n" - #: src/string_utils.c:638 src/string_utils.c:659 -@@ -476,7 +476,7 @@ + #: src/string_utils.c:659 src/string_utils.c:680 +@@ -530,7 +530,7 @@ #: src/audacity.c:237 #, c-format @@ -35,18 +35,18 @@ #: src/filename_regex.c:90 Index: libmp3splt/po/de_DE.po =================================================================== ---- libmp3splt.orig/po/de_DE.po 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/po/de_DE.po 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/po/de_DE.po 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/po/de_DE.po 2016-08-15 10:11:08.442742328 +0200 @@ -34,7 +34,7 @@ - #: src/cue.c:513 + #: src/cue.c:518 #, c-format -msgid " reading informations from CUE file %s ...\n" +msgid " reading information from CUE file %s ...\n" msgstr " Informationen aus CUE-Datei %s werden gelesen …\n" - #: src/cue.c:587 src/cddb.c:133 -@@ -456,7 +456,7 @@ + #: src/cue.c:592 src/cddb.c:133 +@@ -509,7 +509,7 @@ #: src/cddb.c:63 #, c-format @@ -54,8 +54,8 @@ +msgid " reading information from CDDB file %s ...\n" msgstr " Informationen aus CDDB-Datei %s werden gelesen …\n" - #: src/string_utils.c:638 src/string_utils.c:659 -@@ -465,7 +465,7 @@ + #: src/string_utils.c:659 src/string_utils.c:680 +@@ -518,7 +518,7 @@ #: src/audacity.c:237 #, c-format @@ -66,18 +66,18 @@ #: src/filename_regex.c:90 Index: libmp3splt/po/es.po =================================================================== ---- libmp3splt.orig/po/es.po 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/po/es.po 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/po/es.po 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/po/es.po 2016-08-15 10:11:08.446742409 +0200 @@ -32,7 +32,7 @@ - #: src/cue.c:513 + #: src/cue.c:518 #, c-format -msgid " reading informations from CUE file %s ...\n" +msgid " reading information from CUE file %s ...\n" msgstr "" - #: src/cue.c:587 src/cddb.c:133 -@@ -452,7 +452,7 @@ + #: src/cue.c:592 src/cddb.c:133 +@@ -505,7 +505,7 @@ #: src/cddb.c:63 #, c-format @@ -85,8 +85,8 @@ +msgid " reading information from CDDB file %s ...\n" msgstr "" - #: src/string_utils.c:638 src/string_utils.c:659 -@@ -461,7 +461,7 @@ + #: src/string_utils.c:659 src/string_utils.c:680 +@@ -514,7 +514,7 @@ #: src/audacity.c:237 #, c-format @@ -97,18 +97,18 @@ #: src/filename_regex.c:90 Index: libmp3splt/po/fr_FR.po =================================================================== ---- libmp3splt.orig/po/fr_FR.po 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/po/fr_FR.po 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/po/fr_FR.po 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/po/fr_FR.po 2016-08-15 10:11:08.446742409 +0200 @@ -35,7 +35,7 @@ - #: src/cue.c:513 + #: src/cue.c:518 #, c-format -msgid " reading informations from CUE file %s ...\n" +msgid " reading information from CUE file %s ...\n" msgstr " lecture des informations du fichier CUE %s ...\n" - #: src/cue.c:587 src/cddb.c:133 -@@ -464,7 +464,7 @@ + #: src/cue.c:592 src/cddb.c:133 +@@ -518,7 +518,7 @@ #: src/cddb.c:63 #, c-format @@ -116,8 +116,8 @@ +msgid " reading information from CDDB file %s ...\n" msgstr " lecture des informations du fichier CDDB %s ...\n" - #: src/string_utils.c:638 src/string_utils.c:659 -@@ -473,7 +473,7 @@ + #: src/string_utils.c:659 src/string_utils.c:680 +@@ -527,7 +527,7 @@ #: src/audacity.c:237 #, c-format @@ -128,18 +128,18 @@ Index: libmp3splt/po/hr.po =================================================================== ---- libmp3splt.orig/po/hr.po 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/po/hr.po 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/po/hr.po 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/po/hr.po 2016-08-15 10:11:08.446742409 +0200 @@ -35,7 +35,7 @@ - #: src/cue.c:513 + #: src/cue.c:518 #, c-format -msgid " reading informations from CUE file %s ...\n" +msgid " reading information from CUE file %s ...\n" msgstr "" - #: src/cue.c:587 src/cddb.c:133 -@@ -457,7 +457,7 @@ + #: src/cue.c:592 src/cddb.c:133 +@@ -510,7 +510,7 @@ #: src/cddb.c:63 #, c-format @@ -147,8 +147,8 @@ +msgid " reading information from CDDB file %s ...\n" msgstr " čitanje informacija iz CDDB datoteke %s ...\n" - #: src/string_utils.c:638 src/string_utils.c:659 -@@ -466,7 +466,7 @@ + #: src/string_utils.c:659 src/string_utils.c:680 +@@ -519,7 +519,7 @@ #: src/audacity.c:237 #, c-format @@ -159,8 +159,8 @@ #: src/filename_regex.c:90 Index: libmp3splt/src/audacity.c =================================================================== ---- libmp3splt.orig/src/audacity.c 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/src/audacity.c 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/src/audacity.c 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/src/audacity.c 2016-08-15 10:11:08.446742409 +0200 @@ -234,7 +234,7 @@ *error = SPLT_AUDACITY_OK; @@ -172,8 +172,8 @@ Index: libmp3splt/src/cddb.c =================================================================== ---- libmp3splt.orig/src/cddb.c 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/src/cddb.c 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/src/cddb.c 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/src/cddb.c 2016-08-15 10:11:08.446742409 +0200 @@ -60,7 +60,7 @@ } @@ -185,18 +185,18 @@ Index: libmp3splt/po/libmp3splt0.pot =================================================================== ---- libmp3splt.orig/po/libmp3splt0.pot 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/po/libmp3splt0.pot 2013-09-13 22:32:52.000000000 +0200 +--- libmp3splt.orig/po/libmp3splt0.pot 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/po/libmp3splt0.pot 2016-08-15 10:11:08.446742409 +0200 @@ -31,7 +31,7 @@ - #: src/cue.c:513 + #: src/cue.c:518 #, c-format -msgid " reading informations from CUE file %s ...\n" +msgid " reading information from CUE file %s ...\n" msgstr "" - #: src/cue.c:587 src/cddb.c:133 -@@ -451,7 +451,7 @@ + #: src/cue.c:592 src/cddb.c:133 +@@ -504,7 +504,7 @@ #: src/cddb.c:63 #, c-format @@ -204,8 +204,8 @@ +msgid " reading information from CDDB file %s ...\n" msgstr "" - #: src/string_utils.c:638 src/string_utils.c:659 -@@ -460,7 +460,7 @@ + #: src/string_utils.c:659 src/string_utils.c:680 +@@ -513,7 +513,7 @@ #: src/audacity.c:237 #, c-format @@ -216,9 +216,9 @@ #: src/filename_regex.c:90 Index: libmp3splt/src/cue.c =================================================================== ---- libmp3splt.orig/src/cue.c 2013-09-13 22:31:54.000000000 +0200 -+++ libmp3splt/src/cue.c 2013-09-13 22:32:52.000000000 +0200 -@@ -510,7 +510,7 @@ +--- libmp3splt.orig/src/cue.c 2016-08-15 10:11:08.554744585 +0200 ++++ libmp3splt/src/cue.c 2016-08-15 10:11:08.446742409 +0200 +@@ -515,7 +515,7 @@ } splt_c_put_info_message_to_client(state, diff -Nru libmp3splt-0.9.0/doc/Doxyfile_all.in libmp3splt-0.9.2/doc/Doxyfile_all.in --- libmp3splt-0.9.0/doc/Doxyfile_all.in 2013-01-30 22:46:17.000000000 +0000 +++ libmp3splt-0.9.2/doc/Doxyfile_all.in 2014-03-22 23:57:40.000000000 +0000 @@ -38,7 +38,7 @@ # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "Lossless library for splitting audio formats like mp3 and ogg vorbis." +PROJECT_BRIEF = "Lossless library for splitting audio formats like mp3, ogg vorbis and FLAC." # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not diff -Nru libmp3splt-0.9.0/doc/Doxyfile_api.in libmp3splt-0.9.2/doc/Doxyfile_api.in --- libmp3splt-0.9.0/doc/Doxyfile_api.in 2013-02-08 09:02:22.000000000 +0000 +++ libmp3splt-0.9.2/doc/Doxyfile_api.in 2014-03-22 23:57:40.000000000 +0000 @@ -38,7 +38,7 @@ # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "Lossless library for splitting audio formats like mp3 and ogg vorbis." +PROJECT_BRIEF = "Lossless library for splitting audio formats like mp3, ogg vorbis and FLAC." # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not diff -Nru libmp3splt-0.9.0/doc/examples/Makefile.in libmp3splt-0.9.2/doc/examples/Makefile.in --- libmp3splt-0.9.0/doc/examples/Makefile.in 2013-07-20 07:09:21.000000000 +0000 +++ libmp3splt-0.9.2/doc/examples/Makefile.in 2014-11-09 16:48:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru libmp3splt-0.9.0/doc/Makefile.in libmp3splt-0.9.2/doc/Makefile.in --- libmp3splt-0.9.0/doc/Makefile.in 2013-07-20 07:09:20.000000000 +0000 +++ libmp3splt-0.9.2/doc/Makefile.in 2014-11-09 16:48:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -590,8 +590,8 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@HAVE_DOXYGEN_FALSE@uninstall-local: @HAVE_DOXYGEN_FALSE@install-data-local: +@HAVE_DOXYGEN_FALSE@uninstall-local: @HAVE_DOXYGEN_FALSE@clean-local: clean: clean-recursive diff -Nru libmp3splt-0.9.0/include/libmp3splt/mp3splt.h libmp3splt-0.9.2/include/libmp3splt/mp3splt.h --- libmp3splt-0.9.0/include/libmp3splt/mp3splt.h 2013-04-28 09:00:02.000000000 +0000 +++ libmp3splt-0.9.2/include/libmp3splt/mp3splt.h 2014-10-07 00:22:06.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * And others ... see the AUTHORS file provided with libmp3splt source. * @@ -46,8 +46,9 @@ href="http://mp3splt.sourceforge.net/mp3splt_page/home.php">mp3splt-project home page.\n Some of the library features include: - - losslessly split of mp3 (using libmad) and - ogg vorbis (using libvorbis) files + - losslessly split of mp3 (using libmad), + ogg vorbis (using libvorbis), + FLAC files - extensibility to other audio formats using plugins - querying tags from tracktype.org - split on silences @@ -167,6 +168,7 @@ SPLT_ERROR_LENGTH_SPLIT_VALUE_INVALID = -35, SPLT_ERROR_CANNOT_GET_TOTAL_TIME = -36, SPLT_ERROR_LIBID3 = -37, + SPLT_ERROR_FAILED_BITRESERVOIR = -38, SPLT_FREEDB_ERROR_INITIALISE_SOCKET = -101, SPLT_FREEDB_ERROR_CANNOT_GET_HOST = -102, @@ -186,6 +188,8 @@ SPLT_FREEDB_ERROR_SITE = -119, SPLT_FREEDB_ERROR_CANNOT_DISCONNECT = -120, SPLT_FREEDB_ERROR_PROXY_NOT_SUPPORTED = -121, + SPLT_ERROR_INTERNAL_SHEET = -122, + SPLT_ERROR_INTERNAL_SHEET_TYPE_NOT_SUPPORTED = -123, SPLT_DEWRAP_ERR_FILE_LENGTH = -200, SPLT_DEWRAP_ERR_VERSION_OLD = -201, @@ -204,6 +208,10 @@ SPLT_INVALID_REGEX = -800, SPLT_REGEX_NO_MATCH = -801, SPLT_REGEX_UNAVAILABLE = -802, + + SPLT_ERROR_NO_AUTO_ADJUST_FOUND = -900, + + SPLT_ERROR_INVALID_CODE = -1000, } splt_code; //@} @@ -671,6 +679,43 @@ * Default is 0. */ SPLT_OPT_TIME_MINIMUM_THEORETICAL_LENGTH, + /** + * If #SPLT_TRUE, raise a warning when no auto-adjust silence is found when + * using the #SPLT_OPT_AUTO_ADJUST option. + * + * Int option that can take the values #SPLT_TRUE or #SPLT_FALSE. + * + * Default is #SPLT_FALSE. + */ + SPLT_OPT_WARN_IF_NO_AUTO_ADJUST_FOUND, + /** + * If #SPLT_TRUE, stop with error when no auto-adjust silence is found when + * using the #SPLT_OPT_AUTO_ADJUST option. + * + * Int option that can take the values #SPLT_TRUE or #SPLT_FALSE. + * + * Default is #SPLT_FALSE. + */ + SPLT_OPT_STOP_IF_NO_AUTO_ADJUST_FOUND, + /** + * If #SPLT_TRUE, decode flac frames before writing them in the output file and compute the md5sum + * to be stored in the FLAC header - this option decreases the performance of the split because of + * the decoding process - it might be twice slower. + * + * Int option that can take the values #SPLT_TRUE or #SPLT_FALSE. + * + * Default is #SPLT_FALSE. + */ + SPLT_OPT_DECODE_AND_WRITE_FLAC_MD5SUM_FOR_CREATED_FILES, + /** + * If #SPLT_TRUE, handles bit-reservoir for gapless playback when splitting. + * It currently works only for mp3 files. + * + * Int option that can take the values #SPLT_TRUE or #SPLT_FALSE. + * + * Default is #SPLT_FALSE. + */ + SPLT_OPT_HANDLE_BIT_RESERVOIR, } splt_options; /** @@ -1073,6 +1118,10 @@ */ SPLT_MESSAGE_INFO, /** + * @brief Warning message + */ + SPLT_MESSAGE_WARNING, + /** * @brief Debug message */ SPLT_MESSAGE_DEBUG @@ -1728,7 +1777,8 @@ typedef enum { CUE_IMPORT, CDDB_IMPORT, - AUDACITY_LABELS_IMPORT + AUDACITY_LABELS_IMPORT, + PLUGIN_INTERNAL_IMPORT } splt_import_type; /** @@ -2109,16 +2159,17 @@ /** * @brief Libmp3splt plugin API. * - * \warning Because only mp3 and ogg plugins exist and are integrated with the library, the plugin - * API might change. + * \warning The plugin API might still change. * * In order to create a plugin for libmp3splt, the following functions can be implemented.\n * Mandatory functions are #splt_pl_init, #splt_pl_end, #splt_pl_check_plugin_is_for_file, * #splt_pl_set_plugin_info and #splt_pl_split. * - * Two examples can be found for the mp3 and - * ogg implementations. + * Examples can be found for the mp3, + * ogg vorbis + * FLAC + * implementations. */ typedef struct { /** @@ -2252,6 +2303,13 @@ * @param[out] error Fill in possible error. */ void (*splt_pl_dewrap)(splt_state *state, int listonly, const char *dir, splt_code *error); + /** + * @brief Import splitpoints from internal sheets. + * + * @param[in] state Main state. + * @param[out] error Fill in possible error. + */ + void (*splt_pl_import_internal_sheets)(splt_state *state, splt_code *error); } splt_plugin_func; //@} diff -Nru libmp3splt-0.9.0/include/libmp3splt/version.h libmp3splt-0.9.2/include/libmp3splt/version.h --- libmp3splt-0.9.0/include/libmp3splt/version.h 2013-07-20 07:09:28.000000000 +0000 +++ libmp3splt-0.9.2/include/libmp3splt/version.h 2014-11-09 16:48:35.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * And others ... see the AUTHORS file provided with libmp3splt source. * @@ -40,7 +40,7 @@ #define LIBMP3SPLT_MAJOR_VERSION 0 #define LIBMP3SPLT_MINOR_VERSION 9 -#define LIBMP3SPLT_MICRO_VERSION 0 +#define LIBMP3SPLT_MICRO_VERSION 2 //@} diff -Nru libmp3splt-0.9.0/include/libmp3splt/version.h.in libmp3splt-0.9.2/include/libmp3splt/version.h.in --- libmp3splt-0.9.0/include/libmp3splt/version.h.in 2013-02-08 09:22:03.000000000 +0000 +++ libmp3splt-0.9.2/include/libmp3splt/version.h.in 2014-05-10 14:37:15.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * And others ... see the AUTHORS file provided with libmp3splt source. * diff -Nru libmp3splt-0.9.0/libltdl/config/config.guess libmp3splt-0.9.2/libltdl/config/config.guess --- libmp3splt-0.9.0/libltdl/config/config.guess 2013-07-20 07:09:16.000000000 +0000 +++ libmp3splt-0.9.2/libltdl/config/config.guess 2014-11-09 16:48:17.000000000 +0000 @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-05-16' +timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -995,6 +995,12 @@ ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; diff -Nru libmp3splt-0.9.0/libltdl/config/config.sub libmp3splt-0.9.2/libltdl/config/config.sub --- libmp3splt-0.9.0/libltdl/config/config.sub 2013-07-20 07:09:16.000000000 +0000 +++ libmp3splt-0.9.2/libltdl/config/config.sub 2014-11-09 16:48:18.000000000 +0000 @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-04-24' +timestamp='2013-08-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -257,7 +257,7 @@ | avr | avr32 \ | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -372,7 +372,7 @@ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -794,7 +794,7 @@ os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -830,7 +830,7 @@ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1546,6 +1546,9 @@ c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; diff -Nru libmp3splt-0.9.0/libltdl/config/ltmain.sh libmp3splt-0.9.2/libltdl/config/ltmain.sh --- libmp3splt-0.9.0/libltdl/config/ltmain.sh 2013-07-20 07:09:16.000000000 +0000 +++ libmp3splt-0.9.2/libltdl/config/ltmain.sh 2014-11-09 16:48:18.000000000 +0000 @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.3" +VERSION="2.4.2 Debian-2.4.2-1.7" TIMESTAMP="" package_revision=1.3337 diff -Nru libmp3splt-0.9.0/libltdl/config/missing libmp3splt-0.9.2/libltdl/config/missing --- libmp3splt-0.9.0/libltdl/config/missing 2013-07-20 07:09:16.000000000 +0000 +++ libmp3splt-0.9.2/libltdl/config/missing 2014-11-09 16:48:18.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -Nru libmp3splt-0.9.0/m4/Makefile.in libmp3splt-0.9.2/m4/Makefile.in --- libmp3splt-0.9.0/m4/Makefile.in 2013-07-20 07:09:21.000000000 +0000 +++ libmp3splt-0.9.2/m4/Makefile.in 2014-11-09 16:48:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru libmp3splt-0.9.0/Makefile.in libmp3splt-0.9.2/Makefile.in --- libmp3splt-0.9.0/Makefile.in 2013-07-20 07:09:20.000000000 +0000 +++ libmp3splt-0.9.2/Makefile.in 2014-11-09 16:48:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -91,6 +91,7 @@ libltdl/config/config.sub libltdl/config/depcomp \ libltdl/config/install-sh libltdl/config/missing \ libltdl/config/mkinstalldirs libltdl/config/ltmain.sh \ + $(top_srcdir)/libltdl/config/compile \ $(top_srcdir)/libltdl/config/config.guess \ $(top_srcdir)/libltdl/config/config.sub \ $(top_srcdir)/libltdl/config/install-sh \ @@ -457,8 +458,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -692,10 +693,16 @@ $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -737,9 +744,10 @@ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ diff -Nru libmp3splt-0.9.0/NEWS libmp3splt-0.9.2/NEWS --- libmp3splt-0.9.0/NEWS 2013-07-20 06:03:42.000000000 +0000 +++ libmp3splt-0.9.2/NEWS 2014-11-09 14:58:43.000000000 +0000 @@ -1,5 +1,17 @@ See the ChangeLog file for details. +* 09.11.2014 * + -version 0.9.2 released + +* 22.09.2014 * + -version 0.9.1b released + +* 19.07.2014 * + -version 0.9.1a released + +* 02.05.2014 * + -version 0.9.1 released + * 21.07.2013 * -version 0.9 released diff -Nru libmp3splt-0.9.0/plugins/flac.c libmp3splt-0.9.2/plugins/flac.c --- libmp3splt-0.9.0/plugins/flac.c 2013-07-20 06:27:47.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac.c 2014-05-10 14:38:47.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * @@ -30,6 +30,7 @@ #include #include "splt.h" +#include "cddb_cue_common.h" #include "flac_silence.h" #include "flac_metadata_utils.h" @@ -122,6 +123,10 @@ splt_flac_state *flacstate = state->codec; + splt_flac_md5_decoder *flac_md5_d = splt_flac_md5_decoder_new_and_init(state, error); + if (*error < 0) { return end_point; } + flacstate->fr->flac_md5_d = flac_md5_d; + splt_tags *tags_to_write = splt_tu_get_current_tags(state); splt_flac_tags *flac_tags = flacstate->flac_tags; @@ -193,6 +198,72 @@ //nothing to do - we never store original tags in the splt_state, only in the splt_flac_state } +void splt_pl_import_internal_sheets(splt_state *state, splt_code *error) +{ + char *input_filename = splt_t_get_filename_to_split(state); + + FLAC__StreamMetadata *cuesheet = NULL; + FLAC__bool cuesheet_read_ok = FLAC__metadata_get_cuesheet(input_filename, &cuesheet); + if (!cuesheet_read_ok) + { + *error = SPLT_ERROR_INTERNAL_SHEET; + return; + } + + const FLAC__StreamMetadata_CueSheet *cue_sheet = &cuesheet->data.cue_sheet; + unsigned track_number; + long max_hundreths = 0; + for (track_number = 0; track_number < cue_sheet->num_tracks - 1; track_number++) + { + const FLAC__StreamMetadata_CueSheet_Track *cue_track = cue_sheet->tracks + track_number; + + int start_index = 0; + if (cue_track->num_indices > 1) { start_index++; } + + //TODO: only take INDEX 01 or INDEX 00 if INDEX 01 does not exists + const FLAC__StreamMetadata_CueSheet_Index *cue_index = cue_track->indices + start_index; + if (cue_sheet->is_cd) + { + long offset = (long) ((cue_track->offset + cue_index->offset) / (44100 / 75)) * 100; + long hundreths = offset / 75; + if (hundreths > max_hundreths) { max_hundreths = hundreths; } + //long mins, secs, hundr; + //splt_co_get_mins_secs_hundr(hundreths, &mins, &secs, &hundr); + //fprintf(stdout, "%02lu:%02lu:%02lu\n", mins, secs, hundr); + //fflush(stdout); + splt_sp_append_splitpoint(state, hundreths, NULL, SPLT_SPLITPOINT); + } + else + { + *error = SPLT_ERROR_INTERNAL_SHEET_TYPE_NOT_SUPPORTED; + goto end; + } + } + + if (track_number > 0) + { + splt_sp_append_splitpoint(state, LONG_MAX, _("--- last cue splitpoint ---"), SPLT_SPLITPOINT); + } + +end: + FLAC__metadata_object_delete(cuesheet); + if (*error < 0) { return; } + + splt_o_lock_messages(state); + splt_pl_init(state, error); + splt_o_unlock_messages(state); + if (*error < 0) { return; } + + splt_flac_state *flacstate = state->codec; + const splt_tags *our_tags = flacstate->flac_tags->original_tags; + splt_cc_put_filenames_from_tags(state, track_number, error, our_tags, SPLT_FALSE, + SPLT_FALSE); + + int err = SPLT_OK; + splt_pl_end(state, &err); + if (err < 0 && *error >= 0) { *error = err; } +} + static void splt_flac_get_info(splt_state *state, FILE *file_input, const char *input_filename, splt_code *error) { splt_flac_state *flacstate = splt_flac_info(file_input, state, input_filename, error); diff -Nru libmp3splt-0.9.0/plugins/flac_frame_reader.c libmp3splt-0.9.2/plugins/flac_frame_reader.c --- libmp3splt-0.9.0/plugins/flac_frame_reader.c 2013-07-03 20:25:44.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_frame_reader.c 2014-07-19 00:26:43.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * @@ -532,12 +532,16 @@ modified_frame[j] = first_byte_of_new_crc16; modified_frame[j+1] = last_byte_of_new_crc16; + splt_flac_md5_decode_frame(modified_frame, modified_frame_length, fr->flac_md5_d, error, state); + if (*error < 0) { goto end; } + if (splt_io_fwrite(state, modified_frame, modified_frame_length, 1, fr->out) != 1) { splt_e_set_error_data(state, fr->output_fname); *error = SPLT_ERROR_CANT_WRITE_TO_OUTPUT_FILE; } +end: free(modified_frame); } @@ -566,6 +570,18 @@ fr->out_streaminfo.max_blocksize = max_blocksize; } + unsigned char *md5sum = splt_flac_md5_decoder_free_and_get_md5sum(fr->flac_md5_d); + fr->flac_md5_d = NULL; + if (md5sum) + { + int i; + for (i = 0; i < 16; i++) + { + fr->out_streaminfo.md5sum[i] = md5sum[i]; + } + free(md5sum); + } + unsigned char *streaminfo_bytes = splt_flac_l_convert_from_streaminfo(&fr->out_streaminfo); if (streaminfo_bytes == NULL) { @@ -586,7 +602,10 @@ } //TODO: remove fseek for stdout; how to ? - rewind(fr->out); + if (fr->out != NULL) + { + rewind(fr->out); + } unsigned char flac_word[4] = { 0x66, 0x4C, 0x61, 0x43 }; if (splt_io_fwrite(state, flac_word, 4, 1, fr->out) != 1) @@ -708,6 +727,11 @@ if (fr->output_buffer) { free(fr->output_buffer); } if (fr->previous_frame) { free(fr->previous_frame); } if (fr->output_fname) { free(fr->output_fname); } + if (fr->flac_md5_d) + { + unsigned char *md5sum = splt_flac_md5_decoder_free_and_get_md5sum(fr->flac_md5_d); + if (md5sum) { free(md5sum); } + } free(fr); } @@ -837,12 +861,15 @@ splt_c_put_progress_text(state, SPLT_PROGRESS_CREATE); - fr->out = splt_io_fopen(output_fname, "wb+"); - if (fr->out == NULL) + if (! splt_o_get_int_option(state, SPLT_OPT_PRETEND_TO_SPLIT)) { - splt_e_set_strerror_msg_with_data(state, output_fname); - *error = SPLT_ERROR_CANNOT_OPEN_DEST_FILE; - return; + fr->out = splt_io_fopen(output_fname, "wb+"); + if (fr->out == NULL) + { + splt_e_set_strerror_msg_with_data(state, output_fname); + *error = SPLT_ERROR_CANNOT_OPEN_DEST_FILE; + return; + } } unsigned char space[4+SPLT_FLAC_METADATA_HEADER_LENGTH+SPLT_FLAC_STREAMINFO_LENGTH] = {'\0'}; @@ -1032,6 +1059,9 @@ else { end_point += (double) adjust_gap_secs; + + *error = splt_u_process_no_auto_adjust_found(state, end_point); + if (*error < 0) { goto end; } } splt_siu_ssplit_free(&state->silence_list); diff -Nru libmp3splt-0.9.0/plugins/flac_frame_reader.h libmp3splt-0.9.2/plugins/flac_frame_reader.h --- libmp3splt-0.9.0/plugins/flac_frame_reader.h 2013-05-19 23:04:18.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_frame_reader.h 2014-05-10 14:38:34.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * @@ -38,6 +38,7 @@ #include "flac_metadata.h" #include "flac_tags.h" +#include "flac_md5_decoder.h" typedef struct { //input file @@ -95,6 +96,8 @@ size_t previous_frame_length; double end_point; + + splt_flac_md5_decoder *flac_md5_d; } splt_flac_frame_reader; splt_flac_frame_reader *splt_flac_fr_new(FILE *in, const char *input_filename); diff -Nru libmp3splt-0.9.0/plugins/flac.h libmp3splt-0.9.2/plugins/flac.h --- libmp3splt-0.9.0/plugins/flac.h 2013-04-29 12:52:40.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac.h 2014-05-10 14:38:50.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * @@ -34,6 +34,7 @@ #include "flac_frame_reader.h" #include "flac_metadata.h" #include "flac_tags.h" +#include "flac_md5_decoder.h" #define SPLT_FLAC_EXT ".flac" diff -Nru libmp3splt-0.9.0/plugins/flac_md5_decoder.c libmp3splt-0.9.2/plugins/flac_md5_decoder.c --- libmp3splt-0.9.0/plugins/flac_md5_decoder.c 1970-01-01 00:00:00.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_md5_decoder.c 2014-05-10 14:38:52.000000000 +0000 @@ -0,0 +1,181 @@ +/********************************************************** + * libmp3splt -- library based on mp3splt, + * for mp3/ogg splitting without decoding + * + * Copyright (c) 2002-2005 M. Trotta - + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net + * + *********************************************************/ + +/********************************************************** + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + *********************************************************/ + +#include "flac_md5_decoder.h" + +static FLAC__StreamDecoderReadStatus splt_flac_md5_decoder_read( + const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) +{ + splt_flac_md5_decoder *flac_md5_d = (splt_flac_md5_decoder *) client_data; + + if (*bytes <= 0) { return FLAC__STREAM_DECODER_READ_STATUS_ABORT; } + + unsigned char *start = + flac_md5_d->frame + (flac_md5_d->frame_size - flac_md5_d->remaining_size); + + size_t to_read = *bytes; + if (to_read >= flac_md5_d->remaining_size) + { + to_read = flac_md5_d->remaining_size; + memcpy(buffer, start, to_read); + flac_md5_d->remaining_size = 0; + *bytes = to_read; + return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; + } + + to_read = *bytes; + memcpy(buffer, start, to_read); + flac_md5_d->remaining_size -= to_read; + if (flac_md5_d->remaining_size < 0) { flac_md5_d->remaining_size = 0; } + + return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; +} + +static FLAC__StreamDecoderWriteStatus splt_flac_md5_decoder_write(const FLAC__StreamDecoder *decoder, + const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data) +{ + splt_flac_md5_decoder *flac_md5_d = (splt_flac_md5_decoder *) client_data; + + int bytes_per_sample = (int) (frame->header.bits_per_sample + 7) / 8; + + size_t channel, sample; + for (sample = 0;sample < frame->header.blocksize; sample++) + { + for (channel = 0;channel < frame->header.channels; channel++) + { + FLAC__int32 num = buffer[channel][sample]; + MD5_Update(&flac_md5_d->md5_context, &num, bytes_per_sample); + } + } + + return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; +} + +static void splt_flac_md5_decoder_error(const FLAC__StreamDecoder *decoder, + FLAC__StreamDecoderErrorStatus status, void *client_data) +{ + splt_flac_md5_decoder *flac_md5_d = (splt_flac_md5_decoder *) client_data; + + flac_md5_d->error = SPLT_ERROR_INVALID; + splt_e_set_error_data(flac_md5_d->state, splt_t_get_filename_to_split(flac_md5_d->state)); + + splt_d_print_debug(flac_md5_d->state, "Error while decoding flac file: %s\n", + FLAC__StreamDecoderErrorStatusString[status]); +} + +static splt_flac_md5_decoder *splt_flac_md5_decoder_new(splt_code *error, splt_state *state) +{ + splt_flac_md5_decoder *flac_md5_d = malloc(sizeof(splt_flac_md5_decoder)); + if (flac_md5_d == NULL) + { + *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + return NULL; + } + + memset(flac_md5_d, 0, sizeof(splt_flac_md5_decoder)); + + flac_md5_d->error = SPLT_OK; + flac_md5_d->state = state; + MD5_Init(&flac_md5_d->md5_context); + + return flac_md5_d; +} + +splt_flac_md5_decoder *splt_flac_md5_decoder_new_and_init(splt_state *state, splt_code *error) +{ + if (!splt_o_get_int_option(state, SPLT_OPT_DECODE_AND_WRITE_FLAC_MD5SUM_FOR_CREATED_FILES)) + { + return NULL; + } + + splt_flac_md5_decoder *flac_md5_d = splt_flac_md5_decoder_new(error, state); + if (*error < 0) { return NULL; } + + flac_md5_d->decoder = FLAC__stream_decoder_new(); + if (flac_md5_d->decoder == NULL) + { + *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + return NULL; + } + + FLAC__StreamDecoderInitStatus status = FLAC__stream_decoder_init_stream(flac_md5_d->decoder, + splt_flac_md5_decoder_read, + NULL /* seek */, NULL /* tell */, NULL /* length */, NULL /* eof */, + splt_flac_md5_decoder_write, NULL /* metadata */, + splt_flac_md5_decoder_error, flac_md5_d); + + if (status != FLAC__STREAM_DECODER_INIT_STATUS_OK) + { + splt_d_print_debug(state, "Failed to initialize md5 flac decoder with error %d", status); + splt_e_set_error_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_INVALID; + unsigned char *md5sum = splt_flac_md5_decoder_free_and_get_md5sum(flac_md5_d); + if (md5sum) { free(md5sum); } + return NULL; + } + + return flac_md5_d; +} + +void splt_flac_md5_decode_frame(unsigned char *frame, + size_t frame_size, splt_flac_md5_decoder *flac_md5_d, splt_code *error, splt_state *state) +{ + if (!splt_o_get_int_option(state, SPLT_OPT_DECODE_AND_WRITE_FLAC_MD5SUM_FOR_CREATED_FILES)) + { + return; + } + + flac_md5_d->frame = frame; + flac_md5_d->frame_size = frame_size; + flac_md5_d->remaining_size = frame_size; + + if (!FLAC__stream_decoder_process_single(flac_md5_d->decoder)) + { + splt_d_print_debug(flac_md5_d->state, "Failed to process single frame for md5 computation\n"); + return; + } + + if (flac_md5_d->error < 0) { *error = flac_md5_d->error; } +} + +unsigned char *splt_flac_md5_decoder_free_and_get_md5sum(splt_flac_md5_decoder *flac_md5_d) +{ + if (!flac_md5_d) { return NULL; } + + if (flac_md5_d->decoder) + { + FLAC__stream_decoder_delete(flac_md5_d->decoder); + } + + unsigned char *md5sum = NULL; + md5sum = malloc(sizeof(unsigned char) * 16); + MD5_Final(md5sum, &flac_md5_d->md5_context); + + free(flac_md5_d); + + return md5sum; +} + diff -Nru libmp3splt-0.9.0/plugins/flac_md5_decoder.h libmp3splt-0.9.2/plugins/flac_md5_decoder.h --- libmp3splt-0.9.0/plugins/flac_md5_decoder.h 1970-01-01 00:00:00.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_md5_decoder.h 2014-05-10 14:38:55.000000000 +0000 @@ -0,0 +1,59 @@ +/********************************************************** + * + * libmp3splt -- library based on mp3splt, + * for mp3/ogg splitting without decoding + * + * Copyright (c) 2002-2005 M. Trotta - + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net + * + * http://mp3splt.sourceforge.net + * + *********************************************************/ + +/********************************************************** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + *********************************************************/ + +#ifndef MP3SPLT_FLAC_MD5_DECODER_H + +#include + +#include + +#include "splt.h" +#include "md5.h" + +typedef struct { + FLAC__StreamDecoder *decoder; + unsigned char *frame; + size_t frame_size; + size_t remaining_size; + splt_code error; + splt_state *state; + MD5_CTX md5_context; +} splt_flac_md5_decoder; + +splt_flac_md5_decoder *splt_flac_md5_decoder_new_and_init(splt_state *state, splt_code *error); +void splt_flac_md5_decode_frame(unsigned char *frame, + size_t frame_size, splt_flac_md5_decoder *flac_md5_d, splt_code *error, splt_state *state); +unsigned char *splt_flac_md5_decoder_free_and_get_md5sum(splt_flac_md5_decoder *flac_md5_d); + +#define MP3SPLT_FLAC_MD5_DECODER_H + +#endif + diff -Nru libmp3splt-0.9.0/plugins/flac_metadata.c libmp3splt-0.9.2/plugins/flac_metadata.c --- libmp3splt-0.9.0/plugins/flac_metadata.c 2013-04-20 16:06:04.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_metadata.c 2014-05-10 14:39:08.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/flac_metadata.h libmp3splt-0.9.2/plugins/flac_metadata.h --- libmp3splt-0.9.0/plugins/flac_metadata.h 2013-04-20 16:06:16.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_metadata.h 2014-05-10 14:39:10.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/flac_metadata_utils.c libmp3splt-0.9.2/plugins/flac_metadata_utils.c --- libmp3splt-0.9.0/plugins/flac_metadata_utils.c 2013-04-21 22:21:08.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_metadata_utils.c 2014-05-10 14:37:56.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * @@ -40,7 +40,10 @@ return NULL; } - fread(bytes, 1, total_block_length, in); + if (fread(bytes, 1, total_block_length, in) != total_block_length) + { + *error = SPLT_ERROR_INVALID; + } return bytes; } @@ -130,33 +133,47 @@ void splt_flac_mu_read(splt_flac_state *flacstate, splt_state *state, FILE *in, splt_code *error) { + splt_e_set_error_data(state, splt_t_get_filename_to_split(state)); + char flac_stream_marker[4] = { '\0' }; - fread(&flac_stream_marker, 1, 4, in); + if (fread(&flac_stream_marker, 1, 4, in) != 4) + { + goto invalid_error; + } if (flac_stream_marker[0] != 'f' || flac_stream_marker[1] != 'L' || flac_stream_marker[2] != 'a' || flac_stream_marker[3] != 'C') { - splt_e_set_error_data(state, splt_t_get_filename_to_split(state)); - *error = SPLT_ERROR_INVALID; - return; + goto invalid_error; } unsigned char is_last_block = 0; while (!is_last_block) { unsigned char metadata_block_flag_and_block_type; - fread(&metadata_block_flag_and_block_type, 1, 1, in); + if (fread(&metadata_block_flag_and_block_type, 1, 1, in) != 1) + { + goto invalid_error; + } is_last_block = metadata_block_flag_and_block_type >> 7; unsigned char block_type = metadata_block_flag_and_block_type & 0x7f; unsigned char block_length[3]; - fread(block_length, 1, 3, in); + if (fread(block_length, 1, 3, in) != 3) + { + goto invalid_error; + } FLAC__uint32 total_block_length = splt_flac_l_unpack_uint32(block_length, 3); splt_flac_mu_read_metadata_of_type(flacstate, state, block_type, total_block_length, in, error); if (*error < 0) { return; } } + + return; + +invalid_error: + *error = SPLT_ERROR_INVALID; } unsigned char *splt_flac_mu_build_metadata_header(unsigned char type, unsigned char is_last, diff -Nru libmp3splt-0.9.0/plugins/flac_metadata_utils.h libmp3splt-0.9.2/plugins/flac_metadata_utils.h --- libmp3splt-0.9.0/plugins/flac_metadata_utils.h 2013-04-20 16:06:35.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_metadata_utils.h 2014-05-10 14:37:59.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/flac_silence.c libmp3splt-0.9.2/plugins/flac_silence.c --- libmp3splt-0.9.0/plugins/flac_silence.c 2013-07-03 19:11:52.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_silence.c 2014-05-10 14:37:51.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ diff -Nru libmp3splt-0.9.0/plugins/flac_silence.h libmp3splt-0.9.2/plugins/flac_silence.h --- libmp3splt-0.9.0/plugins/flac_silence.h 2013-05-19 12:37:00.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_silence.h 2014-05-10 14:37:53.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/flac_tags.c libmp3splt-0.9.2/plugins/flac_tags.c --- libmp3splt-0.9.0/plugins/flac_tags.c 2013-04-22 22:14:36.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_tags.c 2014-05-10 14:39:13.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * @@ -125,21 +125,21 @@ int err = SPLT_OK; splt_tags *tags = flac_tags->original_tags; - if (strncmp(comment, "TITLE=", 6) == 0) + if (strncasecmp(comment, "TITLE=", 6) == 0) { err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_TITLE, comment + 6); if (err < 0) { *error = err; } return; } - if (strncmp(comment, "ALBUM=", 6) == 0) + if (strncasecmp(comment, "ALBUM=", 6) == 0) { err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_ALBUM, comment + 6); if (err < 0) { *error = err; } return; } - if (strncmp(comment, "TRACKNUMBER=", 12) == 0) + if (strncasecmp(comment, "TRACKNUMBER=", 12) == 0) { int track = atoi(comment + 12); err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_TRACK, &track); @@ -147,28 +147,28 @@ return; } - if (strncmp(comment, "ARTIST=", 7) == 0) + if (strncasecmp(comment, "ARTIST=", 7) == 0) { err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_ARTIST, comment + 7); if (err < 0) { *error = err; } return; } - /*if (strncmp(comment, "PERFORMER=", 10) == 0) + /*if (strncasecmp(comment, "PERFORMER=", 10) == 0) { err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_PERFORMER, comment + 10); if (err < 0) { *error = err; } return; }*/ - if (strncmp(comment, "GENRE=", 6) == 0) + if (strncasecmp(comment, "GENRE=", 6) == 0) { err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_GENRE, comment + 6); if (err < 0) { *error = err; } return; } - if (strncmp(comment, "DATE=", 5) == 0) + if (strncasecmp(comment, "DATE=", 5) == 0) { //TODO: different date formats err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_YEAR, comment + 5); @@ -176,7 +176,7 @@ return; } - if (strncmp(comment, "COMMENT=", 8) == 0) + if (strncasecmp(comment, "COMMENT=", 8) == 0) { err = splt_tu_set_field_on_tags(tags, SPLT_TAGS_COMMENT, comment + 8); if (err < 0) { *error = err; } diff -Nru libmp3splt-0.9.0/plugins/flac_tags.h libmp3splt-0.9.2/plugins/flac_tags.h --- libmp3splt-0.9.0/plugins/flac_tags.h 2013-04-21 22:29:32.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_tags.h 2014-05-10 14:39:16.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/flac_utils.c libmp3splt-0.9.2/plugins/flac_utils.c --- libmp3splt-0.9.0/plugins/flac_utils.c 2013-04-20 16:03:50.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_utils.c 2014-07-19 00:27:28.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * @@ -88,7 +88,7 @@ fr->remaining_bits--; - return (fr->last_byte & splt_flac_u_bit_access_table[fr->remaining_bits]) >> fr->remaining_bits; + return (fr->last_byte & splt_flac_u_bit_access_table[fr->remaining_bits + 1]) >> fr->remaining_bits; } static void splt_flac_u_append_input_buffer_to_output_buffer(splt_flac_frame_reader *fr, diff -Nru libmp3splt-0.9.0/plugins/flac_utils.h libmp3splt-0.9.2/plugins/flac_utils.h --- libmp3splt-0.9.0/plugins/flac_utils.h 2013-04-20 16:04:05.000000000 +0000 +++ libmp3splt-0.9.2/plugins/flac_utils.h 2014-05-10 14:38:44.000000000 +0000 @@ -2,7 +2,7 @@ * * libmp3splt flac plugin * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/from_flac_library.c libmp3splt-0.9.2/plugins/from_flac_library.c --- libmp3splt-0.9.0/plugins/from_flac_library.c 2013-04-21 21:48:05.000000000 +0000 +++ libmp3splt-0.9.2/plugins/from_flac_library.c 2014-05-10 14:38:59.000000000 +0000 @@ -31,7 +31,7 @@ * Alexandru Munteanu's note : copied from libflac and modified * File part of the libmp3splt flac plugin. * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net */ diff -Nru libmp3splt-0.9.0/plugins/from_flac_library.h libmp3splt-0.9.2/plugins/from_flac_library.h --- libmp3splt-0.9.0/plugins/from_flac_library.h 2013-04-20 16:03:09.000000000 +0000 +++ libmp3splt-0.9.2/plugins/from_flac_library.h 2014-05-10 14:39:02.000000000 +0000 @@ -31,7 +31,7 @@ * Alexandru Munteanu's note : copied from libflac and modified * File part of the libmp3splt flac plugin. * - * Copyright (c) 2013 Alexandru Munteanu - + * Copyright (c) 2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net */ diff -Nru libmp3splt-0.9.0/plugins/Makefile.am libmp3splt-0.9.2/plugins/Makefile.am --- libmp3splt-0.9.0/plugins/Makefile.am 2013-04-29 12:51:04.000000000 +0000 +++ libmp3splt-0.9.2/plugins/Makefile.am 2014-03-22 23:57:40.000000000 +0000 @@ -49,7 +49,7 @@ libsplt_flac_la_SOURCES = flac_frame_reader.c flac_frame_reader.h flac_utils.c flac_utils.h \ from_flac_library.c from_flac_library.h flac.c flac.h flac_metadata_utils.c flac_metadata_utils.h \ flac_metadata.c flac_metadata.h flac_tags.c flac_tags.h flac_silence.c flac_silence.h \ -silence_processors.c silence_processors.h +silence_processors.c silence_processors.h md5.c md5.h flac_md5_decoder.c flac_md5_decoder.h libsplt_flac_la_CPPFLAGS = $(common_CPPFLAGS) @FLAC_CFLAGS@ libsplt_flac_la_LDFLAGS = $(common_LDFLAGS) @FLAC_LIBS@ diff -Nru libmp3splt-0.9.0/plugins/Makefile.in libmp3splt-0.9.2/plugins/Makefile.in --- libmp3splt-0.9.0/plugins/Makefile.in 2013-07-20 07:09:21.000000000 +0000 +++ libmp3splt-0.9.2/plugins/Makefile.in 2014-11-09 16:48:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -144,7 +144,8 @@ from_flac_library.c from_flac_library.h flac.c flac.h \ flac_metadata_utils.c flac_metadata_utils.h flac_metadata.c \ flac_metadata.h flac_tags.c flac_tags.h flac_silence.c \ - flac_silence.h silence_processors.c silence_processors.h + flac_silence.h silence_processors.c silence_processors.h md5.c \ + md5.h flac_md5_decoder.c flac_md5_decoder.h @FLAC_PLUGIN_TRUE@am_libsplt_flac_la_OBJECTS = \ @FLAC_PLUGIN_TRUE@ libsplt_flac_la-flac_frame_reader.lo \ @FLAC_PLUGIN_TRUE@ libsplt_flac_la-flac_utils.lo \ @@ -154,7 +155,9 @@ @FLAC_PLUGIN_TRUE@ libsplt_flac_la-flac_metadata.lo \ @FLAC_PLUGIN_TRUE@ libsplt_flac_la-flac_tags.lo \ @FLAC_PLUGIN_TRUE@ libsplt_flac_la-flac_silence.lo \ -@FLAC_PLUGIN_TRUE@ libsplt_flac_la-silence_processors.lo +@FLAC_PLUGIN_TRUE@ libsplt_flac_la-silence_processors.lo \ +@FLAC_PLUGIN_TRUE@ libsplt_flac_la-md5.lo \ +@FLAC_PLUGIN_TRUE@ libsplt_flac_la-flac_md5_decoder.lo libsplt_flac_la_OBJECTS = $(am_libsplt_flac_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -452,7 +455,7 @@ @FLAC_PLUGIN_TRUE@libsplt_flac_la_SOURCES = flac_frame_reader.c flac_frame_reader.h flac_utils.c flac_utils.h \ @FLAC_PLUGIN_TRUE@from_flac_library.c from_flac_library.h flac.c flac.h flac_metadata_utils.c flac_metadata_utils.h \ @FLAC_PLUGIN_TRUE@flac_metadata.c flac_metadata.h flac_tags.c flac_tags.h flac_silence.c flac_silence.h \ -@FLAC_PLUGIN_TRUE@silence_processors.c silence_processors.h +@FLAC_PLUGIN_TRUE@silence_processors.c silence_processors.h md5.c md5.h flac_md5_decoder.c flac_md5_decoder.h @FLAC_PLUGIN_TRUE@libsplt_flac_la_CPPFLAGS = $(common_CPPFLAGS) @FLAC_CFLAGS@ @FLAC_PLUGIN_TRUE@libsplt_flac_la_LDFLAGS = $(common_LDFLAGS) @FLAC_LIBS@ @@ -543,12 +546,14 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac_frame_reader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac_md5_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac_metadata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac_metadata_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac_silence.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac_tags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-flac_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-from_flac_library.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_flac_la-silence_processors.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_mp3_la-mp3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplt_mp3_la-mp3_silence.Plo@am__quote@ @@ -565,14 +570,14 @@ @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -644,6 +649,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsplt_flac_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsplt_flac_la-silence_processors.lo `test -f 'silence_processors.c' || echo '$(srcdir)/'`silence_processors.c +libsplt_flac_la-md5.lo: md5.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsplt_flac_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsplt_flac_la-md5.lo -MD -MP -MF $(DEPDIR)/libsplt_flac_la-md5.Tpo -c -o libsplt_flac_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsplt_flac_la-md5.Tpo $(DEPDIR)/libsplt_flac_la-md5.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='md5.c' object='libsplt_flac_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsplt_flac_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsplt_flac_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c + +libsplt_flac_la-flac_md5_decoder.lo: flac_md5_decoder.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsplt_flac_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsplt_flac_la-flac_md5_decoder.lo -MD -MP -MF $(DEPDIR)/libsplt_flac_la-flac_md5_decoder.Tpo -c -o libsplt_flac_la-flac_md5_decoder.lo `test -f 'flac_md5_decoder.c' || echo '$(srcdir)/'`flac_md5_decoder.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsplt_flac_la-flac_md5_decoder.Tpo $(DEPDIR)/libsplt_flac_la-flac_md5_decoder.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='flac_md5_decoder.c' object='libsplt_flac_la-flac_md5_decoder.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsplt_flac_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsplt_flac_la-flac_md5_decoder.lo `test -f 'flac_md5_decoder.c' || echo '$(srcdir)/'`flac_md5_decoder.c + libsplt_mp3_la-mp3.lo: mp3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsplt_mp3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsplt_mp3_la-mp3.lo -MD -MP -MF $(DEPDIR)/libsplt_mp3_la-mp3.Tpo -c -o libsplt_mp3_la-mp3.lo `test -f 'mp3.c' || echo '$(srcdir)/'`mp3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsplt_mp3_la-mp3.Tpo $(DEPDIR)/libsplt_mp3_la-mp3.Plo diff -Nru libmp3splt-0.9.0/plugins/md5.c libmp3splt-0.9.2/plugins/md5.c --- libmp3splt-0.9.0/plugins/md5.c 1970-01-01 00:00:00.000000000 +0000 +++ libmp3splt-0.9.2/plugins/md5.c 2014-03-22 23:57:40.000000000 +0000 @@ -0,0 +1,296 @@ +/* + * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. + * MD5 Message-Digest Algorithm (RFC 1321). + * + * Homepage: + * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 + * + * Author: + * Alexander Peslyak, better known as Solar Designer + * + * This software was written by Alexander Peslyak in 2001. No copyright is + * claimed, and the software is hereby placed in the public domain. + * In case this attempt to disclaim copyright and place the software in the + * public domain is deemed null and void, then the software is + * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * (This is a heavily cut-down "BSD license".) + * + * This differs from Colin Plumb's older public domain implementation in that + * no exactly 32-bit integer data type is required (any 32-bit or wider + * unsigned integer data type will do), there's no compile-time endianness + * configuration, and the function prototypes match OpenSSL's. No code from + * Colin Plumb's implementation has been reused; this comment merely compares + * the properties of the two independent implementations. + * + * The primary goals of this implementation are portability and ease of use. + * It is meant to be fast, but not as fast as possible. Some known + * optimizations are not included to reduce source code size and avoid + * compile-time configuration. + */ + +#ifndef HAVE_OPENSSL + +#include + +#include "md5.h" + +/* + * The basic MD5 functions. + * + * F and G are optimized compared to their RFC 1321 definitions for + * architectures that lack an AND-NOT instruction, just like in Colin Plumb's + * implementation. + */ +#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) +#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y)))) +#define H(x, y, z) (((x) ^ (y)) ^ (z)) +#define H2(x, y, z) ((x) ^ ((y) ^ (z))) +#define I(x, y, z) ((y) ^ ((x) | ~(z))) + +/* + * The MD5 transformation for all four rounds. + */ +#define STEP(f, a, b, c, d, x, t, s) \ + (a) += f((b), (c), (d)) + (x) + (t); \ + (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \ + (a) += (b); + +/* + * SET reads 4 input bytes in little-endian byte order and stores them + * in a properly aligned word in host byte order. + * + * The check for little-endian architectures that tolerate unaligned + * memory accesses is just an optimization. Nothing will break if it + * doesn't work. + */ +#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) +#define SET(n) \ + (*(MD5_u32plus *)&ptr[(n) * 4]) +#define GET(n) \ + SET(n) +#else +#define SET(n) \ + (ctx->block[(n)] = \ + (MD5_u32plus)ptr[(n) * 4] | \ + ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \ + ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \ + ((MD5_u32plus)ptr[(n) * 4 + 3] << 24)) +#define GET(n) \ + (ctx->block[(n)]) +#endif + +/* + * This processes one or more 64-byte data blocks, but does NOT update + * the bit counters. There are no alignment requirements. + */ +static const void *body(MD5_CTX *ctx, const void *data, unsigned long size) +{ + const unsigned char *ptr; + MD5_u32plus a, b, c, d; + MD5_u32plus saved_a, saved_b, saved_c, saved_d; + + ptr = (const unsigned char *)data; + + a = ctx->a; + b = ctx->b; + c = ctx->c; + d = ctx->d; + + do { + saved_a = a; + saved_b = b; + saved_c = c; + saved_d = d; + +/* Round 1 */ + STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7) + STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12) + STEP(F, c, d, a, b, SET(2), 0x242070db, 17) + STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22) + STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7) + STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12) + STEP(F, c, d, a, b, SET(6), 0xa8304613, 17) + STEP(F, b, c, d, a, SET(7), 0xfd469501, 22) + STEP(F, a, b, c, d, SET(8), 0x698098d8, 7) + STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12) + STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17) + STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22) + STEP(F, a, b, c, d, SET(12), 0x6b901122, 7) + STEP(F, d, a, b, c, SET(13), 0xfd987193, 12) + STEP(F, c, d, a, b, SET(14), 0xa679438e, 17) + STEP(F, b, c, d, a, SET(15), 0x49b40821, 22) + +/* Round 2 */ + STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5) + STEP(G, d, a, b, c, GET(6), 0xc040b340, 9) + STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14) + STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20) + STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5) + STEP(G, d, a, b, c, GET(10), 0x02441453, 9) + STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14) + STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20) + STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5) + STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9) + STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14) + STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20) + STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5) + STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9) + STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14) + STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20) + +/* Round 3 */ + STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4) + STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11) + STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16) + STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23) + STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4) + STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11) + STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16) + STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23) + STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4) + STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11) + STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16) + STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23) + STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4) + STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11) + STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16) + STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23) + +/* Round 4 */ + STEP(I, a, b, c, d, GET(0), 0xf4292244, 6) + STEP(I, d, a, b, c, GET(7), 0x432aff97, 10) + STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15) + STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21) + STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6) + STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10) + STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15) + STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21) + STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6) + STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10) + STEP(I, c, d, a, b, GET(6), 0xa3014314, 15) + STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21) + STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6) + STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10) + STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15) + STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21) + + a += saved_a; + b += saved_b; + c += saved_c; + d += saved_d; + + ptr += 64; + } while (size -= 64); + + ctx->a = a; + ctx->b = b; + ctx->c = c; + ctx->d = d; + + return ptr; +} + +void MD5_Init(MD5_CTX *ctx) +{ + ctx->a = 0x67452301; + ctx->b = 0xefcdab89; + ctx->c = 0x98badcfe; + ctx->d = 0x10325476; + + ctx->lo = 0; + ctx->hi = 0; +} + +void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size) +{ + MD5_u32plus saved_lo; + unsigned long used, available; + + saved_lo = ctx->lo; + if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo) + ctx->hi++; + ctx->hi += size >> 29; + + used = saved_lo & 0x3f; + + if (used) { + available = 64 - used; + + if (size < available) { + memcpy(&ctx->buffer[used], data, size); + return; + } + + memcpy(&ctx->buffer[used], data, available); + data = (const unsigned char *)data + available; + size -= available; + body(ctx, ctx->buffer, 64); + } + + if (size >= 64) { + data = body(ctx, data, size & ~(unsigned long)0x3f); + size &= 0x3f; + } + + memcpy(ctx->buffer, data, size); +} + +void MD5_Final(unsigned char *result, MD5_CTX *ctx) +{ + unsigned long used, available; + + used = ctx->lo & 0x3f; + + ctx->buffer[used++] = 0x80; + + available = 64 - used; + + if (available < 8) { + memset(&ctx->buffer[used], 0, available); + body(ctx, ctx->buffer, 64); + used = 0; + available = 64; + } + + memset(&ctx->buffer[used], 0, available - 8); + + ctx->lo <<= 3; + ctx->buffer[56] = ctx->lo; + ctx->buffer[57] = ctx->lo >> 8; + ctx->buffer[58] = ctx->lo >> 16; + ctx->buffer[59] = ctx->lo >> 24; + ctx->buffer[60] = ctx->hi; + ctx->buffer[61] = ctx->hi >> 8; + ctx->buffer[62] = ctx->hi >> 16; + ctx->buffer[63] = ctx->hi >> 24; + + body(ctx, ctx->buffer, 64); + + result[0] = ctx->a; + result[1] = ctx->a >> 8; + result[2] = ctx->a >> 16; + result[3] = ctx->a >> 24; + result[4] = ctx->b; + result[5] = ctx->b >> 8; + result[6] = ctx->b >> 16; + result[7] = ctx->b >> 24; + result[8] = ctx->c; + result[9] = ctx->c >> 8; + result[10] = ctx->c >> 16; + result[11] = ctx->c >> 24; + result[12] = ctx->d; + result[13] = ctx->d >> 8; + result[14] = ctx->d >> 16; + result[15] = ctx->d >> 24; + + memset(ctx, 0, sizeof(*ctx)); +} + +#endif diff -Nru libmp3splt-0.9.0/plugins/md5.h libmp3splt-0.9.2/plugins/md5.h --- libmp3splt-0.9.0/plugins/md5.h 1970-01-01 00:00:00.000000000 +0000 +++ libmp3splt-0.9.2/plugins/md5.h 2014-03-22 23:57:40.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. + * MD5 Message-Digest Algorithm (RFC 1321). + * + * Homepage: + * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 + * + * Author: + * Alexander Peslyak, better known as Solar Designer + * + * This software was written by Alexander Peslyak in 2001. No copyright is + * claimed, and the software is hereby placed in the public domain. + * In case this attempt to disclaim copyright and place the software in the + * public domain is deemed null and void, then the software is + * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See md5.c for more information. + */ + +#ifdef HAVE_OPENSSL +#include +#elif !defined(_MD5_H) +#define _MD5_H + +/* Any 32-bit or wider unsigned integer data type will do */ +typedef unsigned int MD5_u32plus; + +typedef struct { + MD5_u32plus lo, hi; + MD5_u32plus a, b, c, d; + unsigned char buffer[64]; + MD5_u32plus block[16]; +} MD5_CTX; + +extern void MD5_Init(MD5_CTX *ctx); +extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size); +extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); + +#endif diff -Nru libmp3splt-0.9.0/plugins/mp3.c libmp3splt-0.9.2/plugins/mp3.c --- libmp3splt-0.9.0/plugins/mp3.c 2013-07-03 20:26:10.000000000 +0000 +++ libmp3splt-0.9.2/plugins/mp3.c 2014-10-13 23:48:08.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -29,6 +29,7 @@ */ #include "splt.h" +#include "cddb_cue_common.h" #include "mp3.h" #include "mp3_silence.h" @@ -238,19 +239,38 @@ static void splt_mp3_state_free(splt_state *state) { splt_mp3_state *mp3state = state->codec; + if (!mp3state) { return; } - if (mp3state) + if (mp3state->mp3file.xingbuffer) { - if (mp3state->mp3file.xingbuffer) - { - free(mp3state->mp3file.xingbuffer); - mp3state->mp3file.xingbuffer = NULL; - } + free(mp3state->mp3file.xingbuffer); + mp3state->mp3file.xingbuffer = NULL; + } - //we free the state - free(mp3state); - state->codec = NULL; + if (mp3state->new_xing_lame_frame) + { + free(mp3state->new_xing_lame_frame); + mp3state->new_xing_lame_frame = NULL; + mp3state->new_xing_lame_frame_size = 0; + } + + struct splt_reservoir *reservoir = &mp3state->reservoir; + if (reservoir->reservoir_frame != NULL) + { + free(reservoir->reservoir_frame); + reservoir->reservoir_frame = NULL; + reservoir->reservoir_frame_size = 0; } + + if (mp3state->overlapped_frames) { + free(mp3state->overlapped_frames); + mp3state->overlapped_frames = NULL; + mp3state->overlapped_frames_bytes = 0; + mp3state->overlapped_number_of_frames = 0; + } + + free(mp3state); + state->codec = NULL; } /****************************/ @@ -332,7 +352,7 @@ size_t id3v2_size = (size_t) (id3v2_end_offset + 10); rewind(file); - bytes = splt_io_fread(file, 1, id3v2_size); + bytes = splt_io_fread(file, id3v2_size); if (! bytes) { @@ -1192,9 +1212,18 @@ mp3state->file_input = file_input; mp3state->framemode = framemode; mp3state->headw = 0; + mp3state->first_frame_header_for_reservoir = 0; + mp3state->is_guessed_vbr = SPLT_FALSE; + mp3state->next_br_header_index = 0; + mp3state->number_of_br_headers_stored = 0; mp3state->mp3file.xing = 0; mp3state->mp3file.xing_offset = 0; mp3state->mp3file.xingbuffer = NULL; + mp3state->new_xing_lame_frame_size = 0; + mp3state->new_xing_lame_frame = NULL; + mp3state->overlapped_frames = NULL; + mp3state->overlapped_frames_bytes = 0; + mp3state->overlapped_number_of_frames = 0; //ignore flength error (ex for non seekable stdin) mp3state->mp3file.len = splt_io_get_file_length(state, file_input, filename, error); splt_t_set_total_time(state, 0); @@ -1203,6 +1232,9 @@ mp3state->buf_len = 0; mp3state->bytes = 0; + mp3state->begin_sample = SPLT_MP3_NO_END_SAMPLE; + mp3state->end_sample = SPLT_MP3_NO_END_SAMPLE; + //we initialise the mad structures splt_mp3_init_stream_frame(mp3state); mad_synth_init(&mp3state->synth); @@ -1232,7 +1264,7 @@ mad_stream_skip(&mp3state->stream, tag_size); } #else - splt_c_put_info_message_to_client(state, + splt_c_put_warning_message_to_client(state, _(" warning: lost sync and compiled without id3tag support - the split might be corrupt\n")); #endif } @@ -1303,16 +1335,14 @@ { mp3state->mp3file.xing = mp3state->data_len; - if ((mp3state->mp3file.xingbuffer = - malloc(mp3state->mp3file.xing))==NULL) + if ((mp3state->mp3file.xingbuffer = malloc(mp3state->mp3file.xing))==NULL) { *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; goto function_end; } - memcpy(mp3state->mp3file.xingbuffer, mp3state->data_ptr, - mp3state->mp3file.xing); - mp3state->mp3file.xing_offset = splt_mp3_xing_info_off(mp3state); + memcpy(mp3state->mp3file.xingbuffer, mp3state->data_ptr, mp3state->mp3file.xing); + splt_mp3_parse_xing_lame(mp3state); } splt_o_set_int_option(state, SPLT_OPT_FRAME_MODE, SPLT_TRUE); @@ -1355,22 +1385,23 @@ mp3state->mp3file.firsth = (off_t) (mp3state->bytes - len); splt_d_print_debug(state, "mp3 firsth bytes = %ld\n", mp3state->bytes); splt_d_print_debug(state, "mp3 firsth len = %ld\n", len); + mp3state->bytes = mp3state->mp3file.firsth; mp3state->headw = (unsigned long) ((mp3state->data_ptr[0] << 24) | (mp3state->data_ptr[1] << 16) | (mp3state->data_ptr[2] << 8) | (mp3state->data_ptr[3])); - mp3state->mp3file.mpgid = (int) ((mp3state->headw >> 19)&1); - mp3state->mp3file.layer = mp3state->frame.header.layer; + mp3state->mp3file.mpgid = (int) ((mp3state->headw >> 19) & 3); + mp3state->mp3file.layer = mp3state->frame.header.layer; mp3state->mp3file.freq = mp3state->frame.header.samplerate; - mp3state->mp3file.bitrate = mp3state->frame.header.bitrate/SPLT_MP3_BYTE; + mp3state->mp3file.bitrate = mp3state->frame.header.bitrate / SPLT_MP3_BYTE; mp3state->mp3file.firsthead = splt_mp3_makehead(mp3state->headw, mp3state->mp3file, mp3state->mp3file.firsthead, mp3state->mp3file.firsth); - mp3state->mp3file.fps = (float) (mp3state->mp3file.freq*(2-mp3state->mp3file.mpgid)); - mp3state->mp3file.fps /= SPLT_MP3_PCM; + mp3state->mp3file.samples_per_frame = splt_mp3_get_samples_per_frame(&mp3state->mp3file); + mp3state->mp3file.fps = (float) mp3state->mp3file.freq / (float) mp3state->mp3file.samples_per_frame; //we put the channels stuff (mono, stereo) switch(mp3state->frame.header.mode) @@ -1468,7 +1499,8 @@ char mpeg_infos[1024] = { '\0' }; snprintf(mpeg_infos, 1024, _(" info: MPEG %d Layer %d - %d Hz - %s"), - (2-mfile->mpgid), mfile->layer, mfile->freq, splt_mp3_chan[mfile->channels]); + splt_mp3_get_mpeg_as_int(mfile->mpgid), mfile->layer, mfile->freq, + splt_mp3_chan[mfile->channels]); char frame_mode_infos[256] = { '\0' }; if (mp3state->framemode) @@ -1613,23 +1645,60 @@ } #endif - if (mp3state->mp3file.xing != 0) + //error mode split must only contain original file data + if (splt_o_get_int_option(state, SPLT_OPT_XING) && split_mode != SPLT_OPTION_ERROR_MODE) { - if (splt_o_get_int_option(state, SPLT_OPT_XING)) + void *xing_lame_frame = mp3state->new_xing_lame_frame; + int xing_size = mp3state->new_xing_lame_frame_size; + + if (mp3state->mp3file.xing > 0) + { + xing_lame_frame = mp3state->mp3file.xingbuffer; + xing_size = mp3state->mp3file.xing; + } + + if (xing_lame_frame) { - //error mode split must only contain original file data - if (state->options.split_mode != SPLT_OPTION_ERROR_MODE) + if (splt_io_fwrite(state, xing_lame_frame, 1, xing_size, file_output) < xing_size) { - if (splt_io_fwrite(state, mp3state->mp3file.xingbuffer, 1, - mp3state->mp3file.xing, file_output) < mp3state->mp3file.xing) - { - splt_e_set_error_data(state, output_fname); - error = SPLT_ERROR_CANT_WRITE_TO_OUTPUT_FILE; - goto function_end; - } + splt_e_set_error_data(state, output_fname); + error = SPLT_ERROR_CANT_WRITE_TO_OUTPUT_FILE; + goto function_end; } } } + + struct splt_reservoir *reservoir = &mp3state->reservoir; + if (reservoir->reservoir_frame != NULL) + { + size_t size = reservoir->reservoir_frame_size; + if (splt_io_fwrite(state, reservoir->reservoir_frame, 1, size, file_output) < size) + { + splt_e_set_error_data(state, output_fname); + error = SPLT_ERROR_CANT_WRITE_TO_OUTPUT_FILE; + goto function_end; + } + + free(reservoir->reservoir_frame); + reservoir->reservoir_frame = NULL; + reservoir->reservoir_frame_size = 0; + } + + if (mp3state->overlapped_frames != NULL) + { + size_t size = mp3state->overlapped_frames_bytes; + if (splt_io_fwrite(state, mp3state->overlapped_frames, 1, size, file_output) < size) + { + splt_e_set_error_data(state, output_fname); + error = SPLT_ERROR_CANT_WRITE_TO_OUTPUT_FILE; + goto function_end; + } + + free(mp3state->overlapped_frames); + mp3state->overlapped_frames = NULL; + mp3state->overlapped_frames_bytes = 0; + mp3state->overlapped_number_of_frames = 0; + } if (write_first_frame) { @@ -1694,8 +1763,7 @@ } else { - if (splt_o_get_int_option(state, SPLT_OPT_SPLIT_MODE) - == SPLT_OPTION_TIME_MODE) + if (splt_o_get_int_option(state, SPLT_OPT_SPLIT_MODE) == SPLT_OPTION_TIME_MODE) { temp_end = end; //for the last split @@ -1778,7 +1846,7 @@ */ static double splt_mp3_split(const char *output_fname, splt_state *state, - double fbegin_sec, double fend_sec, int *error, int save_end_point) + double fbegin_sec, double fend_sec, splt_code *error, int save_end_point) { splt_d_print_debug(state,"Mp3 split...\n"); splt_d_print_debug(state,"Output filename is _%s_\n", output_fname); @@ -2200,11 +2268,13 @@ { splt_d_print_debug(state,"Starting seekable mp3 frame mode...\n"); - unsigned long fbegin, fend, adjust; - fbegin = fend = adjust = 0; - //prefer to split a bit before the start than loosing some frame - //so we don't 'ceilf' - fbegin = fbegin_sec * mp3state->mp3file.fps; + unsigned long fbegin, fend = 0, adjust = 0; + + /*fprintf(stdout, "fbegin_sec = %f\n", fbegin_sec); + fflush(stdout);*/ + + fbegin = splt_mp3_find_begin_frame(fbegin_sec, mp3state, state, error); + if (*error < 0) { goto bloc_end2; } if (fend_sec_is_not_eof) { @@ -2234,13 +2304,14 @@ adjust = 0; } } - //prefer to split a bit after the end than loosing some frame - //before the end - fend = (unsigned long) ceilf(fend_sec * mp3state->mp3file.fps); + + fend = splt_mp3_find_end_frame(fend_sec, mp3state, state); } else { fend = 0xFFFFFFFF; + mp3state->end_sample = -1; + mp3state->last_frame_inclusive = -1; } splt_d_print_debug(state,"Finding begin...\n"); @@ -2263,6 +2334,17 @@ begin = mp3state->end_non_zero; } + long bit_reservoir_last_frame = + ((mp3state->begin_sample + mp3state->mp3file.lame_delay + SPLT_MP3_MIN_OVERLAP_SAMPLES_END) + / mp3state->mp3file.samples_per_frame); + //make sure to push forward begin frame when bit reservoir mode, + //because previous overlapped frames will be copied after + if (splt_mp3_handle_bit_reservoir(state) && fbegin > 0) + { + long diff = (bit_reservoir_last_frame - mp3state->first_frame_inclusive) + 1; + fbegin += diff + 1; + } + // Finds begin by counting frames while (mp3state->frames < fbegin) { @@ -2280,6 +2362,7 @@ } mp3state->h = splt_mp3_makehead(mp3state->headw, mp3state->mp3file, mp3state->h, begin); + splt_mp3_read_process_side_info_main_data_begin(mp3state, begin); mp3state->frames++; //if we have adjust mode, then put only 25% @@ -2297,6 +2380,11 @@ 0,SPLT_DEFAULT_PROGRESS_RATE); } } + + if (splt_mp3_handle_bit_reservoir(state)) + { + splt_mp3_get_overlapped_frames(bit_reservoir_last_frame, mp3state, state, error); + } } else { @@ -2304,6 +2392,13 @@ fbegin = mp3state->fend; } + /*fprintf(stdout, "fbegin = %ld\n", fbegin); + fprintf(stdout, "fend = %ld\n", fend); + fflush(stdout);*/ + + splt_mp3_extract_reservoir_and_build_reservoir_frame(mp3state, state, error); + if (*error < 0) { goto bloc_end2; } + splt_d_print_debug(state,"Begin is _%ld_\n", begin); if (mp3state->mp3file.len > 0) @@ -2318,10 +2413,20 @@ splt_c_put_progress_text(state,SPLT_PROGRESS_PREPARE); long int frames_begin = mp3state->frames; + + mp3state->first_frame_header_for_reservoir = 0; + mp3state->is_guessed_vbr = SPLT_FALSE; + + int frames_counter = 0; + int first_bitrate = 0; + // Finds end by counting frames while (mp3state->frames <= fend) { + frames_counter++; + mp3state->frames++; + end = splt_mp3_findhead(mp3state, mp3state->h.ptr + mp3state->h.framesize); if (end == -1) { @@ -2342,6 +2447,20 @@ } mp3state->h = splt_mp3_makehead (mp3state->headw, mp3state->mp3file, mp3state->h, end); + splt_mp3_read_process_side_info_main_data_begin(mp3state, end); + + if (frames_counter > 1) + { + if (!mp3state->first_frame_header_for_reservoir) + { + mp3state->first_frame_header_for_reservoir = (unsigned) mp3state->headw; + first_bitrate = mp3state->h.bitrate; + } + else if (mp3state->h.bitrate != first_bitrate) + { + mp3state->is_guessed_vbr = SPLT_TRUE; + } + } //if we have a progress callback function //time split only calculates the end of the @@ -2410,6 +2529,9 @@ else { adjust = (unsigned long) (adjustoption * mp3state->mp3file.fps); + + *error = splt_u_process_no_auto_adjust_found(state, fend_sec + adjustoption); + if (*error < 0) { goto bloc_end2; } } fend += adjust; @@ -2427,33 +2549,16 @@ splt_mp3_save_end_point(state, mp3state, save_end_point, end, fend); - //if xing, we get xing - if (mp3state->mp3file.xing > 0) - { - unsigned long headw = (unsigned long) (mp3state->frames - fbegin + 1); // Frames - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+4] = (headw >> 24) & 0xFF; - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+5] = (headw >> 16) & 0xFF; - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+6] = (headw >> 8) & 0xFF; - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+7] = headw & 0xFF; - - //put the length of the file if end is -1 - if (end == -1) - { - end = mp3state->mp3file.len; - } - - headw = (unsigned long) (end - begin + mp3state->mp3file.xing); // Bytes - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+8] = (headw >> 24) & 0xFF; - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+9] = (headw >> 16) & 0xFF; - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+10] = (headw >> 8) & 0xFF; - mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+11] = headw & 0xFF; - } + splt_mp3_build_xing_lame_frame(mp3state, begin, end, fbegin, error, state); + if (*error < 0) { goto bloc_end2; } } else //if not framemode { splt_d_print_debug(state,"Starting mp3 seekable non frame mode...\n"); + int mpeg_index = splt_mp3_get_mpeg_as_int(mp3state->mp3file.mpgid) != 1; + long first_frame_offset = mp3state->inputBuffer + mp3state->buf_len - mp3state->data_ptr; //find begin point if the last 'end' not saved @@ -2476,7 +2581,8 @@ *error = SPLT_ERROR_BEGIN_OUT_OF_FILE; goto bloc_end2; } - if (splt_mp3_tabsel_123[1 - mp3state->mp3file.mpgid][mp3state->mp3file.layer-1][splt_mp3_c_bitrate(mp3state->headw)] != + + if (splt_mp3_tabsel_123[mpeg_index][mp3state->mp3file.layer-1][splt_mp3_c_bitrate(mp3state->headw)] != mp3state->mp3file.firsthead.bitrate) { check_bitrate = 1; @@ -2498,7 +2604,8 @@ //take the whole last frame : might result in more frames //but if we don't do it, we might have less frames end = splt_mp3_findvalidhead(mp3state, end); - if (splt_mp3_tabsel_123[1 - mp3state->mp3file.mpgid][mp3state->mp3file.layer-1][splt_mp3_c_bitrate(mp3state->headw)] != + + if (splt_mp3_tabsel_123[mpeg_index][mp3state->mp3file.layer-1][splt_mp3_c_bitrate(mp3state->headw)] != mp3state->mp3file.firsthead.bitrate) check_bitrate = 1; } @@ -2511,8 +2618,7 @@ } //seekable real split - int err = splt_mp3_simple_split(state, output_fname, begin, end, - SPLT_TRUE, write_first_frame); + int err = splt_mp3_simple_split(state, output_fname, begin, end, SPLT_TRUE, write_first_frame); if (err < 0) { *error = err; } if (!save_end_point) @@ -2656,6 +2762,7 @@ mp3state->h = splt_mp3_makehead (mp3state->headw, mp3state->mp3file, mp3state->h, offset); + splt_mp3_read_process_side_info_main_data_begin(mp3state, offset); if (splt_t_split_is_canceled(state)) { @@ -3335,7 +3442,7 @@ char *filename = splt_t_get_filename_to_split(state); if (filename[1] == '\0') { - splt_c_put_info_message_to_client(state, + splt_c_put_warning_message_to_client(state, _(" warning: stdin '-' is supposed to be mp3 stream.\n")); } } @@ -3499,6 +3606,97 @@ #endif } +void splt_pl_import_internal_sheets(splt_state *state, splt_code *error) +{ +#ifndef NO_ID3TAG + char *input_filename = splt_t_get_filename_to_split(state); + splt_mp3_get_original_tags(input_filename, state, error); + if (*error < 0) { return; } + + tag_bytes_and_size *bytes_and_size = (tag_bytes_and_size *) splt_tu_get_original_tags_data(state); + if (bytes_and_size == NULL) { return; } + if (bytes_and_size->tag_bytes == NULL) { return; } + + struct id3_tag *id3tag = + id3_tag_parse(bytes_and_size->tag_bytes, bytes_and_size->tag_length); + if (!id3tag) { goto end; } + + struct id3_frame *frame = NULL; + int counter = 0; + int number_of_splitpoints = 0; + + long previous_end_time = -1; + int index = 0; + while ((frame = id3_tag_findframe(id3tag, "CHAP", counter))) + { + union id3_field *field = id3_frame_field(frame, 0); + if (field->type != ID3_FIELD_TYPE_BINARYDATA) { counter++; continue; } + + id3_byte_t *data = field->binary.data; + id3_length_t length = field->binary.length; + id3_length_t remaining_length = length; + + //skip element id + id3_byte_t *ptr = data; + while (*ptr != '\0' && remaining_length > 0) + { + ptr++; + remaining_length--; + } + + ptr++; + unsigned start_time_in_millis = (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3]; + ptr++; ptr++; ptr++; ptr++; + unsigned end_time_in_millins = (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3]; + + long start_time_hundr = (start_time_in_millis / 10); + if (start_time_hundr < previous_end_time) + { + splt_c_put_warning_message_to_client(state, + _(" warning: overlapped chapters are not yet supported.\n")); + *error = SPLT_PLUGIN_ERROR_UNSUPPORTED_FEATURE; + goto end; + } + + if (start_time_hundr == previous_end_time && index > 0) + { + splt_sp_set_splitpoint_type(state, index - 1, SPLT_SPLITPOINT); + } + else { + splt_sp_append_splitpoint(state, start_time_hundr, NULL, SPLT_SPLITPOINT); + number_of_splitpoints++; + } + + long end_time_hundr = (end_time_in_millins / 10); + splt_sp_append_splitpoint(state, end_time_hundr, NULL, SPLT_SKIPPOINT); + number_of_splitpoints++; + + previous_end_time = (long) end_time_hundr; + + counter++; + index += 2; + } + + splt_tags *original_tags = splt_tu_get_original_tags_tags(state); + int track_number = number_of_splitpoints - 1; + splt_cc_put_filenames_from_tags(state, track_number, error, original_tags, SPLT_FALSE, + SPLT_TRUE); + +end: + if (id3tag) + { + id3_tag_delete(id3tag); + } + if (bytes_and_size) + { + splt_mp3_free_bytes_and_size(bytes_and_size); + free(bytes_and_size); + } +#else + *error = SPLT_PLUGIN_ERROR_UNSUPPORTED_FEATURE; +#endif +} + #ifndef NO_ID3TAG static void splt_mp3_free_bytes_and_size(tag_bytes_and_size *bytes_and_size) { diff -Nru libmp3splt-0.9.0/plugins/mp3.h libmp3splt-0.9.2/plugins/mp3.h --- libmp3splt-0.9.0/plugins/mp3.h 2013-02-08 09:22:27.000000000 +0000 +++ libmp3splt-0.9.2/plugins/mp3.h 2014-10-07 23:42:15.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -54,6 +54,8 @@ #define SPLT_MAD_BSIZE 4032 +#define SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS 30 + #ifndef NO_ID3TAG typedef struct { id3_byte_t *tag_bytes; @@ -67,34 +69,52 @@ } tag_bytes_and_size; #endif -// Struct that will contain header's useful infos struct splt_header { - off_t ptr; // Offset of header + off_t ptr; // offset of header int bitrate; int padding; int framesize; + + int has_crc; + int sideinfo_size; + + //info from the side info for layer 3 + int main_data_begin; + int frame_data_space; +}; + +struct splt_reservoir { + unsigned char reservoir[511]; + int reservoir_end; + unsigned char *reservoir_frame; + unsigned int reservoir_frame_size; }; // Struct that will contains infos on mp3 and an header struct of first valid header struct splt_mp3 { - int mpgid; // 0 or 1 - int layer; // mpg1, mpg2, or mpg3 - int channels; + int mpgid; // mpgid among SPLT_MP3_MPEG1_ID or SPLT_MP3_MPEG2_ID or SPLT_MP3_MPEG25_ID + int layer; // layer 1, 2 or 3 //0 = single channel //1 = dual channel //2 = joint stereo //3 = stereo //4 = other - //frequency + int channels; int freq; - //bitrate int bitrate; - //frames per second float fps; + int samples_per_frame; //used for the xing header int xing; char *xingbuffer; off_t xing_offset; + int xing_content_size; + int xing_has_frames; + int xing_has_bytes; + int xing_has_toc; + int xing_has_quality; + int lame_delay; + int lame_padding; //length of the mp3 file off_t len; //where we begin reading @@ -118,9 +138,29 @@ int first; unsigned long headw; + unsigned first_frame_header_for_reservoir; + int is_guessed_vbr; + //see the mp3 structure struct splt_mp3 mp3file; + //for byte reservoir + struct splt_header br_headers[SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS]; + int next_br_header_index; + int number_of_br_headers_stored; + struct splt_reservoir reservoir; + long begin_sample; + long end_sample; + long first_frame_inclusive; + long last_frame_inclusive; + + long overlapped_number_of_frames; + unsigned char *overlapped_frames; + size_t overlapped_frames_bytes; + + int new_xing_lame_frame_size; + unsigned char *new_xing_lame_frame; + //used internally, libmad structures struct mad_stream stream; struct mad_frame frame; @@ -154,14 +194,34 @@ */ #define SPLT_MP3_TAG "TAG" -#define SPLT_MP3_PCM 1152 + +#define SPLT_MP3_LAYER1_SAMPLES_PER_FRAME 384 +#define SPLT_MP3_LAYER3_MPEG1_AND_LAYER2_SAMPLES_PER_FRAME 1152 +#define SPLT_MP3_LAYER3_MPEG2_SAMPLES_PER_FRAME 576 + +#define SPLT_MP3_NO_END_SAMPLE -10000 +#define SPLT_MP3_MIN_OVERLAP_SAMPLES_START SPLT_MP3_LAYER3_MPEG2_SAMPLES_PER_FRAME +#define SPLT_MP3_MIN_OVERLAP_SAMPLES_END SPLT_MP3_LAYER3_MPEG1_AND_LAYER2_SAMPLES_PER_FRAME + #define SPLT_MP3_BYTE 8 +#define SPLT_MP3_MPEG1_ID 3 +#define SPLT_MP3_MPEG2_ID 2 +#define SPLT_MP3_MPEG25_ID 0 + #define SPLT_MP3_XING_MAGIC 0x58696E67 #define SPLT_MP3_INFO_MAGIC 0x496E666F -#define SPLT_MP3_XING_FRAMES 0x00000001L -#define SPLT_MP3_XING_BYTES 0x00000002L +#define SPLT_MP3_XING_FRAMES 0x00000001L +#define SPLT_MP3_XING_BYTES 0x00000002L +#define SPLT_MP3_XING_TOC 0x00000004L +#define SPLT_MP3_XING_QUALITY 0x00000008L + +#define SPLT_MP3_XING_FLAGS_SIZE 4 + +#define SPLT_MP3_LAME_DELAY_OFFSET 21 +#define SPLT_MP3_LAME_MAX_DELAY 4095 +#define SPLT_MP3_LAME_MAX_PADDING 4095 #define SPLT_MP3_ID3_ARTIST 1 #define SPLT_MP3_ID3_ALBUM 2 diff -Nru libmp3splt-0.9.0/plugins/mp3_silence.c libmp3splt-0.9.2/plugins/mp3_silence.c --- libmp3splt-0.9.0/plugins/mp3_silence.c 2013-05-01 12:37:43.000000000 +0000 +++ libmp3splt-0.9.2/plugins/mp3_silence.c 2014-05-10 14:37:43.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ diff -Nru libmp3splt-0.9.0/plugins/mp3_silence.h libmp3splt-0.9.2/plugins/mp3_silence.h --- libmp3splt-0.9.0/plugins/mp3_silence.h 2013-04-29 12:43:13.000000000 +0000 +++ libmp3splt-0.9.2/plugins/mp3_silence.h 2014-05-10 14:37:47.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/mp3_utils.c libmp3splt-0.9.2/plugins/mp3_utils.c --- libmp3splt-0.9.0/plugins/mp3_utils.c 2013-02-08 09:22:26.000000000 +0000 +++ libmp3splt-0.9.2/plugins/mp3_utils.c 2014-10-16 23:41:33.000000000 +0000 @@ -3,7 +3,17 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net + * + * Bit reservoir fix heavily inspired from pcutmp3. + * It worth reminding that: + * pcutmp3 was created by Sebastian Gesemann + * pcutmp3 source code is here + * http://wiki.themixingbowl.org/Pcutmp3 + * pcutmp3 is licensed as BSD + * quoting the author from source: http://www.hydrogenaudio.org/forums/index.php?showtopic=35654&pid=569128&mode=threaded&start=100#entry569128 + * "Let's say BSD. :)" + * See below for the pcutmp3 license * *********************************************************/ @@ -24,6 +34,35 @@ * USA. *********************************************************/ +/********************************************************** + * Reminder of the pcutmp3 license: + * + * Pcutmp3 Copyright (c) 2005, Sebastian Gesemann + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted + * provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of conditions + * and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions + * and the following disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * 3. Neither the name of the Sebastian Gesemann nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************/ + #include "mp3_utils.h" //! Initializes a stream frame @@ -73,19 +112,907 @@ return ((head>>12)&0xf); } -//!make mp3 header bitrate, padding, offset, framesize struct splt_header splt_mp3_makehead(unsigned long headword, struct splt_mp3 mp3f, struct splt_header head, off_t ptr) { head.ptr = ptr; - head.bitrate = splt_mp3_tabsel_123[1 - mp3f.mpgid][mp3f.layer-1][splt_mp3_c_bitrate(headword)]; - head.padding = ((headword>>9)&0x1); - head.framesize = (head.bitrate*144000)/ - (mp3f.freq<<(1 - mp3f.mpgid)) + head.padding; + + int mpeg_index = splt_mp3_get_mpeg_as_int(mp3f.mpgid) != 1; + head.bitrate = splt_mp3_tabsel_123[mpeg_index][mp3f.layer-1][splt_mp3_c_bitrate(headword)]; + head.padding = ((headword >> 9) & 0x1); + + int is_mpeg1 = mp3f.mpgid == SPLT_MP3_MPEG1_ID; + + if (mp3f.layer == MAD_LAYER_I) + head.framesize = (head.bitrate * 12000 / mp3f.freq + head.padding) * 4; + else if (is_mpeg1 || (mp3f.layer != MAD_LAYER_III)) + head.framesize = head.bitrate * 144000 / mp3f.freq + head.padding; + else + head.framesize = head.bitrate * 72000 / mp3f.freq + head.padding; + + head.has_crc = ! ((headword >> 16) & 0x1); + + if (mp3f.layer == 3) + { + int is_mono = ((headword >> 6 & 3) == 3); // 3 = mono + if (is_mpeg1) + head.sideinfo_size = is_mono ? 17 : 32; + else + head.sideinfo_size = is_mono ? 9 : 17; + } + else + { + head.sideinfo_size = 0; + } + + //4 is the header size + head.frame_data_space = head.framesize - head.sideinfo_size - 4; return head; } +static void splt_mp3_store_header(splt_mp3_state *mp3state) +{ + struct splt_header *h = &mp3state->br_headers[mp3state->next_br_header_index]; + h->ptr = mp3state->h.ptr; + h->bitrate = mp3state->h.bitrate; + h->padding = mp3state->h.padding; + h->framesize = mp3state->h.framesize; + h->has_crc = mp3state->h.has_crc; + h->sideinfo_size = mp3state->h.sideinfo_size; + h->main_data_begin = mp3state->h.main_data_begin; + h->frame_data_space = mp3state->h.frame_data_space; + + mp3state->next_br_header_index++; + + if (mp3state->number_of_br_headers_stored < SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS) + { + mp3state->number_of_br_headers_stored++; + } + + if (mp3state->next_br_header_index >= SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS) + { + mp3state->next_br_header_index = 0; + } +} + +void splt_mp3_read_process_side_info_main_data_begin(splt_mp3_state *mp3state, off_t offset) +{ + //side info is only for layer 3 + if (mp3state->mp3file.layer != 3) { return; } + + //skip crc + if (mp3state->h.has_crc) + { + fgetc(mp3state->file_input); + fgetc(mp3state->file_input); + } + + unsigned int main_data_begin = 0; + main_data_begin = (unsigned int) fgetc(mp3state->file_input); + //main_data_begin has 9 bits in MPEG1 and 8 in MPEG2 + if (mp3state->mp3file.mpgid == SPLT_MP3_MPEG1_ID) + { + main_data_begin <<= 8; + main_data_begin |= fgetc(mp3state->file_input); + main_data_begin >>= 7; + } + + mp3state->h.main_data_begin = (int) main_data_begin; + + /*fprintf(stdout, "frame size = %d\t sideinfo_size = %d\t main_data_begin = %d\t frame data space = %d\n", + mp3state->h.framesize, mp3state->h.sideinfo_size, mp3state->h.main_data_begin, + mp3state->h.frame_data_space); + fflush(stdout);*/ + + splt_mp3_store_header(mp3state); +} + +static void splt_mp3_update_existing_xing(splt_mp3_state *mp3state, unsigned long frames, + unsigned long bytes) +{ + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+4] = (frames >> 24) & 0xFF; + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+5] = (frames >> 16) & 0xFF; + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+6] = (frames >> 8) & 0xFF; + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+7] = frames & 0xFF; + + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+8] = (bytes >> 24) & 0xFF; + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+9] = (bytes >> 16) & 0xFF; + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+10] = (bytes >> 8) & 0xFF; + mp3state->mp3file.xingbuffer[mp3state->mp3file.xing_offset+11] = bytes & 0xFF; +} + +static int splt_mp3_xing_content_size(splt_mp3_state *mp3state) +{ + struct splt_mp3 *mp3file = &mp3state->mp3file; + + unsigned long xing_flags = + (unsigned long) ((mp3file->xingbuffer[mp3file->xing_offset] << 24) | + (mp3file->xingbuffer[mp3file->xing_offset + 1] << 16) | + (mp3file->xingbuffer[mp3file->xing_offset + 2] << 8) | + (mp3file->xingbuffer[mp3file->xing_offset + 3])); + + int xing_content_size = 0; + if (xing_flags & SPLT_MP3_XING_FRAMES) + { + xing_content_size += 4; + mp3file->xing_has_frames = SPLT_TRUE; + } + if (xing_flags & SPLT_MP3_XING_BYTES) + { + xing_content_size += 4; + mp3file->xing_has_bytes = SPLT_TRUE; + } + if (xing_flags & SPLT_MP3_XING_TOC) + { + xing_content_size += 100; + mp3file->xing_has_toc = SPLT_TRUE; + } + if (xing_flags & SPLT_MP3_XING_QUALITY) + { + xing_content_size += 4; + mp3file->xing_has_quality = SPLT_TRUE; + } + + return xing_content_size; +} + +static int splt_mp3_xing_frame_has_lame(splt_mp3_state *mp3state) +{ + struct splt_mp3 mp3file = mp3state->mp3file; + + off_t end_xing_offset = + mp3file.xing_offset + mp3file.xing_content_size + SPLT_MP3_XING_FLAGS_SIZE; + + //4 for the LAME characters + if (mp3state->mp3file.xing <= end_xing_offset + 4) + { + return SPLT_FALSE; + } + + if (mp3file.xingbuffer[end_xing_offset] == 'L' && + mp3file.xingbuffer[end_xing_offset + 1] == 'A' && + mp3file.xingbuffer[end_xing_offset + 2] == 'M' && + mp3file.xingbuffer[end_xing_offset + 3] == 'E') + { + return SPLT_TRUE; + } + + return SPLT_FALSE; +} + +static off_t splt_mp3_get_delay_offset(splt_mp3_state *mp3state) +{ + off_t end_xing_offset = + mp3state->mp3file.xing_offset + mp3state->mp3file.xing_content_size + SPLT_MP3_XING_FLAGS_SIZE; + return end_xing_offset + SPLT_MP3_LAME_DELAY_OFFSET; +} + +static int splt_mp3_xing_info_off(splt_mp3_state *mp3state) +{ + unsigned long headw = 0; + int i; + + for (i=0; imp3file.xing; i++) + { + if ((headw == SPLT_MP3_XING_MAGIC) || + (headw == SPLT_MP3_INFO_MAGIC)) // "Xing" or "Info" + { + return i; + } + headw <<= 8; + headw |= mp3state->mp3file.xingbuffer[i]; + } + + return 0; +} + +int splt_mp3_get_samples_per_frame(struct splt_mp3 *mp3file) +{ + if (mp3file->layer == MAD_LAYER_I) + { + return SPLT_MP3_LAYER1_SAMPLES_PER_FRAME; + } + + if (mp3file->layer == MAD_LAYER_II) + { + return SPLT_MP3_LAYER3_MPEG1_AND_LAYER2_SAMPLES_PER_FRAME; + } + + if (mp3file->mpgid == SPLT_MP3_MPEG1_ID) + { + return SPLT_MP3_LAYER3_MPEG1_AND_LAYER2_SAMPLES_PER_FRAME; + } + + return SPLT_MP3_LAYER3_MPEG2_SAMPLES_PER_FRAME; +} + +int splt_mp3_handle_bit_reservoir(splt_state *state) +{ + int with_bit_reservoir = splt_o_get_int_option(state, SPLT_OPT_HANDLE_BIT_RESERVOIR); + long overlap_time = splt_o_get_long_option(state, SPLT_OPT_OVERLAP_TIME); + int with_auto_adjust = splt_o_get_int_option(state, SPLT_OPT_AUTO_ADJUST); + int input_not_seekable = splt_o_get_int_option(state, SPLT_OPT_INPUT_NOT_SEEKABLE); + + int supported_split_mode = SPLT_TRUE; + int split_mode = splt_o_get_int_option(state, SPLT_OPT_SPLIT_MODE); + if ((split_mode == SPLT_OPTION_SILENCE_MODE) || (split_mode == SPLT_OPTION_TRIM_SILENCE_MODE)) + { + supported_split_mode = SPLT_FALSE; + } + + int with_xing = splt_o_get_int_option(state, SPLT_OPT_XING); + int with_frame_mode = splt_o_get_int_option(state, SPLT_OPT_FRAME_MODE); + + int handle_bit_reservoir = with_bit_reservoir && + overlap_time == 0 && !with_auto_adjust && !input_not_seekable && + supported_split_mode && with_xing && with_frame_mode; + + return handle_bit_reservoir; +} + +int splt_mp3_get_mpeg_as_int(int mpgid) +{ + if (mpgid == SPLT_MP3_MPEG1_ID) { return 1; } + if (mpgid == SPLT_MP3_MPEG2_ID) { return 2; } + return 25; +} + +void splt_mp3_parse_xing_lame(splt_mp3_state *mp3state) +{ + mp3state->mp3file.xing_offset = splt_mp3_xing_info_off(mp3state); + mp3state->mp3file.xing_content_size = splt_mp3_xing_content_size(mp3state); + + if (!splt_mp3_xing_frame_has_lame(mp3state)) + { + mp3state->mp3file.lame_delay = -1; + mp3state->mp3file.lame_padding = -1; + return; + } + + off_t delay_offset = splt_mp3_get_delay_offset(mp3state); + char *delay_padding_ptr = &mp3state->mp3file.xingbuffer[delay_offset]; + + int first = (int) *delay_padding_ptr; + int middle = (int) *(delay_padding_ptr + 1); + int last = (int) *(delay_padding_ptr + 2); + + mp3state->mp3file.lame_delay = ((first & 0xFF) << 4) | (middle >> 4); + mp3state->mp3file.lame_padding = ((middle & 0xF) << 8) | (last & 0xFF); +} + +static unsigned char *splt_mp3_create_new_xing_lame_frame(splt_mp3_state *mp3state, splt_state *state, + int *frame_size, int *xing_offset, int *end_xing_offset, splt_code *error) +{ + unsigned long frame_header = mp3state->first_frame_header_for_reservoir | 0x00010000; //disable crc + int frame_header_created = SPLT_FALSE; + + struct splt_header first_frame_header; + first_frame_header = + splt_mp3_makehead(frame_header, mp3state->mp3file, first_frame_header, 0); + + struct splt_header h; + + int i = 1; + for (; i < 15; i++) { + unsigned long new_frame_header = ((unsigned long) frame_header & 0xFFFF0FFF) | (i << 12); + + h = splt_mp3_makehead(new_frame_header, mp3state->mp3file, h, 0); + if (h.framesize < 0xC0) { continue; } + + if (first_frame_header.bitrate == h.bitrate) + { + frame_header_created = SPLT_TRUE; + frame_header = new_frame_header; + break; + } + } + + if (!frame_header_created) + { + splt_d_print_debug(state,"Failed to create xing lame frame for bitrate %d \n", + first_frame_header.bitrate); + + *error = SPLT_ERROR_FAILED_BITRESERVOIR; + splt_e_set_error_data(state, "failed to create xing lame frame"); + return NULL; + } + + *frame_size = h.framesize; + + unsigned char *frame = malloc(sizeof(unsigned char) * h.framesize); + if (frame == NULL) + { + *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + return NULL; + } + + frame[0] = (unsigned char) (frame_header >> 24); + frame[1] = (unsigned char) (frame_header >> 16); + frame[2] = (unsigned char) (frame_header >> 8); + frame[3] = (unsigned char) frame_header; + + int j = 4; + for (; j < h.framesize;j++) { frame[j] = 0x0; } + + int xing_tag_offset = 4 + h.sideinfo_size; + + if (mp3state->is_guessed_vbr) + { + frame[xing_tag_offset++] = 'X'; + frame[xing_tag_offset++] = 'i'; + frame[xing_tag_offset++] = 'n'; + frame[xing_tag_offset++] = 'g'; + } + else + { + frame[xing_tag_offset++] = 'I'; + frame[xing_tag_offset++] = 'n'; + frame[xing_tag_offset++] = 'f'; + frame[xing_tag_offset++] = 'o'; + } + + *xing_offset = xing_tag_offset; + + frame[xing_tag_offset++] = 0; + frame[xing_tag_offset++] = 0; + frame[xing_tag_offset++] = 0; + frame[xing_tag_offset++] = 0x0F; + //0x0F = SPLT_MP3_XING_FRAMES | SPLT_MP3_XING_BYTES | SPLT_MP3_XING_TOC | SPLT_MP3_XING_QUALITY + + xing_tag_offset += (100 + 4 + 4 + 4); + + *end_xing_offset = xing_tag_offset; + + frame[xing_tag_offset++] = 'L'; + frame[xing_tag_offset++] = 'A'; + frame[xing_tag_offset++] = 'M'; + frame[xing_tag_offset++] = 'E'; + + frame[xing_tag_offset++] = '3'; + frame[xing_tag_offset++] = '.'; + frame[xing_tag_offset++] = '9'; + frame[xing_tag_offset++] = '4'; + + return frame; +} + +static void splt_mp3_update_delay_and_padding_on_lame_frame(splt_mp3_state *mp3state, + char *delay_padding_ptr, short reservoir_frame, unsigned long *frames) +{ + int delay = mp3state->mp3file.lame_delay; + int padding = mp3state->mp3file.lame_padding; + + delay += (mp3state->begin_sample - + mp3state->first_frame_inclusive * mp3state->mp3file.samples_per_frame); + + long number_of_frames = 0; + long last_frame = mp3state->last_frame_inclusive; + + if (last_frame == -1 || last_frame > mp3state->frames) + { + last_frame = mp3state->frames - 1; + } + + if (last_frame != mp3state->first_frame_inclusive) + { + number_of_frames = last_frame - mp3state->first_frame_inclusive + 1; + } + *frames = number_of_frames; + + /*fprintf(stdout, "last frame = %ld\n", last_frame); + fprintf(stdout, "first frame = %ld\n", mp3state->first_frame_inclusive); + fflush(stdout);*/ + + long number_of_samples = number_of_frames * mp3state->mp3file.samples_per_frame; + long number_of_samples_to_play = mp3state->end_sample - mp3state->begin_sample; + + padding = number_of_samples - number_of_samples_to_play - delay; + + if (reservoir_frame) + { + delay += mp3state->mp3file.samples_per_frame; + *frames = *frames + 1; + } + + if (delay > SPLT_MP3_LAME_MAX_DELAY) { delay = SPLT_MP3_LAME_MAX_DELAY; } + if (padding > SPLT_MP3_LAME_MAX_PADDING) { padding = SPLT_MP3_LAME_MAX_PADDING; } + if (delay < 0) { delay = 0; } + if (padding < 0) { padding = 0; } + + *delay_padding_ptr = (char) (delay >> 4); + *(delay_padding_ptr + 1) = (char) (delay & 0xF) << 4 | (padding >> 8); + *(delay_padding_ptr + 2) = (char) padding; +} + +void splt_mp3_build_xing_lame_frame(splt_mp3_state *mp3state, off_t begin, off_t end, + unsigned long fbegin, splt_code *error, splt_state *state) +{ + short reservoir_frame = 0; + short reservoir_bytes = 0; + if (mp3state->reservoir.reservoir_frame != NULL) + { + reservoir_frame = 1; + reservoir_bytes = mp3state->reservoir.reservoir_frame_size; + } + + if (end == -1) { end = mp3state->mp3file.len; } + + unsigned long frames = (unsigned long) mp3state->frames - fbegin; + unsigned long bytes = (unsigned long) (end - begin + reservoir_bytes + mp3state->overlapped_frames_bytes); + + if (!splt_mp3_handle_bit_reservoir(state)) + { + bytes += mp3state->mp3file.xing; + + if (mp3state->mp3file.xing > 0) + { + splt_mp3_update_existing_xing(mp3state, frames, bytes); + } + + return; + } + + if (mp3state->mp3file.xing <= 0) + { + int xing_offset = 0; + int end_xing_offset = 0; + int frame_size = 0; + unsigned char *frame = splt_mp3_create_new_xing_lame_frame(mp3state, state, &frame_size, + &xing_offset, &end_xing_offset, error); + if (*error < 0) { return; } + + char *delay_padding_ptr = (char *) &frame[end_xing_offset + SPLT_MP3_LAME_DELAY_OFFSET]; + splt_mp3_update_delay_and_padding_on_lame_frame(mp3state, delay_padding_ptr, reservoir_frame, &frames); + + frame[xing_offset + 4] = (frames >> 24) & 0xFF; + frame[xing_offset + 5] = (frames >> 16) & 0xFF; + frame[xing_offset + 6] = (frames >> 8) & 0xFF; + frame[xing_offset + 7] = frames & 0xFF; + + bytes += frame_size; + + frame[xing_offset + 8] = (bytes >> 24) & 0xFF; + frame[xing_offset + 9] = (bytes >> 16) & 0xFF; + frame[xing_offset + 10] = (bytes >> 8) & 0xFF; + frame[xing_offset + 11] = bytes & 0xFF; + + if (mp3state->new_xing_lame_frame) + { + free(mp3state->new_xing_lame_frame); + } + + mp3state->new_xing_lame_frame_size = frame_size; + mp3state->new_xing_lame_frame = frame; + + return; + } + + if (splt_mp3_xing_frame_has_lame(mp3state)) + { + bytes += mp3state->mp3file.xing; + + char *delay_padding_ptr = &mp3state->mp3file.xingbuffer[splt_mp3_get_delay_offset(mp3state)]; + splt_mp3_update_delay_and_padding_on_lame_frame(mp3state, delay_padding_ptr, reservoir_frame, &frames); + splt_mp3_update_existing_xing(mp3state, frames, bytes); + return; + } + + if (mp3state->mp3file.xing > 0) + { + *error = SPLT_ERROR_FAILED_BITRESERVOIR; + splt_e_set_error_data(state, "input files with Xing frame without LAME not yet supported"); + } + + //TODO2: update lame crc16 +} + +static int splt_mp3_current_br_header_index(splt_mp3_state *mp3state) +{ + int current_header_index = mp3state->next_br_header_index - 1; + if (current_header_index < 0) + { + current_header_index = SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS - 1; + } + + return current_header_index; +} + +static int splt_mp3_previous_br_header_index(splt_mp3_state *mp3state, int current_header_index) +{ + int header_index = current_header_index - 1; + if (header_index < 0) + { + header_index = SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS - 1; + } + + return header_index; +} + +static void splt_mp3_back_br_header_index(splt_mp3_state *mp3state) +{ + mp3state->next_br_header_index--; + if (mp3state->next_br_header_index < 0) + { + mp3state->next_br_header_index = SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS - 1; + } +} + +void splt_mp3_get_overlapped_frames(long last_frame, splt_mp3_state *mp3state, + splt_state *state, splt_code *error) +{ + if (last_frame <= 0) { return; } + + long number_of_frames_to_be_overlapped = last_frame - mp3state->first_frame_inclusive + 1; + + /*fprintf(stdout, "frames to be overlapped = %ld\n", number_of_frames_to_be_overlapped); + fflush(stdout);*/ + + int current_header_index = splt_mp3_current_br_header_index(mp3state); + mp3state->overlapped_frames_bytes = 0; + + int index = 0; + off_t frame_offsets[SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS] = { 0 }; + int frame_sizes[SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS] = { 0 }; + + int i = 0; + for (;i < number_of_frames_to_be_overlapped; i++) + { + current_header_index = splt_mp3_previous_br_header_index(mp3state, current_header_index); + + mp3state->overlapped_frames_bytes += mp3state->br_headers[current_header_index].framesize; + frame_offsets[index] = mp3state->br_headers[current_header_index].ptr; + frame_sizes[index] = mp3state->br_headers[current_header_index].framesize; + index++; + mp3state->overlapped_number_of_frames++; + } + + off_t previous_position = ftello(mp3state->file_input); + + if (mp3state->overlapped_frames) { + free(mp3state->overlapped_frames); + } + mp3state->overlapped_frames = malloc(sizeof(unsigned char) * mp3state->overlapped_frames_bytes); + if (mp3state->overlapped_frames == NULL) + { + *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + return; + } + + long current_index_in_frames = 0; + for (i = index - 1;i >= 0; i--) + { + off_t frame_offset = frame_offsets[i]; + + if (fseeko(mp3state->file_input, frame_offset, SEEK_SET) == -1) + { + splt_e_set_strerror_msg_with_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_SEEKING_FILE; + return; + } + + int frame_size = frame_sizes[i]; + unsigned char *frame = splt_io_fread(mp3state->file_input, frame_size); + if (!frame) + { + splt_e_clean_strerror_msg(state); + splt_e_set_error_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_WHILE_READING_FILE; + return; + } + + memcpy(mp3state->overlapped_frames + current_index_in_frames, frame, frame_size); + current_index_in_frames += frame_size; + free(frame); + + splt_mp3_back_br_header_index(mp3state); + } + + if (fseeko(mp3state->file_input, previous_position, SEEK_SET) == -1) + { + splt_e_set_strerror_msg_with_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_SEEKING_FILE; + return; + } + + /*fprintf(stdout, "overlapped frames bytes follows:\n"); + int j = 0; + for (j = 0;j < mp3state->overlapped_frames_bytes;j++) + { + fprintf(stdout, "%02x ", mp3state->overlapped_frames[j]); + fflush(stdout); + } + fprintf(stdout, "\n"); + fflush(stdout);*/ +} + +unsigned long splt_mp3_find_begin_frame(double fbegin_sec, splt_mp3_state *mp3state, + splt_state *state, splt_code *error) +{ + unsigned long without_bit_reservoir_begin_frame = + (unsigned long) (fbegin_sec * mp3state->mp3file.fps); + + if (!splt_mp3_handle_bit_reservoir(state)) + { + return without_bit_reservoir_begin_frame; + } + + /*fprintf(stdout, "fbegin sec = %ld\n", fbegin_sec); + fflush(stdout);*/ + + long begin_sample = (long) rint((double) fbegin_sec * (double) mp3state->mp3file.freq); + mp3state->begin_sample = begin_sample; + + long first_frame_inclusive = (long) + ((begin_sample + mp3state->mp3file.lame_delay - SPLT_MP3_MIN_OVERLAP_SAMPLES_START) + / mp3state->mp3file.samples_per_frame); + if (first_frame_inclusive < 0) { first_frame_inclusive = 0; } + + /*fprintf(stdout, "begin_sample = %ld\n", begin_sample); + fprintf(stdout, "first frame inclusive = %ld\n", first_frame_inclusive); + fflush(stdout);*/ + + mp3state->first_frame_inclusive = first_frame_inclusive; + + long last_frame = mp3state->last_frame_inclusive; + splt_mp3_get_overlapped_frames(last_frame, mp3state, state, error); + if (*error < 0) { return 0; } + + return (unsigned long) first_frame_inclusive; +} + +unsigned long splt_mp3_find_end_frame(double fend_sec, splt_mp3_state *mp3state, + splt_state *state) +{ + if (!splt_mp3_handle_bit_reservoir(state)) + { + //prefer to split a bit after the end than loosing some frame + //before the end + return (unsigned long) ceilf(fend_sec * mp3state->mp3file.fps); + } + + long end_sample = (long) rint((double) fend_sec * (double) mp3state->mp3file.freq); + if (end_sample < 0) { end_sample = 0; } + mp3state->end_sample = end_sample; + + long last_frame_inclusive = (long) + ((end_sample + mp3state->mp3file.lame_delay + SPLT_MP3_MIN_OVERLAP_SAMPLES_END) + / mp3state->mp3file.samples_per_frame); + + mp3state->last_frame_inclusive = last_frame_inclusive; + + /*fprintf(stdout, "samples_per_frame = %d\n", mp3state->mp3file.samples_per_frame); + fprintf(stdout, "lame_delay = %d\n", mp3state->mp3file.lame_delay); + fprintf(stdout, "end_sample = %ld\n", end_sample); + fprintf(stdout, "computed end frame = %ld\n", last_frame_inclusive + 1); + fflush(stdout);*/ + + return (unsigned long) (last_frame_inclusive + 1); +} + +static void splt_mp3_extract_reservoir_main_data_bytes(splt_mp3_state *mp3state, splt_state *state, splt_code *error) +{ + //reservoir is only for layer 3 + if (mp3state->mp3file.layer != 3) { return; } + + int number_of_headers_stored = mp3state->number_of_br_headers_stored; + + int current_header_index = splt_mp3_current_br_header_index(mp3state); + struct splt_header *h = &mp3state->br_headers[current_header_index]; + int back_pointer = h->main_data_begin; + + /*fprintf(stdout, "back pointer = %d\n", back_pointer); + fflush(stdout);*/ + + if (back_pointer > 511) + { + splt_e_set_error_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_INVALID; + return; + } + + off_t previous_position = ftello(mp3state->file_input); + + unsigned char **data_from_frames = malloc(sizeof(unsigned char *) * SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS); + int *bytes_to_copy = malloc(sizeof(int *) * SPLT_MP3_MAX_BYTE_RESERVOIR_HEADERS); + if (data_from_frames == NULL || bytes_to_copy == NULL) + { + *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + return; + } + + int is_first_file = splt_t_get_current_split_file_number(state) == 1; + + int number_of_frames = 0; + while (back_pointer > 0) + { + current_header_index = splt_mp3_previous_br_header_index(mp3state, current_header_index); + number_of_headers_stored--; + + //this might happend for the first file, but we don't care for the first file + //(for example when splitting starting at ~7 hundreths of seconds - at frame number ~2) + if ((number_of_headers_stored < 0) && !is_first_file) + { + splt_e_set_error_data(state, "Bit reservoir number of headers stored is negative !"); + *error = SPLT_ERROR_INVALID_CODE; + goto end; + } + + h = &mp3state->br_headers[current_header_index]; + + if (h->frame_data_space == 0) { continue; } + + unsigned int number_of_bytes_to_copy = h->frame_data_space; + if (back_pointer < h->frame_data_space) + { + number_of_bytes_to_copy = back_pointer; + } + + off_t frame_main_data_offset = h->ptr + h->sideinfo_size + 4; + if (number_of_bytes_to_copy < h->frame_data_space) + { + frame_main_data_offset += h->frame_data_space - number_of_bytes_to_copy; + } + + /*fprintf(stdout, "Copying %d bytes into reservoir\n", number_of_bytes_to_copy); + fflush(stdout);*/ + + if (fseeko(mp3state->file_input, frame_main_data_offset, SEEK_SET) == -1) + { + splt_e_set_strerror_msg_with_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_SEEKING_FILE; + goto end; + } + + unsigned char *data_from_frame = splt_io_fread(mp3state->file_input, number_of_bytes_to_copy); + if (data_from_frame) + { + /*unsigned int it = 0; + for (;it < number_of_bytes_to_copy;it++) + { + fprintf(stdout, "%02x ", data_from_frame[it]); + } + fprintf(stdout, "\n"); + fflush(stdout);*/ + + data_from_frames[number_of_frames] = data_from_frame; + bytes_to_copy[number_of_frames] = number_of_bytes_to_copy; + number_of_frames++; + } + else + { + splt_e_clean_strerror_msg(state); + splt_e_set_error_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_WHILE_READING_FILE; + goto end; + } + + back_pointer -= number_of_bytes_to_copy; + } + + struct splt_reservoir *res = &mp3state->reservoir; + res->reservoir_end = 0; + + number_of_frames--; + for (;number_of_frames >= 0; number_of_frames--) + { + unsigned char *data_from_frame = data_from_frames[number_of_frames]; + int number_of_bytes_to_copy = bytes_to_copy[number_of_frames]; + + memcpy(res->reservoir + res->reservoir_end, data_from_frame, number_of_bytes_to_copy); + res->reservoir_end += number_of_bytes_to_copy; + free(data_from_frame); + } + + /*unsigned int index = 0; + fprintf(stdout, "reservoir= _"); + for (;index < res->reservoir_end;index++) + { + fprintf(stdout, "%02x ", res->reservoir[index]); + } + fprintf(stdout, "_\n"); + fflush(stdout);*/ + + if (res->reservoir_end > 0) + { + if (fseeko(mp3state->file_input, previous_position, SEEK_SET) == -1) + { + splt_e_set_strerror_msg_with_data(state, splt_t_get_filename_to_split(state)); + *error = SPLT_ERROR_SEEKING_FILE; + } + } + +end: + free(bytes_to_copy); + free(data_from_frames); +} + +static void splt_mp3_build_reservoir_frame(splt_mp3_state *mp3state, splt_state *state, splt_code *error) +{ + struct splt_reservoir *res = &mp3state->reservoir; + + if (res->reservoir_end == 0) + { + if (res->reservoir_frame) { free(res->reservoir_frame); } + res->reservoir_frame = NULL; + res->reservoir_frame_size = 0; + return; + } + + unsigned long first_frame_header = mp3state->headw; + first_frame_header |= 0x00010000; //set protection bit to 1 in order to turn off CRC + + int bytes_in_main_data = res->reservoir_end + 4; //keep 4 extra bytes + + int bitrate_mask = 1; + for (;bitrate_mask <= 14; bitrate_mask++) + { + unsigned long header = (first_frame_header & 0xFFFF0FFF) + (bitrate_mask << 12); + struct splt_header h; + h = splt_mp3_makehead(header, mp3state->mp3file, h, 0); + + if (h.frame_data_space < bytes_in_main_data) + { + continue; + } + + unsigned char *frame = malloc(sizeof(unsigned char) * h.framesize); + if (frame == NULL) + { + *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + return; + } + + frame[0] = (unsigned char) (header >> 24); + frame[1] = (unsigned char) (header >> 16); + frame[2] = (unsigned char) (header >> 8); + frame[3] = (unsigned char) header; + + int i = 4; + for (; i < 4 + h.sideinfo_size;i++) { frame[i] = 0x0; } + for (; i < h.framesize;i++) { frame[i] = 0x78; } + + memcpy(frame + h.framesize - res->reservoir_end, res->reservoir, res->reservoir_end); + + if (res->reservoir_frame) { free(res->reservoir_frame); } + res->reservoir_frame = frame; + res->reservoir_frame_size = h.framesize; + + return; + } +} + +void splt_mp3_extract_reservoir_and_build_reservoir_frame(splt_mp3_state *mp3state, + splt_state *state, splt_code *error) +{ + if (!splt_mp3_handle_bit_reservoir(state)) + { + return; + } + + splt_mp3_extract_reservoir_main_data_bytes(mp3state, state, error); + if (*error < 0) { return; } + + splt_mp3_build_reservoir_frame(mp3state, state, error); + + struct splt_reservoir *reservoir = &mp3state->reservoir; + if (reservoir->reservoir_frame == NULL) + { + /*fprintf(stdout, "reservoir frame follows : NO reservoir frame\n"); + fflush(stdout);*/ + return; + } + + /*fprintf(stdout, "reservoir frame follows : _ "); + int i = 0; + for (i = 0;i < reservoir->reservoir_frame_size; i++) + { + fprintf(stdout, "%02x ", reservoir->reservoir_frame[i]); + } + fprintf(stdout, "_\n"); + fflush(stdout);*/ +} + //!finds first header from start_pos. Returns -1 if no header is found off_t splt_mp3_findhead(splt_mp3_state *mp3state, off_t start) { @@ -133,26 +1060,6 @@ return start; } -//!finds xing info offset and returns it? -int splt_mp3_xing_info_off(splt_mp3_state *mp3state) -{ - unsigned long headw = 0; - int i; - - for (i=0; imp3file.xing; i++) - { - if ((headw == SPLT_MP3_XING_MAGIC) || - (headw == SPLT_MP3_INFO_MAGIC)) // "Xing" or "Info" - { - return i; - } - headw <<= 8; - headw |= mp3state->mp3file.xingbuffer[i]; - } - - return 0; -} - /*! Get a frame \return negative value means: error diff -Nru libmp3splt-0.9.0/plugins/mp3_utils.h libmp3splt-0.9.2/plugins/mp3_utils.h --- libmp3splt-0.9.0/plugins/mp3_utils.h 2013-02-08 09:22:28.000000000 +0000 +++ libmp3splt-0.9.2/plugins/mp3_utils.h 2014-10-11 23:58:22.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -36,7 +36,25 @@ struct splt_mp3 mp3f, struct splt_header head, off_t ptr); off_t splt_mp3_findhead(splt_mp3_state *mp3state, off_t start); off_t splt_mp3_findvalidhead(splt_mp3_state *mp3state, off_t start); -int splt_mp3_xing_info_off(splt_mp3_state *mp3state); int splt_mp3_get_frame(splt_mp3_state *mp3state); int splt_mp3_get_valid_frame(splt_state *state, int *error); +void splt_mp3_read_process_side_info_main_data_begin(splt_mp3_state *mp3state, off_t offset); +void splt_mp3_extract_reservoir_and_build_reservoir_frame(splt_mp3_state *mp3state, + splt_state *state, splt_code *error); +void splt_mp3_build_xing_lame_frame(splt_mp3_state *mp3state, off_t begin, off_t end, + unsigned long fbegin, splt_code *error, splt_state *state); + +int splt_mp3_get_mpeg_as_int(int mpgid); +int splt_mp3_get_samples_per_frame(struct splt_mp3 *mp3file); +void splt_mp3_parse_xing_lame(splt_mp3_state *mp3state); + +unsigned long splt_mp3_find_begin_frame(double fbegin_sec, splt_mp3_state *mp3state, + splt_state *state, splt_code *error); +unsigned long splt_mp3_find_end_frame(double fend_sec, splt_mp3_state *mp3state, + splt_state *state); + +void splt_mp3_get_overlapped_frames(long last_frame, splt_mp3_state *mp3state, + splt_state *state, splt_code *error); +int splt_mp3_handle_bit_reservoir(splt_state *state); + diff -Nru libmp3splt-0.9.0/plugins/ogg.c libmp3splt-0.9.2/plugins/ogg.c --- libmp3splt-0.9.0/plugins/ogg.c 2013-07-01 20:19:57.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg.c 2014-05-10 14:38:10.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * Large parts of this files have been copied from the 'vcut' 1.6 * program provided with 'vorbis-tools' : @@ -793,7 +793,7 @@ static int splt_ogg_find_end_cutpoint(splt_state *state, ogg_stream_state *stream, FILE *in, FILE *f, ogg_int64_t cutpoint, int adjust, float threshold, float min_length, int shots, int *error, const char *output_fname, int save_end_point, - double *sec_split_time_length) + double *sec_split_time_length, double sec_end) { splt_c_put_progress_text(state, SPLT_PROGRESS_CREATE); @@ -1046,6 +1046,9 @@ else { cutpoint = (cutpoint + (adjust * oggstate->vi->rate)); + + *error = splt_u_process_no_auto_adjust_found(state, sec_end + adjust); + if (*error < 0) { goto error; } } if (first_cut_granpos == 0 && oggstate->first_granpos != 0) @@ -1335,7 +1338,7 @@ double sec_split_time_length = sec_end - sec_begin; splt_ogg_find_end_cutpoint(state, &stream_out, oggstate->in, oggstate->out, cutpoint, adjust, threshold, min_length, shots, error, output_fname, - save_end_point, &sec_split_time_length); + save_end_point, &sec_split_time_length, sec_end); sec_end_time = sec_begin + sec_split_time_length; end: diff -Nru libmp3splt-0.9.0/plugins/ogg.h libmp3splt-0.9.2/plugins/ogg.h --- libmp3splt-0.9.0/plugins/ogg.h 2013-02-18 22:37:33.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg.h 2014-05-10 14:38:14.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/plugins/ogg_new_stream_handler.c libmp3splt-0.9.2/plugins/ogg_new_stream_handler.c --- libmp3splt-0.9.0/plugins/ogg_new_stream_handler.c 2013-02-08 09:22:26.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg_new_stream_handler.c 2014-05-10 14:38:37.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * Parts of this file have been copied from the 'vcut' 1.6 * program provided with 'vorbis-tools' : diff -Nru libmp3splt-0.9.0/plugins/ogg_new_stream_handler.h libmp3splt-0.9.2/plugins/ogg_new_stream_handler.h --- libmp3splt-0.9.0/plugins/ogg_new_stream_handler.h 2013-02-08 09:22:28.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg_new_stream_handler.h 2014-05-10 14:38:39.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * Parts of this file have been copied from the 'vcut' 1.6 * program provided with 'vorbis-tools' : diff -Nru libmp3splt-0.9.0/plugins/ogg_silence.c libmp3splt-0.9.2/plugins/ogg_silence.c --- libmp3splt-0.9.0/plugins/ogg_silence.c 2013-07-01 19:31:11.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg_silence.c 2014-05-10 14:37:35.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * Parts of this file have been copied from the 'vcut' 1.6 * program provided with 'vorbis-tools' : diff -Nru libmp3splt-0.9.0/plugins/ogg_silence.h libmp3splt-0.9.2/plugins/ogg_silence.h --- libmp3splt-0.9.0/plugins/ogg_silence.h 2013-02-08 09:22:28.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg_silence.h 2014-05-10 14:37:38.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * Parts of this file have been copied from the 'vcut' 1.6 * program provided with 'vorbis-tools' : diff -Nru libmp3splt-0.9.0/plugins/ogg_utils.c libmp3splt-0.9.2/plugins/ogg_utils.c --- libmp3splt-0.9.0/plugins/ogg_utils.c 2013-02-08 09:22:27.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg_utils.c 2014-05-10 14:38:18.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * Parts of this file have been copied from the 'vcut' 1.6 * program provided with 'vorbis-tools' : diff -Nru libmp3splt-0.9.0/plugins/ogg_utils.h libmp3splt-0.9.2/plugins/ogg_utils.h --- libmp3splt-0.9.0/plugins/ogg_utils.h 2013-02-08 09:22:29.000000000 +0000 +++ libmp3splt-0.9.2/plugins/ogg_utils.h 2014-05-10 14:38:21.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * Parts of this file have been copied from the 'vcut' 1.6 * program provided with 'vorbis-tools' : diff -Nru libmp3splt-0.9.0/plugins/silence_processors.c libmp3splt-0.9.2/plugins/silence_processors.c --- libmp3splt-0.9.0/plugins/silence_processors.c 2013-07-03 19:26:59.000000000 +0000 +++ libmp3splt-0.9.2/plugins/silence_processors.c 2014-05-10 14:39:18.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ diff -Nru libmp3splt-0.9.0/plugins/silence_processors.h libmp3splt-0.9.2/plugins/silence_processors.h --- libmp3splt-0.9.0/plugins/silence_processors.h 2013-02-08 09:22:29.000000000 +0000 +++ libmp3splt-0.9.2/plugins/silence_processors.h 2014-05-10 14:39:21.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ Binary files /tmp/tmp0o_obT/w4ysScQLiU/libmp3splt-0.9.0/po/cs.gmo and /tmp/tmp0o_obT/FqzkI4ohTj/libmp3splt-0.9.2/po/cs.gmo differ diff -Nru libmp3splt-0.9.0/po/cs.po libmp3splt-0.9.2/po/cs.po --- libmp3splt-0.9.0/po/cs.po 2013-07-20 06:58:38.000000000 +0000 +++ libmp3splt-0.9.2/po/cs.po 2014-11-09 15:04:23.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: mp3splt-gtk\n" "Report-Msgid-Bugs-To: m@ioalex.net\n" -"POT-Creation-Date: 2013-07-20 08:58+0200\n" +"POT-Creation-Date: 2014-11-09 16:04+0100\n" "PO-Revision-Date: 2013-04-29 08:36+0000\n" "Last-Translator: Peter Pall \n" "Language-Team: LANGUAGE \n" @@ -34,12 +34,12 @@ "\n" " Umělec: %s\n" -#: src/cue.c:513 +#: src/cue.c:518 #, c-format msgid " reading informations from CUE file %s ...\n" msgstr " Čtou se informace ze souboru CUE %s …\n" -#: src/cue.c:587 src/cddb.c:133 +#: src/cue.c:592 src/cddb.c:133 #, c-format msgid "" " Tracks: %d\n" @@ -48,7 +48,7 @@ " Skladby: %d\n" "\n" -#: src/cue.c:810 +#: src/cue.c:815 #, c-format msgid " CUE file '%s' created.\n" msgstr " Byl vytvořen soubor CUE »%s«.\n" @@ -182,270 +182,319 @@ msgstr " Chyba freedb: nelze odpojit od hostitele (%s)" #: src/errors.c:261 +msgid " internal sheet error: no internal sheet or invalid sheet" +msgstr "" + +#: src/errors.c:264 +msgid " internal sheet error: internal sheet type not supported" +msgstr "" + +#: src/errors.c:268 msgid " wrap split ok" msgstr " rozdělení na zalomení OK" -#: src/errors.c:264 +#: src/errors.c:271 msgid " wrap error: incorrect file length" msgstr " Chyba zalomení: Nesprávná délka souboru" -#: src/errors.c:267 +#: src/errors.c:274 msgid " wrap error: libmp3splt version too old for this wrap file" msgstr "" " Chyba zalomení: Verze libmp3splt je pro tento soubor se zalomením příliš " "stará" -#: src/errors.c:270 +#: src/errors.c:277 msgid " wrap error: no file found or bad index" msgstr " Chyba zalomení: Nenalezen žádný soubor nebo špatný index" -#: src/errors.c:273 +#: src/errors.c:280 #, c-format msgid " wrap error: file '%s' damaged or incomplete" msgstr " Chyba zalomení: Soubor '%s' poškozen nebo neúplný" -#: src/errors.c:277 +#: src/errors.c:284 msgid " wrap error: maybe not a wrapped file or wrap file damaged" msgstr "" " Chyba zalomení: Možná to není zalomený soubor nebo je soubor se zalomením " "poškozen" -#: src/errors.c:280 +#: src/errors.c:287 msgid " file split (EOF)" msgstr " Rozdělení souboru (EOF)" -#: src/errors.c:282 +#: src/errors.c:289 msgid " no silence splitpoints found" msgstr " Nenalezeny žádné body rozdělení na tichu" -#: src/errors.c:284 +#: src/errors.c:291 msgid " time split ok" msgstr " Časové rozdělení OK" -#: src/errors.c:286 +#: src/errors.c:293 msgid " split in equal tracks ok" msgstr " Rozdělení na skladby se stejnou délkou OK" -#: src/errors.c:288 +#: src/errors.c:295 msgid " silence split ok" msgstr " Rozdělení na tichu OK" -#: src/errors.c:290 +#: src/errors.c:297 msgid " trim using silence split ok" msgstr " Zastřižení pomocí rozdělení ticha OK" -#: src/errors.c:293 +#: src/errors.c:300 msgid " file split, splitpoints bigger than length" msgstr " Rozdělení souboru, body rozdělení větší než délka" -#: src/errors.c:295 +#: src/errors.c:302 msgid " file split" msgstr " Rozdělení souboru" -#: src/errors.c:299 +#: src/errors.c:306 msgid " error: not enough splitpoints (<2)" msgstr " Chyba: Není dost bodů rozdělení (<2)" -#: src/errors.c:302 +#: src/errors.c:309 #, c-format msgid " error: cannot open file '%s': %s" msgstr " Chyba: Nelze otevřít soubor '%s': %s" -#: src/errors.c:306 +#: src/errors.c:313 #, c-format msgid " error: cannot close file '%s': %s" msgstr " Chyba: Nelze zavřít soubor '%s': %s" -#: src/errors.c:313 +#: src/errors.c:320 #, c-format msgid " error: invalid input file '%s' for '%s' plugin" msgstr " Chyba: Neplatný vstupní soubor '%s' pro přídavný modul '%s'" -#: src/errors.c:317 +#: src/errors.c:324 #, c-format msgid " error: splitpoints are equal (%s)" msgstr " Chyba: Body rozdělení jsou stejné (%s)" -#: src/errors.c:320 +#: src/errors.c:327 msgid " error: invalid time split value" msgstr " Chyba: Neplatná hodnota pro časové rozdělení" -#: src/errors.c:323 +#: src/errors.c:330 msgid " error: invalid number of files for equal length split" msgstr " Chyba: Neplatný počet souborů pro rozdělení na části o stejné délce" -#: src/errors.c:326 +#: src/errors.c:333 msgid " error: cannot get total audio length" msgstr " Chyba: Nelze dostat celkovou délku zvuku" -#: src/errors.c:329 +#: src/errors.c:336 msgid " error: unknown error while setting tags with libid3" msgstr " Chyba: neznámá chyba při nastavování značek s libid3" -#: src/errors.c:332 +#: src/errors.c:342 #, c-format msgid " error: the splitpoints are not in order (%s)" msgstr " Chyba: Body rozdělení nejsou v pořádku (%s)" -#: src/errors.c:335 +#: src/errors.c:345 #, c-format msgid " error: negative splitpoint (%s)" msgstr " Chyba: Záporný bod rozdělení (%s)" -#: src/errors.c:339 +#: src/errors.c:349 #, c-format msgid " error: bad destination folder '%s' (%s)" msgstr " Chyba: Špatná cílová složka '%s': (%s)" -#: src/errors.c:342 +#: src/errors.c:352 msgid " error: incompatible options" msgstr " Chyba: Neslučitelné volby" -#: src/errors.c:345 +#: src/errors.c:355 #, c-format msgid " input and output are the same file ('%s')" msgstr " Vstup a výstup jsou tentýž soubor ('%s')" -#: src/errors.c:348 +#: src/errors.c:358 msgid " error: cannot allocate memory" msgstr " Chyba: Nelze přidělit paměť" -#: src/errors.c:351 +#: src/errors.c:361 #, c-format msgid " error: cannot open destination file '%s': %s" msgstr " Chyba: Nelze otevřít cílový soubor '%s': %s" -#: src/errors.c:355 +#: src/errors.c:365 #, c-format msgid " error: cannot write to output file '%s'" msgstr " Chyba: Nelze zapisovat do výstupního souboru '%s'" -#: src/errors.c:359 +#: src/errors.c:369 #, c-format msgid " error: error while reading file '%s': %s" msgstr " Chyba: Chyba při čtení souboru '%s': %s" -#: src/errors.c:362 +#: src/errors.c:372 #, c-format msgid " error: cannot seek file '%s'" msgstr " Chyba: Nelze vyhledat soubor '%s'" -#: src/errors.c:365 +#: src/errors.c:375 msgid " error: begin point out of file" msgstr " Chyba: Počáteční bod mimo soubor" -#: src/errors.c:367 +#: src/errors.c:377 #, c-format msgid " error: inexistent file '%s': %s" msgstr " Chyba: Neexistující soubor '%s': %s" -#: src/errors.c:370 +#: src/errors.c:380 msgid " split process cancelled" msgstr " Postup rozdělení zrušen" -#: src/errors.c:372 +#: src/errors.c:382 msgid " error: library locked" msgstr " Chyba: Knihovna zamknuta" -#: src/errors.c:375 +#: src/errors.c:385 msgid " error: the state has not been initialized with 'mp3splt_new_state'" msgstr " Chyba: Stav nebyl inicializován 'mp3splt_new_state'" -#: src/errors.c:377 +#: src/errors.c:387 msgid " error: negative time split" msgstr " Chyba: Záporná hodnota pro časové rozdělení" -#: src/errors.c:380 +#: src/errors.c:390 #, c-format msgid " error: cannot create directory '%s'" msgstr " Chyba: Nelze vytvořit adresář '%s'" -#: src/errors.c:383 +#: src/errors.c:393 msgid " error: no plugin found" msgstr " Chyba: Nenalezen žádný přídavný modul" -#: src/errors.c:385 +#: src/errors.c:395 msgid " error: cannot initiate libltdl" msgstr " Chyba: Nelze spustit libltdl" -#: src/errors.c:387 +#: src/errors.c:397 msgid " error: CRC failed" msgstr " Chyba: CRC selhalo" -#: src/errors.c:390 +#: src/errors.c:400 #, c-format msgid " error: no plugin matches the file '%s'" msgstr " Chyba: Žádný přídavný modul neodpovídá souboru '%s'" -#: src/errors.c:397 +#: src/errors.c:407 msgid " warning: output format ambiguous (@t or @n missing)" msgstr " Varování: Výstupní formát je nejasný (chybí @t nebo @n)" -#: src/errors.c:403 +#: src/errors.c:413 #, c-format msgid " error: illegal variable '@%s' in output format" msgstr " Chyba: Zakázaná proměnná '@%s' ve výstupním souboru" -#: src/errors.c:408 +#: src/errors.c:418 msgid " error: invalid output format" msgstr " Chyba: Neplatný výstupní formát" -#: src/errors.c:412 +#: src/errors.c:422 msgid " error: inexistent splitpoint" msgstr " Chyba: Neexistující bod rozdělení" -#: src/errors.c:415 +#: src/errors.c:425 #, c-format msgid " plugin error: '%s'" msgstr " Chyba přídavného modulu: '%s'" -#: src/errors.c:423 +#: src/errors.c:433 #, c-format msgid " error: unsupported feature for the plugin '%s'" msgstr " Chyba: Nepodporovaná vlastnost pro přídavný modul '%s'" -#: src/errors.c:426 +#: src/errors.c:436 msgid " audacity labels file processed" msgstr " Soubor se štítky Audacity zpracováván" -#: src/errors.c:429 +#: src/errors.c:439 #, c-format msgid " audacity error: invalid audacity labels file '%s'" msgstr " Chyba Audacity: Neplatný soubor se štítky Audacity '%s'" -#: src/errors.c:433 +#: src/errors.c:443 #, c-format msgid " regular expression error: %s" msgstr " Chyba regulárního výrazu: %s" -#: src/errors.c:435 +#: src/errors.c:445 msgid " regular expressions are not supported" msgstr " Regulární výrazy nejsou podporovány" -#: src/errors.c:437 +#: src/errors.c:447 msgid " regular expression error: no match" msgstr " Chyba regulárního výrazu: žádná shoda" -#: src/errors.c:439 +#: src/errors.c:449 msgid " regular expression ok" msgstr " Regulární výraz OK" +#: src/errors.c:451 +#, fuzzy +msgid " error: one of the splitpoints has not been auto-adjusted" +msgstr " Chyba: Body rozdělení nejsou v pořádku (%s)" + +#: src/errors.c:453 +#, fuzzy, c-format +msgid " invalid code error: '%s'" +msgstr " Chyba přídavného modulu: '%s'" + +#: src/mp3splt.c:1094 +msgid "" +" warning: bit reservoir handling for gapless playback is still experimental\n" +msgstr "" + +#: src/mp3splt.c:1099 +msgid " warning: bit reservoir is not compatible with overlap option\n" +msgstr "" + +#: src/mp3splt.c:1105 +msgid " warning: bit reservoir is not compatible with auto adjust option\n" +msgstr "" + +#: src/mp3splt.c:1111 +msgid " warning: bit reservoir is not compatible with input not seekable\n" +msgstr "" + +#: src/mp3splt.c:1124 +msgid "" +" warning: bit reservoir is not compatible with silence detection or " +"trimming\n" +msgstr "" + +#: src/mp3splt.c:1131 +msgid " warning: bit reservoir is not compatible with 'no xing'\n" +msgstr "" + #: src/mp3splt.c:1138 +msgid " warning: please enable frame mode to make bit reservoir work\n" +msgstr "" + +#: src/mp3splt.c:1191 #, c-format msgid " info: resolving linked filename to '%s'\n" msgstr " Informace: Spojený název souboru je vyřešen do »%s«\n" -#: src/mp3splt.c:1193 +#: src/mp3splt.c:1246 #, c-format msgid " info: file matches the plugin '%s'\n" msgstr " Informace: Soubor odpovídá přídavnému modulu »%s«\n" -#: src/mp3splt.c:1201 +#: src/mp3splt.c:1254 #, c-format msgid " M3U file '%s' will be created.\n" msgstr " Soubor M3U »%s« bude vytvořen.\n" -#: src/mp3splt.c:1222 +#: src/mp3splt.c:1275 #, fuzzy, c-format msgid "" " Working with SILENCE AUTO-ADJUST (Threshold: %.1f dB Gap: %d sec Offset: " @@ -453,7 +502,7 @@ msgstr "" "Pracuje se s SILENCE AUTO-ADJUST (Práh: %.1f dB Mezera: %d s Posun: %.2f)\n" -#: src/mp3splt.c:1977 src/tags_parser.c:107 +#: src/mp3splt.c:2043 src/tags_parser.c:107 msgid "" " warning: cannot set tags from filename regular expression - compiled " "without pcre support\n" @@ -465,12 +514,17 @@ msgid "directory does not exists" msgstr "Adresář neexistuje" +#: src/checks.c:325 +#, c-format +msgid " warning: detected as %s but extension does not match\n" +msgstr "" + #: src/cddb.c:63 #, c-format msgid " reading informations from CDDB file %s ...\n" msgstr " Čtou se informace ze souboru CDDB %s …\n" -#: src/string_utils.c:638 src/string_utils.c:659 +#: src/string_utils.c:659 src/string_utils.c:680 msgid "not enough memory" msgstr "Nedostatek paměti" @@ -570,7 +624,7 @@ msgstr "" " Informace: Začíná se s dělením v režimu automatického zalomení (wrap)\n" -#: src/split_points.c:398 +#: src/split_points.c:421 #, c-format msgid " info: track too short (%ld.%ld.%ld < %ld.%ld.%ld); skipped.\n" msgstr "" @@ -580,7 +634,12 @@ msgid " info: overlapping split files with %ld.%ld.%ld\n" msgstr " Informace: Překrytí dělení souborů %ld.%ld.%ld\n" -#: plugins/mp3.c:1236 +#: src/utils.c:127 +#, c-format +msgid " warning: splitpoint %ld.%ld.%ld is not auto-adjusted\n" +msgstr "" + +#: plugins/mp3.c:1268 msgid "" " warning: lost sync and compiled without id3tag support - the split might be " "corrupt\n" @@ -588,78 +647,82 @@ " Varování: ztraceno seřízení a sestaveno bez podpory pro id3tag - rozdělení " "může být poškozeno\n" -#: plugins/mp3.c:1332 +#: plugins/mp3.c:1362 msgid " info: found Xing or Info header. Switching to frame mode... \n" msgstr "" " Informace: Nalezena hlavička Xing nebo Info. Přepíná se do režimu snímků…\n" -#: plugins/mp3.c:1470 +#: plugins/mp3.c:1501 #, c-format msgid " info: MPEG %d Layer %d - %d Hz - %s" msgstr " Informace: MPEG %d Layer %d - %d Hz - %s" -#: plugins/mp3.c:1478 +#: plugins/mp3.c:1510 #, c-format msgid " - FRAME MODE NS" msgstr " - REŽIM SNÍMKŮ NS" -#: plugins/mp3.c:1482 +#: plugins/mp3.c:1514 #, c-format msgid " - FRAME MODE" msgstr " - REŽIM SNÍMKŮ" -#: plugins/mp3.c:1487 +#: plugins/mp3.c:1519 #, c-format msgid " - NS - %d Kb/s" msgstr " - NS - %d kB/s" -#: plugins/mp3.c:1492 +#: plugins/mp3.c:1524 #, c-format msgid " - %d Kb/s" msgstr " - %d kB/s" -#: plugins/mp3.c:1500 plugins/ogg.c:132 plugins/flac.c:214 +#: plugins/mp3.c:1532 plugins/ogg.c:132 plugins/flac.c:285 #, c-format msgid " - Total time: %dm.%02ds" msgstr " - Celkový čas: %dm.%02ds" -#: plugins/mp3.c:2823 +#: plugins/mp3.c:2930 #, c-format msgid " Detected file created with: Mp3Wrap v. %c.%c\n" msgstr " Zjištěný soubor vytvořen: Mp3Wrap v. %c.%c\n" -#: plugins/mp3.c:2861 +#: plugins/mp3.c:2968 msgid " Check for file integrity: calculating CRC please wait... " msgstr " Ověření celistvosti souboru: Počítá se CRC, prosím, počkejte …" -#: plugins/mp3.c:2880 +#: plugins/mp3.c:2987 msgid " OK\n" msgstr " OK\n" -#: plugins/mp3.c:2899 +#: plugins/mp3.c:3006 msgid " Detected file created with: AlbumWrap\n" msgstr " Zjištěný soubor vytvořen: AlbumWrap\n" -#: plugins/mp3.c:2921 +#: plugins/mp3.c:3028 #, c-format msgid " Total files: %d\n" msgstr " Celkem souborů: %d\n" -#: plugins/mp3.c:3339 +#: plugins/mp3.c:3446 msgid " warning: stdin '-' is supposed to be mp3 stream.\n" msgstr " Varování: Předpokládá se, že stdin »-« je datový proud mp3.\n" -#: plugins/mp3.c:3366 +#: plugins/mp3.c:3473 #, c-format msgid " Processed %lu frames - Sync errors: %lu\n" msgstr " Byly zpracovány snímky %lu - Chyby při seřizování: %lu\n" +#: plugins/mp3.c:3656 +msgid " warning: overlapped chapters are not yet supported.\n" +msgstr "" + #: plugins/ogg.c:124 #, c-format msgid " info: Ogg Vorbis Stream - %ld - %ld Kb/s - %d channels" msgstr " Informace: Datový proud OggVorbis - %ld - %ld kB/s - %d kanály" -#: plugins/ogg.c:1472 +#: plugins/ogg.c:1475 msgid " warning: stdin 'o-' is supposed to be ogg stream.\n" msgstr " Varování: Předpokládá se, že stdin »o-« je datový proud Ogg.\n" @@ -679,7 +742,11 @@ msgid " info: trim end split at %ldm_%.2lds_%.2ldh\n" msgstr " Informace: Překrytí dělení souborů %ld.%ld.%ld\n" -#: plugins/flac.c:206 +#: plugins/flac.c:245 +msgid "--- last cue splitpoint ---" +msgstr "" + +#: plugins/flac.c:277 #, c-format msgid " info: Native FLAC - %u Hz - %d channels of %d bits" msgstr "" Binary files /tmp/tmp0o_obT/w4ysScQLiU/libmp3splt-0.9.0/po/de_DE.gmo and /tmp/tmp0o_obT/FqzkI4ohTj/libmp3splt-0.9.2/po/de_DE.gmo differ diff -Nru libmp3splt-0.9.0/po/de_DE.po libmp3splt-0.9.2/po/de_DE.po --- libmp3splt-0.9.0/po/de_DE.po 2013-07-20 06:58:38.000000000 +0000 +++ libmp3splt-0.9.2/po/de_DE.po 2014-11-09 15:04:23.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: mp3splt-gtk\n" "Report-Msgid-Bugs-To: m@ioalex.net\n" -"POT-Creation-Date: 2013-07-20 08:58+0200\n" +"POT-Creation-Date: 2014-11-09 16:04+0100\n" "PO-Revision-Date: 2013-04-29 08:36+0000\n" "Last-Translator: Peter Pall \n" "Language-Team: LANGUAGE \n" @@ -32,12 +32,12 @@ "\n" " Künstler: %s\n" -#: src/cue.c:513 +#: src/cue.c:518 #, c-format msgid " reading informations from CUE file %s ...\n" msgstr " Informationen aus CUE-Datei %s werden gelesen …\n" -#: src/cue.c:587 src/cddb.c:133 +#: src/cue.c:592 src/cddb.c:133 #, c-format msgid "" " Tracks: %d\n" @@ -46,7 +46,7 @@ " Titel: %d\n" "\n" -#: src/cue.c:810 +#: src/cue.c:815 #, c-format msgid " CUE file '%s' created.\n" msgstr " CUE-Datei »%s« wurde erstellt.\n" @@ -178,273 +178,321 @@ msgstr "" #: src/errors.c:261 -msgid " wrap split ok" +msgid " internal sheet error: no internal sheet or invalid sheet" msgstr "" #: src/errors.c:264 +msgid " internal sheet error: internal sheet type not supported" +msgstr "" + +#: src/errors.c:268 +msgid " wrap split ok" +msgstr "" + +#: src/errors.c:271 msgid " wrap error: incorrect file length" msgstr "" -#: src/errors.c:267 +#: src/errors.c:274 msgid " wrap error: libmp3splt version too old for this wrap file" msgstr "" -#: src/errors.c:270 +#: src/errors.c:277 msgid " wrap error: no file found or bad index" msgstr "" -#: src/errors.c:273 +#: src/errors.c:280 #, c-format msgid " wrap error: file '%s' damaged or incomplete" msgstr "" -#: src/errors.c:277 +#: src/errors.c:284 msgid " wrap error: maybe not a wrapped file or wrap file damaged" msgstr "" -#: src/errors.c:280 +#: src/errors.c:287 msgid " file split (EOF)" msgstr "" -#: src/errors.c:282 +#: src/errors.c:289 msgid " no silence splitpoints found" msgstr "" -#: src/errors.c:284 +#: src/errors.c:291 msgid " time split ok" msgstr "" -#: src/errors.c:286 +#: src/errors.c:293 msgid " split in equal tracks ok" msgstr "" -#: src/errors.c:288 +#: src/errors.c:295 msgid " silence split ok" msgstr "" -#: src/errors.c:290 +#: src/errors.c:297 msgid " trim using silence split ok" msgstr "" -#: src/errors.c:293 +#: src/errors.c:300 msgid " file split, splitpoints bigger than length" msgstr "" -#: src/errors.c:295 +#: src/errors.c:302 msgid " file split" msgstr "" -#: src/errors.c:299 +#: src/errors.c:306 msgid " error: not enough splitpoints (<2)" msgstr "" -#: src/errors.c:302 +#: src/errors.c:309 #, c-format msgid " error: cannot open file '%s': %s" msgstr "" -#: src/errors.c:306 +#: src/errors.c:313 #, c-format msgid " error: cannot close file '%s': %s" msgstr "" -#: src/errors.c:313 +#: src/errors.c:320 #, c-format msgid " error: invalid input file '%s' for '%s' plugin" msgstr "" -#: src/errors.c:317 +#: src/errors.c:324 #, c-format msgid " error: splitpoints are equal (%s)" msgstr "" -#: src/errors.c:320 +#: src/errors.c:327 msgid " error: invalid time split value" msgstr "" -#: src/errors.c:323 +#: src/errors.c:330 msgid " error: invalid number of files for equal length split" msgstr "" -#: src/errors.c:326 +#: src/errors.c:333 msgid " error: cannot get total audio length" msgstr "" -#: src/errors.c:329 +#: src/errors.c:336 msgid " error: unknown error while setting tags with libid3" msgstr "" -#: src/errors.c:332 +#: src/errors.c:342 #, c-format msgid " error: the splitpoints are not in order (%s)" msgstr "" -#: src/errors.c:335 +#: src/errors.c:345 #, c-format msgid " error: negative splitpoint (%s)" msgstr "" -#: src/errors.c:339 +#: src/errors.c:349 #, c-format msgid " error: bad destination folder '%s' (%s)" msgstr "" -#: src/errors.c:342 +#: src/errors.c:352 msgid " error: incompatible options" msgstr "" -#: src/errors.c:345 +#: src/errors.c:355 #, c-format msgid " input and output are the same file ('%s')" msgstr "" -#: src/errors.c:348 +#: src/errors.c:358 msgid " error: cannot allocate memory" msgstr "" -#: src/errors.c:351 +#: src/errors.c:361 #, c-format msgid " error: cannot open destination file '%s': %s" msgstr "" -#: src/errors.c:355 +#: src/errors.c:365 #, c-format msgid " error: cannot write to output file '%s'" msgstr "" -#: src/errors.c:359 +#: src/errors.c:369 #, c-format msgid " error: error while reading file '%s': %s" msgstr "" -#: src/errors.c:362 +#: src/errors.c:372 #, c-format msgid " error: cannot seek file '%s'" msgstr "" -#: src/errors.c:365 +#: src/errors.c:375 msgid " error: begin point out of file" msgstr "" -#: src/errors.c:367 +#: src/errors.c:377 #, c-format msgid " error: inexistent file '%s': %s" msgstr "" -#: src/errors.c:370 +#: src/errors.c:380 msgid " split process cancelled" msgstr "" -#: src/errors.c:372 +#: src/errors.c:382 msgid " error: library locked" msgstr "" -#: src/errors.c:375 +#: src/errors.c:385 msgid " error: the state has not been initialized with 'mp3splt_new_state'" msgstr "" -#: src/errors.c:377 +#: src/errors.c:387 msgid " error: negative time split" msgstr "" -#: src/errors.c:380 +#: src/errors.c:390 #, c-format msgid " error: cannot create directory '%s'" msgstr "" -#: src/errors.c:383 +#: src/errors.c:393 msgid " error: no plugin found" msgstr "" -#: src/errors.c:385 +#: src/errors.c:395 msgid " error: cannot initiate libltdl" msgstr "" -#: src/errors.c:387 +#: src/errors.c:397 msgid " error: CRC failed" msgstr "" -#: src/errors.c:390 +#: src/errors.c:400 #, c-format msgid " error: no plugin matches the file '%s'" msgstr "" -#: src/errors.c:397 +#: src/errors.c:407 msgid " warning: output format ambiguous (@t or @n missing)" msgstr "" -#: src/errors.c:403 +#: src/errors.c:413 #, c-format msgid " error: illegal variable '@%s' in output format" msgstr "" -#: src/errors.c:408 +#: src/errors.c:418 msgid " error: invalid output format" msgstr "" -#: src/errors.c:412 +#: src/errors.c:422 msgid " error: inexistent splitpoint" msgstr "" -#: src/errors.c:415 +#: src/errors.c:425 #, c-format msgid " plugin error: '%s'" msgstr "" -#: src/errors.c:423 +#: src/errors.c:433 #, c-format msgid " error: unsupported feature for the plugin '%s'" msgstr "" -#: src/errors.c:426 +#: src/errors.c:436 msgid " audacity labels file processed" msgstr "" -#: src/errors.c:429 +#: src/errors.c:439 #, c-format msgid " audacity error: invalid audacity labels file '%s'" msgstr "" -#: src/errors.c:433 +#: src/errors.c:443 #, c-format msgid " regular expression error: %s" msgstr "" -#: src/errors.c:435 +#: src/errors.c:445 msgid " regular expressions are not supported" msgstr "" -#: src/errors.c:437 +#: src/errors.c:447 msgid " regular expression error: no match" msgstr "" -#: src/errors.c:439 +#: src/errors.c:449 msgid " regular expression ok" msgstr "" +#: src/errors.c:451 +msgid " error: one of the splitpoints has not been auto-adjusted" +msgstr "" + +#: src/errors.c:453 +#, c-format +msgid " invalid code error: '%s'" +msgstr "" + +#: src/mp3splt.c:1094 +msgid "" +" warning: bit reservoir handling for gapless playback is still experimental\n" +msgstr "" + +#: src/mp3splt.c:1099 +msgid " warning: bit reservoir is not compatible with overlap option\n" +msgstr "" + +#: src/mp3splt.c:1105 +msgid " warning: bit reservoir is not compatible with auto adjust option\n" +msgstr "" + +#: src/mp3splt.c:1111 +msgid " warning: bit reservoir is not compatible with input not seekable\n" +msgstr "" + +#: src/mp3splt.c:1124 +msgid "" +" warning: bit reservoir is not compatible with silence detection or " +"trimming\n" +msgstr "" + +#: src/mp3splt.c:1131 +msgid " warning: bit reservoir is not compatible with 'no xing'\n" +msgstr "" + #: src/mp3splt.c:1138 +msgid " warning: please enable frame mode to make bit reservoir work\n" +msgstr "" + +#: src/mp3splt.c:1191 #, c-format msgid " info: resolving linked filename to '%s'\n" msgstr " Info: Verknüpfter Dateiname wird in »%s« aufgelöst\n" -#: src/mp3splt.c:1193 +#: src/mp3splt.c:1246 #, c-format msgid " info: file matches the plugin '%s'\n" msgstr " Info: Datei passt zum Plugin »%s«\n" -#: src/mp3splt.c:1201 +#: src/mp3splt.c:1254 #, c-format msgid " M3U file '%s' will be created.\n" msgstr " M3U-Datei »%s« wird erstellt.\n" -#: src/mp3splt.c:1222 +#: src/mp3splt.c:1275 #, c-format msgid "" " Working with SILENCE AUTO-ADJUST (Threshold: %.1f dB Gap: %d sec Offset: " "%.2f Min: %.2f sec)\n" msgstr "" -#: src/mp3splt.c:1977 src/tags_parser.c:107 +#: src/mp3splt.c:2043 src/tags_parser.c:107 msgid "" " warning: cannot set tags from filename regular expression - compiled " "without pcre support\n" @@ -454,12 +502,17 @@ msgid "directory does not exists" msgstr "Ordner existiert nicht" +#: src/checks.c:325 +#, c-format +msgid " warning: detected as %s but extension does not match\n" +msgstr "" + #: src/cddb.c:63 #, c-format msgid " reading informations from CDDB file %s ...\n" msgstr " Informationen aus CDDB-Datei %s werden gelesen …\n" -#: src/string_utils.c:638 src/string_utils.c:659 +#: src/string_utils.c:659 src/string_utils.c:680 msgid "not enough memory" msgstr "" @@ -555,7 +608,7 @@ msgid " info: starting wrap mode split\n" msgstr " Info: Teilung im Wrap-Modus wird gestartet\n" -#: src/split_points.c:398 +#: src/split_points.c:421 #, c-format msgid " info: track too short (%ld.%ld.%ld < %ld.%ld.%ld); skipped.\n" msgstr "" @@ -565,84 +618,93 @@ msgid " info: overlapping split files with %ld.%ld.%ld\n" msgstr " Info: Überlappung der Dateiteilung mit %ld.%ld.%ld\n" -#: plugins/mp3.c:1236 +#: src/utils.c:127 +#, c-format +msgid " warning: splitpoint %ld.%ld.%ld is not auto-adjusted\n" +msgstr "" + +#: plugins/mp3.c:1268 msgid "" " warning: lost sync and compiled without id3tag support - the split might be " "corrupt\n" msgstr "" -#: plugins/mp3.c:1332 +#: plugins/mp3.c:1362 msgid " info: found Xing or Info header. Switching to frame mode... \n" msgstr "" " Hinweis: Xing- oder Info-Header wurde gefunden. Wechsel zum Frame-Modus…\n" -#: plugins/mp3.c:1470 +#: plugins/mp3.c:1501 #, c-format msgid " info: MPEG %d Layer %d - %d Hz - %s" msgstr " Info: MPEG %d Layer %d - %d Hz - %s" -#: plugins/mp3.c:1478 +#: plugins/mp3.c:1510 #, c-format msgid " - FRAME MODE NS" msgstr " - FRAME-MODUS NS" -#: plugins/mp3.c:1482 +#: plugins/mp3.c:1514 #, c-format msgid " - FRAME MODE" msgstr " - FRAME-MODUS" -#: plugins/mp3.c:1487 +#: plugins/mp3.c:1519 #, c-format msgid " - NS - %d Kb/s" msgstr " - NS - %d kB/s" -#: plugins/mp3.c:1492 +#: plugins/mp3.c:1524 #, c-format msgid " - %d Kb/s" msgstr " - %d kB/s" -#: plugins/mp3.c:1500 plugins/ogg.c:132 plugins/flac.c:214 +#: plugins/mp3.c:1532 plugins/ogg.c:132 plugins/flac.c:285 #, c-format msgid " - Total time: %dm.%02ds" msgstr " - Zeit gesamt: %dm.%02ds" -#: plugins/mp3.c:2823 +#: plugins/mp3.c:2930 #, c-format msgid " Detected file created with: Mp3Wrap v. %c.%c\n" msgstr " Erkannte Datei erzeugt mit: Mp3Wrap v. %c.%c\n" -#: plugins/mp3.c:2861 +#: plugins/mp3.c:2968 msgid " Check for file integrity: calculating CRC please wait... " msgstr " Integritätsprüfung der Datei: CRC wird berechnet, bitte warten …" -#: plugins/mp3.c:2880 +#: plugins/mp3.c:2987 msgid " OK\n" msgstr " OK\n" -#: plugins/mp3.c:2899 +#: plugins/mp3.c:3006 msgid " Detected file created with: AlbumWrap\n" msgstr " Erkannte Datei erzeugt mit: AlbumWrap\n" -#: plugins/mp3.c:2921 +#: plugins/mp3.c:3028 #, c-format msgid " Total files: %d\n" msgstr " Dateien gesamt: %d\n" -#: plugins/mp3.c:3339 +#: plugins/mp3.c:3446 msgid " warning: stdin '-' is supposed to be mp3 stream.\n" msgstr " Warnung: stdin »-« wird als mp3-Datenstrom angenommen.\n" -#: plugins/mp3.c:3366 +#: plugins/mp3.c:3473 #, c-format msgid " Processed %lu frames - Sync errors: %lu\n" msgstr " %lu Frames wurden verarbeitet - Synchronisationsfehler: %lu\n" +#: plugins/mp3.c:3656 +msgid " warning: overlapped chapters are not yet supported.\n" +msgstr "" + #: plugins/ogg.c:124 #, c-format msgid " info: Ogg Vorbis Stream - %ld - %ld Kb/s - %d channels" msgstr " Info: OggVorbis-Datenstrom - %ld - %ld kB/s - %d Kanäle" -#: plugins/ogg.c:1472 +#: plugins/ogg.c:1475 msgid " warning: stdin 'o-' is supposed to be ogg stream.\n" msgstr " Warnung: stdin »o-« wird als Ogg-Datenstrom angenommen.\n" @@ -662,7 +724,11 @@ msgid " info: trim end split at %ldm_%.2lds_%.2ldh\n" msgstr " Info: Überlappung der Dateiteilung mit %ld.%ld.%ld\n" -#: plugins/flac.c:206 +#: plugins/flac.c:245 +msgid "--- last cue splitpoint ---" +msgstr "" + +#: plugins/flac.c:277 #, c-format msgid " info: Native FLAC - %u Hz - %d channels of %d bits" msgstr "" Binary files /tmp/tmp0o_obT/w4ysScQLiU/libmp3splt-0.9.0/po/es.gmo and /tmp/tmp0o_obT/FqzkI4ohTj/libmp3splt-0.9.2/po/es.gmo differ diff -Nru libmp3splt-0.9.0/po/es.po libmp3splt-0.9.2/po/es.po --- libmp3splt-0.9.0/po/es.po 2013-07-20 06:58:38.000000000 +0000 +++ libmp3splt-0.9.2/po/es.po 2014-11-09 15:04:23.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: mp3splt-gtk\n" "Report-Msgid-Bugs-To: m@ioalex.net\n" -"POT-Creation-Date: 2013-07-20 08:58+0200\n" +"POT-Creation-Date: 2014-11-09 16:04+0100\n" "PO-Revision-Date: 2013-04-29 08:36+0000\n" "Last-Translator: Peter Pall \n" "Language-Team: LANGUAGE \n" @@ -30,19 +30,19 @@ " Artist: %s\n" msgstr "" -#: src/cue.c:513 +#: src/cue.c:518 #, c-format msgid " reading informations from CUE file %s ...\n" msgstr "" -#: src/cue.c:587 src/cddb.c:133 +#: src/cue.c:592 src/cddb.c:133 #, c-format msgid "" " Tracks: %d\n" "\n" msgstr "" -#: src/cue.c:810 +#: src/cue.c:815 #, c-format msgid " CUE file '%s' created.\n" msgstr "" @@ -174,273 +174,321 @@ msgstr "" #: src/errors.c:261 -msgid " wrap split ok" +msgid " internal sheet error: no internal sheet or invalid sheet" msgstr "" #: src/errors.c:264 +msgid " internal sheet error: internal sheet type not supported" +msgstr "" + +#: src/errors.c:268 +msgid " wrap split ok" +msgstr "" + +#: src/errors.c:271 msgid " wrap error: incorrect file length" msgstr "" -#: src/errors.c:267 +#: src/errors.c:274 msgid " wrap error: libmp3splt version too old for this wrap file" msgstr "" -#: src/errors.c:270 +#: src/errors.c:277 msgid " wrap error: no file found or bad index" msgstr "" -#: src/errors.c:273 +#: src/errors.c:280 #, c-format msgid " wrap error: file '%s' damaged or incomplete" msgstr "" -#: src/errors.c:277 +#: src/errors.c:284 msgid " wrap error: maybe not a wrapped file or wrap file damaged" msgstr "" -#: src/errors.c:280 +#: src/errors.c:287 msgid " file split (EOF)" msgstr "" -#: src/errors.c:282 +#: src/errors.c:289 msgid " no silence splitpoints found" msgstr "" -#: src/errors.c:284 +#: src/errors.c:291 msgid " time split ok" msgstr "" -#: src/errors.c:286 +#: src/errors.c:293 msgid " split in equal tracks ok" msgstr "" -#: src/errors.c:288 +#: src/errors.c:295 msgid " silence split ok" msgstr "" -#: src/errors.c:290 +#: src/errors.c:297 msgid " trim using silence split ok" msgstr "" -#: src/errors.c:293 +#: src/errors.c:300 msgid " file split, splitpoints bigger than length" msgstr "" -#: src/errors.c:295 +#: src/errors.c:302 msgid " file split" msgstr "" -#: src/errors.c:299 +#: src/errors.c:306 msgid " error: not enough splitpoints (<2)" msgstr "" -#: src/errors.c:302 +#: src/errors.c:309 #, c-format msgid " error: cannot open file '%s': %s" msgstr "" -#: src/errors.c:306 +#: src/errors.c:313 #, c-format msgid " error: cannot close file '%s': %s" msgstr "" -#: src/errors.c:313 +#: src/errors.c:320 #, c-format msgid " error: invalid input file '%s' for '%s' plugin" msgstr "" -#: src/errors.c:317 +#: src/errors.c:324 #, c-format msgid " error: splitpoints are equal (%s)" msgstr "" -#: src/errors.c:320 +#: src/errors.c:327 msgid " error: invalid time split value" msgstr "" -#: src/errors.c:323 +#: src/errors.c:330 msgid " error: invalid number of files for equal length split" msgstr "" -#: src/errors.c:326 +#: src/errors.c:333 msgid " error: cannot get total audio length" msgstr "" -#: src/errors.c:329 +#: src/errors.c:336 msgid " error: unknown error while setting tags with libid3" msgstr "" -#: src/errors.c:332 +#: src/errors.c:342 #, c-format msgid " error: the splitpoints are not in order (%s)" msgstr "" -#: src/errors.c:335 +#: src/errors.c:345 #, c-format msgid " error: negative splitpoint (%s)" msgstr "" -#: src/errors.c:339 +#: src/errors.c:349 #, c-format msgid " error: bad destination folder '%s' (%s)" msgstr "" -#: src/errors.c:342 +#: src/errors.c:352 msgid " error: incompatible options" msgstr "" -#: src/errors.c:345 +#: src/errors.c:355 #, c-format msgid " input and output are the same file ('%s')" msgstr "" -#: src/errors.c:348 +#: src/errors.c:358 msgid " error: cannot allocate memory" msgstr "" -#: src/errors.c:351 +#: src/errors.c:361 #, c-format msgid " error: cannot open destination file '%s': %s" msgstr "" -#: src/errors.c:355 +#: src/errors.c:365 #, c-format msgid " error: cannot write to output file '%s'" msgstr "" -#: src/errors.c:359 +#: src/errors.c:369 #, c-format msgid " error: error while reading file '%s': %s" msgstr "" -#: src/errors.c:362 +#: src/errors.c:372 #, c-format msgid " error: cannot seek file '%s'" msgstr "" -#: src/errors.c:365 +#: src/errors.c:375 msgid " error: begin point out of file" msgstr "" -#: src/errors.c:367 +#: src/errors.c:377 #, c-format msgid " error: inexistent file '%s': %s" msgstr "" -#: src/errors.c:370 +#: src/errors.c:380 msgid " split process cancelled" msgstr "" -#: src/errors.c:372 +#: src/errors.c:382 msgid " error: library locked" msgstr "" -#: src/errors.c:375 +#: src/errors.c:385 msgid " error: the state has not been initialized with 'mp3splt_new_state'" msgstr "" -#: src/errors.c:377 +#: src/errors.c:387 msgid " error: negative time split" msgstr "" -#: src/errors.c:380 +#: src/errors.c:390 #, c-format msgid " error: cannot create directory '%s'" msgstr "" -#: src/errors.c:383 +#: src/errors.c:393 msgid " error: no plugin found" msgstr "" -#: src/errors.c:385 +#: src/errors.c:395 msgid " error: cannot initiate libltdl" msgstr "" -#: src/errors.c:387 +#: src/errors.c:397 msgid " error: CRC failed" msgstr "" -#: src/errors.c:390 +#: src/errors.c:400 #, c-format msgid " error: no plugin matches the file '%s'" msgstr "" -#: src/errors.c:397 +#: src/errors.c:407 msgid " warning: output format ambiguous (@t or @n missing)" msgstr "" -#: src/errors.c:403 +#: src/errors.c:413 #, c-format msgid " error: illegal variable '@%s' in output format" msgstr "" -#: src/errors.c:408 +#: src/errors.c:418 msgid " error: invalid output format" msgstr "" -#: src/errors.c:412 +#: src/errors.c:422 msgid " error: inexistent splitpoint" msgstr "" -#: src/errors.c:415 +#: src/errors.c:425 #, c-format msgid " plugin error: '%s'" msgstr "" -#: src/errors.c:423 +#: src/errors.c:433 #, c-format msgid " error: unsupported feature for the plugin '%s'" msgstr "" -#: src/errors.c:426 +#: src/errors.c:436 msgid " audacity labels file processed" msgstr "" -#: src/errors.c:429 +#: src/errors.c:439 #, c-format msgid " audacity error: invalid audacity labels file '%s'" msgstr "" -#: src/errors.c:433 +#: src/errors.c:443 #, c-format msgid " regular expression error: %s" msgstr "" -#: src/errors.c:435 +#: src/errors.c:445 msgid " regular expressions are not supported" msgstr "" -#: src/errors.c:437 +#: src/errors.c:447 msgid " regular expression error: no match" msgstr "" -#: src/errors.c:439 +#: src/errors.c:449 msgid " regular expression ok" msgstr "" +#: src/errors.c:451 +msgid " error: one of the splitpoints has not been auto-adjusted" +msgstr "" + +#: src/errors.c:453 +#, c-format +msgid " invalid code error: '%s'" +msgstr "" + +#: src/mp3splt.c:1094 +msgid "" +" warning: bit reservoir handling for gapless playback is still experimental\n" +msgstr "" + +#: src/mp3splt.c:1099 +msgid " warning: bit reservoir is not compatible with overlap option\n" +msgstr "" + +#: src/mp3splt.c:1105 +msgid " warning: bit reservoir is not compatible with auto adjust option\n" +msgstr "" + +#: src/mp3splt.c:1111 +msgid " warning: bit reservoir is not compatible with input not seekable\n" +msgstr "" + +#: src/mp3splt.c:1124 +msgid "" +" warning: bit reservoir is not compatible with silence detection or " +"trimming\n" +msgstr "" + +#: src/mp3splt.c:1131 +msgid " warning: bit reservoir is not compatible with 'no xing'\n" +msgstr "" + #: src/mp3splt.c:1138 +msgid " warning: please enable frame mode to make bit reservoir work\n" +msgstr "" + +#: src/mp3splt.c:1191 #, c-format msgid " info: resolving linked filename to '%s'\n" msgstr "" -#: src/mp3splt.c:1193 +#: src/mp3splt.c:1246 #, c-format msgid " info: file matches the plugin '%s'\n" msgstr "" -#: src/mp3splt.c:1201 +#: src/mp3splt.c:1254 #, c-format msgid " M3U file '%s' will be created.\n" msgstr "" -#: src/mp3splt.c:1222 +#: src/mp3splt.c:1275 #, c-format msgid "" " Working with SILENCE AUTO-ADJUST (Threshold: %.1f dB Gap: %d sec Offset: " "%.2f Min: %.2f sec)\n" msgstr "" -#: src/mp3splt.c:1977 src/tags_parser.c:107 +#: src/mp3splt.c:2043 src/tags_parser.c:107 msgid "" " warning: cannot set tags from filename regular expression - compiled " "without pcre support\n" @@ -450,12 +498,17 @@ msgid "directory does not exists" msgstr "" +#: src/checks.c:325 +#, c-format +msgid " warning: detected as %s but extension does not match\n" +msgstr "" + #: src/cddb.c:63 #, c-format msgid " reading informations from CDDB file %s ...\n" msgstr "" -#: src/string_utils.c:638 src/string_utils.c:659 +#: src/string_utils.c:659 src/string_utils.c:680 msgid "not enough memory" msgstr "" @@ -549,7 +602,7 @@ msgid " info: starting wrap mode split\n" msgstr "" -#: src/split_points.c:398 +#: src/split_points.c:421 #, c-format msgid " info: track too short (%ld.%ld.%ld < %ld.%ld.%ld); skipped.\n" msgstr "" @@ -559,83 +612,92 @@ msgid " info: overlapping split files with %ld.%ld.%ld\n" msgstr "" -#: plugins/mp3.c:1236 +#: src/utils.c:127 +#, c-format +msgid " warning: splitpoint %ld.%ld.%ld is not auto-adjusted\n" +msgstr "" + +#: plugins/mp3.c:1268 msgid "" " warning: lost sync and compiled without id3tag support - the split might be " "corrupt\n" msgstr "" -#: plugins/mp3.c:1332 +#: plugins/mp3.c:1362 msgid " info: found Xing or Info header. Switching to frame mode... \n" msgstr "" -#: plugins/mp3.c:1470 +#: plugins/mp3.c:1501 #, c-format msgid " info: MPEG %d Layer %d - %d Hz - %s" msgstr "" -#: plugins/mp3.c:1478 +#: plugins/mp3.c:1510 #, c-format msgid " - FRAME MODE NS" msgstr "" -#: plugins/mp3.c:1482 +#: plugins/mp3.c:1514 #, c-format msgid " - FRAME MODE" msgstr "" -#: plugins/mp3.c:1487 +#: plugins/mp3.c:1519 #, c-format msgid " - NS - %d Kb/s" msgstr "" -#: plugins/mp3.c:1492 +#: plugins/mp3.c:1524 #, c-format msgid " - %d Kb/s" msgstr "" -#: plugins/mp3.c:1500 plugins/ogg.c:132 plugins/flac.c:214 +#: plugins/mp3.c:1532 plugins/ogg.c:132 plugins/flac.c:285 #, c-format msgid " - Total time: %dm.%02ds" msgstr "" -#: plugins/mp3.c:2823 +#: plugins/mp3.c:2930 #, c-format msgid " Detected file created with: Mp3Wrap v. %c.%c\n" msgstr "" -#: plugins/mp3.c:2861 +#: plugins/mp3.c:2968 msgid " Check for file integrity: calculating CRC please wait... " msgstr "" -#: plugins/mp3.c:2880 +#: plugins/mp3.c:2987 msgid " OK\n" msgstr "" -#: plugins/mp3.c:2899 +#: plugins/mp3.c:3006 msgid " Detected file created with: AlbumWrap\n" msgstr "" -#: plugins/mp3.c:2921 +#: plugins/mp3.c:3028 #, c-format msgid " Total files: %d\n" msgstr "" -#: plugins/mp3.c:3339 +#: plugins/mp3.c:3446 msgid " warning: stdin '-' is supposed to be mp3 stream.\n" msgstr "" -#: plugins/mp3.c:3366 +#: plugins/mp3.c:3473 #, c-format msgid " Processed %lu frames - Sync errors: %lu\n" msgstr "" +#: plugins/mp3.c:3656 +msgid " warning: overlapped chapters are not yet supported.\n" +msgstr "" + #: plugins/ogg.c:124 #, c-format msgid " info: Ogg Vorbis Stream - %ld - %ld Kb/s - %d channels" msgstr "" -#: plugins/ogg.c:1472 +#: plugins/ogg.c:1475 msgid " warning: stdin 'o-' is supposed to be ogg stream.\n" msgstr "" @@ -655,7 +717,11 @@ msgid " info: trim end split at %ldm_%.2lds_%.2ldh\n" msgstr "" -#: plugins/flac.c:206 +#: plugins/flac.c:245 +msgid "--- last cue splitpoint ---" +msgstr "" + +#: plugins/flac.c:277 #, c-format msgid " info: Native FLAC - %u Hz - %d channels of %d bits" msgstr "" Binary files /tmp/tmp0o_obT/w4ysScQLiU/libmp3splt-0.9.0/po/fr_FR.gmo and /tmp/tmp0o_obT/FqzkI4ohTj/libmp3splt-0.9.2/po/fr_FR.gmo differ diff -Nru libmp3splt-0.9.0/po/fr_FR.po libmp3splt-0.9.2/po/fr_FR.po --- libmp3splt-0.9.0/po/fr_FR.po 2013-07-20 06:58:38.000000000 +0000 +++ libmp3splt-0.9.2/po/fr_FR.po 2014-11-09 15:04:23.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: mp3splt-gtk\n" "Report-Msgid-Bugs-To: m@ioalex.net\n" -"POT-Creation-Date: 2013-07-20 08:58+0200\n" +"POT-Creation-Date: 2014-11-09 16:04+0100\n" "PO-Revision-Date: 2013-04-29 16:15+0000\n" "Last-Translator: Chris38 \n" "Language-Team: LANGUAGE \n" @@ -33,12 +33,12 @@ "\n" " Artiste : %s\n" -#: src/cue.c:513 +#: src/cue.c:518 #, c-format msgid " reading informations from CUE file %s ...\n" msgstr " lecture des informations du fichier CUE %s ...\n" -#: src/cue.c:587 src/cddb.c:133 +#: src/cue.c:592 src/cddb.c:133 #, c-format msgid "" " Tracks: %d\n" @@ -47,7 +47,7 @@ " Pistes : %d\n" "\n" -#: src/cue.c:810 +#: src/cue.c:815 #, c-format msgid " CUE file '%s' created.\n" msgstr " Fichier CUE '%s' créé.\n" @@ -180,268 +180,317 @@ msgstr " erreur freedb : impossible de se déconnecter de l'hôte (%s)" #: src/errors.c:261 +msgid " internal sheet error: no internal sheet or invalid sheet" +msgstr "" + +#: src/errors.c:264 +msgid " internal sheet error: internal sheet type not supported" +msgstr "" + +#: src/errors.c:268 msgid " wrap split ok" msgstr "découpage 'wrap' ok" -#: src/errors.c:264 +#: src/errors.c:271 msgid " wrap error: incorrect file length" msgstr "erreur 'wrap' : longueur fichier incorrecte" -#: src/errors.c:267 +#: src/errors.c:274 msgid " wrap error: libmp3splt version too old for this wrap file" msgstr "" "erreur 'wrap' : version libmp3splt trop ancienne pour ce fichier 'wrap'" -#: src/errors.c:270 +#: src/errors.c:277 msgid " wrap error: no file found or bad index" msgstr "erreur 'wrap' : fichier non trouvé ou index incorrect" -#: src/errors.c:273 +#: src/errors.c:280 #, c-format msgid " wrap error: file '%s' damaged or incomplete" msgstr "erreur 'wrap' : fichier '%s' endommagé ou incomplet" -#: src/errors.c:277 +#: src/errors.c:284 msgid " wrap error: maybe not a wrapped file or wrap file damaged" msgstr "erreur 'wrap' : fichier non 'wrap' ou fichier 'wrap' endommagé" -#: src/errors.c:280 +#: src/errors.c:287 msgid " file split (EOF)" msgstr "fichier découpé (fin de fichier)" -#: src/errors.c:282 +#: src/errors.c:289 msgid " no silence splitpoints found" msgstr "aucun silence trouvé pour découper" -#: src/errors.c:284 +#: src/errors.c:291 msgid " time split ok" msgstr "découpage 'durée' ok" -#: src/errors.c:286 +#: src/errors.c:293 msgid " split in equal tracks ok" msgstr "découpage morceaux ok" -#: src/errors.c:288 +#: src/errors.c:295 msgid " silence split ok" msgstr "découpage 'silence' ok" -#: src/errors.c:290 +#: src/errors.c:297 msgid " trim using silence split ok" msgstr "découpage en mode Silcence ok" -#: src/errors.c:293 +#: src/errors.c:300 msgid " file split, splitpoints bigger than length" msgstr "découpage fichier, point de découpage trop loin" -#: src/errors.c:295 +#: src/errors.c:302 msgid " file split" msgstr "découpage fichier" -#: src/errors.c:299 +#: src/errors.c:306 msgid " error: not enough splitpoints (<2)" msgstr "erreur : pas assez de points de découpage (<2)" -#: src/errors.c:302 +#: src/errors.c:309 #, c-format msgid " error: cannot open file '%s': %s" msgstr "erreur : impossible d'ouvrir le fichier '%s': %s" -#: src/errors.c:306 +#: src/errors.c:313 #, c-format msgid " error: cannot close file '%s': %s" msgstr "erreur: impossible de fermer le fichier '%s': %s" -#: src/errors.c:313 +#: src/errors.c:320 #, c-format msgid " error: invalid input file '%s' for '%s' plugin" msgstr "erreur : fichier d'entrée incorrect '%s' pour le plugin '%s'" -#: src/errors.c:317 +#: src/errors.c:324 #, c-format msgid " error: splitpoints are equal (%s)" msgstr "erreur : points de découpage identiques (%s)" -#: src/errors.c:320 +#: src/errors.c:327 msgid " error: invalid time split value" msgstr "erreur : valeur de durée de découpage incorrecte" -#: src/errors.c:323 +#: src/errors.c:330 msgid " error: invalid number of files for equal length split" msgstr "erreur : nombre de morceaux incorrect" -#: src/errors.c:326 +#: src/errors.c:333 msgid " error: cannot get total audio length" msgstr "erreur : impossible d'obtenir la durée totale audio" -#: src/errors.c:329 +#: src/errors.c:336 msgid " error: unknown error while setting tags with libid3" msgstr "" "erreur : erreur inconnue pendant l'enregistrement des 'tags' avec libid3" -#: src/errors.c:332 +#: src/errors.c:342 #, c-format msgid " error: the splitpoints are not in order (%s)" msgstr "erreur : points de découpage dans le désordre (%s)" -#: src/errors.c:335 +#: src/errors.c:345 #, c-format msgid " error: negative splitpoint (%s)" msgstr "erreur : point de découpage négatif (%s)" -#: src/errors.c:339 +#: src/errors.c:349 #, c-format msgid " error: bad destination folder '%s' (%s)" msgstr "erreur : dossier destination incorrect '%s' (%s)" -#: src/errors.c:342 +#: src/errors.c:352 msgid " error: incompatible options" msgstr "erreur : options incompatibles" -#: src/errors.c:345 +#: src/errors.c:355 #, c-format msgid " input and output are the same file ('%s')" msgstr "fichiers source et destination identiques ('%s')" -#: src/errors.c:348 +#: src/errors.c:358 msgid " error: cannot allocate memory" msgstr "erreur : allocation mémoire impossible" -#: src/errors.c:351 +#: src/errors.c:361 #, c-format msgid " error: cannot open destination file '%s': %s" msgstr "erreur : ouverture du fichier destination impossible '%s': %s" -#: src/errors.c:355 +#: src/errors.c:365 #, c-format msgid " error: cannot write to output file '%s'" msgstr "erreur : impossible d'écrire dans le fichier destination '%s'" -#: src/errors.c:359 +#: src/errors.c:369 #, c-format msgid " error: error while reading file '%s': %s" msgstr "erreur : pendant la lecture du fichier '%s': %s" -#: src/errors.c:362 +#: src/errors.c:372 #, c-format msgid " error: cannot seek file '%s'" msgstr "erreur : impossible de trouver le fichier '%s'" -#: src/errors.c:365 +#: src/errors.c:375 msgid " error: begin point out of file" msgstr "erreur : premier point hors fichier" -#: src/errors.c:367 +#: src/errors.c:377 #, c-format msgid " error: inexistent file '%s': %s" msgstr " erreur: fichier inexistant '%s': %s" -#: src/errors.c:370 +#: src/errors.c:380 msgid " split process cancelled" msgstr "découpage interrompu" -#: src/errors.c:372 +#: src/errors.c:382 msgid " error: library locked" msgstr "erreur : bibliothèque verrouillée" -#: src/errors.c:375 +#: src/errors.c:385 msgid " error: the state has not been initialized with 'mp3splt_new_state'" msgstr "erreur : l'état n'a pas été initialisé avec 'mp3splt_new_state'" -#: src/errors.c:377 +#: src/errors.c:387 msgid " error: negative time split" msgstr "erreur : temps découpage négatif" -#: src/errors.c:380 +#: src/errors.c:390 #, c-format msgid " error: cannot create directory '%s'" msgstr "erreur : impossible de créer le dossier '%s'" -#: src/errors.c:383 +#: src/errors.c:393 msgid " error: no plugin found" msgstr "erreur : plugin non trouvé" -#: src/errors.c:385 +#: src/errors.c:395 msgid " error: cannot initiate libltdl" msgstr "erreur : impossible de démarrer libltdl" -#: src/errors.c:387 +#: src/errors.c:397 msgid " error: CRC failed" msgstr "erreur : CRC faux" -#: src/errors.c:390 +#: src/errors.c:400 #, c-format msgid " error: no plugin matches the file '%s'" msgstr "erreur : aucun plugin correspondant au fichier '%s'" -#: src/errors.c:397 +#: src/errors.c:407 msgid " warning: output format ambiguous (@t or @n missing)" msgstr "avertissement : format de sortie ambigu (@t ou @n manquant)" -#: src/errors.c:403 +#: src/errors.c:413 #, c-format msgid " error: illegal variable '@%s' in output format" msgstr "erreur : variable incorrecte '@%s' dans le format de sortie" -#: src/errors.c:408 +#: src/errors.c:418 msgid " error: invalid output format" msgstr "erreur : format de sortie incorrect" -#: src/errors.c:412 +#: src/errors.c:422 msgid " error: inexistent splitpoint" msgstr "erreur : aucun point de découpage" -#: src/errors.c:415 +#: src/errors.c:425 #, c-format msgid " plugin error: '%s'" msgstr "erreur plugin : '%s'" -#: src/errors.c:423 +#: src/errors.c:433 #, c-format msgid " error: unsupported feature for the plugin '%s'" msgstr "erreur : fonctionnalité non supportée par le plugin '%s'" -#: src/errors.c:426 +#: src/errors.c:436 msgid " audacity labels file processed" msgstr "fichier de marqueurs audacity traité" -#: src/errors.c:429 +#: src/errors.c:439 #, c-format msgid " audacity error: invalid audacity labels file '%s'" msgstr "audacity erreur : fichier marqueurs audacity incorrect '%s'" -#: src/errors.c:433 +#: src/errors.c:443 #, c-format msgid " regular expression error: %s" msgstr "erreur expression régulière : %s" -#: src/errors.c:435 +#: src/errors.c:445 msgid " regular expressions are not supported" msgstr " les expressions régulières ne sont pas supportées" -#: src/errors.c:437 +#: src/errors.c:447 msgid " regular expression error: no match" msgstr "erreur expression régulière : aucune correspondance" -#: src/errors.c:439 +#: src/errors.c:449 msgid " regular expression ok" msgstr "expression régulière ok" +#: src/errors.c:451 +#, fuzzy +msgid " error: one of the splitpoints has not been auto-adjusted" +msgstr "erreur : points de découpage dans le désordre (%s)" + +#: src/errors.c:453 +#, fuzzy, c-format +msgid " invalid code error: '%s'" +msgstr "erreur plugin : '%s'" + +#: src/mp3splt.c:1094 +msgid "" +" warning: bit reservoir handling for gapless playback is still experimental\n" +msgstr "" + +#: src/mp3splt.c:1099 +msgid " warning: bit reservoir is not compatible with overlap option\n" +msgstr "" + +#: src/mp3splt.c:1105 +msgid " warning: bit reservoir is not compatible with auto adjust option\n" +msgstr "" + +#: src/mp3splt.c:1111 +msgid " warning: bit reservoir is not compatible with input not seekable\n" +msgstr "" + +#: src/mp3splt.c:1124 +msgid "" +" warning: bit reservoir is not compatible with silence detection or " +"trimming\n" +msgstr "" + +#: src/mp3splt.c:1131 +msgid " warning: bit reservoir is not compatible with 'no xing'\n" +msgstr "" + #: src/mp3splt.c:1138 +msgid " warning: please enable frame mode to make bit reservoir work\n" +msgstr "" + +#: src/mp3splt.c:1191 #, c-format msgid " info: resolving linked filename to '%s'\n" msgstr " info : le fichier du lien symbolique est '%s'\n" -#: src/mp3splt.c:1193 +#: src/mp3splt.c:1246 #, c-format msgid " info: file matches the plugin '%s'\n" msgstr " info : le fichier correspond au module '%s'\n" -#: src/mp3splt.c:1201 +#: src/mp3splt.c:1254 #, c-format msgid " M3U file '%s' will be created.\n" msgstr " Le fichier M3U '%s' sera créé.\n" -#: src/mp3splt.c:1222 +#: src/mp3splt.c:1275 #, fuzzy, c-format msgid "" " Working with SILENCE AUTO-ADJUST (Threshold: %.1f dB Gap: %d sec Offset: " @@ -450,7 +499,7 @@ "Travail en mode SILENCE AUTO-AJUSTEMENT (Seuil : %.1f dB - Espace : %d sec - " "Décalage : %.2f)\n" -#: src/mp3splt.c:1977 src/tags_parser.c:107 +#: src/mp3splt.c:2043 src/tags_parser.c:107 msgid "" " warning: cannot set tags from filename regular expression - compiled " "without pcre support\n" @@ -462,12 +511,17 @@ msgid "directory does not exists" msgstr "le dossier n'existe pas" +#: src/checks.c:325 +#, c-format +msgid " warning: detected as %s but extension does not match\n" +msgstr "" + #: src/cddb.c:63 #, c-format msgid " reading informations from CDDB file %s ...\n" msgstr " lecture des informations du fichier CDDB %s ...\n" -#: src/string_utils.c:638 src/string_utils.c:659 +#: src/string_utils.c:659 src/string_utils.c:680 msgid "not enough memory" msgstr "mémoire insuffisante" @@ -567,7 +621,7 @@ msgid " info: starting wrap mode split\n" msgstr " info : début du découpage en mode 'wrap'\n" -#: src/split_points.c:398 +#: src/split_points.c:421 #, c-format msgid " info: track too short (%ld.%ld.%ld < %ld.%ld.%ld); skipped.\n" msgstr "" @@ -577,7 +631,12 @@ msgid " info: overlapping split files with %ld.%ld.%ld\n" msgstr " info : chevauchement des fichiers obtenus avec %ld.%ld.%ld\n" -#: plugins/mp3.c:1236 +#: src/utils.c:127 +#, c-format +msgid " warning: splitpoint %ld.%ld.%ld is not auto-adjusted\n" +msgstr "" + +#: plugins/mp3.c:1268 msgid "" " warning: lost sync and compiled without id3tag support - the split might be " "corrupt\n" @@ -585,80 +644,84 @@ "attention : synchronisation perdue et compilation sans l'aide de id3tag - Le " "résultat du découpage pourrait être incorrect\n" -#: plugins/mp3.c:1332 +#: plugins/mp3.c:1362 msgid " info: found Xing or Info header. Switching to frame mode... \n" msgstr " info: entête Xing ou Info trouvée. Activation du mode \"frame\"...\n" -#: plugins/mp3.c:1470 +#: plugins/mp3.c:1501 #, c-format msgid " info: MPEG %d Layer %d - %d Hz - %s" msgstr " info : MPEG %d couche %d - %d Hz - %s" -#: plugins/mp3.c:1478 +#: plugins/mp3.c:1510 #, c-format msgid " - FRAME MODE NS" msgstr " - MODE 'FRAME' NS (sans changement de position)" -#: plugins/mp3.c:1482 +#: plugins/mp3.c:1514 #, c-format msgid " - FRAME MODE" msgstr " - MODE 'FRAME'" -#: plugins/mp3.c:1487 +#: plugins/mp3.c:1519 #, c-format msgid " - NS - %d Kb/s" msgstr " - NS - %d Kb/s" -#: plugins/mp3.c:1492 +#: plugins/mp3.c:1524 #, c-format msgid " - %d Kb/s" msgstr " - %d Kb/s" -#: plugins/mp3.c:1500 plugins/ogg.c:132 plugins/flac.c:214 +#: plugins/mp3.c:1532 plugins/ogg.c:132 plugins/flac.c:285 #, c-format msgid " - Total time: %dm.%02ds" msgstr " - Temps total : %dm.%02ds" -#: plugins/mp3.c:2823 +#: plugins/mp3.c:2930 #, c-format msgid " Detected file created with: Mp3Wrap v. %c.%c\n" msgstr " Le fichier reconnu a le format Mp3Wrap v. %c.%c\n" -#: plugins/mp3.c:2861 +#: plugins/mp3.c:2968 msgid " Check for file integrity: calculating CRC please wait... " msgstr "" " Vérification de l'intégrité du fichier : calcul du CRC (contrôle de " "redondance cyclique), veuillez attendre..." -#: plugins/mp3.c:2880 +#: plugins/mp3.c:2987 msgid " OK\n" msgstr " Succès\n" -#: plugins/mp3.c:2899 +#: plugins/mp3.c:3006 msgid " Detected file created with: AlbumWrap\n" msgstr " Le fichier reconnu a le format : AlbumWrap\n" -#: plugins/mp3.c:2921 +#: plugins/mp3.c:3028 #, c-format msgid " Total files: %d\n" msgstr " Nombre de fichiers : %d\n" -#: plugins/mp3.c:3339 +#: plugins/mp3.c:3446 msgid " warning: stdin '-' is supposed to be mp3 stream.\n" msgstr "" " attention : le flux standard d'entrée '-' est supposé être un flux mp3.\n" -#: plugins/mp3.c:3366 +#: plugins/mp3.c:3473 #, c-format msgid " Processed %lu frames - Sync errors: %lu\n" msgstr " %lu 'frames' parcourus - Erreurs de synchronisation : %lu\n" +#: plugins/mp3.c:3656 +msgid " warning: overlapped chapters are not yet supported.\n" +msgstr "" + #: plugins/ogg.c:124 #, c-format msgid " info: Ogg Vorbis Stream - %ld - %ld Kb/s - %d channels" msgstr " info : flux Ogg Vorbis - %ld - %ld Kb/s - %d canaux" -#: plugins/ogg.c:1472 +#: plugins/ogg.c:1475 msgid " warning: stdin 'o-' is supposed to be ogg stream.\n" msgstr "" " attention : le flux standard d'entrée '-' est supposé être un flux ogg.\n" @@ -679,7 +742,11 @@ msgid " info: trim end split at %ldm_%.2lds_%.2ldh\n" msgstr " info : chevauchement des fichiers obtenus avec %ld.%ld.%ld\n" -#: plugins/flac.c:206 +#: plugins/flac.c:245 +msgid "--- last cue splitpoint ---" +msgstr "" + +#: plugins/flac.c:277 #, c-format msgid " info: Native FLAC - %u Hz - %d channels of %d bits" msgstr "" Binary files /tmp/tmp0o_obT/w4ysScQLiU/libmp3splt-0.9.0/po/hr.gmo and /tmp/tmp0o_obT/FqzkI4ohTj/libmp3splt-0.9.2/po/hr.gmo differ diff -Nru libmp3splt-0.9.0/po/hr.po libmp3splt-0.9.2/po/hr.po --- libmp3splt-0.9.0/po/hr.po 2013-07-20 06:58:38.000000000 +0000 +++ libmp3splt-0.9.2/po/hr.po 2014-11-09 15:04:23.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: mp3splt-gtk\n" "Report-Msgid-Bugs-To: m@ioalex.net\n" -"POT-Creation-Date: 2013-07-20 08:58+0200\n" +"POT-Creation-Date: 2014-11-09 16:04+0100\n" "PO-Revision-Date: 2013-04-29 08:36+0000\n" "Last-Translator: Peter Pall \n" "Language-Team: LANGUAGE \n" @@ -33,12 +33,12 @@ "\n" " Izvođač: %s\n" -#: src/cue.c:513 +#: src/cue.c:518 #, c-format msgid " reading informations from CUE file %s ...\n" msgstr "" -#: src/cue.c:587 src/cddb.c:133 +#: src/cue.c:592 src/cddb.c:133 #, c-format msgid "" " Tracks: %d\n" @@ -47,7 +47,7 @@ " Pjesme: %d\n" "\n" -#: src/cue.c:810 +#: src/cue.c:815 #, c-format msgid " CUE file '%s' created.\n" msgstr " CUE datoteka '%s' izrađena\n" @@ -179,273 +179,321 @@ msgstr "" #: src/errors.c:261 -msgid " wrap split ok" +msgid " internal sheet error: no internal sheet or invalid sheet" msgstr "" #: src/errors.c:264 +msgid " internal sheet error: internal sheet type not supported" +msgstr "" + +#: src/errors.c:268 +msgid " wrap split ok" +msgstr "" + +#: src/errors.c:271 msgid " wrap error: incorrect file length" msgstr " greška prijeloma: neispravna duljina datoteke" -#: src/errors.c:267 +#: src/errors.c:274 msgid " wrap error: libmp3splt version too old for this wrap file" msgstr "" -#: src/errors.c:270 +#: src/errors.c:277 msgid " wrap error: no file found or bad index" msgstr " greška prijeloma: datoteka nije nađena ili je loš indeks" -#: src/errors.c:273 +#: src/errors.c:280 #, c-format msgid " wrap error: file '%s' damaged or incomplete" msgstr "" -#: src/errors.c:277 +#: src/errors.c:284 msgid " wrap error: maybe not a wrapped file or wrap file damaged" msgstr "" -#: src/errors.c:280 +#: src/errors.c:287 msgid " file split (EOF)" msgstr "" -#: src/errors.c:282 +#: src/errors.c:289 msgid " no silence splitpoints found" msgstr "" -#: src/errors.c:284 +#: src/errors.c:291 msgid " time split ok" msgstr "" -#: src/errors.c:286 +#: src/errors.c:293 msgid " split in equal tracks ok" msgstr " podjeli u jednake pjesme" -#: src/errors.c:288 +#: src/errors.c:295 msgid " silence split ok" msgstr "" -#: src/errors.c:290 +#: src/errors.c:297 msgid " trim using silence split ok" msgstr " izreži koristeći otkrivanje tišine" -#: src/errors.c:293 +#: src/errors.c:300 msgid " file split, splitpoints bigger than length" msgstr "" -#: src/errors.c:295 +#: src/errors.c:302 msgid " file split" msgstr " datoteka podjele" -#: src/errors.c:299 +#: src/errors.c:306 msgid " error: not enough splitpoints (<2)" msgstr "" -#: src/errors.c:302 +#: src/errors.c:309 #, c-format msgid " error: cannot open file '%s': %s" msgstr " greška: nemoguće je otvoriti datoteku '%s': %s" -#: src/errors.c:306 +#: src/errors.c:313 #, c-format msgid " error: cannot close file '%s': %s" msgstr "" -#: src/errors.c:313 +#: src/errors.c:320 #, c-format msgid " error: invalid input file '%s' for '%s' plugin" msgstr "" -#: src/errors.c:317 +#: src/errors.c:324 #, c-format msgid " error: splitpoints are equal (%s)" msgstr "greška: točke podjele su jednake (%s)" -#: src/errors.c:320 +#: src/errors.c:327 msgid " error: invalid time split value" msgstr "greška: neispravna vrijednost vremena podjele" -#: src/errors.c:323 +#: src/errors.c:330 msgid " error: invalid number of files for equal length split" msgstr "" -#: src/errors.c:326 +#: src/errors.c:333 msgid " error: cannot get total audio length" msgstr "greška: nemoguće je dobiti ukupnu audio duljinu" -#: src/errors.c:329 +#: src/errors.c:336 msgid " error: unknown error while setting tags with libid3" msgstr "" -#: src/errors.c:332 +#: src/errors.c:342 #, c-format msgid " error: the splitpoints are not in order (%s)" msgstr "" -#: src/errors.c:335 +#: src/errors.c:345 #, c-format msgid " error: negative splitpoint (%s)" msgstr "greška: negativna točka podjele (%s)" -#: src/errors.c:339 +#: src/errors.c:349 #, c-format msgid " error: bad destination folder '%s' (%s)" msgstr "" -#: src/errors.c:342 +#: src/errors.c:352 msgid " error: incompatible options" msgstr "" -#: src/errors.c:345 +#: src/errors.c:355 #, c-format msgid " input and output are the same file ('%s')" msgstr "" -#: src/errors.c:348 +#: src/errors.c:358 msgid " error: cannot allocate memory" msgstr "greška: nemoguće alociranje memorije" -#: src/errors.c:351 +#: src/errors.c:361 #, c-format msgid " error: cannot open destination file '%s': %s" msgstr "greška: nemoguće otvaranje odredišne datoteke '%s': %s" -#: src/errors.c:355 +#: src/errors.c:365 #, c-format msgid " error: cannot write to output file '%s'" msgstr "" -#: src/errors.c:359 +#: src/errors.c:369 #, c-format msgid " error: error while reading file '%s': %s" msgstr "" -#: src/errors.c:362 +#: src/errors.c:372 #, c-format msgid " error: cannot seek file '%s'" msgstr "greška: nemoguće traženje datoteke '%s'" -#: src/errors.c:365 +#: src/errors.c:375 msgid " error: begin point out of file" msgstr "" -#: src/errors.c:367 +#: src/errors.c:377 #, c-format msgid " error: inexistent file '%s': %s" msgstr "" -#: src/errors.c:370 +#: src/errors.c:380 msgid " split process cancelled" msgstr " postupak podjele prekinut" -#: src/errors.c:372 +#: src/errors.c:382 msgid " error: library locked" msgstr "greška: zbirka zaključana" -#: src/errors.c:375 +#: src/errors.c:385 msgid " error: the state has not been initialized with 'mp3splt_new_state'" msgstr "" -#: src/errors.c:377 +#: src/errors.c:387 msgid " error: negative time split" msgstr "greška: negativna točka podjele" -#: src/errors.c:380 +#: src/errors.c:390 #, c-format msgid " error: cannot create directory '%s'" msgstr "greška: nemoguće stvaranje direktorija '%s'" -#: src/errors.c:383 +#: src/errors.c:393 msgid " error: no plugin found" msgstr " greška: priključak nije nađen" -#: src/errors.c:385 +#: src/errors.c:395 msgid " error: cannot initiate libltdl" msgstr "greška: nemoguće pokretanje libltdl" -#: src/errors.c:387 +#: src/errors.c:397 msgid " error: CRC failed" msgstr "greška: CRC greška" -#: src/errors.c:390 +#: src/errors.c:400 #, c-format msgid " error: no plugin matches the file '%s'" msgstr "" -#: src/errors.c:397 +#: src/errors.c:407 msgid " warning: output format ambiguous (@t or @n missing)" msgstr "" -#: src/errors.c:403 +#: src/errors.c:413 #, c-format msgid " error: illegal variable '@%s' in output format" msgstr "" -#: src/errors.c:408 +#: src/errors.c:418 msgid " error: invalid output format" msgstr "" -#: src/errors.c:412 +#: src/errors.c:422 msgid " error: inexistent splitpoint" msgstr "" -#: src/errors.c:415 +#: src/errors.c:425 #, c-format msgid " plugin error: '%s'" msgstr "" -#: src/errors.c:423 +#: src/errors.c:433 #, c-format msgid " error: unsupported feature for the plugin '%s'" msgstr "" -#: src/errors.c:426 +#: src/errors.c:436 msgid " audacity labels file processed" msgstr " obrada datoteke audacity oznake" -#: src/errors.c:429 +#: src/errors.c:439 #, c-format msgid " audacity error: invalid audacity labels file '%s'" msgstr "" -#: src/errors.c:433 +#: src/errors.c:443 #, c-format msgid " regular expression error: %s" msgstr " regularni izraz greške: %s" -#: src/errors.c:435 +#: src/errors.c:445 msgid " regular expressions are not supported" msgstr " regularni izrazi nisu podržani" -#: src/errors.c:437 +#: src/errors.c:447 msgid " regular expression error: no match" msgstr " greška regularnog izraza: nema podudaranja " -#: src/errors.c:439 +#: src/errors.c:449 msgid " regular expression ok" msgstr " regularni izraz" +#: src/errors.c:451 +msgid " error: one of the splitpoints has not been auto-adjusted" +msgstr "" + +#: src/errors.c:453 +#, fuzzy, c-format +msgid " invalid code error: '%s'" +msgstr " cue greška: pogrešna cue datoteka '%s'" + +#: src/mp3splt.c:1094 +msgid "" +" warning: bit reservoir handling for gapless playback is still experimental\n" +msgstr "" + +#: src/mp3splt.c:1099 +msgid " warning: bit reservoir is not compatible with overlap option\n" +msgstr "" + +#: src/mp3splt.c:1105 +msgid " warning: bit reservoir is not compatible with auto adjust option\n" +msgstr "" + +#: src/mp3splt.c:1111 +msgid " warning: bit reservoir is not compatible with input not seekable\n" +msgstr "" + +#: src/mp3splt.c:1124 +msgid "" +" warning: bit reservoir is not compatible with silence detection or " +"trimming\n" +msgstr "" + +#: src/mp3splt.c:1131 +msgid " warning: bit reservoir is not compatible with 'no xing'\n" +msgstr "" + #: src/mp3splt.c:1138 +msgid " warning: please enable frame mode to make bit reservoir work\n" +msgstr "" + +#: src/mp3splt.c:1191 #, c-format msgid " info: resolving linked filename to '%s'\n" msgstr " info: rješavanje povezanog naziva datoteke u '%s'\n" -#: src/mp3splt.c:1193 +#: src/mp3splt.c:1246 #, c-format msgid " info: file matches the plugin '%s'\n" msgstr "info: datoteka se podudara s priključkom '%s'\n" -#: src/mp3splt.c:1201 +#: src/mp3splt.c:1254 #, c-format msgid " M3U file '%s' will be created.\n" msgstr " M3U datoteka '%s' biti će izrađena.\n" -#: src/mp3splt.c:1222 +#: src/mp3splt.c:1275 #, c-format msgid "" " Working with SILENCE AUTO-ADJUST (Threshold: %.1f dB Gap: %d sec Offset: " "%.2f Min: %.2f sec)\n" msgstr "" -#: src/mp3splt.c:1977 src/tags_parser.c:107 +#: src/mp3splt.c:2043 src/tags_parser.c:107 msgid "" " warning: cannot set tags from filename regular expression - compiled " "without pcre support\n" @@ -455,12 +503,17 @@ msgid "directory does not exists" msgstr "direktorij ne postoji" +#: src/checks.c:325 +#, c-format +msgid " warning: detected as %s but extension does not match\n" +msgstr "" + #: src/cddb.c:63 #, c-format msgid " reading informations from CDDB file %s ...\n" msgstr " čitanje informacija iz CDDB datoteke %s ...\n" -#: src/string_utils.c:638 src/string_utils.c:659 +#: src/string_utils.c:659 src/string_utils.c:680 msgid "not enough memory" msgstr "nedovoljno memorije" @@ -556,7 +609,7 @@ msgid " info: starting wrap mode split\n" msgstr "" -#: src/split_points.c:398 +#: src/split_points.c:421 #, c-format msgid " info: track too short (%ld.%ld.%ld < %ld.%ld.%ld); skipped.\n" msgstr "" @@ -566,83 +619,92 @@ msgid " info: overlapping split files with %ld.%ld.%ld\n" msgstr "" -#: plugins/mp3.c:1236 +#: src/utils.c:127 +#, c-format +msgid " warning: splitpoint %ld.%ld.%ld is not auto-adjusted\n" +msgstr "" + +#: plugins/mp3.c:1268 msgid "" " warning: lost sync and compiled without id3tag support - the split might be " "corrupt\n" msgstr "" -#: plugins/mp3.c:1332 +#: plugins/mp3.c:1362 msgid " info: found Xing or Info header. Switching to frame mode... \n" msgstr " info: nađeno Xing ili Info zaglavlje. Prebacujem u način okvira... \n" -#: plugins/mp3.c:1470 +#: plugins/mp3.c:1501 #, c-format msgid " info: MPEG %d Layer %d - %d Hz - %s" msgstr " info: MPEG %d Layer %d - %d Hz - %s" -#: plugins/mp3.c:1478 +#: plugins/mp3.c:1510 #, c-format msgid " - FRAME MODE NS" msgstr " - NAČIN OKVIRA NS" -#: plugins/mp3.c:1482 +#: plugins/mp3.c:1514 #, c-format msgid " - FRAME MODE" msgstr " - NAČIN OKVIRA" -#: plugins/mp3.c:1487 +#: plugins/mp3.c:1519 #, c-format msgid " - NS - %d Kb/s" msgstr " - NS - %d Kb/s" -#: plugins/mp3.c:1492 +#: plugins/mp3.c:1524 #, c-format msgid " - %d Kb/s" msgstr " - %d Kb/s" -#: plugins/mp3.c:1500 plugins/ogg.c:132 plugins/flac.c:214 +#: plugins/mp3.c:1532 plugins/ogg.c:132 plugins/flac.c:285 #, c-format msgid " - Total time: %dm.%02ds" msgstr " - Ukupno vrijeme: %dm.%02ds" -#: plugins/mp3.c:2823 +#: plugins/mp3.c:2930 #, c-format msgid " Detected file created with: Mp3Wrap v. %c.%c\n" msgstr " Otkrivrna datoteka je stvorena sa: Mp3Wrap i. %c.%c\n" -#: plugins/mp3.c:2861 +#: plugins/mp3.c:2968 msgid " Check for file integrity: calculating CRC please wait... " msgstr " Provjera integriteta datoteke: CRC izračunavanje, molim pričekajte..." -#: plugins/mp3.c:2880 +#: plugins/mp3.c:2987 msgid " OK\n" msgstr " U redu\n" -#: plugins/mp3.c:2899 +#: plugins/mp3.c:3006 msgid " Detected file created with: AlbumWrap\n" msgstr " Otkrivrna datoteka je stvorena sa: AlbumWrap\n" -#: plugins/mp3.c:2921 +#: plugins/mp3.c:3028 #, c-format msgid " Total files: %d\n" msgstr " Ukupno datoteka: %d\n" -#: plugins/mp3.c:3339 +#: plugins/mp3.c:3446 msgid " warning: stdin '-' is supposed to be mp3 stream.\n" msgstr " upozorenje: stdin '-' trebao bi biti mp3 stream.\n" -#: plugins/mp3.c:3366 +#: plugins/mp3.c:3473 #, c-format msgid " Processed %lu frames - Sync errors: %lu\n" msgstr " Obrađeno %lu okvira - Greška usklađivanja: %lu\n" +#: plugins/mp3.c:3656 +msgid " warning: overlapped chapters are not yet supported.\n" +msgstr "" + #: plugins/ogg.c:124 #, c-format msgid " info: Ogg Vorbis Stream - %ld - %ld Kb/s - %d channels" msgstr " info: Ogg Vorbis stream - %ld - %ld Kb/s - %d kanala" -#: plugins/ogg.c:1472 +#: plugins/ogg.c:1475 msgid " warning: stdin 'o-' is supposed to be ogg stream.\n" msgstr " upozorenje: stdin '-' trebao bi biti ogg stream.\n" @@ -662,7 +724,11 @@ msgid " info: trim end split at %ldm_%.2lds_%.2ldh\n" msgstr "" -#: plugins/flac.c:206 +#: plugins/flac.c:245 +msgid "--- last cue splitpoint ---" +msgstr "" + +#: plugins/flac.c:277 #, c-format msgid " info: Native FLAC - %u Hz - %d channels of %d bits" msgstr "" diff -Nru libmp3splt-0.9.0/po/libmp3splt0.pot libmp3splt-0.9.2/po/libmp3splt0.pot --- libmp3splt-0.9.0/po/libmp3splt0.pot 2013-07-20 06:58:38.000000000 +0000 +++ libmp3splt-0.9.2/po/libmp3splt0.pot 2014-11-09 15:04:22.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: m@ioalex.net\n" -"POT-Creation-Date: 2013-07-20 08:58+0200\n" +"POT-Creation-Date: 2014-11-09 16:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,19 +29,19 @@ " Artist: %s\n" msgstr "" -#: src/cue.c:513 +#: src/cue.c:518 #, c-format msgid " reading informations from CUE file %s ...\n" msgstr "" -#: src/cue.c:587 src/cddb.c:133 +#: src/cue.c:592 src/cddb.c:133 #, c-format msgid "" " Tracks: %d\n" "\n" msgstr "" -#: src/cue.c:810 +#: src/cue.c:815 #, c-format msgid " CUE file '%s' created.\n" msgstr "" @@ -173,273 +173,321 @@ msgstr "" #: src/errors.c:261 -msgid " wrap split ok" +msgid " internal sheet error: no internal sheet or invalid sheet" msgstr "" #: src/errors.c:264 +msgid " internal sheet error: internal sheet type not supported" +msgstr "" + +#: src/errors.c:268 +msgid " wrap split ok" +msgstr "" + +#: src/errors.c:271 msgid " wrap error: incorrect file length" msgstr "" -#: src/errors.c:267 +#: src/errors.c:274 msgid " wrap error: libmp3splt version too old for this wrap file" msgstr "" -#: src/errors.c:270 +#: src/errors.c:277 msgid " wrap error: no file found or bad index" msgstr "" -#: src/errors.c:273 +#: src/errors.c:280 #, c-format msgid " wrap error: file '%s' damaged or incomplete" msgstr "" -#: src/errors.c:277 +#: src/errors.c:284 msgid " wrap error: maybe not a wrapped file or wrap file damaged" msgstr "" -#: src/errors.c:280 +#: src/errors.c:287 msgid " file split (EOF)" msgstr "" -#: src/errors.c:282 +#: src/errors.c:289 msgid " no silence splitpoints found" msgstr "" -#: src/errors.c:284 +#: src/errors.c:291 msgid " time split ok" msgstr "" -#: src/errors.c:286 +#: src/errors.c:293 msgid " split in equal tracks ok" msgstr "" -#: src/errors.c:288 +#: src/errors.c:295 msgid " silence split ok" msgstr "" -#: src/errors.c:290 +#: src/errors.c:297 msgid " trim using silence split ok" msgstr "" -#: src/errors.c:293 +#: src/errors.c:300 msgid " file split, splitpoints bigger than length" msgstr "" -#: src/errors.c:295 +#: src/errors.c:302 msgid " file split" msgstr "" -#: src/errors.c:299 +#: src/errors.c:306 msgid " error: not enough splitpoints (<2)" msgstr "" -#: src/errors.c:302 +#: src/errors.c:309 #, c-format msgid " error: cannot open file '%s': %s" msgstr "" -#: src/errors.c:306 +#: src/errors.c:313 #, c-format msgid " error: cannot close file '%s': %s" msgstr "" -#: src/errors.c:313 +#: src/errors.c:320 #, c-format msgid " error: invalid input file '%s' for '%s' plugin" msgstr "" -#: src/errors.c:317 +#: src/errors.c:324 #, c-format msgid " error: splitpoints are equal (%s)" msgstr "" -#: src/errors.c:320 +#: src/errors.c:327 msgid " error: invalid time split value" msgstr "" -#: src/errors.c:323 +#: src/errors.c:330 msgid " error: invalid number of files for equal length split" msgstr "" -#: src/errors.c:326 +#: src/errors.c:333 msgid " error: cannot get total audio length" msgstr "" -#: src/errors.c:329 +#: src/errors.c:336 msgid " error: unknown error while setting tags with libid3" msgstr "" -#: src/errors.c:332 +#: src/errors.c:342 #, c-format msgid " error: the splitpoints are not in order (%s)" msgstr "" -#: src/errors.c:335 +#: src/errors.c:345 #, c-format msgid " error: negative splitpoint (%s)" msgstr "" -#: src/errors.c:339 +#: src/errors.c:349 #, c-format msgid " error: bad destination folder '%s' (%s)" msgstr "" -#: src/errors.c:342 +#: src/errors.c:352 msgid " error: incompatible options" msgstr "" -#: src/errors.c:345 +#: src/errors.c:355 #, c-format msgid " input and output are the same file ('%s')" msgstr "" -#: src/errors.c:348 +#: src/errors.c:358 msgid " error: cannot allocate memory" msgstr "" -#: src/errors.c:351 +#: src/errors.c:361 #, c-format msgid " error: cannot open destination file '%s': %s" msgstr "" -#: src/errors.c:355 +#: src/errors.c:365 #, c-format msgid " error: cannot write to output file '%s'" msgstr "" -#: src/errors.c:359 +#: src/errors.c:369 #, c-format msgid " error: error while reading file '%s': %s" msgstr "" -#: src/errors.c:362 +#: src/errors.c:372 #, c-format msgid " error: cannot seek file '%s'" msgstr "" -#: src/errors.c:365 +#: src/errors.c:375 msgid " error: begin point out of file" msgstr "" -#: src/errors.c:367 +#: src/errors.c:377 #, c-format msgid " error: inexistent file '%s': %s" msgstr "" -#: src/errors.c:370 +#: src/errors.c:380 msgid " split process cancelled" msgstr "" -#: src/errors.c:372 +#: src/errors.c:382 msgid " error: library locked" msgstr "" -#: src/errors.c:375 +#: src/errors.c:385 msgid " error: the state has not been initialized with 'mp3splt_new_state'" msgstr "" -#: src/errors.c:377 +#: src/errors.c:387 msgid " error: negative time split" msgstr "" -#: src/errors.c:380 +#: src/errors.c:390 #, c-format msgid " error: cannot create directory '%s'" msgstr "" -#: src/errors.c:383 +#: src/errors.c:393 msgid " error: no plugin found" msgstr "" -#: src/errors.c:385 +#: src/errors.c:395 msgid " error: cannot initiate libltdl" msgstr "" -#: src/errors.c:387 +#: src/errors.c:397 msgid " error: CRC failed" msgstr "" -#: src/errors.c:390 +#: src/errors.c:400 #, c-format msgid " error: no plugin matches the file '%s'" msgstr "" -#: src/errors.c:397 +#: src/errors.c:407 msgid " warning: output format ambiguous (@t or @n missing)" msgstr "" -#: src/errors.c:403 +#: src/errors.c:413 #, c-format msgid " error: illegal variable '@%s' in output format" msgstr "" -#: src/errors.c:408 +#: src/errors.c:418 msgid " error: invalid output format" msgstr "" -#: src/errors.c:412 +#: src/errors.c:422 msgid " error: inexistent splitpoint" msgstr "" -#: src/errors.c:415 +#: src/errors.c:425 #, c-format msgid " plugin error: '%s'" msgstr "" -#: src/errors.c:423 +#: src/errors.c:433 #, c-format msgid " error: unsupported feature for the plugin '%s'" msgstr "" -#: src/errors.c:426 +#: src/errors.c:436 msgid " audacity labels file processed" msgstr "" -#: src/errors.c:429 +#: src/errors.c:439 #, c-format msgid " audacity error: invalid audacity labels file '%s'" msgstr "" -#: src/errors.c:433 +#: src/errors.c:443 #, c-format msgid " regular expression error: %s" msgstr "" -#: src/errors.c:435 +#: src/errors.c:445 msgid " regular expressions are not supported" msgstr "" -#: src/errors.c:437 +#: src/errors.c:447 msgid " regular expression error: no match" msgstr "" -#: src/errors.c:439 +#: src/errors.c:449 msgid " regular expression ok" msgstr "" +#: src/errors.c:451 +msgid " error: one of the splitpoints has not been auto-adjusted" +msgstr "" + +#: src/errors.c:453 +#, c-format +msgid " invalid code error: '%s'" +msgstr "" + +#: src/mp3splt.c:1094 +msgid "" +" warning: bit reservoir handling for gapless playback is still experimental\n" +msgstr "" + +#: src/mp3splt.c:1099 +msgid " warning: bit reservoir is not compatible with overlap option\n" +msgstr "" + +#: src/mp3splt.c:1105 +msgid " warning: bit reservoir is not compatible with auto adjust option\n" +msgstr "" + +#: src/mp3splt.c:1111 +msgid " warning: bit reservoir is not compatible with input not seekable\n" +msgstr "" + +#: src/mp3splt.c:1124 +msgid "" +" warning: bit reservoir is not compatible with silence detection or " +"trimming\n" +msgstr "" + +#: src/mp3splt.c:1131 +msgid " warning: bit reservoir is not compatible with 'no xing'\n" +msgstr "" + #: src/mp3splt.c:1138 +msgid " warning: please enable frame mode to make bit reservoir work\n" +msgstr "" + +#: src/mp3splt.c:1191 #, c-format msgid " info: resolving linked filename to '%s'\n" msgstr "" -#: src/mp3splt.c:1193 +#: src/mp3splt.c:1246 #, c-format msgid " info: file matches the plugin '%s'\n" msgstr "" -#: src/mp3splt.c:1201 +#: src/mp3splt.c:1254 #, c-format msgid " M3U file '%s' will be created.\n" msgstr "" -#: src/mp3splt.c:1222 +#: src/mp3splt.c:1275 #, c-format msgid "" " Working with SILENCE AUTO-ADJUST (Threshold: %.1f dB Gap: %d sec Offset: " "%.2f Min: %.2f sec)\n" msgstr "" -#: src/mp3splt.c:1977 src/tags_parser.c:107 +#: src/mp3splt.c:2043 src/tags_parser.c:107 msgid "" " warning: cannot set tags from filename regular expression - compiled " "without pcre support\n" @@ -449,12 +497,17 @@ msgid "directory does not exists" msgstr "" +#: src/checks.c:325 +#, c-format +msgid " warning: detected as %s but extension does not match\n" +msgstr "" + #: src/cddb.c:63 #, c-format msgid " reading informations from CDDB file %s ...\n" msgstr "" -#: src/string_utils.c:638 src/string_utils.c:659 +#: src/string_utils.c:659 src/string_utils.c:680 msgid "not enough memory" msgstr "" @@ -548,7 +601,7 @@ msgid " info: starting wrap mode split\n" msgstr "" -#: src/split_points.c:398 +#: src/split_points.c:421 #, c-format msgid " info: track too short (%ld.%ld.%ld < %ld.%ld.%ld); skipped.\n" msgstr "" @@ -558,83 +611,92 @@ msgid " info: overlapping split files with %ld.%ld.%ld\n" msgstr "" -#: plugins/mp3.c:1236 +#: src/utils.c:127 +#, c-format +msgid " warning: splitpoint %ld.%ld.%ld is not auto-adjusted\n" +msgstr "" + +#: plugins/mp3.c:1268 msgid "" " warning: lost sync and compiled without id3tag support - the split might be " "corrupt\n" msgstr "" -#: plugins/mp3.c:1332 +#: plugins/mp3.c:1362 msgid " info: found Xing or Info header. Switching to frame mode... \n" msgstr "" -#: plugins/mp3.c:1470 +#: plugins/mp3.c:1501 #, c-format msgid " info: MPEG %d Layer %d - %d Hz - %s" msgstr "" -#: plugins/mp3.c:1478 +#: plugins/mp3.c:1510 #, c-format msgid " - FRAME MODE NS" msgstr "" -#: plugins/mp3.c:1482 +#: plugins/mp3.c:1514 #, c-format msgid " - FRAME MODE" msgstr "" -#: plugins/mp3.c:1487 +#: plugins/mp3.c:1519 #, c-format msgid " - NS - %d Kb/s" msgstr "" -#: plugins/mp3.c:1492 +#: plugins/mp3.c:1524 #, c-format msgid " - %d Kb/s" msgstr "" -#: plugins/mp3.c:1500 plugins/ogg.c:132 plugins/flac.c:214 +#: plugins/mp3.c:1532 plugins/ogg.c:132 plugins/flac.c:285 #, c-format msgid " - Total time: %dm.%02ds" msgstr "" -#: plugins/mp3.c:2823 +#: plugins/mp3.c:2930 #, c-format msgid " Detected file created with: Mp3Wrap v. %c.%c\n" msgstr "" -#: plugins/mp3.c:2861 +#: plugins/mp3.c:2968 msgid " Check for file integrity: calculating CRC please wait... " msgstr "" -#: plugins/mp3.c:2880 +#: plugins/mp3.c:2987 msgid " OK\n" msgstr "" -#: plugins/mp3.c:2899 +#: plugins/mp3.c:3006 msgid " Detected file created with: AlbumWrap\n" msgstr "" -#: plugins/mp3.c:2921 +#: plugins/mp3.c:3028 #, c-format msgid " Total files: %d\n" msgstr "" -#: plugins/mp3.c:3339 +#: plugins/mp3.c:3446 msgid " warning: stdin '-' is supposed to be mp3 stream.\n" msgstr "" -#: plugins/mp3.c:3366 +#: plugins/mp3.c:3473 #, c-format msgid " Processed %lu frames - Sync errors: %lu\n" msgstr "" +#: plugins/mp3.c:3656 +msgid " warning: overlapped chapters are not yet supported.\n" +msgstr "" + #: plugins/ogg.c:124 #, c-format msgid " info: Ogg Vorbis Stream - %ld - %ld Kb/s - %d channels" msgstr "" -#: plugins/ogg.c:1472 +#: plugins/ogg.c:1475 msgid " warning: stdin 'o-' is supposed to be ogg stream.\n" msgstr "" @@ -654,7 +716,11 @@ msgid " info: trim end split at %ldm_%.2lds_%.2ldh\n" msgstr "" -#: plugins/flac.c:206 +#: plugins/flac.c:245 +msgid "--- last cue splitpoint ---" +msgstr "" + +#: plugins/flac.c:277 #, c-format msgid " info: Native FLAC - %u Hz - %d channels of %d bits" msgstr "" diff -Nru libmp3splt-0.9.0/po/Makefile.in.in libmp3splt-0.9.2/po/Makefile.in.in --- libmp3splt-0.9.0/po/Makefile.in.in 2013-01-30 23:20:54.000000000 +0000 +++ libmp3splt-0.9.2/po/Makefile.in.in 2014-03-22 23:57:40.000000000 +0000 @@ -29,7 +29,7 @@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) +mkinstalldirs = @MKDIR_P@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ diff -Nru libmp3splt-0.9.0/README libmp3splt-0.9.2/README --- libmp3splt-0.9.0/README 2013-07-20 07:09:10.000000000 +0000 +++ libmp3splt-0.9.2/README 2014-11-09 16:48:11.000000000 +0000 @@ -1,6 +1,6 @@ - libmp3splt version 0.9.0 + libmp3splt version 0.9.2 - Copyright (c) 2005-2013 Alexandru Ionut Munteanu + Copyright (c) 2005-2014 Alexandru Ionut Munteanu Copyright (c) 2002-2005 Matteo Trotta Visit http://mp3splt.sourceforge.net for the latest libmp3splt release! diff -Nru libmp3splt-0.9.0/src/audacity.c libmp3splt-0.9.2/src/audacity.c --- libmp3splt-0.9.0/src/audacity.c 2013-04-20 15:22:04.000000000 +0000 +++ libmp3splt-0.9.2/src/audacity.c 2014-05-10 14:34:55.000000000 +0000 @@ -5,7 +5,7 @@ * * Copyright (c) 2002-2004 M. Trotta - * Copyright (c) 2007 Federico Grau - - * Copyright (c) 2005-2013 Alexandru Munteanu - + * Copyright (c) 2005-2014 Alexandru Munteanu - * * http://mp3splt.sourceforge.net * http://audacity.sourceforge.net/ diff -Nru libmp3splt-0.9.0/src/audacity.h libmp3splt-0.9.2/src/audacity.h --- libmp3splt-0.9.0/src/audacity.h 2013-02-08 09:21:56.000000000 +0000 +++ libmp3splt-0.9.2/src/audacity.h 2014-05-10 14:34:55.000000000 +0000 @@ -4,7 +4,7 @@ * * Copyright (c) 2002-2004 M. Trotta - * Copyright (c) 2007 Federico Grau - - * Copyright (c) 2005-2013 Alexandru Munteanu + * Copyright (c) 2005-2014 Alexandru Munteanu * * http://mp3splt.sourceforge.net * http://audacity.sourceforge.net/ diff -Nru libmp3splt-0.9.0/src/cddb.c libmp3splt-0.9.2/src/cddb.c --- libmp3splt-0.9.0/src/cddb.c 2013-07-08 20:48:25.000000000 +0000 +++ libmp3splt-0.9.2/src/cddb.c 2014-05-10 14:28:18.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -109,7 +109,7 @@ splt_tu_copy_tags(tags_at_0, all_tags, error); if (*error < 0) { goto function_end; } - splt_cc_put_filenames_from_tags(state, tracks, error, all_tags, SPLT_FALSE); + splt_cc_put_filenames_from_tags(state, tracks, error, all_tags, SPLT_FALSE, SPLT_FALSE); function_end: splt_tu_free_one_tags(&all_tags); diff -Nru libmp3splt-0.9.0/src/cddb_cue_common.c libmp3splt-0.9.2/src/cddb_cue_common.c --- libmp3splt-0.9.0/src/cddb_cue_common.c 2013-07-08 20:53:53.000000000 +0000 +++ libmp3splt-0.9.2/src/cddb_cue_common.c 2014-05-10 14:35:00.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -39,7 +39,8 @@ user using the format that is handled by oformat_parser.c */ void splt_cc_put_filenames_from_tags(splt_state *state, int tracks, int *error, - const splt_tags *all_tags, int only_set_name_if_null) + const splt_tags *all_tags, int only_set_name_if_null, + int force_splitnumber_as_filenumber) { int err = splt_tu_copy_tags_on_all_tracks(state, tracks, all_tags); if (err < 0) { *error = err; return; } @@ -64,7 +65,12 @@ const char *splitpoint_name = splt_sp_get_splitpoint_name(state, current_split, &err); if (!only_set_name_if_null || (splitpoint_name == NULL)) { - err = splt_u_finish_tags_and_put_output_format_filename(state, current_split); + int split_number = current_split; + if (force_splitnumber_as_filenumber) + { + split_number = -1; + } + err = splt_u_finish_tags_and_put_output_format_filename(state, split_number); if (err != SPLT_OK) { *error = err; return; } } diff -Nru libmp3splt-0.9.0/src/cddb_cue_common.h libmp3splt-0.9.2/src/cddb_cue_common.h --- libmp3splt-0.9.0/src/cddb_cue_common.h 2013-07-08 20:53:16.000000000 +0000 +++ libmp3splt-0.9.2/src/cddb_cue_common.h 2014-05-10 14:35:00.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -32,7 +32,8 @@ #ifndef CDDB_CUE_COMMON_H void splt_cc_put_filenames_from_tags(splt_state *state, int tracks, int *error, - const splt_tags *all_tags, int only_set_name_if_null); + const splt_tags *all_tags, int only_set_name_if_null, + int force_splitnumber_as_filenumber); #define CDDB_CUE_COMMON_H diff -Nru libmp3splt-0.9.0/src/cddb.h libmp3splt-0.9.2/src/cddb.h --- libmp3splt-0.9.0/src/cddb.h 2013-02-08 09:21:57.000000000 +0000 +++ libmp3splt-0.9.2/src/cddb.h 2014-05-10 14:28:18.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/checks.c libmp3splt-0.9.2/src/checks.c --- libmp3splt-0.9.0/src/checks.c 2013-07-20 06:24:57.000000000 +0000 +++ libmp3splt-0.9.2/src/checks.c 2014-05-10 14:28:17.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -262,7 +262,25 @@ } } -void splt_check_file_type(splt_state *state, int *error) +static int splt_check_if_file_matches_plugin_extension(const char *filename, splt_state *state, + int *error) +{ + const char *extension = splt_p_get_extension(state, error); + if (*error < 0) { return SPLT_FALSE; } + const char *upper_extension = splt_p_get_upper_extension(state, error); + if (*error < 0) { return SPLT_FALSE; } + + if (splt_su_str_ends_with(filename, extension) || + splt_su_str_ends_with(filename, upper_extension)) + { + return SPLT_TRUE; + } + + return SPLT_FALSE; +} + +void splt_check_file_type_and_set_plugin(splt_state *state, + short force_check_by_extension, short show_warnings, int *error) { int err = SPLT_OK; @@ -274,41 +292,56 @@ splt_plugins *pl = state->plug; int plugin_found = SPLT_FALSE; int i = 0; + int last_plugin_found_without_extension = -1; for (i = 0;i < pl->number_of_plugins_found;i++) { splt_p_set_current_plugin(state, i); err = SPLT_OK; - if (splt_o_get_int_option(state, SPLT_OPT_INPUT_NOT_SEEKABLE) && - ! splt_io_input_is_stdin(state)) + int file_matches_plugin_extension = + splt_check_if_file_matches_plugin_extension(filename, state, &err); + if (err < 0) { *error = err; return; } + + if (force_check_by_extension || + (splt_o_get_int_option(state, SPLT_OPT_INPUT_NOT_SEEKABLE) && + !splt_io_input_is_stdin(state))) { - const char *extension = splt_p_get_extension(state, &err); - const char *upper_extension = splt_p_get_extension(state, &err); - if (err == SPLT_OK) + if (file_matches_plugin_extension) { - if (splt_su_str_ends_with(filename, extension) || - splt_su_str_ends_with(filename, upper_extension)) - { - plugin_found = SPLT_TRUE; - break; - } + plugin_found = SPLT_TRUE; + break; } + continue; } - else + + if (splt_p_check_plugin_is_for_file(state, &err)) { - if (splt_p_check_plugin_is_for_file(state, &err)) + if (!splt_io_input_is_stdin(state) && !file_matches_plugin_extension) { - if (err == SPLT_OK) + if (show_warnings) { - plugin_found = SPLT_TRUE; - break; + const char *extension = splt_p_get_extension(state, error); + splt_c_put_warning_message_to_client(state, + _(" warning: detected as %s but extension does not match\n"), extension); } + last_plugin_found_without_extension = i; + } + else if (err == SPLT_OK) + { + plugin_found = SPLT_TRUE; + break; } } } if (! plugin_found) { + if (last_plugin_found_without_extension >= 0) + { + splt_p_set_current_plugin(state, last_plugin_found_without_extension); + return; + } + splt_e_set_error_data(state, filename); *error = SPLT_ERROR_NO_PLUGIN_FOUND_FOR_FILE; splt_d_print_debug(state,"No plugin found !\n"); diff -Nru libmp3splt-0.9.0/src/checks.h libmp3splt-0.9.2/src/checks.h --- libmp3splt-0.9.0/src/checks.h 2013-02-08 09:21:57.000000000 +0000 +++ libmp3splt-0.9.2/src/checks.h 2014-05-10 14:28:17.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -56,7 +56,8 @@ /****************************/ /* file checks */ -void splt_check_file_type(splt_state *state, int *error); +void splt_check_file_type_and_set_plugin(splt_state *state, short force_check_by_extension, + short show_warnings, int *error); int splt_check_is_the_same_file(splt_state *state, const char *file1, const char *file2, int *error); diff -Nru libmp3splt-0.9.0/src/client.c libmp3splt-0.9.2/src/client.c --- libmp3splt-0.9.0/src/client.c 2013-07-03 19:18:08.000000000 +0000 +++ libmp3splt-0.9.2/src/client.c 2014-05-10 14:35:00.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -67,40 +67,41 @@ p_bar->progress_type = type; } -void splt_c_put_info_message_to_client(splt_state *state, const char *message, ...) +static void splt_c_put_message_to_clientv(splt_state *state, splt_message_type type, + const char *message, va_list ap) { - va_list ap; - char *mess = NULL; - - va_start(ap, message); - mess = splt_su_format_messagev(state, message, ap); - va_end(ap); - + char *mess = splt_su_format_messagev(state, message, ap); if (mess) { - splt_c_put_message_to_client(state, mess, SPLT_MESSAGE_INFO); + splt_c_put_message_to_client(state, mess, type); free(mess); mess = NULL; } } -void splt_c_put_debug_message_to_client(splt_state *state, const char *message, ...) +void splt_c_put_info_message_to_client(splt_state *state, const char *message, ...) { va_list ap; - char *mess = NULL; - va_start(ap, message); - mess = splt_su_format_messagev(state, message, ap); + splt_c_put_message_to_clientv(state, SPLT_MESSAGE_INFO, message, ap); va_end(ap); +} - if (mess) - { - splt_c_put_message_to_client(state, mess, SPLT_MESSAGE_DEBUG); +void splt_c_put_warning_message_to_client(splt_state *state, const char *message, ...) +{ + va_list ap; + va_start(ap, message); + splt_c_put_message_to_clientv(state, SPLT_MESSAGE_WARNING, message, ap); + va_end(ap); +} - free(mess); - mess = NULL; - } +void splt_c_put_debug_message_to_client(splt_state *state, const char *message, ...) +{ + va_list ap; + va_start(ap, message); + splt_c_put_message_to_clientv(state, SPLT_MESSAGE_DEBUG, message, ap); + va_end(ap); } void splt_c_update_progress(splt_state *state, double current_point, diff -Nru libmp3splt-0.9.0/src/client.h libmp3splt-0.9.2/src/client.h --- libmp3splt-0.9.0/src/client.h 2013-02-08 09:21:57.000000000 +0000 +++ libmp3splt-0.9.2/src/client.h 2014-05-10 14:35:00.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -34,14 +34,12 @@ int splt_c_put_split_file(splt_state *state, const char *filename); void splt_c_put_progress_text(splt_state *state,int type); -void splt_c_put_info_message_to_client(splt_state *state, - const char *message, ...); -void splt_c_put_debug_message_to_client(splt_state *state, - const char *message, ...); +void splt_c_put_info_message_to_client(splt_state *state, const char *message, ...); +void splt_c_put_warning_message_to_client(splt_state *state, const char *message, ...); +void splt_c_put_debug_message_to_client(splt_state *state, const char *message, ...); void splt_c_update_progress(splt_state *state, double current_point, - double total_points, int progress_stage, - float progress_start, int refresh_rate); + double total_points, int progress_stage, float progress_start, int refresh_rate); #define SPLT_CLIENT_H diff -Nru libmp3splt-0.9.0/src/conversions.c libmp3splt-0.9.2/src/conversions.c --- libmp3splt-0.9.0/src/conversions.c 2013-02-08 09:21:49.000000000 +0000 +++ libmp3splt-0.9.2/src/conversions.c 2014-09-19 20:43:34.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -39,10 +39,9 @@ #include "splt.h" -//! Convert a string to an integer containing the hundreths of a second -long splt_co_convert_to_hundreths(const char *s) +long splt_co_convert_cue_line_to_hundreths(const char *s) { - long minutes = 0, seconds = 0, hundredths = 0, i = 0; + long minutes = 0, seconds = 0, frames = 0, i = 0; for(i=0; i< strlen(s); i++) { @@ -52,27 +51,22 @@ } } - if (sscanf(s, "%ld:%ld:%ld", &minutes, &seconds, &hundredths) < 2) + if (sscanf(s, "%ld:%ld:%ld", &minutes, &seconds, &frames) < 2) { return -1; } - if ((minutes < 0) || (seconds < 0) || (hundredths < 0)) + if ((minutes < 0) || (seconds < 0) || (frames < 0)) { return -1; } - if ((seconds > 59) || (hundredths > 99)) + if ((seconds > 59) || (frames > 99)) { return -1; } - if (s[strlen(s)-2]==':') - { - hundredths *= 10; - } - - long hun = hundredths; + long hun = (long) round((double) frames * 100.0 / 75.0); hun += (minutes * 60 + seconds) * 100; return hun; diff -Nru libmp3splt-0.9.0/src/conversions.h libmp3splt-0.9.2/src/conversions.h --- libmp3splt-0.9.0/src/conversions.h 2013-02-08 09:21:57.000000000 +0000 +++ libmp3splt-0.9.2/src/conversions.h 2014-09-19 20:43:56.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -31,7 +31,7 @@ #ifndef SPLT_CONVERSIONS_H -long splt_co_convert_to_hundreths (const char *s); +long splt_co_convert_cue_line_to_hundreths (const char *s); float splt_co_convert_to_db(double input); double splt_co_convert_from_db(float input); void splt_co_get_mins_secs_hundr(long split_hundr, long *mins, long *secs, long *hundr); diff -Nru libmp3splt-0.9.0/src/cue.c libmp3splt-0.9.2/src/cue.c --- libmp3splt-0.9.0/src/cue.c 2013-07-08 20:47:04.000000000 +0000 +++ libmp3splt-0.9.2/src/cue.c 2014-09-20 19:00:47.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -216,11 +216,11 @@ { if (cu->tracks > 0) { - if ((err = splt_cue_store_value(state, line_content, cu->tracks - 1, SPLT_TAGS_ARTIST, cu)) != SPLT_OK) + /*if ((err = splt_cue_store_value(state, line_content, cu->tracks - 1, SPLT_TAGS_ARTIST, cu)) != SPLT_OK) { cu->error = err; return; - } + }*/ if ((err = splt_cue_store_value(state, line_content, cu->tracks - 1, SPLT_TAGS_PERFORMER, cu)) != SPLT_OK) { @@ -232,11 +232,11 @@ } //! Process the rest of a cue line that begins with the word INDEX -static void splt_cue_process_index_line(char *line_content, cue_utils *cu, splt_state *state) +static void splt_cue_process_index_line(int index_length, char *line_content, cue_utils *cu, splt_state *state) { int err = SPLT_OK; - line_content += 9; + line_content += index_length; if (cu->tracks <= 0) { @@ -245,7 +245,7 @@ char *trimmed_line = splt_su_trim_spaces(line_content); - long hundr_seconds = splt_co_convert_to_hundreths(trimmed_line); + long hundr_seconds = splt_co_convert_cue_line_to_hundreths(trimmed_line); if (hundr_seconds == -1) { splt_e_set_error_data(state, cu->file); @@ -429,7 +429,12 @@ } else if ((line_content = strstr(line, "INDEX 01")) != NULL) { - splt_cue_process_index_line(line_content, cu, state); + splt_cue_process_index_line(9, line_content, cu, state); + } + //also support strange CUE files having INDEX 1 + else if ((line_content = strstr(line, "INDEX 1 ")) != NULL) + { + splt_cue_process_index_line(8, line_content, cu, state); } else if ((line_content = strstr(line, "FILE")) != NULL) { @@ -563,7 +568,7 @@ if (!splt_o_get_int_option(state, SPLT_OPT_CUE_SET_SPLITPOINT_NAMES_FROM_REM_NAME)) { - splt_cc_put_filenames_from_tags(state, tracks, error, cu->all_tags, SPLT_TRUE); + splt_cc_put_filenames_from_tags(state, tracks, error, cu->all_tags, SPLT_TRUE, SPLT_FALSE); } function_end: @@ -785,13 +790,13 @@ fprintf(file_output, " REM NOKEEP\n"); } - long mins = 0, secs = 0, hundr = 0; + long mins = 0, secs = 0, frames = 0; if (splitpoint == LONG_MAX) { splitpoint = total_time; } - splt_sp_get_mins_secs_hundr_from_splitpoint(splitpoint, &mins, &secs, &hundr); - fprintf(file_output, " INDEX 01 %02ld:%02ld:%02ld\n", mins, secs, hundr); + splt_sp_get_mins_secs_frames_from_splitpoint(splitpoint, &mins, &secs, &frames); + fprintf(file_output, " INDEX 01 %02ld:%02ld:%02ld\n", mins, secs, frames); splt_t_set_current_split_file_number_next(state); } diff -Nru libmp3splt-0.9.0/src/cue.h libmp3splt-0.9.2/src/cue.h --- libmp3splt-0.9.0/src/cue.h 2013-02-08 09:21:57.000000000 +0000 +++ libmp3splt-0.9.2/src/cue.h 2014-05-10 14:28:16.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/debug.c libmp3splt-0.9.2/src/debug.c --- libmp3splt-0.9.0/src/debug.c 2013-02-08 09:21:49.000000000 +0000 +++ libmp3splt-0.9.2/src/debug.c 2014-05-10 14:28:13.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/debug.h libmp3splt-0.9.2/src/debug.h --- libmp3splt-0.9.0/src/debug.h 2013-02-08 09:21:58.000000000 +0000 +++ libmp3splt-0.9.2/src/debug.h 2014-05-10 14:28:14.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/errors.c libmp3splt-0.9.2/src/errors.c --- libmp3splt-0.9.0/src/errors.c 2013-02-08 09:21:50.000000000 +0000 +++ libmp3splt-0.9.2/src/errors.c 2014-10-07 00:22:55.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -39,7 +39,7 @@ #include #ifdef __WIN32__ -#include +#include #else #include #endif @@ -256,6 +256,13 @@ case SPLT_FREEDB_ERROR_SITE: return splt_su_get_formatted_message(state, _(" freedb error: bad response from remote host")); + case SPLT_ERROR_INTERNAL_SHEET: + return splt_su_get_formatted_message(state, + _(" internal sheet error: no internal sheet or invalid sheet")); + case SPLT_ERROR_INTERNAL_SHEET_TYPE_NOT_SUPPORTED: + return splt_su_get_formatted_message(state, + _(" internal sheet error: internal sheet type not supported")); + // case SPLT_DEWRAP_OK: return splt_su_get_formatted_message(state, _(" wrap split ok")); @@ -327,6 +334,9 @@ case SPLT_ERROR_LIBID3: return splt_su_get_formatted_message(state, _(" error: unknown error while setting tags with libid3")); + case SPLT_ERROR_FAILED_BITRESERVOIR: + return splt_su_get_formatted_message(state, + " error: bit reservoir failed - %s", state->err.error_data); case SPLT_ERROR_SPLITPOINTS_NOT_IN_ORDER: return splt_su_get_formatted_message(state, _(" error: the splitpoints are not in order (%s)"), @@ -437,6 +447,11 @@ return splt_su_get_formatted_message(state, _(" regular expression error: no match")); case SPLT_REGEX_OK: return splt_su_get_formatted_message(state, _(" regular expression ok")); + case SPLT_ERROR_NO_AUTO_ADJUST_FOUND: + return splt_su_get_formatted_message(state, _(" error: one of the splitpoints has not been auto-adjusted")); + case SPLT_ERROR_INVALID_CODE: + return splt_su_get_formatted_message(state, _(" invalid code error: '%s'"), + state->err.error_data); } return NULL; diff -Nru libmp3splt-0.9.0/src/errors.h libmp3splt-0.9.2/src/errors.h --- libmp3splt-0.9.0/src/errors.h 2013-02-08 09:21:58.000000000 +0000 +++ libmp3splt-0.9.2/src/errors.h 2014-05-10 14:28:16.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/filename_regex.c libmp3splt-0.9.2/src/filename_regex.c --- libmp3splt-0.9.0/src/filename_regex.c 2013-02-08 09:21:50.000000000 +0000 +++ libmp3splt-0.9.2/src/filename_regex.c 2014-05-10 14:34:56.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2010 David Belohrad - * Copyright (c) 2010-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2010-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/filename_regex.h libmp3splt-0.9.2/src/filename_regex.h --- libmp3splt-0.9.0/src/filename_regex.h 2013-02-08 09:21:58.000000000 +0000 +++ libmp3splt-0.9.2/src/filename_regex.h 2014-05-10 14:34:56.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2010 David Belohrad - * Copyright (c) 2010-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2010-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/freedb.c libmp3splt-0.9.2/src/freedb.c --- libmp3splt-0.9.0/src/freedb.c 2013-02-08 09:21:50.000000000 +0000 +++ libmp3splt-0.9.2/src/freedb.c 2014-05-10 14:34:54.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -37,7 +37,7 @@ #ifdef __WIN32__ #include -#include +#include #else #include #include diff -Nru libmp3splt-0.9.0/src/freedb.h libmp3splt-0.9.2/src/freedb.h --- libmp3splt-0.9.0/src/freedb.h 2013-02-08 09:21:58.000000000 +0000 +++ libmp3splt-0.9.2/src/freedb.h 2014-05-10 14:34:54.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/freedb_utils.c libmp3splt-0.9.2/src/freedb_utils.c --- libmp3splt-0.9.0/src/freedb_utils.c 2013-02-08 09:21:50.000000000 +0000 +++ libmp3splt-0.9.2/src/freedb_utils.c 2014-05-10 14:28:17.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/freedb_utils.h libmp3splt-0.9.2/src/freedb_utils.h --- libmp3splt-0.9.0/src/freedb_utils.h 2013-02-08 09:21:58.000000000 +0000 +++ libmp3splt-0.9.2/src/freedb_utils.h 2014-05-10 14:28:17.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/input_output.c libmp3splt-0.9.2/src/input_output.c --- libmp3splt-0.9.0/src/input_output.c 2013-02-08 09:21:51.000000000 +0000 +++ libmp3splt-0.9.2/src/input_output.c 2014-09-19 21:48:27.000000000 +0000 @@ -3,7 +3,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -93,7 +93,20 @@ } #ifndef __WIN32__ -static char *splt_io_readlink(const char *fname) +static char *splt_io_to_real_path(char *fname) +{ + char *resolved_path = realpath(fname, NULL); + + if (resolved_path) + { + free(fname); + return resolved_path; + } + + return fname; +} + +static char *splt_io_readlink_as_realpath(const char *fname) { int bufsize = 1024; @@ -115,7 +128,7 @@ if (real_link_size < bufsize) { linked_fname[real_link_size] = '\0'; - return linked_fname; + return splt_io_to_real_path(linked_fname); } free(linked_fname); @@ -129,7 +142,7 @@ { char *previous_linked_fname = NULL; - char *linked_fname = splt_io_readlink(fname); + char *linked_fname = splt_io_readlink_as_realpath(fname); if (!linked_fname) { return NULL; @@ -143,7 +156,7 @@ free(previous_linked_fname); } previous_linked_fname = linked_fname; - linked_fname = splt_io_readlink(linked_fname); + linked_fname = splt_io_readlink_as_realpath(linked_fname); count++; if (count > MAX_SYMLINKS) @@ -716,7 +729,7 @@ { state->split.write_cb(ptr, size, nmemb, state->split.write_cb_data); } - return size * nmemb; + return nmemb; } else { @@ -762,7 +775,7 @@ return line; } -unsigned char *splt_io_fread(FILE *file, int start, size_t size) +unsigned char *splt_io_fread(FILE *file, size_t size) { unsigned char *bytes = malloc(sizeof(unsigned char) * size); diff -Nru libmp3splt-0.9.0/src/input_output.h libmp3splt-0.9.2/src/input_output.h --- libmp3splt-0.9.0/src/input_output.h 2013-02-08 09:21:59.000000000 +0000 +++ libmp3splt-0.9.2/src/input_output.h 2014-05-10 14:28:15.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -53,7 +53,7 @@ int splt_io_stat(const char *path, mode_t *st_mode, off_t *st_size); FILE *splt_io_fopen(const char *filename, const char *mode); int splt_io_mkdir(splt_state *state, const char *path); -unsigned char *splt_io_fread(FILE *file, int start, size_t size); +unsigned char *splt_io_fread(FILE *file, size_t size); size_t splt_io_fwrite(splt_state *state, const void *ptr, size_t size, size_t nmemb, FILE *stream); diff -Nru libmp3splt-0.9.0/src/Makefile.in libmp3splt-0.9.2/src/Makefile.in --- libmp3splt-0.9.0/src/Makefile.in 2013-07-20 07:09:21.000000000 +0000 +++ libmp3splt-0.9.2/src/Makefile.in 2014-11-09 16:48:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -565,14 +565,14 @@ @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff -Nru libmp3splt-0.9.0/src/mp3splt.c libmp3splt-0.9.2/src/mp3splt.c --- libmp3splt-0.9.0/src/mp3splt.c 2013-02-08 09:21:51.000000000 +0000 +++ libmp3splt-0.9.2/src/mp3splt.c 2014-09-16 21:39:39.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -127,10 +127,12 @@ { #ifdef ENABLE_NLS -# ifndef __WIN32__ + #ifndef __WIN32__ bindtextdomain(MP3SPLT_LIB_GETTEXT_DOMAIN, LOCALEDIR); -# endif + bind_textdomain_codeset(MP3SPLT_LIB_GETTEXT_DOMAIN, nl_langinfo(CODESET)); + #else bind_textdomain_codeset(MP3SPLT_LIB_GETTEXT_DOMAIN, "UTF-8"); + #endif #endif state = splt_t_new_state(state, err); @@ -898,7 +900,7 @@ splt_o_lock_library(state); - splt_check_file_type(state, &error); + splt_check_file_type_and_set_plugin(state, SPLT_FALSE, SPLT_FALSE, &error); if (error < 0) { goto end; } splt_o_lock_messages(state); @@ -1086,6 +1088,57 @@ splt_d_print_debug(state,"Starting to split file ...\n"); + if (splt_o_get_int_option(state, SPLT_OPT_HANDLE_BIT_RESERVOIR)) + { + splt_c_put_warning_message_to_client(state, + _(" warning: bit reservoir handling for gapless playback is still experimental\n")); + + if (splt_o_get_long_option(state, SPLT_OPT_OVERLAP_TIME) > 0) + { + splt_c_put_warning_message_to_client(state, + _(" warning: bit reservoir is not compatible with overlap option\n")); + } + + if (splt_o_get_int_option(state, SPLT_OPT_AUTO_ADJUST)) + { + splt_c_put_warning_message_to_client(state, + _(" warning: bit reservoir is not compatible with auto adjust option\n")); + } + + if (splt_o_get_int_option(state, SPLT_OPT_INPUT_NOT_SEEKABLE)) + { + splt_c_put_warning_message_to_client(state, + _(" warning: bit reservoir is not compatible with input not seekable\n")); + } + + int supported_split_mode = SPLT_TRUE; + int split_mode = splt_o_get_int_option(state, SPLT_OPT_SPLIT_MODE); + if ((split_mode == SPLT_OPTION_SILENCE_MODE) || (split_mode == SPLT_OPTION_TRIM_SILENCE_MODE)) + { + supported_split_mode = SPLT_FALSE; + } + + if (!supported_split_mode) + { + splt_c_put_warning_message_to_client(state, + _(" warning: bit reservoir is not compatible with silence detection or trimming\n")); + } + + int with_xing = splt_o_get_int_option(state, SPLT_OPT_XING); + if (!with_xing) + { + splt_c_put_warning_message_to_client(state, + _(" warning: bit reservoir is not compatible with 'no xing'\n")); + } + + int with_frame_mode = splt_o_get_int_option(state, SPLT_OPT_FRAME_MODE); + if (!with_frame_mode) + { + splt_c_put_warning_message_to_client(state, + _(" warning: please enable frame mode to make bit reservoir work\n")); + } + } + char *new_filename_path = NULL; char *fname_to_split = splt_t_get_filename_to_split(state); @@ -1170,7 +1223,7 @@ if (error < 0) { goto function_end; } //we check if mp3 or ogg - splt_check_file_type(state, &error); + splt_check_file_type_and_set_plugin(state, SPLT_FALSE, SPLT_TRUE, &error); if (error < 0) { goto function_end; } int tags_option = splt_o_get_int_option(state, SPLT_OPT_TAGS); @@ -1344,7 +1397,32 @@ { splt_audacity_put_splitpoints(file, state, &err); } + else if (type == PLUGIN_INTERNAL_IMPORT) + { + char *old_filename_to_split = strdup(mp3splt_get_filename_to_split(state)); + if (old_filename_to_split == NULL) + { + err = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + goto end; + } + + err = splt_t_set_filename_to_split(state, file); + if (err < 0) { goto end2; } + + splt_check_file_type_and_set_plugin(state, SPLT_TRUE, SPLT_FALSE, &err); + if (err >= 0) + { + splt_t_free_splitpoints_tags(state); + splt_p_import_internal_sheets(state, &err); + } + + splt_t_set_filename_to_split(state, old_filename_to_split); + +end2: + free(old_filename_to_split); + } +end: splt_o_unlock_library(state); return err; @@ -1636,7 +1714,7 @@ splt_o_lock_library(state); //we check the format of the filename - splt_check_file_type(state, err); + splt_check_file_type_and_set_plugin(state, SPLT_FALSE, SPLT_FALSE, err); int old_split_mode = splt_o_get_int_option(state, SPLT_OPT_SPLIT_MODE); splt_o_set_int_option(state, SPLT_OPT_SPLIT_MODE, SPLT_OPTION_WRAP_MODE); @@ -1734,7 +1812,7 @@ splt_t_set_stop_split(state, SPLT_FALSE); - splt_check_file_type(state, err); + splt_check_file_type_and_set_plugin(state, SPLT_FALSE, SPLT_FALSE, err); if (*err >= 0) { @@ -1778,7 +1856,7 @@ splt_t_set_stop_split(state, SPLT_FALSE); - splt_check_file_type(state, err); + splt_check_file_type_and_set_plugin(state, SPLT_FALSE, SPLT_FALSE, err); if (*err >= 0) { @@ -1851,18 +1929,6 @@ } #endif -/*! TODO: What does this function do - -\param state The splt_state The central structure containing all data -for our library -\param num_of_files_found The number of files this library has found -\param error The error code - -\attention The resulting string is malloc'ed and must be freed by the -caller after use. - -\todo What does this function do? -*/ char **mp3splt_find_filenames(splt_state *state, const char *filename, int *num_of_files_found, splt_code *error) { @@ -1973,7 +2039,7 @@ #ifndef NO_PCRE tags = splt_fr_parse_from_state(state, error); #else - splt_c_put_info_message_to_client(state, + splt_c_put_warning_message_to_client(state, _(" warning: cannot set tags from filename regular expression - compiled without pcre support\n")); *error = SPLT_REGEX_UNAVAILABLE; #endif diff -Nru libmp3splt-0.9.0/src/oformat_parser.c libmp3splt-0.9.2/src/oformat_parser.c --- libmp3splt-0.9.0/src/oformat_parser.c 2013-03-19 21:25:31.000000000 +0000 +++ libmp3splt-0.9.2/src/oformat_parser.c 2014-10-02 22:46:20.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -83,6 +83,7 @@ case 'A': case 'b': case 'f': + case 'd': case 'g': case 'p': break; @@ -533,7 +534,7 @@ int max_number_of_digits = splt_u_get_requested_num_of_digits(state, state->oformat.format[i], &requested_num_of_digits, SPLT_FALSE); - snprintf(temp + offset, temp_len, format); + snprintf(temp + offset, temp_len, "%s", format); fm_length = strlen(temp) + 1 + max_number_of_digits; if ((fm = malloc(fm_length * sizeof(char))) == NULL) @@ -563,7 +564,7 @@ // if (artist_or_performer != NULL) { - snprintf(temp+2,temp_len, state->oformat.format[i]+2); + snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2); int artist_length = 0; artist_length = strlen(artist_or_performer); @@ -571,7 +572,7 @@ } else { - snprintf(temp,temp_len, state->oformat.format[i]+2); + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + 1; } @@ -591,7 +592,7 @@ } else { - snprintf(fm, fm_length, temp); + snprintf(fm, fm_length, "%s", temp); } break; @@ -608,7 +609,7 @@ // if (artist != NULL) { - snprintf(temp+2,temp_len, state->oformat.format[i]+2); + snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2); int artist_length = 0; artist_length = strlen(artist); @@ -616,7 +617,7 @@ } else { - snprintf(temp,temp_len, state->oformat.format[i]+2); + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + 1; } @@ -636,7 +637,7 @@ } else { - snprintf(fm, fm_length, temp); + snprintf(fm, fm_length, "%s", temp); } break; case 'b': @@ -654,13 +655,13 @@ { int album_length = 0; album_length = strlen(album); - snprintf(temp+2, temp_len, state->oformat.format[i]+2); + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + album_length + 1; } else { - snprintf(temp,temp_len, state->oformat.format[i]+2); + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + 1; } @@ -698,13 +699,13 @@ { int genre_length = 0; genre_length = strlen(genre); - snprintf(temp+2, temp_len, state->oformat.format[i]+2); + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + genre_length + 1; } else { - snprintf(temp,temp_len, state->oformat.format[i]+2); + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + 1; } @@ -742,13 +743,13 @@ { int title_length = 0; title_length = strlen(title); - snprintf(temp+2, temp_len, state->oformat.format[i]+2); + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + title_length + 1; } else { - snprintf(temp,temp_len, state->oformat.format[i]+2); + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + 1; } @@ -768,7 +769,7 @@ } else { - snprintf(fm, fm_length, temp); + snprintf(fm, fm_length, "%s", temp); } break; case 'p': @@ -786,13 +787,13 @@ { int performer_length = 0; performer_length = strlen(performer); - snprintf(temp+2, temp_len, state->oformat.format[i]+2); + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + performer_length + 1; } else { - snprintf(temp,temp_len, state->oformat.format[i]+2); + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2); fm_length = strlen(temp) + 1; } @@ -811,7 +812,7 @@ } else { - snprintf(fm, fm_length, temp); + snprintf(fm, fm_length, "%s", temp); } break; case 'l': @@ -861,7 +862,7 @@ const char *format = splt_u_get_format_ptr(state->oformat.format[i], temp, NULL); - snprintf(temp + 4, temp_len, format + 2); + snprintf(temp + 4, temp_len, "%s", format + 2); fm_length = strlen(temp) + 1 + max_num_of_digits; } else @@ -902,7 +903,7 @@ original_filename = strdup(splt_su_get_fname_without_path(splt_t_get_filename_to_split(state))); if (original_filename) { - snprintf(temp+2,temp_len, state->oformat.format[i]+2); + snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2); splt_su_cut_extension(original_filename); @@ -926,6 +927,30 @@ } } break; + case 'd': + { + char *last_dir = splt_su_get_last_dir_of_fname(splt_t_get_filename_to_split(state), &error); + if (error < 0) { goto end; } + + if (last_dir) + { + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2); + + int last_dir_length = strlen(last_dir); + + fm_length = strlen(temp) + last_dir_length; + if ((fm = malloc(fm_length * sizeof(char))) == NULL) + { + error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; + goto end; + } + + snprintf(fm, fm_length, temp, last_dir); + free(last_dir); + last_dir = NULL; + } + } + break; } } else diff -Nru libmp3splt-0.9.0/src/oformat_parser.h libmp3splt-0.9.2/src/oformat_parser.h --- libmp3splt-0.9.0/src/oformat_parser.h 2013-02-08 09:21:59.000000000 +0000 +++ libmp3splt-0.9.2/src/oformat_parser.h 2014-05-10 14:34:54.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/options.c libmp3splt-0.9.2/src/options.c --- libmp3splt-0.9.0/src/options.c 2013-04-28 07:42:51.000000000 +0000 +++ libmp3splt-0.9.2/src/options.c 2014-05-28 22:04:18.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -75,6 +75,10 @@ state->options.cue_set_splitpoint_names_from_rem_name = SPLT_FALSE; state->options.cue_disable_cue_file_created_message = SPLT_FALSE; state->options.cue_cddb_add_tags_with_keep_original_tags = SPLT_FALSE; + state->options.warn_if_no_auto_adjust_found = SPLT_FALSE; + state->options.stop_if_no_auto_adjust_found = SPLT_FALSE; + state->options.decode_and_write_flac_md5sum = SPLT_FALSE; + state->options.handle_bit_reservoir = SPLT_FALSE; state->options.id3v2_encoding = SPLT_ID3V2_UTF16; state->options.input_tags_encoding = SPLT_ID3V2_UTF8; state->options.time_minimum_length = 0; @@ -141,6 +145,18 @@ case SPLT_OPT_CUE_CDDB_ADD_TAGS_WITH_KEEP_ORIGINAL_TAGS: state->options.cue_cddb_add_tags_with_keep_original_tags = *((int *)data); break; + case SPLT_OPT_WARN_IF_NO_AUTO_ADJUST_FOUND: + state->options.warn_if_no_auto_adjust_found = *((int *)data); + break; + case SPLT_OPT_STOP_IF_NO_AUTO_ADJUST_FOUND: + state->options.stop_if_no_auto_adjust_found = *((int *)data); + break; + case SPLT_OPT_DECODE_AND_WRITE_FLAC_MD5SUM_FOR_CREATED_FILES: + state->options.decode_and_write_flac_md5sum = *((int *)data); + break; + case SPLT_OPT_HANDLE_BIT_RESERVOIR: + state->options.handle_bit_reservoir = *((int *)data); + break; case SPLT_OPT_ID3V2_ENCODING: state->options.id3v2_encoding = *((int *) data); break; @@ -271,6 +287,14 @@ return &state->options.cue_disable_cue_file_created_message; case SPLT_OPT_CUE_CDDB_ADD_TAGS_WITH_KEEP_ORIGINAL_TAGS: return &state->options.cue_cddb_add_tags_with_keep_original_tags; + case SPLT_OPT_WARN_IF_NO_AUTO_ADJUST_FOUND: + return &state->options.warn_if_no_auto_adjust_found; + case SPLT_OPT_STOP_IF_NO_AUTO_ADJUST_FOUND: + return &state->options.stop_if_no_auto_adjust_found; + case SPLT_OPT_DECODE_AND_WRITE_FLAC_MD5SUM_FOR_CREATED_FILES: + return &state->options.decode_and_write_flac_md5sum; + case SPLT_OPT_HANDLE_BIT_RESERVOIR: + return &state->options.handle_bit_reservoir; case SPLT_OPT_ID3V2_ENCODING: return &state->options.id3v2_encoding; case SPLT_OPT_INPUT_TAGS_ENCODING: diff -Nru libmp3splt-0.9.0/src/options.h libmp3splt-0.9.2/src/options.h --- libmp3splt-0.9.0/src/options.h 2013-02-08 09:21:59.000000000 +0000 +++ libmp3splt-0.9.2/src/options.h 2014-05-10 14:34:56.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/output_format.c libmp3splt-0.9.2/src/output_format.c --- libmp3splt-0.9.0/src/output_format.c 2013-02-08 09:21:52.000000000 +0000 +++ libmp3splt-0.9.2/src/output_format.c 2014-05-10 14:28:15.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/output_format.h libmp3splt-0.9.2/src/output_format.h --- libmp3splt-0.9.0/src/output_format.h 2013-02-08 09:21:59.000000000 +0000 +++ libmp3splt-0.9.2/src/output_format.h 2014-05-10 14:28:16.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/pair.c libmp3splt-0.9.2/src/pair.c --- libmp3splt-0.9.0/src/pair.c 2013-02-08 09:21:52.000000000 +0000 +++ libmp3splt-0.9.2/src/pair.c 2014-05-10 14:34:54.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/pair.h libmp3splt-0.9.2/src/pair.h --- libmp3splt-0.9.0/src/pair.h 2013-02-08 09:21:59.000000000 +0000 +++ libmp3splt-0.9.2/src/pair.h 2014-05-10 14:34:54.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/plugins.c libmp3splt-0.9.2/src/plugins.c --- libmp3splt-0.9.0/src/plugins.c 2013-03-19 21:08:04.000000000 +0000 +++ libmp3splt-0.9.2/src/plugins.c 2014-05-28 21:30:15.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -38,6 +38,7 @@ #include #include +#include #ifdef __WIN32__ #include @@ -412,8 +413,6 @@ int splt_p_move_replace_plugin_data(splt_state *state, int old, int new) { splt_plugins *pl = state->plug; - fprintf(stdout, "move old %d to new %d\n", old, new); - fflush(stdout); splt_p_free_plugin_data(&pl->data[new]); @@ -620,6 +619,8 @@ lt_dlsym(pl->data[i].plugin_handle, "splt_pl_check_plugin_is_for_file"); pl->data[i].func->splt_pl_search_syncerrors = lt_dlsym(pl->data[i].plugin_handle, "splt_pl_search_syncerrors"); + pl->data[i].func->splt_pl_import_internal_sheets = + lt_dlsym(pl->data[i].plugin_handle, "splt_pl_import_internal_sheets"); pl->data[i].func->splt_pl_dewrap = lt_dlsym(pl->data[i].plugin_handle, "splt_pl_dewrap"); pl->data[i].func->splt_pl_offset_split = @@ -799,6 +800,25 @@ } } +void splt_p_import_internal_sheets(splt_state *state, splt_code *error) +{ + splt_plugins *pl = state->plug; + int current_plugin = splt_p_get_current_plugin(state); + if ((current_plugin < 0) || (current_plugin >= pl->number_of_plugins_found)) + { + *error = SPLT_ERROR_NO_PLUGIN_FOUND; + return; + } + + if (pl->data[current_plugin].func->splt_pl_import_internal_sheets == NULL) + { + *error = SPLT_PLUGIN_ERROR_UNSUPPORTED_FEATURE; + return; + } + + pl->data[current_plugin].func->splt_pl_import_internal_sheets(state, error); +} + double splt_p_split(splt_state *state, const char *final_fname, double begin_point, double end_point, int *error, int save_end_point) { diff -Nru libmp3splt-0.9.0/src/plugins.h libmp3splt-0.9.2/src/plugins.h --- libmp3splt-0.9.0/src/plugins.h 2013-02-08 09:22:00.000000000 +0000 +++ libmp3splt-0.9.2/src/plugins.h 2014-05-10 14:34:59.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -38,6 +38,7 @@ int splt_p_check_plugin_is_for_file(splt_state *state, int *error); void splt_p_search_syncerrors(splt_state *state, int *error); void splt_p_dewrap(splt_state *state, int listonly, const char *dir, int *error); +void splt_p_import_internal_sheets(splt_state *state, splt_code *error); double splt_p_split(splt_state *state, const char *final_fname, double begin_point, double end_point, int *error, int save_end_point); int splt_p_simple_split(splt_state *state, const char *output_fname, off_t begin, diff -Nru libmp3splt-0.9.0/src/proxy.c libmp3splt-0.9.2/src/proxy.c --- libmp3splt-0.9.0/src/proxy.c 2013-02-08 09:21:53.000000000 +0000 +++ libmp3splt-0.9.2/src/proxy.c 2014-05-10 14:35:00.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/proxy.h libmp3splt-0.9.2/src/proxy.h --- libmp3splt-0.9.0/src/proxy.h 2013-02-08 09:22:00.000000000 +0000 +++ libmp3splt-0.9.2/src/proxy.h 2014-05-10 14:35:00.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/silence_utils.c libmp3splt-0.9.2/src/silence_utils.c --- libmp3splt-0.9.0/src/silence_utils.c 2013-02-08 09:21:53.000000000 +0000 +++ libmp3splt-0.9.2/src/silence_utils.c 2014-05-10 14:28:14.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/silence_utils.h libmp3splt-0.9.2/src/silence_utils.h --- libmp3splt-0.9.0/src/silence_utils.h 2013-02-08 09:22:00.000000000 +0000 +++ libmp3splt-0.9.2/src/silence_utils.h 2014-05-10 14:28:14.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/socket_manager.c libmp3splt-0.9.2/src/socket_manager.c --- libmp3splt-0.9.0/src/socket_manager.c 2013-07-06 22:25:35.000000000 +0000 +++ libmp3splt-0.9.2/src/socket_manager.c 2014-05-10 14:28:15.000000000 +0000 @@ -4,7 +4,7 @@ * Utility for mp3/ogg splitting without decoding * * Copyright (c) 2002-2004 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net */ @@ -37,9 +37,9 @@ #ifdef __WIN32__ #define _WIN32_WINNT 0x0501 +#include #include #include -#include #else #include #include diff -Nru libmp3splt-0.9.0/src/socket_manager.h libmp3splt-0.9.2/src/socket_manager.h --- libmp3splt-0.9.0/src/socket_manager.h 2013-02-08 09:22:00.000000000 +0000 +++ libmp3splt-0.9.2/src/socket_manager.h 2014-05-10 14:28:15.000000000 +0000 @@ -4,7 +4,7 @@ * Utility for mp3/ogg splitting without decoding * * Copyright (c) 2002-2004 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu + * Copyright (c) 2005-2014 Alexandru Munteanu * * http://mp3splt.sourceforge.net **/ diff -Nru libmp3splt-0.9.0/src/split_points.c libmp3splt-0.9.2/src/split_points.c --- libmp3splt-0.9.0/src/split_points.c 2013-02-08 09:21:53.000000000 +0000 +++ libmp3splt-0.9.2/src/split_points.c 2014-09-20 18:21:07.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -35,6 +35,7 @@ checking, of this split point already exists,...) */ #include +#include #include "splt.h" @@ -296,6 +297,28 @@ } splitpoint /= 100; + + if (secs) + { + *secs = splitpoint % 60; + } + + if (mins) + { + *mins = splitpoint / 60; + } +} + +void splt_sp_get_mins_secs_frames_from_splitpoint(long splitpoint, + long *mins, long *secs, long *frames) +{ + if (frames) + { + long hundr = splitpoint % 100; + *frames = (long) round((double) hundr * 75.0 / 100.0); + } + + splitpoint /= 100; if (secs) { diff -Nru libmp3splt-0.9.0/src/split_points.h libmp3splt-0.9.2/src/split_points.h --- libmp3splt-0.9.0/src/split_points.h 2013-02-08 09:22:00.000000000 +0000 +++ libmp3splt-0.9.2/src/split_points.h 2014-09-20 18:21:22.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -57,6 +57,8 @@ void splt_sp_get_mins_secs_hundr_from_splitpoint(long splitpoint, long *mins, long *secs, long *hudr); +void splt_sp_get_mins_secs_frames_from_splitpoint(long splitpoint, + long *mins, long *secs, long *frames); long splt_sp_overlap_time(splt_state *state, int splitpoint_index); diff -Nru libmp3splt-0.9.0/src/splt_array.c libmp3splt-0.9.2/src/splt_array.c --- libmp3splt-0.9.0/src/splt_array.c 2013-02-08 09:21:54.000000000 +0000 +++ libmp3splt-0.9.2/src/splt_array.c 2014-05-10 14:34:57.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/splt_array.h libmp3splt-0.9.2/src/splt_array.h --- libmp3splt-0.9.0/src/splt_array.h 2013-02-08 09:22:01.000000000 +0000 +++ libmp3splt-0.9.2/src/splt_array.h 2014-05-10 14:34:58.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/splt.c libmp3splt-0.9.2/src/splt.c --- libmp3splt-0.9.0/src/splt.c 2013-07-03 20:27:31.000000000 +0000 +++ libmp3splt-0.9.2/src/splt.c 2014-10-12 09:16:46.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/splt.h libmp3splt-0.9.2/src/splt.h --- libmp3splt-0.9.0/src/splt.h 2013-04-28 08:24:50.000000000 +0000 +++ libmp3splt-0.9.2/src/splt.h 2014-05-28 22:04:08.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -487,6 +487,10 @@ int cue_set_splitpoint_names_from_rem_name; int cue_disable_cue_file_created_message; int cue_cddb_add_tags_with_keep_original_tags; + int warn_if_no_auto_adjust_found; + int stop_if_no_auto_adjust_found; + int decode_and_write_flac_md5sum; + int handle_bit_reservoir; int id3v2_encoding; int input_tags_encoding; long time_minimum_length; @@ -655,7 +659,11 @@ #include #ifdef ENABLE_NLS -# include + #include + + #ifndef __WIN32 + #include + #endif #endif #ifdef __WIN32__ diff -Nru libmp3splt-0.9.0/src/string_utils.c libmp3splt-0.9.2/src/string_utils.c --- libmp3splt-0.9.0/src/string_utils.c 2013-02-08 09:21:54.000000000 +0000 +++ libmp3splt-0.9.2/src/string_utils.c 2014-10-02 22:48:45.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -457,6 +457,27 @@ return fname_without_path_and_extension; } +char *splt_su_get_last_dir_of_fname(const char *filename_with_path, int *error) +{ + if (!filename_with_path) { return NULL; } + + char *full_fname = strdup(filename_with_path); + if (!full_fname) { *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; return NULL; } + + splt_su_keep_path_and_remove_filename(full_fname); + + char *first_dirchar = strchr(full_fname, SPLT_DIRCHAR); + if (!first_dirchar) { return full_fname; } + + char *last_dir = NULL; + int err = splt_su_copy(first_dirchar + 1, &last_dir); + if (err < 0) { *error = err; } + + free(full_fname); + + return last_dir; +} + char *splt_su_get_fname_with_path_and_extension(splt_state *state, int *error) { int err = SPLT_OK; diff -Nru libmp3splt-0.9.0/src/string_utils.h libmp3splt-0.9.2/src/string_utils.h --- libmp3splt-0.9.0/src/string_utils.h 2013-02-08 09:22:01.000000000 +0000 +++ libmp3splt-0.9.2/src/string_utils.h 2014-10-02 22:43:11.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -53,6 +53,7 @@ void splt_su_keep_path_and_remove_filename(char *path); char *splt_su_get_fname_without_path_and_extension(const char *filename, int *error); char *splt_su_get_fname_with_path_and_extension(splt_state *state, int *error); +char *splt_su_get_last_dir_of_fname(const char *filename_with_path, int *error); void splt_su_cut_extension(char *str); char *splt_su_convert(const char *str, splt_str_format format, int *error); diff -Nru libmp3splt-0.9.0/src/sync_errors.c libmp3splt-0.9.2/src/sync_errors.c --- libmp3splt-0.9.0/src/sync_errors.c 2013-02-08 09:21:55.000000000 +0000 +++ libmp3splt-0.9.2/src/sync_errors.c 2014-05-10 14:34:58.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/sync_errors.h libmp3splt-0.9.2/src/sync_errors.h --- libmp3splt-0.9.0/src/sync_errors.h 2013-02-08 09:22:01.000000000 +0000 +++ libmp3splt-0.9.2/src/sync_errors.h 2014-05-10 14:34:58.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/tags_parser.c libmp3splt-0.9.2/src/tags_parser.c --- libmp3splt-0.9.0/src/tags_parser.c 2013-04-21 14:40:09.000000000 +0000 +++ libmp3splt-0.9.2/src/tags_parser.c 2014-05-10 14:34:59.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -103,7 +103,7 @@ splt_tu_free_one_tags(&tags); #else - splt_c_put_info_message_to_client(state, + splt_c_put_warning_message_to_client(state, _(" warning: cannot set tags from filename regular expression - compiled without pcre support\n")); #endif } @@ -537,7 +537,7 @@ static void splt_tp_get_original_tags_and_append(splt_state *state, int *error) { - splt_check_file_type(state, error); + splt_check_file_type_and_set_plugin(state, SPLT_FALSE, SPLT_FALSE, error); if (*error < 0) { return; } splt_o_lock_messages(state); diff -Nru libmp3splt-0.9.0/src/tags_parser.h libmp3splt-0.9.2/src/tags_parser.h --- libmp3splt-0.9.0/src/tags_parser.h 2013-02-08 09:22:02.000000000 +0000 +++ libmp3splt-0.9.2/src/tags_parser.h 2014-05-10 14:34:59.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/tags_utils.c libmp3splt-0.9.2/src/tags_utils.c --- libmp3splt-0.9.0/src/tags_utils.c 2013-04-21 21:38:28.000000000 +0000 +++ libmp3splt-0.9.2/src/tags_utils.c 2014-05-10 14:28:14.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * *********************************************************/ @@ -1226,13 +1226,16 @@ const char *all_album = splt_tu_get_tags_value(all_tags, SPLT_TAGS_ALBUM); const char *all_year = splt_tu_get_tags_value(all_tags, SPLT_TAGS_YEAR); const char *all_genre = splt_tu_get_tags_value(all_tags, SPLT_TAGS_GENRE); + const char *all_title = splt_tu_get_tags_value(all_tags, SPLT_TAGS_TITLE); + const char *all_comment = splt_tu_get_tags_value(all_tags, SPLT_TAGS_COMMENT); int i = 0; for (i = 0; i < tracks;i++) { if (all_artist != NULL) { - if (splt_tu_get_tags_field(state, i, SPLT_TAGS_ARTIST) == NULL) + if (!splt_tu_tags_exists(state, i) || + splt_tu_get_tags_field(state, i, SPLT_TAGS_ARTIST) == NULL) { err = splt_tu_set_tags_field(state, i, SPLT_TAGS_ARTIST, all_artist); if (err != SPLT_OK) { break; } @@ -1241,7 +1244,8 @@ if (all_album != NULL) { - if (splt_tu_get_tags_field(state, i, SPLT_TAGS_ALBUM) == NULL) + if (!splt_tu_tags_exists(state, i) || + splt_tu_get_tags_field(state, i, SPLT_TAGS_ALBUM) == NULL) { err = splt_tu_set_tags_field(state, i, SPLT_TAGS_ALBUM, all_album); if (err != SPLT_OK) { break; } @@ -1250,7 +1254,8 @@ if (all_year != NULL) { - if (splt_tu_get_tags_field(state, i, SPLT_TAGS_YEAR) == NULL) + if (!splt_tu_tags_exists(state, i) || + splt_tu_get_tags_field(state, i, SPLT_TAGS_YEAR) == NULL) { err = splt_tu_set_tags_field(state, i, SPLT_TAGS_YEAR, all_year); if (err != SPLT_OK) { break; } @@ -1259,12 +1264,33 @@ if (all_genre != NULL) { - if (splt_tu_get_tags_field(state, i, SPLT_TAGS_GENRE) == NULL) + if (!splt_tu_tags_exists(state, i) || + splt_tu_get_tags_field(state, i, SPLT_TAGS_GENRE) == NULL) { err = splt_tu_set_tags_field(state, i, SPLT_TAGS_GENRE, all_genre); if (err != SPLT_OK) { break; } } } + + if (all_title != NULL) + { + if (!splt_tu_tags_exists(state, i) || + splt_tu_get_tags_field(state, i, SPLT_TAGS_TITLE) == NULL) + { + err = splt_tu_set_tags_field(state, i, SPLT_TAGS_TITLE, all_title); + if (err != SPLT_OK) { break; } + } + } + + if (all_comment != NULL) + { + if (!splt_tu_tags_exists(state, i) || + splt_tu_get_tags_field(state, i, SPLT_TAGS_COMMENT) == NULL) + { + err = splt_tu_set_tags_field(state, i, SPLT_TAGS_COMMENT, all_comment); + if (err != SPLT_OK) { break; } + } + } } return err; diff -Nru libmp3splt-0.9.0/src/tags_utils.h libmp3splt-0.9.2/src/tags_utils.h --- libmp3splt-0.9.0/src/tags_utils.h 2013-04-21 21:38:27.000000000 +0000 +++ libmp3splt-0.9.2/src/tags_utils.h 2014-05-10 14:28:14.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/types_func.c libmp3splt-0.9.2/src/types_func.c --- libmp3splt-0.9.0/src/types_func.c 2013-02-08 09:21:55.000000000 +0000 +++ libmp3splt-0.9.2/src/types_func.c 2014-05-10 14:34:55.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -106,7 +106,7 @@ free(state); return NULL; } - memset(state->wrap, 0x0, sizeof(state->wrap)); + memset(state->wrap, 0x0, sizeof(splt_wrap)); if ((state->serrors = malloc(sizeof(splt_syncerrors))) == NULL) { @@ -115,7 +115,7 @@ *error = SPLT_ERROR_CANNOT_ALLOCATE_MEMORY; return NULL; } - memset(state->serrors, 0x0, sizeof(state->serrors)); + memset(state->serrors, 0x0, sizeof(splt_syncerrors)); if ((state->split.p_bar = malloc(sizeof(splt_progress))) == NULL) { diff -Nru libmp3splt-0.9.0/src/types_func.h libmp3splt-0.9.2/src/types_func.h --- libmp3splt-0.9.0/src/types_func.h 2013-02-08 09:22:02.000000000 +0000 +++ libmp3splt-0.9.2/src/types_func.h 2014-05-10 14:34:55.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Munteanu Alexandru - m@ioalex.net + * Copyright (c) 2005-2014 Munteanu Alexandru - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/utils.c libmp3splt-0.9.2/src/utils.c --- libmp3splt-0.9.0/src/utils.c 2013-02-08 09:21:56.000000000 +0000 +++ libmp3splt-0.9.2/src/utils.c 2014-05-10 14:34:57.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -116,3 +116,23 @@ return SPLT_FALSE;*/ } +splt_code splt_u_process_no_auto_adjust_found(splt_state *state, double point) +{ + if (splt_o_get_int_option(state, SPLT_OPT_WARN_IF_NO_AUTO_ADJUST_FOUND)) + { + long time = splt_co_time_to_long(point); + long mins, secs, hundr; + splt_co_get_mins_secs_hundr(time, &mins, &secs, &hundr); + splt_c_put_warning_message_to_client(state, + _(" warning: splitpoint %ld.%ld.%ld is not auto-adjusted\n"), + mins, secs, hundr); + } + + if (splt_o_get_int_option(state, SPLT_OPT_STOP_IF_NO_AUTO_ADJUST_FOUND)) + { + return SPLT_ERROR_NO_AUTO_ADJUST_FOUND; + } + + return SPLT_OK; +} + diff -Nru libmp3splt-0.9.0/src/utils.h libmp3splt-0.9.2/src/utils.h --- libmp3splt-0.9.0/src/utils.h 2013-02-08 09:22:02.000000000 +0000 +++ libmp3splt-0.9.2/src/utils.h 2014-05-10 14:34:57.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Munteanu Alexandru - m@ioalex.net + * Copyright (c) 2005-2014 Munteanu Alexandru - m@ioalex.net * * http://mp3splt.sourceforge.net * @@ -34,6 +34,7 @@ int splt_u_finish_tags_and_put_output_format_filename(splt_state *state, int current_split); void splt_u_print_overlap_time(splt_state *state); short splt_u_fend_sec_is_bigger_than_total_time(splt_state *state, double fend_sec); +splt_code splt_u_process_no_auto_adjust_found(splt_state *state, double point); #define SPLT_UTILS_H diff -Nru libmp3splt-0.9.0/src/win32.c libmp3splt-0.9.2/src/win32.c --- libmp3splt-0.9.0/src/win32.c 2013-02-08 09:21:56.000000000 +0000 +++ libmp3splt-0.9.2/src/win32.c 2014-05-10 14:34:59.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/win32.h libmp3splt-0.9.2/src/win32.h --- libmp3splt-0.9.0/src/win32.h 2013-02-08 09:22:02.000000000 +0000 +++ libmp3splt-0.9.2/src/win32.h 2014-05-10 14:34:59.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/wrap.c libmp3splt-0.9.2/src/wrap.c --- libmp3splt-0.9.0/src/wrap.c 2013-02-08 09:21:56.000000000 +0000 +++ libmp3splt-0.9.2/src/wrap.c 2014-05-10 14:34:57.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Alexandru Munteanu - m@ioalex.net + * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/src/wrap.h libmp3splt-0.9.2/src/wrap.h --- libmp3splt-0.9.0/src/wrap.h 2013-02-08 09:22:02.000000000 +0000 +++ libmp3splt-0.9.2/src/wrap.h 2014-05-10 14:34:57.000000000 +0000 @@ -4,7 +4,7 @@ * for mp3/ogg splitting without decoding * * Copyright (c) 2002-2005 M. Trotta - - * Copyright (c) 2005-2013 Munteanu Alexandru - m@ioalex.net + * Copyright (c) 2005-2014 Munteanu Alexandru - m@ioalex.net * * http://mp3splt.sourceforge.net * diff -Nru libmp3splt-0.9.0/test/Makefile.in libmp3splt-0.9.2/test/Makefile.in --- libmp3splt-0.9.0/test/Makefile.in 2013-07-20 07:09:21.000000000 +0000 +++ libmp3splt-0.9.2/test/Makefile.in 2014-11-09 16:48:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -716,14 +716,14 @@ @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<