From ed6c6296ebe85baac29e473c70043cd8e07871b7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 May 2016 23:11:07 +0200 Subject: [PATCH] {de,en}coder/{vorbis,flac,opus}: move several libraries to lib/xiph/ --- Makefile.am | 24 +++++++++---------- configure.ac | 2 -- src/decoder/plugins/OggFind.cxx | 2 +- src/decoder/plugins/OpusDecoderPlugin.cxx | 2 +- src/decoder/plugins/VorbisDecoderPlugin.cxx | 2 +- src/encoder/plugins/OpusEncoderPlugin.cxx | 4 ++-- src/encoder/plugins/VorbisEncoderPlugin.cxx | 4 ++-- .../plugins => lib/xiph}/OggSerial.cxx | 0 .../plugins => lib/xiph}/OggSerial.hxx | 0 .../plugins => lib/xiph}/OggStream.hxx | 0 .../plugins => lib/xiph}/OggSyncState.hxx | 0 src/{decoder/plugins => lib/xiph}/OggUtil.cxx | 0 src/{decoder/plugins => lib/xiph}/OggUtil.hxx | 0 .../plugins => lib/xiph}/VorbisComments.cxx | 2 +- .../plugins => lib/xiph}/VorbisComments.hxx | 0 15 files changed, 20 insertions(+), 22 deletions(-) rename src/{encoder/plugins => lib/xiph}/OggSerial.cxx (100%) rename src/{encoder/plugins => lib/xiph}/OggSerial.hxx (100%) rename src/{encoder/plugins => lib/xiph}/OggStream.hxx (100%) rename src/{decoder/plugins => lib/xiph}/OggSyncState.hxx (100%) rename src/{decoder/plugins => lib/xiph}/OggUtil.cxx (100%) rename src/{decoder/plugins => lib/xiph}/OggUtil.hxx (100%) rename src/{decoder/plugins => lib/xiph}/VorbisComments.cxx (98%) rename src/{decoder/plugins => lib/xiph}/VorbisComments.hxx (100%) diff --git a/Makefile.am b/Makefile.am index d46b682f5..bf1db8653 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,6 +20,7 @@ noinst_LIBRARIES = \ libevent.a \ libicu.a \ libpcm.a \ + libxiph.a \ libconf.a \ libtag.a \ libinput.a \ @@ -585,10 +586,19 @@ if HAVE_XIPH noinst_LIBRARIES += libxiph.a libxiph_a_SOURCES = \ + src/lib/xiph/VorbisComments.cxx src/lib/xiph/VorbisComments.hxx \ src/lib/xiph/XiphTags.cxx src/lib/xiph/XiphTags.hxx libxiph_a_CPPFLAGS = $(AM_CPPFLAGS) \ $(OGG_CFLAGS) +if HAVE_OGG +libxiph_a_SOURCES += \ + src/lib/xiph/OggSerial.cxx src/lib/xiph/OggSerial.hxx \ + src/lib/xiph/OggUtil.cxx src/lib/xiph/OggUtil.hxx \ + src/lib/xiph/OggSyncState.hxx \ + src/lib/xiph/OggStream.hxx +endif + XIPH_LIBS = libxiph.a endif @@ -988,9 +998,6 @@ endif if ENABLE_OPUS libdecoder_a_SOURCES += \ - src/decoder/plugins/OggUtil.cxx \ - src/decoder/plugins/OggUtil.hxx \ - src/decoder/plugins/OggSyncState.hxx \ src/decoder/plugins/OggFind.cxx src/decoder/plugins/OggFind.hxx \ src/decoder/plugins/OpusDomain.cxx src/decoder/plugins/OpusDomain.hxx \ src/decoder/plugins/OpusReader.hxx \ @@ -1027,7 +1034,6 @@ endif if ENABLE_VORBIS_DECODER libdecoder_a_SOURCES += \ src/decoder/plugins/VorbisDomain.cxx src/decoder/plugins/VorbisDomain.hxx \ - src/decoder/plugins/VorbisComments.cxx src/decoder/plugins/VorbisComments.hxx \ src/decoder/plugins/VorbisDecoderPlugin.cxx src/decoder/plugins/VorbisDecoderPlugin.h endif @@ -1120,6 +1126,7 @@ libencoder_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \ ENCODER_LIBS = \ libencoder_plugins.a \ + $(XIPH_LIBS) \ $(LAME_LIBS) \ $(TWOLAME_LIBS) \ $(FLAC_LIBS) \ @@ -1132,18 +1139,10 @@ libencoder_plugins_a_SOURCES = \ src/encoder/EncoderInterface.hxx \ src/encoder/EncoderPlugin.hxx \ src/encoder/ToOutputStream.cxx src/encoder/ToOutputStream.hxx \ - src/encoder/plugins/OggStream.hxx \ src/encoder/plugins/NullEncoderPlugin.cxx \ src/encoder/plugins/NullEncoderPlugin.hxx \ src/encoder/EncoderList.cxx src/encoder/EncoderList.hxx -if HAVE_OGG_ENCODER -libencoder_plugins_a_SOURCES += \ - src/encoder/plugins/OggSerial.cxx \ - src/encoder/plugins/OggSerial.hxx \ - src/encoder/plugins/OggStream.hxx -endif - if ENABLE_WAVE_ENCODER libencoder_plugins_a_SOURCES += \ src/encoder/plugins/WaveEncoderPlugin.cxx \ @@ -1825,6 +1824,7 @@ test_dump_playlist_LDADD = \ $(FLAC_LIBS) \ $(DECODER_LIBS) \ $(TAG_LIBS) \ + libxiph.a \ $(INPUT_LIBS) \ $(ARCHIVE_LIBS) \ libconf.a \ diff --git a/configure.ac b/configure.ac index 6f1b8edc2..c64a0f515 100644 --- a/configure.ac +++ b/configure.ac @@ -1086,8 +1086,6 @@ fi MPD_DEFINE_CONDITIONAL(enable_encoder, ENABLE_ENCODER, [the encoder plugins]) -AM_CONDITIONAL(HAVE_OGG_ENCODER, test x$enable_vorbis_encoder = xyes || test x$enable_opus = xyes) - dnl --------------------------------------------------------------------------- dnl Audio Output Plugins dnl --------------------------------------------------------------------------- diff --git a/src/decoder/plugins/OggFind.cxx b/src/decoder/plugins/OggFind.cxx index 0ae85adc4..994cfa403 100644 --- a/src/decoder/plugins/OggFind.cxx +++ b/src/decoder/plugins/OggFind.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "OggFind.hxx" -#include "OggSyncState.hxx" +#include "lib/xiph/OggSyncState.hxx" #include "input/InputStream.hxx" #include "util/Error.hxx" diff --git a/src/decoder/plugins/OpusDecoderPlugin.cxx b/src/decoder/plugins/OpusDecoderPlugin.cxx index aeffeb488..7a9b64a08 100644 --- a/src/decoder/plugins/OpusDecoderPlugin.cxx +++ b/src/decoder/plugins/OpusDecoderPlugin.cxx @@ -23,7 +23,7 @@ #include "OpusHead.hxx" #include "OpusTags.hxx" #include "OggFind.hxx" -#include "OggSyncState.hxx" +#include "lib/xiph/OggSyncState.hxx" #include "../DecoderAPI.hxx" #include "decoder/Reader.hxx" #include "input/Reader.hxx" diff --git a/src/decoder/plugins/VorbisDecoderPlugin.cxx b/src/decoder/plugins/VorbisDecoderPlugin.cxx index 0a23b1628..b853d2e63 100644 --- a/src/decoder/plugins/VorbisDecoderPlugin.cxx +++ b/src/decoder/plugins/VorbisDecoderPlugin.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "VorbisDecoderPlugin.h" -#include "VorbisComments.hxx" +#include "lib/xiph/VorbisComments.hxx" #include "VorbisDomain.hxx" #include "../DecoderAPI.hxx" #include "input/InputStream.hxx" diff --git a/src/encoder/plugins/OpusEncoderPlugin.cxx b/src/encoder/plugins/OpusEncoderPlugin.cxx index bb8eda5cb..517649950 100644 --- a/src/encoder/plugins/OpusEncoderPlugin.cxx +++ b/src/encoder/plugins/OpusEncoderPlugin.cxx @@ -19,8 +19,8 @@ #include "config.h" #include "OpusEncoderPlugin.hxx" -#include "OggStream.hxx" -#include "OggSerial.hxx" +#include "lib/xiph/OggStream.hxx" +#include "lib/xiph/OggSerial.hxx" #include "../EncoderAPI.hxx" #include "AudioFormat.hxx" #include "config/ConfigError.hxx" diff --git a/src/encoder/plugins/VorbisEncoderPlugin.cxx b/src/encoder/plugins/VorbisEncoderPlugin.cxx index 079048615..26f3deab1 100644 --- a/src/encoder/plugins/VorbisEncoderPlugin.cxx +++ b/src/encoder/plugins/VorbisEncoderPlugin.cxx @@ -19,8 +19,8 @@ #include "config.h" #include "VorbisEncoderPlugin.hxx" -#include "OggStream.hxx" -#include "OggSerial.hxx" +#include "lib/xiph/OggStream.hxx" +#include "lib/xiph/OggSerial.hxx" #include "../EncoderAPI.hxx" #include "AudioFormat.hxx" #include "config/ConfigError.hxx" diff --git a/src/encoder/plugins/OggSerial.cxx b/src/lib/xiph/OggSerial.cxx similarity index 100% rename from src/encoder/plugins/OggSerial.cxx rename to src/lib/xiph/OggSerial.cxx diff --git a/src/encoder/plugins/OggSerial.hxx b/src/lib/xiph/OggSerial.hxx similarity index 100% rename from src/encoder/plugins/OggSerial.hxx rename to src/lib/xiph/OggSerial.hxx diff --git a/src/encoder/plugins/OggStream.hxx b/src/lib/xiph/OggStream.hxx similarity index 100% rename from src/encoder/plugins/OggStream.hxx rename to src/lib/xiph/OggStream.hxx diff --git a/src/decoder/plugins/OggSyncState.hxx b/src/lib/xiph/OggSyncState.hxx similarity index 100% rename from src/decoder/plugins/OggSyncState.hxx rename to src/lib/xiph/OggSyncState.hxx diff --git a/src/decoder/plugins/OggUtil.cxx b/src/lib/xiph/OggUtil.cxx similarity index 100% rename from src/decoder/plugins/OggUtil.cxx rename to src/lib/xiph/OggUtil.cxx diff --git a/src/decoder/plugins/OggUtil.hxx b/src/lib/xiph/OggUtil.hxx similarity index 100% rename from src/decoder/plugins/OggUtil.hxx rename to src/lib/xiph/OggUtil.hxx diff --git a/src/decoder/plugins/VorbisComments.cxx b/src/lib/xiph/VorbisComments.cxx similarity index 98% rename from src/decoder/plugins/VorbisComments.cxx rename to src/lib/xiph/VorbisComments.cxx index 72e8dbae1..4f0e84893 100644 --- a/src/decoder/plugins/VorbisComments.cxx +++ b/src/lib/xiph/VorbisComments.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "VorbisComments.hxx" -#include "lib/xiph/XiphTags.hxx" +#include "XiphTags.hxx" #include "tag/TagTable.hxx" #include "tag/TagHandler.hxx" #include "tag/TagBuilder.hxx" diff --git a/src/decoder/plugins/VorbisComments.hxx b/src/lib/xiph/VorbisComments.hxx similarity index 100% rename from src/decoder/plugins/VorbisComments.hxx rename to src/lib/xiph/VorbisComments.hxx