update json.hpp to 3.1.0

This commit is contained in:
badaix 2018-02-06 22:38:45 +01:00
parent 84b03c98af
commit 6bbcc83cb1
11 changed files with 17184 additions and 10073 deletions

View file

@ -19,11 +19,7 @@
#ifndef METADATA_H #ifndef METADATA_H
#define METADATA_H #define METADATA_H
#ifdef HAS_JSONRPCPP #include "common/json.hpp"
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
// Prefix used in output // Prefix used in output
#define METADATA std::string("metadata") #define METADATA std::string("metadata")

View file

@ -87,7 +87,7 @@ int main (int argc, char **argv)
auto versionSwitch = op.add<Switch>("v", "version", "show version number"); auto versionSwitch = op.add<Switch>("v", "version", "show version number");
#if defined(HAS_ALSA) #if defined(HAS_ALSA)
auto listSwitch = op.add<Switch>("l", "list", "list pcm devices"); auto listSwitch = op.add<Switch>("l", "list", "list pcm devices");
auto soundcardValue = op.add<Value<string>>("s", "soundcard", "index or name of the soundcard", "default", &soundcard); /*auto soundcardValue =*/ op.add<Value<string>>("s", "soundcard", "index or name of the soundcard", "default", &soundcard);
#endif #endif
auto metaStderr = op.add<Switch>("e", "mstderr", "send metadata to stderr"); auto metaStderr = op.add<Switch>("e", "mstderr", "send metadata to stderr");
//auto metaHook = op.add<Value<string>>("m", "mhook", "script to call on meta tags", "", &meta_script); //auto metaHook = op.add<Value<string>>("m", "mhook", "script to call on meta tags", "", &meta_script);
@ -198,7 +198,6 @@ int main (int argc, char **argv)
} }
#endif #endif
/* TODO: Merge
PcmDevice pcmDevice = getPcmDevice(soundcard); PcmDevice pcmDevice = getPcmDevice(soundcard);
#if defined(HAS_ALSA) #if defined(HAS_ALSA)
if (pcmDevice.idx == -1) if (pcmDevice.idx == -1)
@ -207,12 +206,6 @@ int main (int argc, char **argv)
// exit(EXIT_FAILURE); // exit(EXIT_FAILURE);
} }
#endif #endif
*/
PcmDevice pcmDevice;
pcmDevice.idx = 1;
if (soundcardValue->is_set())
pcmDevice.name = soundcard;
if (host.empty()) if (host.empty())
{ {

17173
common/json.hpp Normal file

File diff suppressed because it is too large Load diff

9
externals/Makefile vendored
View file

@ -32,17 +32,16 @@ ifndef NDK_DIR
$(error android NDK_DIR is not set) $(error android NDK_DIR is not set)
endif endif
ifndef ARCH ifndef ARCH
$(error ARCH is not set (arm, mips, x86)) $(error ARCH is not set ("arm" or "x86"))
endif endif
ifeq ($(ARCH), x86) ifeq ($(ARCH), x86)
$(eval CPPFLAGS:=-DLITTLE_ENDIAN=1234 -DBIG_ENDIAN=4321 -DBYTE_ORDER=LITTLE_ENDIAN) $(eval CPPFLAGS:=-DLITTLE_ENDIAN=1234 -DBIG_ENDIAN=4321 -DBYTE_ORDER=LITTLE_ENDIAN)
$(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/i686-linux-android-) $(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/i686-linux-android-)
else ifeq ($(ARCH), mips) else ifeq ($(ARCH), arm)
$(eval CPPFLAGS:=-DLITTLE_ENDIAN=1234 -DBIG_ENDIAN=4321 -DBYTE_ORDER=BIG_ENDIAN)
$(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/mipsel-linux-android-)
else
$(eval CPPFLAGS:=-U_ARM_ASSEM_) $(eval CPPFLAGS:=-U_ARM_ASSEM_)
$(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/arm-linux-androideabi-) $(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/arm-linux-androideabi-)
else
$(error ARCH must be "arm" or "x86")
endif endif
$(eval CC:=$(PROGRAM_PREFIX)clang) $(eval CC:=$(PROGRAM_PREFIX)clang)
$(eval CXX:=$(PROGRAM_PREFIX)clang++) $(eval CXX:=$(PROGRAM_PREFIX)clang++)

10034
externals/json.hpp vendored

File diff suppressed because it is too large Load diff

View file

@ -20,12 +20,7 @@
#define JSON_MESSAGE_H #define JSON_MESSAGE_H
#include "message.h" #include "message.h"
#include "common/json.hpp"
#ifdef HAS_JSONRPCPP
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
using json = nlohmann::json; using json = nlohmann::json;

View file

@ -24,11 +24,7 @@
#include <vector> #include <vector>
#include <sys/time.h> #include <sys/time.h>
#ifdef HAS_JSONRPCPP #include "common/json.hpp"
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
#include "common/utils/string_utils.h" #include "common/utils/string_utils.h"
#include "common/utils.h" #include "common/utils.h"

View file

@ -28,14 +28,10 @@
#include "streamUri.h" #include "streamUri.h"
#include "encoder/encoder.h" #include "encoder/encoder.h"
#include "common/sampleFormat.h" #include "common/sampleFormat.h"
#include "common/json.hpp"
#include "message/codecHeader.h" #include "message/codecHeader.h"
#include "message/streamTags.h" #include "message/streamTags.h"
#ifdef HAS_JSONRPCPP
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
class PcmStream; class PcmStream;

View file

@ -22,11 +22,8 @@
#include <string> #include <string>
#include <map> #include <map>
#ifdef HAS_JSONRPCPP #include "common/json.hpp"
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
using json = nlohmann::json; using json = nlohmann::json;