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
#define METADATA_H
#ifdef HAS_JSONRPCPP
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
#include "common/json.hpp"
// Prefix used in output
#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");
#if defined(HAS_ALSA)
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
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);
@ -198,7 +198,6 @@ int main (int argc, char **argv)
}
#endif
/* TODO: Merge
PcmDevice pcmDevice = getPcmDevice(soundcard);
#if defined(HAS_ALSA)
if (pcmDevice.idx == -1)
@ -207,12 +206,6 @@ int main (int argc, char **argv)
// exit(EXIT_FAILURE);
}
#endif
*/
PcmDevice pcmDevice;
pcmDevice.idx = 1;
if (soundcardValue->is_set())
pcmDevice.name = soundcard;
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)
endif
ifndef ARCH
$(error ARCH is not set (arm, mips, x86))
$(error ARCH is not set ("arm" or "x86"))
endif
ifeq ($(ARCH), x86)
$(eval CPPFLAGS:=-DLITTLE_ENDIAN=1234 -DBIG_ENDIAN=4321 -DBYTE_ORDER=LITTLE_ENDIAN)
$(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/i686-linux-android-)
else ifeq ($(ARCH), mips)
$(eval CPPFLAGS:=-DLITTLE_ENDIAN=1234 -DBIG_ENDIAN=4321 -DBYTE_ORDER=BIG_ENDIAN)
$(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/mipsel-linux-android-)
else
else ifeq ($(ARCH), arm)
$(eval CPPFLAGS:=-U_ARM_ASSEM_)
$(eval PROGRAM_PREFIX:=$(NDK_DIR)/bin/arm-linux-androideabi-)
else
$(error ARCH must be "arm" or "x86")
endif
$(eval CC:=$(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
#include "message.h"
#ifdef HAS_JSONRPCPP
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
#include "common/json.hpp"
using json = nlohmann::json;

View file

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

View file

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

View file

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