diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index b98cbd00..c49ae909 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -4,7 +4,7 @@ set(CLIENT_SOURCES snapclient.cpp stream.cpp time_provider.cpp - decoder/pcmDecoder.cpp + decoder/pcm_decoder.cpp player/player.cpp) set(CLIENT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} common) @@ -20,12 +20,12 @@ set(CLIENT_INCLUDE if(MACOSX) # Bonjour if (BONJOUR_FOUND) - list(APPEND CLIENT_SOURCES browseZeroConf/browseBonjour.cpp) + list(APPEND CLIENT_SOURCES browseZeroConf/browse_bonjour.cpp) endif (BONJOUR_FOUND) # CoreAudio add_definitions(-DHAS_COREAUDIO) - list(APPEND CLIENT_SOURCES player/coreAudioPlayer.cpp) + list(APPEND CLIENT_SOURCES player/coreaudio_player.cpp) find_library(COREAUDIO_LIB CoreAudio) find_library(COREFOUNDATION_LIB CoreFoundation) find_library(AUDIOTOOLBOX_LIB AudioToolbox) @@ -33,14 +33,14 @@ if(MACOSX) else() # Avahi if (AVAHI_FOUND) - list(APPEND CLIENT_SOURCES browseZeroConf/browseAvahi.cpp) + list(APPEND CLIENT_SOURCES browseZeroConf/browse_avahi.cpp) list(APPEND CLIENT_LIBRARIES ${AVAHI_LIBRARIES}) list(APPEND CLIENT_INCLUDE ${AVAHI_INCLUDE_DIRS}) endif (AVAHI_FOUND) # ALSA if (ALSA_FOUND) - list(APPEND CLIENT_SOURCES player/alsaPlayer.cpp) + list(APPEND CLIENT_SOURCES player/alsa_player.cpp) list(APPEND CLIENT_LIBRARIES ${ALSA_LIBRARIES}) list(APPEND CLIENT_INCLUDE ${ALSA_INCLUDE_DIRS}) endif (ALSA_FOUND) @@ -48,7 +48,7 @@ endif (MACOSX) # if OGG then tremor or vorbis if (OGG_FOUND) - list(APPEND CLIENT_SOURCES decoder/oggDecoder.cpp) + list(APPEND CLIENT_SOURCES decoder/ogg_decoder.cpp) list(APPEND CLIENT_LIBRARIES ${OGG_LIBRARIES}) list(APPEND CLIENT_INCLUDE ${OGG_INCLUDE_DIRS}) endif (OGG_FOUND) @@ -63,7 +63,7 @@ elseif (VORBIS_FOUND) endif (TREMOR_FOUND) if (FLAC_FOUND) - list(APPEND CLIENT_SOURCES decoder/flacDecoder.cpp) + list(APPEND CLIENT_SOURCES decoder/flac_decoder.cpp) list(APPEND CLIENT_LIBRARIES ${FLAC_LIBRARIES}) list(APPEND CLIENT_INCLUDE ${FLAC_INCLUDE_DIRS}) endif (FLAC_FOUND) diff --git a/client/Makefile b/client/Makefile index ed8f5d94..1a482d0b 100644 --- a/client/Makefile +++ b/client/Makefile @@ -36,7 +36,7 @@ DEBUG=-O3 CXXFLAGS += $(ADD_CFLAGS) -std=c++0x -Wall -Wpedantic -Wno-unused-function $(DEBUG) -DHAS_FLAC -DHAS_OGG -DVERSION=\"$(VERSION)\" -I. -I.. -I../common LDFLAGS = $(ADD_LDFLAGS) -logg -lFLAC -OBJ = snapclient.o stream.o client_connection.o time_provider.o player/player.o decoder/pcmDecoder.o decoder/oggDecoder.o decoder/flacDecoder.o controller.o ../common/sampleFormat.o +OBJ = snapclient.o stream.o client_connection.o time_provider.o player/player.o decoder/pcm_decoder.o decoder/ogg_decoder.o decoder/flac_decoder.o controller.o ../common/sample_format.o ifneq (,$(TARGET)) @@ -53,20 +53,20 @@ CXX = $(PROGRAM_PREFIX)clang++ STRIP = $(PROGRAM_PREFIX)strip CXXFLAGS += -pthread -fPIC -DHAS_TREMOR -DHAS_OPENSL -I$(NDK_DIR)/include LDFLAGS = -L$(NDK_DIR)/lib -pie -lvorbisidec -logg -lFLAC -lOpenSLES -latomic -llog -static-libstdc++ -OBJ += player/openslPlayer.o +OBJ += player/opensl_player.o else ifeq ($(TARGET), OPENWRT) STRIP = echo CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic -OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o +OBJ += ../common/daemon.o player/alsa_player.o browseZeroConf/browse_avahi.o else ifeq ($(TARGET), BUILDROOT) CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic -OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o +OBJ += ../common/daemon.o player/alsa_player.o browseZeroConf/browse_avahi.o else ifeq ($(TARGET), MACOS) @@ -74,7 +74,7 @@ CXX = g++ STRIP = strip CXXFLAGS += -DHAS_COREAUDIO -DHAS_VORBIS -DFREEBSD -DHAS_BONJOUR -DHAS_DAEMON -I/usr/local/include -Wno-unused-local-typedef -Wno-deprecated LDFLAGS += -lvorbis -lFLAC -L/usr/local/lib -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework IOKit -OBJ += ../common/daemon.o player/coreAudioPlayer.o browseZeroConf/browseBonjour.o +OBJ += ../common/daemon.o player/coreaudio_player.o browseZeroConf/browse_bonjour.o else @@ -82,7 +82,7 @@ CXX = g++ STRIP = strip CXXFLAGS += -pthread -DHAS_VORBIS -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic -OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o +OBJ += ../common/daemon.o player/alsa_player.o browseZeroConf/browse_avahi.o endif diff --git a/client/browseZeroConf/browseAvahi.cpp b/client/browseZeroConf/browse_avahi.cpp similarity index 99% rename from client/browseZeroConf/browseAvahi.cpp rename to client/browseZeroConf/browse_avahi.cpp index 9b84b566..7f140fea 100644 --- a/client/browseZeroConf/browseAvahi.cpp +++ b/client/browseZeroConf/browse_avahi.cpp @@ -17,9 +17,9 @@ USA. ***/ -#include "browseAvahi.h" +#include "browse_avahi.hpp" #include "common/aixlog.hpp" -#include "common/snapException.h" +#include "common/snap_exception.hpp" #include #include #include diff --git a/client/browseZeroConf/browseAvahi.h b/client/browseZeroConf/browse_avahi.hpp similarity index 98% rename from client/browseZeroConf/browseAvahi.h rename to client/browseZeroConf/browse_avahi.hpp index 900f4c59..768d85c5 100644 --- a/client/browseZeroConf/browseAvahi.h +++ b/client/browseZeroConf/browse_avahi.hpp @@ -27,7 +27,7 @@ class BrowseAvahi; -#include "browsemDNS.h" +#include "browse_mdns.hpp" class BrowseAvahi : public BrowsemDNS { diff --git a/client/browseZeroConf/browseBonjour.cpp b/client/browseZeroConf/browse_bonjour.cpp similarity index 99% rename from client/browseZeroConf/browseBonjour.cpp rename to client/browseZeroConf/browse_bonjour.cpp index ddffd993..485399ba 100644 --- a/client/browseZeroConf/browseBonjour.cpp +++ b/client/browseZeroConf/browse_bonjour.cpp @@ -12,7 +12,7 @@ #endif #include "common/aixlog.hpp" -#include "common/snapException.h" +#include "common/snap_exception.hpp" using namespace std; diff --git a/client/browseZeroConf/browseBonjour.h b/client/browseZeroConf/browse_bonjour.hpp similarity index 90% rename from client/browseZeroConf/browseBonjour.h rename to client/browseZeroConf/browse_bonjour.hpp index 57d2347a..509b393d 100644 --- a/client/browseZeroConf/browseBonjour.h +++ b/client/browseZeroConf/browse_bonjour.hpp @@ -5,7 +5,7 @@ class BrowseBonjour; -#include "browsemDNS.h" +#include "browse_mdns.hpp" class BrowseBonjour : public BrowsemDNS { diff --git a/client/browseZeroConf/browsemDNS.h b/client/browseZeroConf/browse_mdns.hpp similarity index 95% rename from client/browseZeroConf/browsemDNS.h rename to client/browseZeroConf/browse_mdns.hpp index 4d06c005..a203b92e 100644 --- a/client/browseZeroConf/browsemDNS.h +++ b/client/browseZeroConf/browse_mdns.hpp @@ -27,7 +27,7 @@ public: }; #if defined(HAS_AVAHI) -#include "browseAvahi.h" +#include "browse_avahi.hpp" typedef BrowseAvahi BrowseZeroConf; #elif defined(HAS_BONJOUR) #include "browseBonjour.h" diff --git a/client/client_connection.cpp b/client/client_connection.cpp index bd5c2230..28fd91a8 100644 --- a/client/client_connection.cpp +++ b/client/client_connection.cpp @@ -18,8 +18,8 @@ #include "client_connection.hpp" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" #include "message/hello.h" #include #include diff --git a/client/client_connection.hpp b/client/client_connection.hpp index e2ef8cb3..2ed35de0 100644 --- a/client/client_connection.hpp +++ b/client/client_connection.hpp @@ -19,7 +19,7 @@ #ifndef CLIENT_CONNECTION_H #define CLIENT_CONNECTION_H -#include "common/timeDefs.h" +#include "common/time_defs.hpp" #include "message/message.h" #include #include diff --git a/client/controller.cpp b/client/controller.cpp index 1e2ef48e..e61a988a 100644 --- a/client/controller.cpp +++ b/client/controller.cpp @@ -17,18 +17,18 @@ ***/ #include "controller.hpp" -#include "decoder/pcmDecoder.h" +#include "decoder/pcm_decoder.hpp" #include #include #include #if defined(HAS_OGG) && (defined(HAS_TREMOR) || defined(HAS_VORBIS)) -#include "decoder/oggDecoder.h" +#include "decoder/ogg_decoder.hpp" #endif #if defined(HAS_FLAC) -#include "decoder/flacDecoder.h" +#include "decoder/flac_decoder.hpp" #endif #include "common/aixlog.hpp" -#include "common/snapException.h" +#include "common/snap_exception.hpp" #include "message/hello.h" #include "message/time.h" #include "time_provider.hpp" diff --git a/client/controller.hpp b/client/controller.hpp index ae26cd6d..e4a8b8e0 100644 --- a/client/controller.hpp +++ b/client/controller.hpp @@ -23,11 +23,11 @@ #include "message/message.h" #include "message/serverSettings.h" #include "message/streamTags.h" -#include "player/pcmDevice.h" +#include "player/pcm_device.hpp" #include #include #ifdef HAS_ALSA -#include "player/alsaPlayer.h" +#include "player/alsa_player.hpp" #elif HAS_OPENSL #include "player/openslPlayer.h" #elif HAS_COREAUDIO diff --git a/client/decoder/decoder.h b/client/decoder/decoder.h index e99006bb..b46e1526 100644 --- a/client/decoder/decoder.h +++ b/client/decoder/decoder.h @@ -18,7 +18,7 @@ #ifndef DECODER_H #define DECODER_H -#include "common/sampleFormat.h" +#include "common/sample_format.hpp" #include "message/codecHeader.h" #include "message/pcmChunk.h" #include diff --git a/client/decoder/flacDecoder.cpp b/client/decoder/flac_decoder.cpp similarity index 99% rename from client/decoder/flacDecoder.cpp rename to client/decoder/flac_decoder.cpp index c4691112..f62a2f13 100644 --- a/client/decoder/flacDecoder.cpp +++ b/client/decoder/flac_decoder.cpp @@ -16,10 +16,10 @@ along with this program. If not, see . ***/ -#include "flacDecoder.h" +#include "flac_decoder.hpp" #include "common/aixlog.hpp" #include "common/endian.hpp" -#include "common/snapException.h" +#include "common/snap_exception.hpp" #include #include #include diff --git a/client/decoder/flacDecoder.h b/client/decoder/flac_decoder.hpp similarity index 100% rename from client/decoder/flacDecoder.h rename to client/decoder/flac_decoder.hpp diff --git a/client/decoder/oggDecoder.cpp b/client/decoder/ogg_decoder.cpp similarity index 99% rename from client/decoder/oggDecoder.cpp rename to client/decoder/ogg_decoder.cpp index 9b9a6a0b..18302003 100644 --- a/client/decoder/oggDecoder.cpp +++ b/client/decoder/ogg_decoder.cpp @@ -22,8 +22,8 @@ #include "common/aixlog.hpp" #include "common/endian.hpp" -#include "common/snapException.h" -#include "oggDecoder.h" +#include "common/snap_exception.hpp" +#include "ogg_decoder.hpp" using namespace std; diff --git a/client/decoder/oggDecoder.h b/client/decoder/ogg_decoder.hpp similarity index 100% rename from client/decoder/oggDecoder.h rename to client/decoder/ogg_decoder.hpp diff --git a/client/decoder/pcmDecoder.cpp b/client/decoder/pcm_decoder.cpp similarity index 98% rename from client/decoder/pcmDecoder.cpp rename to client/decoder/pcm_decoder.cpp index ddd9d31c..89aaa67a 100644 --- a/client/decoder/pcmDecoder.cpp +++ b/client/decoder/pcm_decoder.cpp @@ -16,10 +16,10 @@ along with this program. If not, see . ***/ -#include "pcmDecoder.h" +#include "pcm_decoder.hpp" #include "common/aixlog.hpp" #include "common/endian.hpp" -#include "common/snapException.h" +#include "common/snap_exception.hpp" #define ID_RIFF 0x46464952 diff --git a/client/decoder/pcmDecoder.h b/client/decoder/pcm_decoder.hpp similarity index 100% rename from client/decoder/pcmDecoder.h rename to client/decoder/pcm_decoder.hpp diff --git a/client/player/alsaPlayer.cpp b/client/player/alsa_player.cpp similarity index 98% rename from client/player/alsaPlayer.cpp rename to client/player/alsa_player.cpp index 49c01ad2..93d518f0 100644 --- a/client/player/alsaPlayer.cpp +++ b/client/player/alsa_player.cpp @@ -16,10 +16,10 @@ along with this program. If not, see . ***/ -#include "alsaPlayer.h" +#include "alsa_player.hpp" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" //#define BUFFER_TIME 120000 #define PERIOD_TIME 30000 diff --git a/client/player/alsaPlayer.h b/client/player/alsa_player.hpp similarity index 98% rename from client/player/alsaPlayer.h rename to client/player/alsa_player.hpp index 6c4824c4..a956aa31 100644 --- a/client/player/alsaPlayer.h +++ b/client/player/alsa_player.hpp @@ -19,7 +19,7 @@ #ifndef ALSA_PLAYER_H #define ALSA_PLAYER_H -#include "player.h" +#include "player.hpp" #include diff --git a/client/player/coreAudioPlayer.cpp b/client/player/coreaudio_player.cpp similarity index 100% rename from client/player/coreAudioPlayer.cpp rename to client/player/coreaudio_player.cpp diff --git a/client/player/coreAudioPlayer.h b/client/player/coreaudio_player.hpp similarity index 98% rename from client/player/coreAudioPlayer.h rename to client/player/coreaudio_player.hpp index f871339b..a6a891ab 100644 --- a/client/player/coreAudioPlayer.h +++ b/client/player/coreaudio_player.hpp @@ -23,7 +23,7 @@ #include #include -#include "player.h" +#include "player.hpp" /// Audio Player /** diff --git a/client/player/openslPlayer.cpp b/client/player/opensl_player.cpp similarity index 99% rename from client/player/openslPlayer.cpp rename to client/player/opensl_player.cpp index 60fff1a0..d238b7a1 100644 --- a/client/player/openslPlayer.cpp +++ b/client/player/opensl_player.cpp @@ -20,8 +20,8 @@ #include #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" #include "openslPlayer.h" using namespace std; diff --git a/client/player/openslPlayer.h b/client/player/opensl_player.hpp similarity index 98% rename from client/player/openslPlayer.h rename to client/player/opensl_player.hpp index 78de66f7..69e105d2 100644 --- a/client/player/openslPlayer.h +++ b/client/player/opensl_player.hpp @@ -23,7 +23,7 @@ #include #include -#include "player.h" +#include "player.hpp" typedef int (*AndroidAudioCallback)(short* buffer, int num_samples); diff --git a/client/player/pcmDevice.h b/client/player/pcm_device.hpp similarity index 100% rename from client/player/pcmDevice.h rename to client/player/pcm_device.hpp diff --git a/client/player/player.cpp b/client/player/player.cpp index fee3e8b4..a00e1a6b 100644 --- a/client/player/player.cpp +++ b/client/player/player.cpp @@ -20,7 +20,7 @@ #include #include "common/aixlog.hpp" -#include "player.h" +#include "player.hpp" using namespace std; diff --git a/client/player/player.h b/client/player/player.hpp similarity index 98% rename from client/player/player.h rename to client/player/player.hpp index a9937c64..12c405a7 100644 --- a/client/player/player.h +++ b/client/player/player.hpp @@ -21,7 +21,7 @@ #include "common/aixlog.hpp" #include "common/endian.hpp" -#include "pcmDevice.h" +#include "pcm_device.hpp" #include "stream.hpp" #include #include diff --git a/client/snapclient.cpp b/client/snapclient.cpp index 112588a7..8144d39a 100644 --- a/client/snapclient.cpp +++ b/client/snapclient.cpp @@ -19,20 +19,20 @@ #include #include -#include "browseZeroConf/browsemDNS.h" +#include "browseZeroConf/browse_mdns.hpp" #include "common/popl.hpp" #include "controller.hpp" #ifdef HAS_ALSA -#include "player/alsaPlayer.h" +#include "player/alsa_player.hpp" #endif #ifdef HAS_DAEMON -#include "common/daemon.h" +#include "common/daemon.hpp" #endif #include "common/aixlog.hpp" -#include "common/signalHandler.h" -#include "common/strCompat.h" -#include "common/utils.h" +#include "common/signal_handler.hpp" +#include "common/str_compat.hpp" +#include "common/utils.hpp" #include "metadata.hpp" diff --git a/client/stream.hpp b/client/stream.hpp index effa7400..110c5696 100644 --- a/client/stream.hpp +++ b/client/stream.hpp @@ -26,7 +26,7 @@ //#include "common/timeUtils.h" #include "common/queue.h" -#include "common/sampleFormat.h" +#include "common/sample_format.hpp" #include "double_buffer.hpp" #include "message/message.h" #include "message/pcmChunk.h" diff --git a/client/time_provider.hpp b/client/time_provider.hpp index ccaef2d5..3c42a132 100644 --- a/client/time_provider.hpp +++ b/client/time_provider.hpp @@ -19,7 +19,7 @@ #ifndef TIME_PROVIDER_H #define TIME_PROVIDER_H -#include "common/timeDefs.h" +#include "common/time_defs.hpp" #include "double_buffer.hpp" #include "message/message.h" #include diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index f8891ded..d1c9675b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1 +1 @@ -add_library(common STATIC daemon.cpp sampleFormat.cpp) +add_library(common STATIC daemon.cpp sample_format.cpp) diff --git a/common/daemon.cpp b/common/daemon.cpp index 4ee01969..68c19b45 100644 --- a/common/daemon.cpp +++ b/common/daemon.cpp @@ -16,12 +16,12 @@ along with this program. If not, see . ***/ -#include "daemon.h" +#include "daemon.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" -#include "common/utils.h" -#include "common/utils/file_utils.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" +#include "common/utils.hpp" +#include "common/utils/file_utils.hpp" #include #include #include diff --git a/common/daemon.h b/common/daemon.hpp similarity index 100% rename from common/daemon.h rename to common/daemon.hpp diff --git a/common/json.hpp b/common/json.hpp index 76eb2c28..e1b5b399 100644 --- a/common/json.hpp +++ b/common/json.hpp @@ -55,7 +55,7 @@ SOFTWARE. #include // string #include // vector -#include "strCompat.h" +#include "str_compat.hpp" /*! diff --git a/common/message/hello.h b/common/message/hello.h index dc3f3f38..d2b568d5 100644 --- a/common/message/hello.h +++ b/common/message/hello.h @@ -19,8 +19,8 @@ #ifndef HELLO_MSG_H #define HELLO_MSG_H -#include "common/strCompat.h" -#include "common/utils.h" +#include "common/str_compat.hpp" +#include "common/utils.hpp" #include "jsonMessage.h" #include diff --git a/common/message/message.h b/common/message/message.h index 1f32e835..dee11afc 100644 --- a/common/message/message.h +++ b/common/message/message.h @@ -20,7 +20,7 @@ #define MESSAGE_H #include "common/endian.hpp" -#include "common/timeDefs.h" +#include "common/time_defs.hpp" #include #include #include diff --git a/common/message/pcmChunk.h b/common/message/pcmChunk.h index 8550f713..e54ba0a0 100644 --- a/common/message/pcmChunk.h +++ b/common/message/pcmChunk.h @@ -19,7 +19,7 @@ #ifndef PCM_CHUNK_H #define PCM_CHUNK_H -#include "common/sampleFormat.h" +#include "common/sample_format.hpp" #include "message.h" #include "wireChunk.h" #include diff --git a/common/message/wireChunk.h b/common/message/wireChunk.h index 3ee2d8e8..f02caa2c 100644 --- a/common/message/wireChunk.h +++ b/common/message/wireChunk.h @@ -19,7 +19,7 @@ #ifndef WIRE_CHUNK_H #define WIRE_CHUNK_H -#include "common/timeDefs.h" +#include "common/time_defs.hpp" #include "message.h" #include #include diff --git a/common/sampleFormat.cpp b/common/sample_format.cpp similarity index 93% rename from common/sampleFormat.cpp rename to common/sample_format.cpp index 094c6bba..8ae79b0e 100644 --- a/common/sampleFormat.cpp +++ b/common/sample_format.cpp @@ -21,10 +21,10 @@ #include #include "common/aixlog.hpp" -#include "common/strCompat.h" -#include "common/utils.h" -#include "common/utils/string_utils.h" -#include "sampleFormat.h" +#include "common/str_compat.hpp" +#include "common/utils.hpp" +#include "common/utils/string_utils.hpp" +#include "sample_format.hpp" using namespace std; diff --git a/common/sampleFormat.h b/common/sample_format.hpp similarity index 100% rename from common/sampleFormat.h rename to common/sample_format.hpp diff --git a/common/signalHandler.h b/common/signal_handler.hpp similarity index 100% rename from common/signalHandler.h rename to common/signal_handler.hpp diff --git a/common/snapException.h b/common/snap_exception.hpp similarity index 100% rename from common/snapException.h rename to common/snap_exception.hpp diff --git a/common/strCompat.h b/common/str_compat.hpp similarity index 100% rename from common/strCompat.h rename to common/str_compat.hpp diff --git a/common/timeDefs.h b/common/time_defs.hpp similarity index 100% rename from common/timeDefs.h rename to common/time_defs.hpp diff --git a/common/utils.h b/common/utils.hpp similarity index 99% rename from common/utils.h rename to common/utils.hpp index d56930d9..274d4745 100644 --- a/common/utils.h +++ b/common/utils.hpp @@ -19,8 +19,8 @@ #ifndef UTILS_H #define UTILS_H -#include "common/strCompat.h" -#include "common/utils/string_utils.h" +#include "common/str_compat.hpp" +#include "common/utils/string_utils.hpp" #include #include diff --git a/common/utils/file_utils.h b/common/utils/file_utils.hpp similarity index 98% rename from common/utils/file_utils.h rename to common/utils/file_utils.hpp index ec9f3f64..3e828dd7 100644 --- a/common/utils/file_utils.h +++ b/common/utils/file_utils.hpp @@ -19,7 +19,7 @@ #ifndef FILE_UTILS_H #define FILE_UTILS_H -#include "string_utils.h" +#include "string_utils.hpp" #include #include #include diff --git a/common/utils/string_utils.h b/common/utils/string_utils.hpp similarity index 100% rename from common/utils/string_utils.h rename to common/utils/string_utils.hpp diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index b34d6e4d..d2018aab 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -6,18 +6,18 @@ set(SERVER_SOURCES snapserver.cpp stream_server.cpp stream_session.cpp - encoder/encoderFactory.cpp - encoder/pcmEncoder.cpp + encoder/encoder_factory.cpp + encoder/pcm_encoder.cpp streamreader/base64.cpp - streamreader/streamUri.cpp - streamreader/streamManager.cpp - streamreader/pcmStream.cpp - streamreader/pipeStream.cpp - streamreader/fileStream.cpp - streamreader/airplayStream.cpp - streamreader/spotifyStream.cpp + streamreader/stream_uri.cpp + streamreader/stream_manager.cpp + streamreader/pcm_stream.cpp + streamreader/pipe_stream.cpp + streamreader/file_stream.cpp + streamreader/airplay_stream.cpp + streamreader/librespot_stream.cpp streamreader/watchdog.cpp - streamreader/processStream.cpp) + streamreader/process_stream.cpp) set(SERVER_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} @@ -30,19 +30,19 @@ set(SERVER_INCLUDE # Avahi if (AVAHI_FOUND) - list(APPEND SERVER_SOURCES publishZeroConf/publishAvahi.cpp) + list(APPEND SERVER_SOURCES publishZeroConf/publish_avahi.cpp) list(APPEND SERVER_LIBRARIES ${AVAHI_LIBRARIES}) list(APPEND SERVER_INCLUDE ${AVAHI_INCLUDE_DIRS}) endif (AVAHI_FOUND) if (BONJOUR_FOUND) - list(APPEND SERVER_SOURCES publishZeroConf/publishBonjour.cpp) + list(APPEND SERVER_SOURCES publishZeroConf/publish_bonjour.cpp) # list(APPEND SERVER_LIBRARIES ${BONJOUR_LIBRARIES}) # list(APPEND SERVER_INCLUDE ${BONJOUR_INCLUDE_DIRS}) endif (BONJOUR_FOUND) if (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_FOUND) - list(APPEND SERVER_SOURCES encoder/oggEncoder.cpp) + list(APPEND SERVER_SOURCES encoder/ogg_encoder.cpp) list(APPEND SERVER_LIBRARIES ${OGG_LIBRARIES} ${VORBIS_LIBRARIES} @@ -54,7 +54,7 @@ if (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_FOUND) endif (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_FOUND) if (FLAC_FOUND) - list(APPEND SERVER_SOURCES encoder/flacEncoder.cpp) + list(APPEND SERVER_SOURCES encoder/flac_encoder.cpp) list(APPEND SERVER_LIBRARIES ${FLAC_LIBRARIES}) list(APPEND SERVER_INCLUDE ${FLAC_INCLUDE_DIRS}) endif (FLAC_FOUND) diff --git a/server/Makefile b/server/Makefile index e0c148a9..57a6521c 100644 --- a/server/Makefile +++ b/server/Makefile @@ -31,13 +31,13 @@ else endif # Simplify building debuggable executables 'make DEBUG=-g STRIP=echo' -DEBUG=-O2 +DEBUG=-g SANITIZE= #-fsanitize=thread CXXFLAGS += $(ADD_CFLAGS) $(SANITIZE) -std=c++14 -Wall -Wpedantic -Wno-unused-function $(DEBUG) -DHAS_FLAC -DHAS_OGG -DHAS_VORBIS -DHAS_VORBIS_ENC -DVERSION=\"$(VERSION)\" -I. -I.. -I../common LDFLAGS = $(ADD_LDFLAGS) $(SANITIZE) -lvorbis -lvorbisenc -logg -lFLAC -OBJ = snapserver.o config.o control_server.o control_session_tcp.o control_session_http.o stream_server.o stream_session.o streamreader/streamUri.o streamreader/base64.o streamreader/streamManager.o streamreader/pcmStream.o streamreader/pipeStream.o streamreader/fileStream.o streamreader/processStream.o streamreader/airplayStream.o streamreader/spotifyStream.o streamreader/watchdog.o encoder/encoderFactory.o encoder/flacEncoder.o encoder/pcmEncoder.o encoder/oggEncoder.o ../common/sampleFormat.o +OBJ = snapserver.o config.o control_server.o control_session_tcp.o control_session_http.o stream_server.o stream_session.o streamreader/stream_uri.o streamreader/base64.o streamreader/stream_manager.o streamreader/pcm_stream.o streamreader/pipe_stream.o streamreader/file_stream.o streamreader/process_stream.o streamreader/airplay_stream.o streamreader/librespot_stream.o streamreader/watchdog.o encoder/encoder_factory.o encoder/flac_encoder.o encoder/pcm_encoder.o encoder/ogg_encoder.o ../common/sample_format.o ifneq (,$(TARGET)) CXXFLAGS += -D$(TARGET) @@ -59,13 +59,13 @@ else ifeq ($(TARGET), OPENWRT) STRIP = echo CXXFLAGS += -DNO_CPP11_STRING -DHAS_AVAHI -DHAS_DAEMON -pthread LDFLAGS += -lavahi-client -lavahi-common -latomic -OBJ += ../common/daemon.o publishZeroConf/publishAvahi.o +OBJ += ../common/daemon.o publishZeroConf/publish_avahi.o else ifeq ($(TARGET), BUILDROOT) CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -OBJ += publishZeroConf/publishAvahi.o +OBJ += publishZeroConf/publish_avahi.o else ifeq ($(TARGET), FREEBSD) @@ -73,7 +73,7 @@ CXX = g++ STRIP = echo CXXFLAGS += -DFREEBSD -DNO_CPP11_STRING -DHAS_AVAHI -DHAS_DAEMON -pthread LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic -OBJ += ../common/daemon.o publishZeroConf/publishAvahi.o +OBJ += ../common/daemon.o publishZeroConf/publish_avahi.o else ifeq ($(TARGET), MACOS) @@ -81,15 +81,15 @@ CXX = g++ STRIP = strip CXXFLAGS += -DFREEBSD -DHAS_BONJOUR -DHAS_DAEMON -Wno-deprecated -I/usr/local/include LDFLAGS += -L/usr/local/lib -framework CoreFoundation -framework IOKit -OBJ += ../common/daemon.o publishZeroConf/publishBonjour.o +OBJ += ../common/daemon.o publishZeroConf/publish_bonjour.o else CXX = g++ -STRIP = strip +STRIP = echo CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -OBJ += ../common/daemon.o publishZeroConf/publishAvahi.o +OBJ += ../common/daemon.o publishZeroConf/publish_avahi.o endif diff --git a/server/config.cpp b/server/config.cpp index 54bd675a..67710507 100644 --- a/server/config.cpp +++ b/server/config.cpp @@ -18,9 +18,9 @@ #include "config.h" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" -#include "common/utils/file_utils.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" +#include "common/utils/file_utils.hpp" #include #include #include diff --git a/server/config.h b/server/config.h index f27ea880..dd5a5a14 100644 --- a/server/config.h +++ b/server/config.h @@ -25,8 +25,8 @@ #include #include "common/json.hpp" -#include "common/utils.h" -#include "common/utils/string_utils.h" +#include "common/utils.hpp" +#include "common/utils/string_utils.hpp" namespace strutils = utils::string; diff --git a/server/control_server.cpp b/server/control_server.cpp index a5e0e6c1..0ea5a18e 100644 --- a/server/control_server.cpp +++ b/server/control_server.cpp @@ -18,8 +18,8 @@ #include "control_server.hpp" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/utils.h" +#include "common/snap_exception.hpp" +#include "common/utils.hpp" #include "config.h" #include "control_session_http.hpp" #include "control_session_tcp.hpp" diff --git a/server/control_server.hpp b/server/control_server.hpp index 5112623a..4f48bab2 100644 --- a/server/control_server.hpp +++ b/server/control_server.hpp @@ -28,7 +28,7 @@ #include #include "common/queue.h" -#include "common/sampleFormat.h" +#include "common/sample_format.hpp" #include "control_session.hpp" #include "message/codecHeader.h" #include "message/message.h" diff --git a/server/encoder/encoder.h b/server/encoder/encoder.hpp similarity index 98% rename from server/encoder/encoder.h rename to server/encoder/encoder.hpp index f44237b1..8592ec59 100644 --- a/server/encoder/encoder.h +++ b/server/encoder/encoder.hpp @@ -22,7 +22,7 @@ #include #include -#include "common/sampleFormat.h" +#include "common/sample_format.hpp" #include "message/codecHeader.h" #include "message/pcmChunk.h" diff --git a/server/encoder/encoderFactory.cpp b/server/encoder/encoder_factory.cpp similarity index 91% rename from server/encoder/encoderFactory.cpp rename to server/encoder/encoder_factory.cpp index d2417daa..02fa59af 100644 --- a/server/encoder/encoderFactory.cpp +++ b/server/encoder/encoder_factory.cpp @@ -16,17 +16,17 @@ along with this program. If not, see . ***/ -#include "encoderFactory.h" -#include "pcmEncoder.h" +#include "encoder_factory.hpp" +#include "pcm_encoder.hpp" #if defined(HAS_OGG) && defined(HAS_VORBIS) && defined(HAS_VORBISENC) -#include "oggEncoder.h" +#include "ogg_encoder.hpp" #endif #if defined(HAS_FLAC) -#include "flacEncoder.h" +#include "flac_encoder.hpp" #endif #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/utils/string_utils.h" +#include "common/snap_exception.hpp" +#include "common/utils/string_utils.hpp" using namespace std; diff --git a/server/encoder/encoderFactory.h b/server/encoder/encoder_factory.hpp similarity index 91% rename from server/encoder/encoderFactory.h rename to server/encoder/encoder_factory.hpp index 39d2d6b0..086acf7b 100644 --- a/server/encoder/encoderFactory.h +++ b/server/encoder/encoder_factory.hpp @@ -1,7 +1,7 @@ #ifndef ENCODER_FACTORY_H #define ENCODER_FACTORY_H -#include "encoder.h" +#include "encoder.hpp" #include class EncoderFactory diff --git a/server/encoder/flacEncoder.cpp b/server/encoder/flac_encoder.cpp similarity index 98% rename from server/encoder/flacEncoder.cpp rename to server/encoder/flac_encoder.cpp index 036fdfaf..e0f16dc6 100644 --- a/server/encoder/flacEncoder.cpp +++ b/server/encoder/flac_encoder.cpp @@ -19,9 +19,9 @@ #include #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" -#include "flacEncoder.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" +#include "flac_encoder.hpp" using namespace std; diff --git a/server/encoder/flacEncoder.h b/server/encoder/flac_encoder.hpp similarity index 98% rename from server/encoder/flacEncoder.h rename to server/encoder/flac_encoder.hpp index 6e5de9b0..03c6321d 100644 --- a/server/encoder/flacEncoder.h +++ b/server/encoder/flac_encoder.hpp @@ -18,7 +18,7 @@ #ifndef FLAC_ENCODER_H #define FLAC_ENCODER_H -#include "encoder.h" +#include "encoder.hpp" #include #include #include diff --git a/server/encoder/oggEncoder.cpp b/server/encoder/ogg_encoder.cpp similarity index 98% rename from server/encoder/oggEncoder.cpp rename to server/encoder/ogg_encoder.cpp index 0ae857a6..26dee560 100644 --- a/server/encoder/oggEncoder.cpp +++ b/server/encoder/ogg_encoder.cpp @@ -20,11 +20,11 @@ #include #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" -#include "common/utils.h" -#include "common/utils/string_utils.h" -#include "oggEncoder.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" +#include "common/utils.hpp" +#include "common/utils/string_utils.hpp" +#include "ogg_encoder.hpp" using namespace std; diff --git a/server/encoder/oggEncoder.h b/server/encoder/ogg_encoder.hpp similarity index 98% rename from server/encoder/oggEncoder.h rename to server/encoder/ogg_encoder.hpp index 583a45cf..368ab9d7 100644 --- a/server/encoder/oggEncoder.h +++ b/server/encoder/ogg_encoder.hpp @@ -18,7 +18,7 @@ #ifndef OGG_ENCODER_H #define OGG_ENCODER_H -#include "encoder.h" +#include "encoder.hpp" #include #include diff --git a/server/encoder/pcmEncoder.cpp b/server/encoder/pcm_encoder.cpp similarity index 98% rename from server/encoder/pcmEncoder.cpp rename to server/encoder/pcm_encoder.cpp index 08a574fb..92339db6 100644 --- a/server/encoder/pcmEncoder.cpp +++ b/server/encoder/pcm_encoder.cpp @@ -16,7 +16,7 @@ along with this program. If not, see . ***/ -#include "pcmEncoder.h" +#include "pcm_encoder.hpp" #include "common/endian.hpp" #include diff --git a/server/encoder/pcmEncoder.h b/server/encoder/pcm_encoder.hpp similarity index 98% rename from server/encoder/pcmEncoder.h rename to server/encoder/pcm_encoder.hpp index 208abbac..e5298620 100644 --- a/server/encoder/pcmEncoder.h +++ b/server/encoder/pcm_encoder.hpp @@ -18,7 +18,7 @@ #ifndef PCM_ENCODER_H #define PCM_ENCODER_H -#include "encoder.h" +#include "encoder.hpp" class PcmEncoder : public Encoder diff --git a/server/publishZeroConf/publishAvahi.cpp b/server/publishZeroConf/publish_avahi.cpp similarity index 99% rename from server/publishZeroConf/publishAvahi.cpp rename to server/publishZeroConf/publish_avahi.cpp index 1459a4c1..da6aa397 100644 --- a/server/publishZeroConf/publishAvahi.cpp +++ b/server/publishZeroConf/publish_avahi.cpp @@ -17,7 +17,7 @@ USA. ***/ -#include "publishAvahi.h" +#include "publish_avahi.hpp" #include "common/aixlog.hpp" #include #include diff --git a/server/publishZeroConf/publishAvahi.h b/server/publishZeroConf/publish_avahi.hpp similarity index 98% rename from server/publishZeroConf/publishAvahi.h rename to server/publishZeroConf/publish_avahi.hpp index cc9135d4..98f7ab25 100644 --- a/server/publishZeroConf/publishAvahi.h +++ b/server/publishZeroConf/publish_avahi.hpp @@ -35,7 +35,7 @@ class PublishAvahi; -#include "publishmDNS.h" +#include "publish_mdns.hpp" class PublishAvahi : public PublishmDNS { diff --git a/server/publishZeroConf/publishBonjour.cpp b/server/publishZeroConf/publish_bonjour.cpp similarity index 100% rename from server/publishZeroConf/publishBonjour.cpp rename to server/publishZeroConf/publish_bonjour.cpp diff --git a/server/publishZeroConf/publishBonjour.h b/server/publishZeroConf/publish_bonjour.hpp similarity index 97% rename from server/publishZeroConf/publishBonjour.h rename to server/publishZeroConf/publish_bonjour.hpp index 66d58a4a..51cfbccd 100644 --- a/server/publishZeroConf/publishBonjour.h +++ b/server/publishZeroConf/publish_bonjour.hpp @@ -25,7 +25,7 @@ class PublishBonjour; -#include "publishmDNS.h" +#include "publish_mdns.hpp" class PublishBonjour : public PublishmDNS { diff --git a/server/publishZeroConf/publishmDNS.h b/server/publishZeroConf/publish_mdns.hpp similarity index 95% rename from server/publishZeroConf/publishmDNS.h rename to server/publishZeroConf/publish_mdns.hpp index 53e8d043..e19b5da2 100644 --- a/server/publishZeroConf/publishmDNS.h +++ b/server/publishZeroConf/publish_mdns.hpp @@ -32,7 +32,7 @@ protected: }; #if defined(HAS_AVAHI) -#include "publishAvahi.h" +#include "publish_avahi.hpp" typedef PublishAvahi PublishZeroConf; #elif defined(HAS_BONJOUR) #include "publishBonjour.h" diff --git a/server/snapserver.cpp b/server/snapserver.cpp index 3af167c6..c14cacc9 100644 --- a/server/snapserver.cpp +++ b/server/snapserver.cpp @@ -22,19 +22,19 @@ #include "common/popl.hpp" #ifdef HAS_DAEMON -#include "common/daemon.h" +#include "common/daemon.hpp" #endif -#include "common/sampleFormat.h" -#include "common/signalHandler.h" -#include "common/snapException.h" -#include "common/timeDefs.h" -#include "common/utils/string_utils.h" -#include "encoder/encoderFactory.h" +#include "common/sample_format.hpp" +#include "common/signal_handler.hpp" +#include "common/snap_exception.hpp" +#include "common/time_defs.hpp" +#include "common/utils/string_utils.hpp" +#include "encoder/encoder_factory.hpp" #include "message/message.h" #include "server_settings.hpp" #include "stream_server.hpp" #if defined(HAS_AVAHI) || defined(HAS_BONJOUR) -#include "publishZeroConf/publishmDNS.h" +#include "publishZeroConf/publish_mdns.hpp" #endif #include "common/aixlog.hpp" #include "config.h" diff --git a/server/stream_server.hpp b/server/stream_server.hpp index c783fb2b..0ffdee56 100644 --- a/server/stream_server.hpp +++ b/server/stream_server.hpp @@ -28,7 +28,7 @@ #include #include "common/queue.h" -#include "common/sampleFormat.h" +#include "common/sample_format.hpp" #include "control_server.hpp" #include "jsonrpcpp.hpp" #include "message/codecHeader.h" @@ -36,7 +36,7 @@ #include "message/serverSettings.h" #include "server_settings.hpp" #include "stream_session.hpp" -#include "streamreader/streamManager.h" +#include "streamreader/stream_manager.hpp" using boost::asio::ip::tcp; diff --git a/server/stream_session.hpp b/server/stream_session.hpp index c53e307d..ed3f98bc 100644 --- a/server/stream_session.hpp +++ b/server/stream_session.hpp @@ -21,7 +21,7 @@ #include "common/queue.h" #include "message/message.h" -#include "streamreader/streamManager.h" +#include "streamreader/stream_manager.hpp" #include #include #include diff --git a/server/streamreader/airplayStream.cpp b/server/streamreader/airplay_stream.cpp similarity index 97% rename from server/streamreader/airplayStream.cpp rename to server/streamreader/airplay_stream.cpp index cef14617..d2193378 100644 --- a/server/streamreader/airplayStream.cpp +++ b/server/streamreader/airplay_stream.cpp @@ -16,12 +16,12 @@ along with this program. If not, see . ***/ -#include "airplayStream.h" +#include "airplay_stream.hpp" #include "base64.h" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/utils.h" -#include "common/utils/string_utils.h" +#include "common/snap_exception.hpp" +#include "common/utils.hpp" +#include "common/utils/string_utils.hpp" using namespace std; diff --git a/server/streamreader/airplayStream.h b/server/streamreader/airplay_stream.hpp similarity index 98% rename from server/streamreader/airplayStream.h rename to server/streamreader/airplay_stream.hpp index 4c69f13d..792173ca 100644 --- a/server/streamreader/airplayStream.h +++ b/server/streamreader/airplay_stream.hpp @@ -19,7 +19,7 @@ #ifndef AIRPLAY_STREAM_H #define AIRPLAY_STREAM_H -#include "processStream.h" +#include "process_stream.hpp" /* * Expat is used in metadata parsing from Shairport-sync. diff --git a/server/streamreader/fileStream.cpp b/server/streamreader/file_stream.cpp similarity index 96% rename from server/streamreader/fileStream.cpp rename to server/streamreader/file_stream.cpp index dbfef30a..376b9893 100644 --- a/server/streamreader/fileStream.cpp +++ b/server/streamreader/file_stream.cpp @@ -21,9 +21,9 @@ #include #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "encoder/encoderFactory.h" -#include "fileStream.h" +#include "common/snap_exception.hpp" +#include "encoder/encoder_factory.hpp" +#include "file_stream.hpp" using namespace std; diff --git a/server/streamreader/fileStream.h b/server/streamreader/file_stream.hpp similarity index 98% rename from server/streamreader/fileStream.h rename to server/streamreader/file_stream.hpp index 2c68ea46..2cef23e4 100644 --- a/server/streamreader/fileStream.h +++ b/server/streamreader/file_stream.hpp @@ -19,7 +19,7 @@ #ifndef FILE_STREAM_H #define FILE_STREAM_H -#include "pcmStream.h" +#include "pcm_stream.hpp" #include diff --git a/server/streamreader/librespot-meta.patch b/server/streamreader/librespot-meta.patch deleted file mode 100644 index a371a08b..00000000 --- a/server/streamreader/librespot-meta.patch +++ /dev/null @@ -1,31 +0,0 @@ -*** librespot/src/player.rs 2017-11-30 08:16:40.865939287 +0100 ---- librespot.meta/src/player.rs 2017-11-30 08:14:39.232954039 +0100 -*************** -*** 13,19 **** - use audio_backend::Sink; - use audio::{AudioFile, AudioDecrypt}; - use audio::{VorbisDecoder, VorbisPacket}; -! use metadata::{FileFormat, Track, Metadata}; - use mixer::AudioFilter; - - #[derive(Clone)] ---- 13,19 ---- - use audio_backend::Sink; - use audio::{AudioFile, AudioDecrypt}; - use audio::{VorbisDecoder, VorbisPacket}; -! use metadata::{Artist, FileFormat, Track, Metadata}; - use mixer::AudioFilter; - - #[derive(Clone)] -*************** -*** 384,389 **** ---- 384,392 ---- - - info!("Track \"{}\" loaded", track.name); - -+ let artist = Artist::get(&self.session, track.artists[0]).wait().unwrap(); -+ info!("metadata:{{\"ARTIST\":\"{}\",\"TITLE\":\"{}\"}}", artist.name, track.name); -+ - Some(decoder) - } - } diff --git a/server/streamreader/spotifyStream.cpp b/server/streamreader/librespot_stream.cpp similarity index 97% rename from server/streamreader/spotifyStream.cpp rename to server/streamreader/librespot_stream.cpp index add7e818..241f8ba7 100644 --- a/server/streamreader/spotifyStream.cpp +++ b/server/streamreader/librespot_stream.cpp @@ -16,11 +16,11 @@ along with this program. If not, see . ***/ -#include "spotifyStream.h" +#include "librespot_stream.hpp" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/utils.h" -#include "common/utils/string_utils.h" +#include "common/snap_exception.hpp" +#include "common/utils.hpp" +#include "common/utils/string_utils.hpp" #include diff --git a/server/streamreader/spotifyStream.h b/server/streamreader/librespot_stream.hpp similarity index 98% rename from server/streamreader/spotifyStream.h rename to server/streamreader/librespot_stream.hpp index 8fc647b4..97aebce2 100644 --- a/server/streamreader/spotifyStream.h +++ b/server/streamreader/librespot_stream.hpp @@ -19,7 +19,7 @@ #ifndef SPOTIFY_STREAM_H #define SPOTIFY_STREAM_H -#include "processStream.h" +#include "process_stream.hpp" #include "watchdog.h" /// Starts librespot and reads PCM data from stdout diff --git a/server/streamreader/pcmStream.cpp b/server/streamreader/pcm_stream.cpp similarity index 97% rename from server/streamreader/pcmStream.cpp rename to server/streamreader/pcm_stream.cpp index 0e013092..8d104f26 100644 --- a/server/streamreader/pcmStream.cpp +++ b/server/streamreader/pcm_stream.cpp @@ -21,10 +21,10 @@ #include #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" -#include "encoder/encoderFactory.h" -#include "pcmStream.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" +#include "encoder/encoder_factory.hpp" +#include "pcm_stream.hpp" using namespace std; diff --git a/server/streamreader/pcmStream.h b/server/streamreader/pcm_stream.hpp similarity index 97% rename from server/streamreader/pcmStream.h rename to server/streamreader/pcm_stream.hpp index a4ced5a8..7db22df5 100644 --- a/server/streamreader/pcmStream.h +++ b/server/streamreader/pcm_stream.hpp @@ -20,11 +20,11 @@ #define PCM_STREAM_H #include "common/json.hpp" -#include "common/sampleFormat.h" -#include "encoder/encoder.h" +#include "common/sample_format.hpp" +#include "encoder/encoder.hpp" #include "message/codecHeader.h" #include "message/streamTags.h" -#include "streamUri.h" +#include "stream_uri.hpp" #include #include #include diff --git a/server/streamreader/pipeStream.cpp b/server/streamreader/pipe_stream.cpp similarity index 97% rename from server/streamreader/pipeStream.cpp rename to server/streamreader/pipe_stream.cpp index 750426f3..d6632fa0 100644 --- a/server/streamreader/pipeStream.cpp +++ b/server/streamreader/pipe_stream.cpp @@ -23,10 +23,10 @@ #include #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" -#include "encoder/encoderFactory.h" -#include "pipeStream.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" +#include "encoder/encoder_factory.hpp" +#include "pipe_stream.hpp" using namespace std; diff --git a/server/streamreader/pipeStream.h b/server/streamreader/pipe_stream.hpp similarity index 97% rename from server/streamreader/pipeStream.h rename to server/streamreader/pipe_stream.hpp index 18937b34..46d3318d 100644 --- a/server/streamreader/pipeStream.h +++ b/server/streamreader/pipe_stream.hpp @@ -19,7 +19,7 @@ #ifndef PIPE_STREAM_H #define PIPE_STREAM_H -#include "pcmStream.h" +#include "pcm_stream.hpp" diff --git a/server/streamreader/processStream.cpp b/server/streamreader/process_stream.cpp similarity index 97% rename from server/streamreader/processStream.cpp rename to server/streamreader/process_stream.cpp index b8f1dba9..58c7384f 100644 --- a/server/streamreader/processStream.cpp +++ b/server/streamreader/process_stream.cpp @@ -17,11 +17,11 @@ ***/ -#include "processStream.h" +#include "process_stream.hpp" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/utils.h" -#include "common/utils/string_utils.h" +#include "common/snap_exception.hpp" +#include "common/utils.hpp" +#include "common/utils/string_utils.hpp" #include #include #include diff --git a/server/streamreader/processStream.h b/server/streamreader/process_stream.hpp similarity index 98% rename from server/streamreader/processStream.h rename to server/streamreader/process_stream.hpp index 78644941..7fb240aa 100644 --- a/server/streamreader/processStream.h +++ b/server/streamreader/process_stream.hpp @@ -22,7 +22,7 @@ #include #include -#include "pcmStream.h" +#include "pcm_stream.hpp" #include "process.hpp" diff --git a/server/streamreader/streamManager.cpp b/server/streamreader/stream_manager.cpp similarity index 93% rename from server/streamreader/streamManager.cpp rename to server/streamreader/stream_manager.cpp index ce4491e7..169b0904 100644 --- a/server/streamreader/streamManager.cpp +++ b/server/streamreader/stream_manager.cpp @@ -16,16 +16,16 @@ along with this program. If not, see . ***/ -#include "streamManager.h" -#include "airplayStream.h" +#include "stream_manager.hpp" +#include "airplay_stream.hpp" #include "common/aixlog.hpp" -#include "common/snapException.h" -#include "common/strCompat.h" -#include "common/utils.h" -#include "fileStream.h" -#include "pipeStream.h" -#include "processStream.h" -#include "spotifyStream.h" +#include "common/snap_exception.hpp" +#include "common/str_compat.hpp" +#include "common/utils.hpp" +#include "file_stream.hpp" +#include "pipe_stream.hpp" +#include "process_stream.hpp" +#include "librespot_stream.hpp" using namespace std; diff --git a/server/streamreader/streamManager.h b/server/streamreader/stream_manager.hpp similarity index 96% rename from server/streamreader/streamManager.h rename to server/streamreader/stream_manager.hpp index c200cfe8..2afa81cf 100644 --- a/server/streamreader/streamManager.h +++ b/server/streamreader/stream_manager.hpp @@ -1,7 +1,7 @@ #ifndef PCM_READER_FACTORY_H #define PCM_READER_FACTORY_H -#include "pcmStream.h" +#include "pcm_stream.hpp" #include #include #include diff --git a/server/streamreader/streamUri.cpp b/server/streamreader/stream_uri.cpp similarity index 97% rename from server/streamreader/streamUri.cpp rename to server/streamreader/stream_uri.cpp index b5c6f590..efd2d0f3 100644 --- a/server/streamreader/streamUri.cpp +++ b/server/streamreader/stream_uri.cpp @@ -16,10 +16,10 @@ along with this program. If not, see . ***/ -#include "streamUri.h" +#include "stream_uri.hpp" #include "common/aixlog.hpp" -#include "common/strCompat.h" -#include "common/utils/string_utils.h" +#include "common/str_compat.hpp" +#include "common/utils/string_utils.hpp" using namespace std; diff --git a/server/streamreader/streamUri.h b/server/streamreader/stream_uri.hpp similarity index 100% rename from server/streamreader/streamUri.h rename to server/streamreader/stream_uri.hpp