mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 07:36:41 +02:00
rename files to snake_case
This commit is contained in:
parent
ea3921d8b7
commit
a30f548a31
87 changed files with 181 additions and 212 deletions
|
@ -4,7 +4,7 @@ set(CLIENT_SOURCES
|
||||||
snapclient.cpp
|
snapclient.cpp
|
||||||
stream.cpp
|
stream.cpp
|
||||||
time_provider.cpp
|
time_provider.cpp
|
||||||
decoder/pcmDecoder.cpp
|
decoder/pcm_decoder.cpp
|
||||||
player/player.cpp)
|
player/player.cpp)
|
||||||
|
|
||||||
set(CLIENT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} common)
|
set(CLIENT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} common)
|
||||||
|
@ -20,12 +20,12 @@ set(CLIENT_INCLUDE
|
||||||
if(MACOSX)
|
if(MACOSX)
|
||||||
# Bonjour
|
# Bonjour
|
||||||
if (BONJOUR_FOUND)
|
if (BONJOUR_FOUND)
|
||||||
list(APPEND CLIENT_SOURCES browseZeroConf/browseBonjour.cpp)
|
list(APPEND CLIENT_SOURCES browseZeroConf/browse_bonjour.cpp)
|
||||||
endif (BONJOUR_FOUND)
|
endif (BONJOUR_FOUND)
|
||||||
|
|
||||||
# CoreAudio
|
# CoreAudio
|
||||||
add_definitions(-DHAS_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(COREAUDIO_LIB CoreAudio)
|
||||||
find_library(COREFOUNDATION_LIB CoreFoundation)
|
find_library(COREFOUNDATION_LIB CoreFoundation)
|
||||||
find_library(AUDIOTOOLBOX_LIB AudioToolbox)
|
find_library(AUDIOTOOLBOX_LIB AudioToolbox)
|
||||||
|
@ -33,14 +33,14 @@ if(MACOSX)
|
||||||
else()
|
else()
|
||||||
# Avahi
|
# Avahi
|
||||||
if (AVAHI_FOUND)
|
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_LIBRARIES ${AVAHI_LIBRARIES})
|
||||||
list(APPEND CLIENT_INCLUDE ${AVAHI_INCLUDE_DIRS})
|
list(APPEND CLIENT_INCLUDE ${AVAHI_INCLUDE_DIRS})
|
||||||
endif (AVAHI_FOUND)
|
endif (AVAHI_FOUND)
|
||||||
|
|
||||||
# ALSA
|
# ALSA
|
||||||
if (ALSA_FOUND)
|
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_LIBRARIES ${ALSA_LIBRARIES})
|
||||||
list(APPEND CLIENT_INCLUDE ${ALSA_INCLUDE_DIRS})
|
list(APPEND CLIENT_INCLUDE ${ALSA_INCLUDE_DIRS})
|
||||||
endif (ALSA_FOUND)
|
endif (ALSA_FOUND)
|
||||||
|
@ -48,7 +48,7 @@ endif (MACOSX)
|
||||||
|
|
||||||
# if OGG then tremor or vorbis
|
# if OGG then tremor or vorbis
|
||||||
if (OGG_FOUND)
|
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_LIBRARIES ${OGG_LIBRARIES})
|
||||||
list(APPEND CLIENT_INCLUDE ${OGG_INCLUDE_DIRS})
|
list(APPEND CLIENT_INCLUDE ${OGG_INCLUDE_DIRS})
|
||||||
endif (OGG_FOUND)
|
endif (OGG_FOUND)
|
||||||
|
@ -63,7 +63,7 @@ elseif (VORBIS_FOUND)
|
||||||
endif (TREMOR_FOUND)
|
endif (TREMOR_FOUND)
|
||||||
|
|
||||||
if (FLAC_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_LIBRARIES ${FLAC_LIBRARIES})
|
||||||
list(APPEND CLIENT_INCLUDE ${FLAC_INCLUDE_DIRS})
|
list(APPEND CLIENT_INCLUDE ${FLAC_INCLUDE_DIRS})
|
||||||
endif (FLAC_FOUND)
|
endif (FLAC_FOUND)
|
||||||
|
|
|
@ -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
|
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
|
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))
|
ifneq (,$(TARGET))
|
||||||
|
@ -53,20 +53,20 @@ CXX = $(PROGRAM_PREFIX)clang++
|
||||||
STRIP = $(PROGRAM_PREFIX)strip
|
STRIP = $(PROGRAM_PREFIX)strip
|
||||||
CXXFLAGS += -pthread -fPIC -DHAS_TREMOR -DHAS_OPENSL -I$(NDK_DIR)/include
|
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++
|
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)
|
else ifeq ($(TARGET), OPENWRT)
|
||||||
|
|
||||||
STRIP = echo
|
STRIP = echo
|
||||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||||
LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic
|
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)
|
else ifeq ($(TARGET), BUILDROOT)
|
||||||
|
|
||||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||||
LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic
|
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)
|
else ifeq ($(TARGET), MACOS)
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ CXX = g++
|
||||||
STRIP = strip
|
STRIP = strip
|
||||||
CXXFLAGS += -DHAS_COREAUDIO -DHAS_VORBIS -DFREEBSD -DHAS_BONJOUR -DHAS_DAEMON -I/usr/local/include -Wno-unused-local-typedef -Wno-deprecated
|
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
|
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
|
else
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ CXX = g++
|
||||||
STRIP = strip
|
STRIP = strip
|
||||||
CXXFLAGS += -pthread -DHAS_VORBIS -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
CXXFLAGS += -pthread -DHAS_VORBIS -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||||
LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic
|
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
|
endif
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
USA.
|
USA.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "browseAvahi.h"
|
#include "browse_avahi.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
class BrowseAvahi;
|
class BrowseAvahi;
|
||||||
|
|
||||||
#include "browsemDNS.h"
|
#include "browse_mdns.hpp"
|
||||||
|
|
||||||
class BrowseAvahi : public BrowsemDNS
|
class BrowseAvahi : public BrowsemDNS
|
||||||
{
|
{
|
|
@ -12,7 +12,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
class BrowseBonjour;
|
class BrowseBonjour;
|
||||||
|
|
||||||
#include "browsemDNS.h"
|
#include "browse_mdns.hpp"
|
||||||
|
|
||||||
class BrowseBonjour : public BrowsemDNS
|
class BrowseBonjour : public BrowsemDNS
|
||||||
{
|
{
|
|
@ -27,7 +27,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(HAS_AVAHI)
|
#if defined(HAS_AVAHI)
|
||||||
#include "browseAvahi.h"
|
#include "browse_avahi.hpp"
|
||||||
typedef BrowseAvahi BrowseZeroConf;
|
typedef BrowseAvahi BrowseZeroConf;
|
||||||
#elif defined(HAS_BONJOUR)
|
#elif defined(HAS_BONJOUR)
|
||||||
#include "browseBonjour.h"
|
#include "browseBonjour.h"
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
#include "client_connection.hpp"
|
#include "client_connection.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "message/hello.h"
|
#include "message/hello.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CLIENT_CONNECTION_H
|
#ifndef CLIENT_CONNECTION_H
|
||||||
#define CLIENT_CONNECTION_H
|
#define CLIENT_CONNECTION_H
|
||||||
|
|
||||||
#include "common/timeDefs.h"
|
#include "common/time_defs.hpp"
|
||||||
#include "message/message.h"
|
#include "message/message.h"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
|
|
|
@ -17,18 +17,18 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "controller.hpp"
|
#include "controller.hpp"
|
||||||
#include "decoder/pcmDecoder.h"
|
#include "decoder/pcm_decoder.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#if defined(HAS_OGG) && (defined(HAS_TREMOR) || defined(HAS_VORBIS))
|
#if defined(HAS_OGG) && (defined(HAS_TREMOR) || defined(HAS_VORBIS))
|
||||||
#include "decoder/oggDecoder.h"
|
#include "decoder/ogg_decoder.hpp"
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAS_FLAC)
|
#if defined(HAS_FLAC)
|
||||||
#include "decoder/flacDecoder.h"
|
#include "decoder/flac_decoder.hpp"
|
||||||
#endif
|
#endif
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "message/hello.h"
|
#include "message/hello.h"
|
||||||
#include "message/time.h"
|
#include "message/time.h"
|
||||||
#include "time_provider.hpp"
|
#include "time_provider.hpp"
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
#include "message/message.h"
|
#include "message/message.h"
|
||||||
#include "message/serverSettings.h"
|
#include "message/serverSettings.h"
|
||||||
#include "message/streamTags.h"
|
#include "message/streamTags.h"
|
||||||
#include "player/pcmDevice.h"
|
#include "player/pcm_device.hpp"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#ifdef HAS_ALSA
|
#ifdef HAS_ALSA
|
||||||
#include "player/alsaPlayer.h"
|
#include "player/alsa_player.hpp"
|
||||||
#elif HAS_OPENSL
|
#elif HAS_OPENSL
|
||||||
#include "player/openslPlayer.h"
|
#include "player/openslPlayer.h"
|
||||||
#elif HAS_COREAUDIO
|
#elif HAS_COREAUDIO
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#ifndef DECODER_H
|
#ifndef DECODER_H
|
||||||
#define DECODER_H
|
#define DECODER_H
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "message/codecHeader.h"
|
#include "message/codecHeader.h"
|
||||||
#include "message/pcmChunk.h"
|
#include "message/pcmChunk.h"
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "flacDecoder.h"
|
#include "flac_decoder.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/endian.hpp"
|
#include "common/endian.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/endian.hpp"
|
#include "common/endian.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "oggDecoder.h"
|
#include "ogg_decoder.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -16,10 +16,10 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "pcmDecoder.h"
|
#include "pcm_decoder.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/endian.hpp"
|
#include "common/endian.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
|
|
||||||
|
|
||||||
#define ID_RIFF 0x46464952
|
#define ID_RIFF 0x46464952
|
|
@ -16,10 +16,10 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "alsaPlayer.h"
|
#include "alsa_player.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
|
|
||||||
//#define BUFFER_TIME 120000
|
//#define BUFFER_TIME 120000
|
||||||
#define PERIOD_TIME 30000
|
#define PERIOD_TIME 30000
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef ALSA_PLAYER_H
|
#ifndef ALSA_PLAYER_H
|
||||||
#define ALSA_PLAYER_H
|
#define ALSA_PLAYER_H
|
||||||
|
|
||||||
#include "player.h"
|
#include "player.hpp"
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <CoreAudio/CoreAudioTypes.h>
|
#include <CoreAudio/CoreAudioTypes.h>
|
||||||
#include <CoreFoundation/CFRunLoop.h>
|
#include <CoreFoundation/CFRunLoop.h>
|
||||||
|
|
||||||
#include "player.h"
|
#include "player.hpp"
|
||||||
|
|
||||||
/// Audio Player
|
/// Audio Player
|
||||||
/**
|
/**
|
|
@ -20,8 +20,8 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "openslPlayer.h"
|
#include "openslPlayer.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -23,7 +23,7 @@
|
||||||
#include <SLES/OpenSLES_Android.h>
|
#include <SLES/OpenSLES_Android.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "player.h"
|
#include "player.hpp"
|
||||||
|
|
||||||
typedef int (*AndroidAudioCallback)(short* buffer, int num_samples);
|
typedef int (*AndroidAudioCallback)(short* buffer, int num_samples);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "player.h"
|
#include "player.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/endian.hpp"
|
#include "common/endian.hpp"
|
||||||
#include "pcmDevice.h"
|
#include "pcm_device.hpp"
|
||||||
#include "stream.hpp"
|
#include "stream.hpp"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <string>
|
#include <string>
|
|
@ -19,20 +19,20 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
||||||
#include "browseZeroConf/browsemDNS.h"
|
#include "browseZeroConf/browse_mdns.hpp"
|
||||||
#include "common/popl.hpp"
|
#include "common/popl.hpp"
|
||||||
#include "controller.hpp"
|
#include "controller.hpp"
|
||||||
|
|
||||||
#ifdef HAS_ALSA
|
#ifdef HAS_ALSA
|
||||||
#include "player/alsaPlayer.h"
|
#include "player/alsa_player.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_DAEMON
|
#ifdef HAS_DAEMON
|
||||||
#include "common/daemon.h"
|
#include "common/daemon.hpp"
|
||||||
#endif
|
#endif
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/signalHandler.h"
|
#include "common/signal_handler.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "metadata.hpp"
|
#include "metadata.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
//#include "common/timeUtils.h"
|
//#include "common/timeUtils.h"
|
||||||
|
|
||||||
#include "common/queue.h"
|
#include "common/queue.h"
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "double_buffer.hpp"
|
#include "double_buffer.hpp"
|
||||||
#include "message/message.h"
|
#include "message/message.h"
|
||||||
#include "message/pcmChunk.h"
|
#include "message/pcmChunk.h"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef TIME_PROVIDER_H
|
#ifndef TIME_PROVIDER_H
|
||||||
#define TIME_PROVIDER_H
|
#define TIME_PROVIDER_H
|
||||||
|
|
||||||
#include "common/timeDefs.h"
|
#include "common/time_defs.hpp"
|
||||||
#include "double_buffer.hpp"
|
#include "double_buffer.hpp"
|
||||||
#include "message/message.h"
|
#include "message/message.h"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
add_library(common STATIC daemon.cpp sampleFormat.cpp)
|
add_library(common STATIC daemon.cpp sample_format.cpp)
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "daemon.h"
|
#include "daemon.hpp"
|
||||||
|
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "common/utils/file_utils.h"
|
#include "common/utils/file_utils.hpp"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -55,7 +55,7 @@ SOFTWARE.
|
||||||
#include <string> // string
|
#include <string> // string
|
||||||
#include <vector> // vector
|
#include <vector> // vector
|
||||||
|
|
||||||
#include "strCompat.h"
|
#include "str_compat.hpp"
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#ifndef HELLO_MSG_H
|
#ifndef HELLO_MSG_H
|
||||||
#define HELLO_MSG_H
|
#define HELLO_MSG_H
|
||||||
|
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "jsonMessage.h"
|
#include "jsonMessage.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#define MESSAGE_H
|
#define MESSAGE_H
|
||||||
|
|
||||||
#include "common/endian.hpp"
|
#include "common/endian.hpp"
|
||||||
#include "common/timeDefs.h"
|
#include "common/time_defs.hpp"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef PCM_CHUNK_H
|
#ifndef PCM_CHUNK_H
|
||||||
#define PCM_CHUNK_H
|
#define PCM_CHUNK_H
|
||||||
|
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "wireChunk.h"
|
#include "wireChunk.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef WIRE_CHUNK_H
|
#ifndef WIRE_CHUNK_H
|
||||||
#define WIRE_CHUNK_H
|
#define WIRE_CHUNK_H
|
||||||
|
|
||||||
#include "common/timeDefs.h"
|
#include "common/time_defs.hpp"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
#include "sampleFormat.h"
|
#include "sample_format.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -19,8 +19,8 @@
|
||||||
#ifndef UTILS_H
|
#ifndef UTILS_H
|
||||||
#define UTILS_H
|
#define UTILS_H
|
||||||
|
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef FILE_UTILS_H
|
#ifndef FILE_UTILS_H
|
||||||
#define FILE_UTILS_H
|
#define FILE_UTILS_H
|
||||||
|
|
||||||
#include "string_utils.h"
|
#include "string_utils.hpp"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
|
@ -6,18 +6,18 @@ set(SERVER_SOURCES
|
||||||
snapserver.cpp
|
snapserver.cpp
|
||||||
stream_server.cpp
|
stream_server.cpp
|
||||||
stream_session.cpp
|
stream_session.cpp
|
||||||
encoder/encoderFactory.cpp
|
encoder/encoder_factory.cpp
|
||||||
encoder/pcmEncoder.cpp
|
encoder/pcm_encoder.cpp
|
||||||
streamreader/base64.cpp
|
streamreader/base64.cpp
|
||||||
streamreader/streamUri.cpp
|
streamreader/stream_uri.cpp
|
||||||
streamreader/streamManager.cpp
|
streamreader/stream_manager.cpp
|
||||||
streamreader/pcmStream.cpp
|
streamreader/pcm_stream.cpp
|
||||||
streamreader/pipeStream.cpp
|
streamreader/pipe_stream.cpp
|
||||||
streamreader/fileStream.cpp
|
streamreader/file_stream.cpp
|
||||||
streamreader/airplayStream.cpp
|
streamreader/airplay_stream.cpp
|
||||||
streamreader/spotifyStream.cpp
|
streamreader/librespot_stream.cpp
|
||||||
streamreader/watchdog.cpp
|
streamreader/watchdog.cpp
|
||||||
streamreader/processStream.cpp)
|
streamreader/process_stream.cpp)
|
||||||
|
|
||||||
set(SERVER_LIBRARIES
|
set(SERVER_LIBRARIES
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
|
@ -30,19 +30,19 @@ set(SERVER_INCLUDE
|
||||||
|
|
||||||
# Avahi
|
# Avahi
|
||||||
if (AVAHI_FOUND)
|
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_LIBRARIES ${AVAHI_LIBRARIES})
|
||||||
list(APPEND SERVER_INCLUDE ${AVAHI_INCLUDE_DIRS})
|
list(APPEND SERVER_INCLUDE ${AVAHI_INCLUDE_DIRS})
|
||||||
endif (AVAHI_FOUND)
|
endif (AVAHI_FOUND)
|
||||||
|
|
||||||
if (BONJOUR_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_LIBRARIES ${BONJOUR_LIBRARIES})
|
||||||
# list(APPEND SERVER_INCLUDE ${BONJOUR_INCLUDE_DIRS})
|
# list(APPEND SERVER_INCLUDE ${BONJOUR_INCLUDE_DIRS})
|
||||||
endif (BONJOUR_FOUND)
|
endif (BONJOUR_FOUND)
|
||||||
|
|
||||||
if (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_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
|
list(APPEND SERVER_LIBRARIES
|
||||||
${OGG_LIBRARIES}
|
${OGG_LIBRARIES}
|
||||||
${VORBIS_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)
|
endif (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_FOUND)
|
||||||
|
|
||||||
if (FLAC_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_LIBRARIES ${FLAC_LIBRARIES})
|
||||||
list(APPEND SERVER_INCLUDE ${FLAC_INCLUDE_DIRS})
|
list(APPEND SERVER_INCLUDE ${FLAC_INCLUDE_DIRS})
|
||||||
endif (FLAC_FOUND)
|
endif (FLAC_FOUND)
|
||||||
|
|
|
@ -31,13 +31,13 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Simplify building debuggable executables 'make DEBUG=-g STRIP=echo'
|
# Simplify building debuggable executables 'make DEBUG=-g STRIP=echo'
|
||||||
DEBUG=-O2
|
DEBUG=-g
|
||||||
SANITIZE=
|
SANITIZE=
|
||||||
#-fsanitize=thread
|
#-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
|
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
|
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))
|
ifneq (,$(TARGET))
|
||||||
CXXFLAGS += -D$(TARGET)
|
CXXFLAGS += -D$(TARGET)
|
||||||
|
@ -59,13 +59,13 @@ else ifeq ($(TARGET), OPENWRT)
|
||||||
STRIP = echo
|
STRIP = echo
|
||||||
CXXFLAGS += -DNO_CPP11_STRING -DHAS_AVAHI -DHAS_DAEMON -pthread
|
CXXFLAGS += -DNO_CPP11_STRING -DHAS_AVAHI -DHAS_DAEMON -pthread
|
||||||
LDFLAGS += -lavahi-client -lavahi-common -latomic
|
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)
|
else ifeq ($(TARGET), BUILDROOT)
|
||||||
|
|
||||||
CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread
|
CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread
|
||||||
LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++
|
LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++
|
||||||
OBJ += publishZeroConf/publishAvahi.o
|
OBJ += publishZeroConf/publish_avahi.o
|
||||||
|
|
||||||
else ifeq ($(TARGET), FREEBSD)
|
else ifeq ($(TARGET), FREEBSD)
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ CXX = g++
|
||||||
STRIP = echo
|
STRIP = echo
|
||||||
CXXFLAGS += -DFREEBSD -DNO_CPP11_STRING -DHAS_AVAHI -DHAS_DAEMON -pthread
|
CXXFLAGS += -DFREEBSD -DNO_CPP11_STRING -DHAS_AVAHI -DHAS_DAEMON -pthread
|
||||||
LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic
|
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)
|
else ifeq ($(TARGET), MACOS)
|
||||||
|
|
||||||
|
@ -81,15 +81,15 @@ CXX = g++
|
||||||
STRIP = strip
|
STRIP = strip
|
||||||
CXXFLAGS += -DFREEBSD -DHAS_BONJOUR -DHAS_DAEMON -Wno-deprecated -I/usr/local/include
|
CXXFLAGS += -DFREEBSD -DHAS_BONJOUR -DHAS_DAEMON -Wno-deprecated -I/usr/local/include
|
||||||
LDFLAGS += -L/usr/local/lib -framework CoreFoundation -framework IOKit
|
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
|
else
|
||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
STRIP = strip
|
STRIP = echo
|
||||||
CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread
|
CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread
|
||||||
LDFLAGS += -lrt -lavahi-client -lavahi-common -static-libgcc -static-libstdc++
|
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
|
endif
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils/file_utils.h"
|
#include "common/utils/file_utils.hpp"
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/json.hpp"
|
#include "common/json.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace strutils = utils::string;
|
namespace strutils = utils::string;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
#include "control_server.hpp"
|
#include "control_server.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "control_session_http.hpp"
|
#include "control_session_http.hpp"
|
||||||
#include "control_session_tcp.hpp"
|
#include "control_session_tcp.hpp"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/queue.h"
|
#include "common/queue.h"
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "control_session.hpp"
|
#include "control_session.hpp"
|
||||||
#include "message/codecHeader.h"
|
#include "message/codecHeader.h"
|
||||||
#include "message/message.h"
|
#include "message/message.h"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "message/codecHeader.h"
|
#include "message/codecHeader.h"
|
||||||
#include "message/pcmChunk.h"
|
#include "message/pcmChunk.h"
|
||||||
|
|
|
@ -16,17 +16,17 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "encoderFactory.h"
|
#include "encoder_factory.hpp"
|
||||||
#include "pcmEncoder.h"
|
#include "pcm_encoder.hpp"
|
||||||
#if defined(HAS_OGG) && defined(HAS_VORBIS) && defined(HAS_VORBISENC)
|
#if defined(HAS_OGG) && defined(HAS_VORBIS) && defined(HAS_VORBISENC)
|
||||||
#include "oggEncoder.h"
|
#include "ogg_encoder.hpp"
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAS_FLAC)
|
#if defined(HAS_FLAC)
|
||||||
#include "flacEncoder.h"
|
#include "flac_encoder.hpp"
|
||||||
#endif
|
#endif
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef ENCODER_FACTORY_H
|
#ifndef ENCODER_FACTORY_H
|
||||||
#define ENCODER_FACTORY_H
|
#define ENCODER_FACTORY_H
|
||||||
|
|
||||||
#include "encoder.h"
|
#include "encoder.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class EncoderFactory
|
class EncoderFactory
|
|
@ -19,9 +19,9 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "flacEncoder.h"
|
#include "flac_encoder.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#ifndef FLAC_ENCODER_H
|
#ifndef FLAC_ENCODER_H
|
||||||
#define FLAC_ENCODER_H
|
#define FLAC_ENCODER_H
|
||||||
#include "encoder.h"
|
#include "encoder.hpp"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
|
@ -20,11 +20,11 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
#include "oggEncoder.h"
|
#include "ogg_encoder.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#ifndef OGG_ENCODER_H
|
#ifndef OGG_ENCODER_H
|
||||||
#define OGG_ENCODER_H
|
#define OGG_ENCODER_H
|
||||||
#include "encoder.h"
|
#include "encoder.hpp"
|
||||||
#include <ogg/ogg.h>
|
#include <ogg/ogg.h>
|
||||||
#include <vorbis/vorbisenc.h>
|
#include <vorbis/vorbisenc.h>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "pcmEncoder.h"
|
#include "pcm_encoder.hpp"
|
||||||
#include "common/endian.hpp"
|
#include "common/endian.hpp"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#ifndef PCM_ENCODER_H
|
#ifndef PCM_ENCODER_H
|
||||||
#define PCM_ENCODER_H
|
#define PCM_ENCODER_H
|
||||||
#include "encoder.h"
|
#include "encoder.hpp"
|
||||||
|
|
||||||
|
|
||||||
class PcmEncoder : public Encoder
|
class PcmEncoder : public Encoder
|
|
@ -17,7 +17,7 @@
|
||||||
USA.
|
USA.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "publishAvahi.h"
|
#include "publish_avahi.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
class PublishAvahi;
|
class PublishAvahi;
|
||||||
|
|
||||||
#include "publishmDNS.h"
|
#include "publish_mdns.hpp"
|
||||||
|
|
||||||
class PublishAvahi : public PublishmDNS
|
class PublishAvahi : public PublishmDNS
|
||||||
{
|
{
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
class PublishBonjour;
|
class PublishBonjour;
|
||||||
|
|
||||||
#include "publishmDNS.h"
|
#include "publish_mdns.hpp"
|
||||||
|
|
||||||
class PublishBonjour : public PublishmDNS
|
class PublishBonjour : public PublishmDNS
|
||||||
{
|
{
|
|
@ -32,7 +32,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(HAS_AVAHI)
|
#if defined(HAS_AVAHI)
|
||||||
#include "publishAvahi.h"
|
#include "publish_avahi.hpp"
|
||||||
typedef PublishAvahi PublishZeroConf;
|
typedef PublishAvahi PublishZeroConf;
|
||||||
#elif defined(HAS_BONJOUR)
|
#elif defined(HAS_BONJOUR)
|
||||||
#include "publishBonjour.h"
|
#include "publishBonjour.h"
|
|
@ -22,19 +22,19 @@
|
||||||
|
|
||||||
#include "common/popl.hpp"
|
#include "common/popl.hpp"
|
||||||
#ifdef HAS_DAEMON
|
#ifdef HAS_DAEMON
|
||||||
#include "common/daemon.h"
|
#include "common/daemon.hpp"
|
||||||
#endif
|
#endif
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "common/signalHandler.h"
|
#include "common/signal_handler.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/timeDefs.h"
|
#include "common/time_defs.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
#include "encoder/encoderFactory.h"
|
#include "encoder/encoder_factory.hpp"
|
||||||
#include "message/message.h"
|
#include "message/message.h"
|
||||||
#include "server_settings.hpp"
|
#include "server_settings.hpp"
|
||||||
#include "stream_server.hpp"
|
#include "stream_server.hpp"
|
||||||
#if defined(HAS_AVAHI) || defined(HAS_BONJOUR)
|
#if defined(HAS_AVAHI) || defined(HAS_BONJOUR)
|
||||||
#include "publishZeroConf/publishmDNS.h"
|
#include "publishZeroConf/publish_mdns.hpp"
|
||||||
#endif
|
#endif
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/queue.h"
|
#include "common/queue.h"
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "control_server.hpp"
|
#include "control_server.hpp"
|
||||||
#include "jsonrpcpp.hpp"
|
#include "jsonrpcpp.hpp"
|
||||||
#include "message/codecHeader.h"
|
#include "message/codecHeader.h"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
#include "message/serverSettings.h"
|
#include "message/serverSettings.h"
|
||||||
#include "server_settings.hpp"
|
#include "server_settings.hpp"
|
||||||
#include "stream_session.hpp"
|
#include "stream_session.hpp"
|
||||||
#include "streamreader/streamManager.h"
|
#include "streamreader/stream_manager.hpp"
|
||||||
|
|
||||||
|
|
||||||
using boost::asio::ip::tcp;
|
using boost::asio::ip::tcp;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "common/queue.h"
|
#include "common/queue.h"
|
||||||
#include "message/message.h"
|
#include "message/message.h"
|
||||||
#include "streamreader/streamManager.h"
|
#include "streamreader/stream_manager.hpp"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "airplayStream.h"
|
#include "airplay_stream.hpp"
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef AIRPLAY_STREAM_H
|
#ifndef AIRPLAY_STREAM_H
|
||||||
#define AIRPLAY_STREAM_H
|
#define AIRPLAY_STREAM_H
|
||||||
|
|
||||||
#include "processStream.h"
|
#include "process_stream.hpp"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expat is used in metadata parsing from Shairport-sync.
|
* Expat is used in metadata parsing from Shairport-sync.
|
|
@ -21,9 +21,9 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "encoder/encoderFactory.h"
|
#include "encoder/encoder_factory.hpp"
|
||||||
#include "fileStream.h"
|
#include "file_stream.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef FILE_STREAM_H
|
#ifndef FILE_STREAM_H
|
||||||
#define FILE_STREAM_H
|
#define FILE_STREAM_H
|
||||||
|
|
||||||
#include "pcmStream.h"
|
#include "pcm_stream.hpp"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
|
@ -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)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,11 +16,11 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "spotifyStream.h"
|
#include "librespot_stream.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef SPOTIFY_STREAM_H
|
#ifndef SPOTIFY_STREAM_H
|
||||||
#define SPOTIFY_STREAM_H
|
#define SPOTIFY_STREAM_H
|
||||||
|
|
||||||
#include "processStream.h"
|
#include "process_stream.hpp"
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
|
|
||||||
/// Starts librespot and reads PCM data from stdout
|
/// Starts librespot and reads PCM data from stdout
|
|
@ -21,10 +21,10 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "encoder/encoderFactory.h"
|
#include "encoder/encoder_factory.hpp"
|
||||||
#include "pcmStream.h"
|
#include "pcm_stream.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -20,11 +20,11 @@
|
||||||
#define PCM_STREAM_H
|
#define PCM_STREAM_H
|
||||||
|
|
||||||
#include "common/json.hpp"
|
#include "common/json.hpp"
|
||||||
#include "common/sampleFormat.h"
|
#include "common/sample_format.hpp"
|
||||||
#include "encoder/encoder.h"
|
#include "encoder/encoder.hpp"
|
||||||
#include "message/codecHeader.h"
|
#include "message/codecHeader.h"
|
||||||
#include "message/streamTags.h"
|
#include "message/streamTags.h"
|
||||||
#include "streamUri.h"
|
#include "stream_uri.hpp"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
#include <map>
|
#include <map>
|
|
@ -23,10 +23,10 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "encoder/encoderFactory.h"
|
#include "encoder/encoder_factory.hpp"
|
||||||
#include "pipeStream.h"
|
#include "pipe_stream.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef PIPE_STREAM_H
|
#ifndef PIPE_STREAM_H
|
||||||
#define PIPE_STREAM_H
|
#define PIPE_STREAM_H
|
||||||
|
|
||||||
#include "pcmStream.h"
|
#include "pcm_stream.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
|
||||||
#include "processStream.h"
|
#include "process_stream.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
|
@ -22,7 +22,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "pcmStream.h"
|
#include "pcm_stream.hpp"
|
||||||
#include "process.hpp"
|
#include "process.hpp"
|
||||||
|
|
||||||
|
|
|
@ -16,16 +16,16 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "streamManager.h"
|
#include "stream_manager.hpp"
|
||||||
#include "airplayStream.h"
|
#include "airplay_stream.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/snapException.h"
|
#include "common/snap_exception.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils.h"
|
#include "common/utils.hpp"
|
||||||
#include "fileStream.h"
|
#include "file_stream.hpp"
|
||||||
#include "pipeStream.h"
|
#include "pipe_stream.hpp"
|
||||||
#include "processStream.h"
|
#include "process_stream.hpp"
|
||||||
#include "spotifyStream.h"
|
#include "librespot_stream.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PCM_READER_FACTORY_H
|
#ifndef PCM_READER_FACTORY_H
|
||||||
#define PCM_READER_FACTORY_H
|
#define PCM_READER_FACTORY_H
|
||||||
|
|
||||||
#include "pcmStream.h"
|
#include "pcm_stream.hpp"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
|
@ -16,10 +16,10 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "streamUri.h"
|
#include "stream_uri.hpp"
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
#include "common/strCompat.h"
|
#include "common/str_compat.hpp"
|
||||||
#include "common/utils/string_utils.h"
|
#include "common/utils/string_utils.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
Loading…
Add table
Add a link
Reference in a new issue