From b843a328f4896ae7dd84c3a349976dacc4da81e9 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 30 十月 2018 19:15:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/U3DRepository
---
ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/JPUSHService.h | 608 ++++++++
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/en.lproj/Root.strings | 0
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h | 159 ++
ChannelDiff/iOS/jisusnyjjios/SDK/libTianQingSDK.a | 0
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/File.txt | 79 +
ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a | 0
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h | 753 ++++++++++
ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist | 8
ChannelDiff/iOS/jisusnyjjios/Opus/include.meta | 9
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h | 981 +++++++++++++
ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png | 0
ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h | 101 +
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h.meta | 33
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_NormalBtn_icon@2x.png | 0
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_seletedBtn_icon@2x.png | 0
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h.meta | 33
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h.meta | 33
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Back_Icon.png | 0
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h.meta | 33
ChannelDiff/iOS/jisusnyjjios/Opus/lib.meta | 9
ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h.meta | 33
ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a.meta | 33
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus.meta | 9
ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a.meta | 33
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQingConfig.plist | 10
ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingHeader.h | 48
ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h | 660 ++++++++
ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingSDK.h | 74
ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a | 0
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/userIcon.png | 0
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_BG.png | 0
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Close_Icon.png | 0
ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jpush-ios-3.0.9.a | 0
ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.h | 73
ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingUserAccount.h | 19
ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/Root.plist | 61
ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jcore-ios-1.1.9.a | 0
ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.mm | 570 +++++++
38 files changed, 4,462 insertions(+), 0 deletions(-)
diff --git a/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h
new file mode 100644
index 0000000..eada810
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h
@@ -0,0 +1,101 @@
+//
+// BuglyBridge.h
+// BuglyAgent
+//
+// Created by Yeelik on 15/11/25.
+// Copyright 漏 2015骞� Bugly. All rights reserved.
+//
+// Version: 1.3.3
+//
+
+#import <Foundation/Foundation.h>
+
+#pragma mark - Interface for Bridge
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+ /**
+ * @brief 鍒濆鍖�
+ *
+ * @param appId 搴旂敤鏍囪瘑
+ * @param debug 鏄惁寮�鍚痙ebug妯″紡锛屽紑鍚悗浼氬湪鎺у埗鍙版墦鍗拌皟璇曚俊鎭紝榛樿涓篘O
+ * @param level 鑷畾涔夋棩蹇椾笂鎶ョ骇鍒紝浣跨敤SDK鎺ュ彛鎵撳嵃鐨勬棩蹇椾細璺熷穿婧冧俊鎭竴璧蜂笂鎶ワ紝榛樿涓篒nfo(鍗矷nfo銆乄arning銆丒rror绾у埆鐨勬棩蹇楅兘浼氫笂鎶�)
+ * Debug=4,Info=3,Warnning=2,Error=1,Off=0
+ */
+ void _BuglyInit(const char * appId, bool debug, int level);
+
+ /**
+ * @brief 璁剧疆鐢ㄦ埛鍞竴鏍囪瘑
+ *
+ * @param userId
+ */
+ void _BuglySetUserId(const char * userId);
+
+ /**
+ * @brief 璁剧疆鑷畾涔夋爣绛�
+ *
+ * @param tag
+ */
+ void _BuglySetTag(int tag);
+
+ /**
+ * @brief 璁剧疆鑷畾涔夐敭鍊煎鏁版嵁
+ *
+ * @param key
+ * @param value
+ */
+ void _BuglySetKeyValue(const char * key, const char * value);
+
+ /**
+ * @brief 鑷畾涔夊紓甯告暟鎹笂鎶�
+ *
+ * @param type
+ * @param name 寮傚父绫诲瀷
+ * @param reason 寮傚父鍘熷洜
+ * @param stackTrace 寮傚父鍫嗘爤
+ * @param extras 闄勫姞鏁版嵁
+ * @param quit 涓婃姤鍚庢槸鍚﹂��鍑哄簲鐢�
+ */
+ void _BuglyReportException(int type, const char * name, const char * reason, const char * stackTrace, const char * extras, bool quit);
+
+ /**
+ * @brief 璁剧疆榛樿鐨勫簲鐢ㄩ厤缃紝鍦ㄥ垵濮嬪寲涔嬪墠璋冪敤
+ *
+ * @param channel 娓犻亾
+ * @param version 搴旂敤鐗堟湰
+ * @param user 鐢ㄦ埛
+ * @param deviceId 璁惧鍞竴鏍囪瘑
+ */
+ void _BuglyDefaultConfig(const char * channel, const char * version, const char *user, const char * deviceId);
+
+ /**
+ * @brief 鑷畾涔夋棩蹇楁墦鍗版帴鍙�
+ *
+ * @param level 鏃ュ織绾у埆, 1=Error銆�2=Warning銆�3=Info銆�4=Debug
+ * @param tag 鏃ュ織鏍囩
+ * @param log 鏃ュ織鍐呭
+ */
+ void _BuglyLogMessage(int level, const char * tag, const char * log);
+
+ /**
+ * @brief 璁剧疆宕╂簝涓婃姤缁勪欢鐨勭被鍒�
+ *
+ * @param type 0锛滵efault銆�1=Bugly銆�2=MSDK銆�3=IMSDK
+ */
+ void _BuglyConfigCrashReporterType(int type);
+
+ /**
+ * @brief 璁剧疆棰濆鐨勯厤缃俊鎭�
+ *
+ * @param key
+ * @param value
+ */
+ void _BuglySetExtraConfig(const char *key, const char * value);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#pragma mark -
diff --git a/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h.meta b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h.meta
new file mode 100644
index 0000000..a71716b
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/BuglyBridge.h.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 536a760efdc8d1d4c9e8e7ca974a1194
+timeCreated: 1520348629
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a
new file mode 100644
index 0000000..17410d0
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a.meta b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a.meta
new file mode 100644
index 0000000..b055452
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/BuglyBridge/libBuglyBridge.a.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: e68aa3c9fb353eb4d858feac3361623e
+timeCreated: 1520330307
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/include.meta
new file mode 100644
index 0000000..d9de7a9
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 528250871104544138c58d9c19e33e78
+folderAsset: yes
+timeCreated: 1531143153
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus.meta
new file mode 100644
index 0000000..63996a3
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: dec52c76577734fc59962b1fcf05ed11
+folderAsset: yes
+timeCreated: 1531143153
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h
new file mode 100644
index 0000000..5be73dd
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h
@@ -0,0 +1,981 @@
+/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited
+ Written by Jean-Marc Valin and Koen Vos */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * @file opus.h
+ * @brief Opus reference implementation API
+ */
+
+#ifndef OPUS_H
+#define OPUS_H
+
+#include "opus_types.h"
+#include "opus_defines.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @mainpage Opus
+ *
+ * The Opus codec is designed for interactive speech and audio transmission over the Internet.
+ * It is designed by the IETF Codec Working Group and incorporates technology from
+ * Skype's SILK codec and Xiph.Org's CELT codec.
+ *
+ * The Opus codec is designed to handle a wide range of interactive audio applications,
+ * including Voice over IP, videoconferencing, in-game chat, and even remote live music
+ * performances. It can scale from low bit-rate narrowband speech to very high quality
+ * stereo music. Its main features are:
+
+ * @li Sampling rates from 8 to 48 kHz
+ * @li Bit-rates from 6 kb/s to 510 kb/s
+ * @li Support for both constant bit-rate (CBR) and variable bit-rate (VBR)
+ * @li Audio bandwidth from narrowband to full-band
+ * @li Support for speech and music
+ * @li Support for mono and stereo
+ * @li Support for multichannel (up to 255 channels)
+ * @li Frame sizes from 2.5 ms to 60 ms
+ * @li Good loss robustness and packet loss concealment (PLC)
+ * @li Floating point and fixed-point implementation
+ *
+ * Documentation sections:
+ * @li @ref opus_encoder
+ * @li @ref opus_decoder
+ * @li @ref opus_repacketizer
+ * @li @ref opus_multistream
+ * @li @ref opus_libinfo
+ * @li @ref opus_custom
+ */
+
+/** @defgroup opus_encoder Opus Encoder
+ * @{
+ *
+ * @brief This page describes the process and functions used to encode Opus.
+ *
+ * Since Opus is a stateful codec, the encoding process starts with creating an encoder
+ * state. This can be done with:
+ *
+ * @code
+ * int error;
+ * OpusEncoder *enc;
+ * enc = opus_encoder_create(Fs, channels, application, &error);
+ * @endcode
+ *
+ * From this point, @c enc can be used for encoding an audio stream. An encoder state
+ * @b must @b not be used for more than one stream at the same time. Similarly, the encoder
+ * state @b must @b not be re-initialized for each frame.
+ *
+ * While opus_encoder_create() allocates memory for the state, it's also possible
+ * to initialize pre-allocated memory:
+ *
+ * @code
+ * int size;
+ * int error;
+ * OpusEncoder *enc;
+ * size = opus_encoder_get_size(channels);
+ * enc = malloc(size);
+ * error = opus_encoder_init(enc, Fs, channels, application);
+ * @endcode
+ *
+ * where opus_encoder_get_size() returns the required size for the encoder state. Note that
+ * future versions of this code may change the size, so no assuptions should be made about it.
+ *
+ * The encoder state is always continuous in memory and only a shallow copy is sufficient
+ * to copy it (e.g. memcpy())
+ *
+ * It is possible to change some of the encoder's settings using the opus_encoder_ctl()
+ * interface. All these settings already default to the recommended value, so they should
+ * only be changed when necessary. The most common settings one may want to change are:
+ *
+ * @code
+ * opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrate));
+ * opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(complexity));
+ * opus_encoder_ctl(enc, OPUS_SET_SIGNAL(signal_type));
+ * @endcode
+ *
+ * where
+ *
+ * @arg bitrate is in bits per second (b/s)
+ * @arg complexity is a value from 1 to 10, where 1 is the lowest complexity and 10 is the highest
+ * @arg signal_type is either OPUS_AUTO (default), OPUS_SIGNAL_VOICE, or OPUS_SIGNAL_MUSIC
+ *
+ * See @ref opus_encoderctls and @ref opus_genericctls for a complete list of parameters that can be set or queried. Most parameters can be set or changed at any time during a stream.
+ *
+ * To encode a frame, opus_encode() or opus_encode_float() must be called with exactly one frame (2.5, 5, 10, 20, 40 or 60 ms) of audio data:
+ * @code
+ * len = opus_encode(enc, audio_frame, frame_size, packet, max_packet);
+ * @endcode
+ *
+ * where
+ * <ul>
+ * <li>audio_frame is the audio data in opus_int16 (or float for opus_encode_float())</li>
+ * <li>frame_size is the duration of the frame in samples (per channel)</li>
+ * <li>packet is the byte array to which the compressed data is written</li>
+ * <li>max_packet is the maximum number of bytes that can be written in the packet (4000 bytes is recommended).
+ * Do not use max_packet to control VBR target bitrate, instead use the #OPUS_SET_BITRATE CTL.</li>
+ * </ul>
+ *
+ * opus_encode() and opus_encode_float() return the number of bytes actually written to the packet.
+ * The return value <b>can be negative</b>, which indicates that an error has occurred. If the return value
+ * is 2 bytes or less, then the packet does not need to be transmitted (DTX).
+ *
+ * Once the encoder state if no longer needed, it can be destroyed with
+ *
+ * @code
+ * opus_encoder_destroy(enc);
+ * @endcode
+ *
+ * If the encoder was created with opus_encoder_init() rather than opus_encoder_create(),
+ * then no action is required aside from potentially freeing the memory that was manually
+ * allocated for it (calling free(enc) for the example above)
+ *
+ */
+
+/** Opus encoder state.
+ * This contains the complete state of an Opus encoder.
+ * It is position independent and can be freely copied.
+ * @see opus_encoder_create,opus_encoder_init
+ */
+typedef struct OpusEncoder OpusEncoder;
+
+/** Gets the size of an <code>OpusEncoder</code> structure.
+ * @param[in] channels <tt>int</tt>: Number of channels.
+ * This must be 1 or 2.
+ * @returns The size in bytes.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_encoder_get_size(int channels);
+
+/**
+ */
+
+/** Allocates and initializes an encoder state.
+ * There are three coding modes:
+ *
+ * @ref OPUS_APPLICATION_VOIP gives best quality at a given bitrate for voice
+ * signals. It enhances the input signal by high-pass filtering and
+ * emphasizing formants and harmonics. Optionally it includes in-band
+ * forward error correction to protect against packet loss. Use this
+ * mode for typical VoIP applications. Because of the enhancement,
+ * even at high bitrates the output may sound different from the input.
+ *
+ * @ref OPUS_APPLICATION_AUDIO gives best quality at a given bitrate for most
+ * non-voice signals like music. Use this mode for music and mixed
+ * (music/voice) content, broadcast, and applications requiring less
+ * than 15 ms of coding delay.
+ *
+ * @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY configures low-delay mode that
+ * disables the speech-optimized mode in exchange for slightly reduced delay.
+ * This mode can only be set on an newly initialized or freshly reset encoder
+ * because it changes the codec delay.
+ *
+ * This is useful when the caller knows that the speech-optimized modes will not be needed (use with caution).
+ * @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal
+ * @param [in] application <tt>int</tt>: Coding mode (@ref OPUS_APPLICATION_VOIP/@ref OPUS_APPLICATION_AUDIO/@ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)
+ * @param [out] error <tt>int*</tt>: @ref opus_errorcodes
+ * @note Regardless of the sampling rate and number channels selected, the Opus encoder
+ * can switch to a lower audio bandwidth or number of channels if the bitrate
+ * selected is too low. This also means that it is safe to always use 48 kHz stereo input
+ * and let the encoder optimize the encoding.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusEncoder *opus_encoder_create(
+ opus_int32 Fs,
+ int channels,
+ int application,
+ int *error
+);
+
+/** Initializes a previously allocated encoder state
+ * The memory pointed to by st must be at least the size returned by opus_encoder_get_size().
+ * This is intended for applications which use their own allocator instead of malloc.
+ * @see opus_encoder_create(),opus_encoder_get_size()
+ * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
+ * @param [in] st <tt>OpusEncoder*</tt>: Encoder state
+ * @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal
+ * @param [in] application <tt>int</tt>: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY)
+ * @retval #OPUS_OK Success or @ref opus_errorcodes
+ */
+OPUS_EXPORT int opus_encoder_init(
+ OpusEncoder *st,
+ opus_int32 Fs,
+ int channels,
+ int application
+) OPUS_ARG_NONNULL(1);
+
+/** Encodes an Opus frame.
+ * @param [in] st <tt>OpusEncoder*</tt>: Encoder state
+ * @param [in] pcm <tt>opus_int16*</tt>: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16)
+ * @param [in] frame_size <tt>int</tt>: Number of samples per channel in the
+ * input signal.
+ * This must be an Opus frame size for
+ * the encoder's sampling rate.
+ * For example, at 48 kHz the permitted
+ * values are 120, 240, 480, 960, 1920,
+ * and 2880.
+ * Passing in a duration of less than
+ * 10 ms (480 samples at 48 kHz) will
+ * prevent the encoder from using the LPC
+ * or hybrid modes.
+ * @param [out] data <tt>unsigned char*</tt>: Output payload.
+ * This must contain storage for at
+ * least \a max_data_bytes.
+ * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
+ * memory for the output
+ * payload. This may be
+ * used to impose an upper limit on
+ * the instant bitrate, but should
+ * not be used as the only bitrate
+ * control. Use #OPUS_SET_BITRATE to
+ * control the bitrate.
+ * @returns The length of the encoded packet (in bytes) on success or a
+ * negative error code (see @ref opus_errorcodes) on failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode(
+ OpusEncoder *st,
+ const opus_int16 *pcm,
+ int frame_size,
+ unsigned char *data,
+ opus_int32 max_data_bytes
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
+
+/** Encodes an Opus frame from floating point input.
+ * @param [in] st <tt>OpusEncoder*</tt>: Encoder state
+ * @param [in] pcm <tt>float*</tt>: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0.
+ * Samples with a range beyond +/-1.0 are supported but will
+ * be clipped by decoders using the integer API and should
+ * only be used if it is known that the far end supports
+ * extended dynamic range.
+ * length is frame_size*channels*sizeof(float)
+ * @param [in] frame_size <tt>int</tt>: Number of samples per channel in the
+ * input signal.
+ * This must be an Opus frame size for
+ * the encoder's sampling rate.
+ * For example, at 48 kHz the permitted
+ * values are 120, 240, 480, 960, 1920,
+ * and 2880.
+ * Passing in a duration of less than
+ * 10 ms (480 samples at 48 kHz) will
+ * prevent the encoder from using the LPC
+ * or hybrid modes.
+ * @param [out] data <tt>unsigned char*</tt>: Output payload.
+ * This must contain storage for at
+ * least \a max_data_bytes.
+ * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
+ * memory for the output
+ * payload. This may be
+ * used to impose an upper limit on
+ * the instant bitrate, but should
+ * not be used as the only bitrate
+ * control. Use #OPUS_SET_BITRATE to
+ * control the bitrate.
+ * @returns The length of the encoded packet (in bytes) on success or a
+ * negative error code (see @ref opus_errorcodes) on failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode_float(
+ OpusEncoder *st,
+ const float *pcm,
+ int frame_size,
+ unsigned char *data,
+ opus_int32 max_data_bytes
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
+
+/** Frees an <code>OpusEncoder</code> allocated by opus_encoder_create().
+ * @param[in] st <tt>OpusEncoder*</tt>: State to be freed.
+ */
+OPUS_EXPORT void opus_encoder_destroy(OpusEncoder *st);
+
+/** Perform a CTL function on an Opus encoder.
+ *
+ * Generally the request and subsequent arguments are generated
+ * by a convenience macro.
+ * @param st <tt>OpusEncoder*</tt>: Encoder state.
+ * @param request This and all remaining parameters should be replaced by one
+ * of the convenience macros in @ref opus_genericctls or
+ * @ref opus_encoderctls.
+ * @see opus_genericctls
+ * @see opus_encoderctls
+ */
+OPUS_EXPORT int opus_encoder_ctl(OpusEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);
+/**@}*/
+
+/** @defgroup opus_decoder Opus Decoder
+ * @{
+ *
+ * @brief This page describes the process and functions used to decode Opus.
+ *
+ * The decoding process also starts with creating a decoder
+ * state. This can be done with:
+ * @code
+ * int error;
+ * OpusDecoder *dec;
+ * dec = opus_decoder_create(Fs, channels, &error);
+ * @endcode
+ * where
+ * @li Fs is the sampling rate and must be 8000, 12000, 16000, 24000, or 48000
+ * @li channels is the number of channels (1 or 2)
+ * @li error will hold the error code in case of failure (or #OPUS_OK on success)
+ * @li the return value is a newly created decoder state to be used for decoding
+ *
+ * While opus_decoder_create() allocates memory for the state, it's also possible
+ * to initialize pre-allocated memory:
+ * @code
+ * int size;
+ * int error;
+ * OpusDecoder *dec;
+ * size = opus_decoder_get_size(channels);
+ * dec = malloc(size);
+ * error = opus_decoder_init(dec, Fs, channels);
+ * @endcode
+ * where opus_decoder_get_size() returns the required size for the decoder state. Note that
+ * future versions of this code may change the size, so no assuptions should be made about it.
+ *
+ * The decoder state is always continuous in memory and only a shallow copy is sufficient
+ * to copy it (e.g. memcpy())
+ *
+ * To decode a frame, opus_decode() or opus_decode_float() must be called with a packet of compressed audio data:
+ * @code
+ * frame_size = opus_decode(dec, packet, len, decoded, max_size, 0);
+ * @endcode
+ * where
+ *
+ * @li packet is the byte array containing the compressed data
+ * @li len is the exact number of bytes contained in the packet
+ * @li decoded is the decoded audio data in opus_int16 (or float for opus_decode_float())
+ * @li max_size is the max duration of the frame in samples (per channel) that can fit into the decoded_frame array
+ *
+ * opus_decode() and opus_decode_float() return the number of samples (per channel) decoded from the packet.
+ * If that value is negative, then an error has occurred. This can occur if the packet is corrupted or if the audio
+ * buffer is too small to hold the decoded audio.
+ *
+ * Opus is a stateful codec with overlapping blocks and as a result Opus
+ * packets are not coded independently of each other. Packets must be
+ * passed into the decoder serially and in the correct order for a correct
+ * decode. Lost packets can be replaced with loss concealment by calling
+ * the decoder with a null pointer and zero length for the missing packet.
+ *
+ * A single codec state may only be accessed from a single thread at
+ * a time and any required locking must be performed by the caller. Separate
+ * streams must be decoded with separate decoder states and can be decoded
+ * in parallel unless the library was compiled with NONTHREADSAFE_PSEUDOSTACK
+ * defined.
+ *
+ */
+
+/** Opus decoder state.
+ * This contains the complete state of an Opus decoder.
+ * It is position independent and can be freely copied.
+ * @see opus_decoder_create,opus_decoder_init
+ */
+typedef struct OpusDecoder OpusDecoder;
+
+/** Gets the size of an <code>OpusDecoder</code> structure.
+ * @param [in] channels <tt>int</tt>: Number of channels.
+ * This must be 1 or 2.
+ * @returns The size in bytes.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_size(int channels);
+
+/** Allocates and initializes a decoder state.
+ * @param [in] Fs <tt>opus_int32</tt>: Sample rate to decode at (Hz).
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode
+ * @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes
+ *
+ * Internally Opus stores data at 48000 Hz, so that should be the default
+ * value for Fs. However, the decoder can efficiently decode to buffers
+ * at 8, 12, 16, and 24 kHz so if for some reason the caller cannot use
+ * data at the full sample rate, or knows the compressed data doesn't
+ * use the full frequency range, it can request decoding at a reduced
+ * rate. Likewise, the decoder is capable of filling in either mono or
+ * interleaved stereo pcm buffers, at the caller's request.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusDecoder *opus_decoder_create(
+ opus_int32 Fs,
+ int channels,
+ int *error
+);
+
+/** Initializes a previously allocated decoder state.
+ * The state must be at least the size returned by opus_decoder_get_size().
+ * This is intended for applications which use their own allocator instead of malloc. @see opus_decoder_create,opus_decoder_get_size
+ * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
+ * @param [in] st <tt>OpusDecoder*</tt>: Decoder state.
+ * @param [in] Fs <tt>opus_int32</tt>: Sampling rate to decode to (Hz).
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode
+ * @retval #OPUS_OK Success or @ref opus_errorcodes
+ */
+OPUS_EXPORT int opus_decoder_init(
+ OpusDecoder *st,
+ opus_int32 Fs,
+ int channels
+) OPUS_ARG_NONNULL(1);
+
+/** Decode an Opus packet.
+ * @param [in] st <tt>OpusDecoder*</tt>: Decoder state
+ * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
+ * @param [in] len <tt>opus_int32</tt>: Number of bytes in payload*
+ * @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length
+ * is frame_size*channels*sizeof(opus_int16)
+ * @param [in] frame_size Number of samples per channel of available space in \a pcm.
+ * If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will
+ * not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),
+ * then frame_size needs to be exactly the duration of audio that is missing, otherwise the
+ * decoder will not be in the optimal state to decode the next incoming packet. For the PLC and
+ * FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.
+ * @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be
+ * decoded. If no such data is available, the frame is decoded as if it were lost.
+ * @returns Number of decoded samples or @ref opus_errorcodes
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode(
+ OpusDecoder *st,
+ const unsigned char *data,
+ opus_int32 len,
+ opus_int16 *pcm,
+ int frame_size,
+ int decode_fec
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
+
+/** Decode an Opus packet with floating point output.
+ * @param [in] st <tt>OpusDecoder*</tt>: Decoder state
+ * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
+ * @param [in] len <tt>opus_int32</tt>: Number of bytes in payload
+ * @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length
+ * is frame_size*channels*sizeof(float)
+ * @param [in] frame_size Number of samples per channel of available space in \a pcm.
+ * If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will
+ * not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),
+ * then frame_size needs to be exactly the duration of audio that is missing, otherwise the
+ * decoder will not be in the optimal state to decode the next incoming packet. For the PLC and
+ * FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.
+ * @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be
+ * decoded. If no such data is available the frame is decoded as if it were lost.
+ * @returns Number of decoded samples or @ref opus_errorcodes
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode_float(
+ OpusDecoder *st,
+ const unsigned char *data,
+ opus_int32 len,
+ float *pcm,
+ int frame_size,
+ int decode_fec
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
+
+/** Perform a CTL function on an Opus decoder.
+ *
+ * Generally the request and subsequent arguments are generated
+ * by a convenience macro.
+ * @param st <tt>OpusDecoder*</tt>: Decoder state.
+ * @param request This and all remaining parameters should be replaced by one
+ * of the convenience macros in @ref opus_genericctls or
+ * @ref opus_decoderctls.
+ * @see opus_genericctls
+ * @see opus_decoderctls
+ */
+OPUS_EXPORT int opus_decoder_ctl(OpusDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);
+
+/** Frees an <code>OpusDecoder</code> allocated by opus_decoder_create().
+ * @param[in] st <tt>OpusDecoder*</tt>: State to be freed.
+ */
+OPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st);
+
+/** Parse an opus packet into one or more frames.
+ * Opus_decode will perform this operation internally so most applications do
+ * not need to use this function.
+ * This function does not copy the frames, the returned pointers are pointers into
+ * the input packet.
+ * @param [in] data <tt>char*</tt>: Opus packet to be parsed
+ * @param [in] len <tt>opus_int32</tt>: size of data
+ * @param [out] out_toc <tt>char*</tt>: TOC pointer
+ * @param [out] frames <tt>char*[48]</tt> encapsulated frames
+ * @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated frames
+ * @param [out] payload_offset <tt>int*</tt>: returns the position of the payload within the packet (in bytes)
+ * @returns number of frames
+ */
+OPUS_EXPORT int opus_packet_parse(
+ const unsigned char *data,
+ opus_int32 len,
+ unsigned char *out_toc,
+ const unsigned char *frames[48],
+ opus_int16 size[48],
+ int *payload_offset
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
+
+/** Gets the bandwidth of an Opus packet.
+ * @param [in] data <tt>char*</tt>: Opus packet
+ * @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass)
+ * @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass)
+ * @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass)
+ * @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass)
+ * @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass)
+ * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_bandwidth(const unsigned char *data) OPUS_ARG_NONNULL(1);
+
+/** Gets the number of samples per frame from an Opus packet.
+ * @param [in] data <tt>char*</tt>: Opus packet.
+ * This must contain at least one byte of
+ * data.
+ * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.
+ * This must be a multiple of 400, or
+ * inaccurate results will be returned.
+ * @returns Number of samples per frame.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_samples_per_frame(const unsigned char *data, opus_int32 Fs) OPUS_ARG_NONNULL(1);
+
+/** Gets the number of channels from an Opus packet.
+ * @param [in] data <tt>char*</tt>: Opus packet
+ * @returns Number of channels
+ * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const unsigned char *data) OPUS_ARG_NONNULL(1);
+
+/** Gets the number of frames in an Opus packet.
+ * @param [in] packet <tt>char*</tt>: Opus packet
+ * @param [in] len <tt>opus_int32</tt>: Length of packet
+ * @returns Number of frames
+ * @retval OPUS_BAD_ARG Insufficient data was passed to the function
+ * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1);
+
+/** Gets the number of samples of an Opus packet.
+ * @param [in] packet <tt>char*</tt>: Opus packet
+ * @param [in] len <tt>opus_int32</tt>: Length of packet
+ * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.
+ * This must be a multiple of 400, or
+ * inaccurate results will be returned.
+ * @returns Number of samples
+ * @retval OPUS_BAD_ARG Insufficient data was passed to the function
+ * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1);
+
+/** Gets the number of samples of an Opus packet.
+ * @param [in] dec <tt>OpusDecoder*</tt>: Decoder state
+ * @param [in] packet <tt>char*</tt>: Opus packet
+ * @param [in] len <tt>opus_int32</tt>: Length of packet
+ * @returns Number of samples
+ * @retval OPUS_BAD_ARG Insufficient data was passed to the function
+ * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_nb_samples(const OpusDecoder *dec, const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
+
+/** Applies soft-clipping to bring a float signal within the [-1,1] range. If
+ * the signal is already in that range, nothing is done. If there are values
+ * outside of [-1,1], then the signal is clipped as smoothly as possible to
+ * both fit in the range and avoid creating excessive distortion in the
+ * process.
+ * @param [in,out] pcm <tt>float*</tt>: Input PCM and modified PCM
+ * @param [in] frame_size <tt>int</tt> Number of samples per channel to process
+ * @param [in] channels <tt>int</tt>: Number of channels
+ * @param [in,out] softclip_mem <tt>float*</tt>: State memory for the soft clipping process (one float per channel, initialized to zero)
+ */
+OPUS_EXPORT void opus_pcm_soft_clip(float *pcm, int frame_size, int channels, float *softclip_mem);
+
+
+/**@}*/
+
+/** @defgroup opus_repacketizer Repacketizer
+ * @{
+ *
+ * The repacketizer can be used to merge multiple Opus packets into a single
+ * packet or alternatively to split Opus packets that have previously been
+ * merged. Splitting valid Opus packets is always guaranteed to succeed,
+ * whereas merging valid packets only succeeds if all frames have the same
+ * mode, bandwidth, and frame size, and when the total duration of the merged
+ * packet is no more than 120 ms. The 120 ms limit comes from the
+ * specification and limits decoder memory requirements at a point where
+ * framing overhead becomes negligible.
+ *
+ * The repacketizer currently only operates on elementary Opus
+ * streams. It will not manipualte multistream packets successfully, except in
+ * the degenerate case where they consist of data from a single stream.
+ *
+ * The repacketizing process starts with creating a repacketizer state, either
+ * by calling opus_repacketizer_create() or by allocating the memory yourself,
+ * e.g.,
+ * @code
+ * OpusRepacketizer *rp;
+ * rp = (OpusRepacketizer*)malloc(opus_repacketizer_get_size());
+ * if (rp != NULL)
+ * opus_repacketizer_init(rp);
+ * @endcode
+ *
+ * Then the application should submit packets with opus_repacketizer_cat(),
+ * extract new packets with opus_repacketizer_out() or
+ * opus_repacketizer_out_range(), and then reset the state for the next set of
+ * input packets via opus_repacketizer_init().
+ *
+ * For example, to split a sequence of packets into individual frames:
+ * @code
+ * unsigned char *data;
+ * int len;
+ * while (get_next_packet(&data, &len))
+ * {
+ * unsigned char out[1276];
+ * opus_int32 out_len;
+ * int nb_frames;
+ * int err;
+ * int i;
+ * err = opus_repacketizer_cat(rp, data, len);
+ * if (err != OPUS_OK)
+ * {
+ * release_packet(data);
+ * return err;
+ * }
+ * nb_frames = opus_repacketizer_get_nb_frames(rp);
+ * for (i = 0; i < nb_frames; i++)
+ * {
+ * out_len = opus_repacketizer_out_range(rp, i, i+1, out, sizeof(out));
+ * if (out_len < 0)
+ * {
+ * release_packet(data);
+ * return (int)out_len;
+ * }
+ * output_next_packet(out, out_len);
+ * }
+ * opus_repacketizer_init(rp);
+ * release_packet(data);
+ * }
+ * @endcode
+ *
+ * Alternatively, to combine a sequence of frames into packets that each
+ * contain up to <code>TARGET_DURATION_MS</code> milliseconds of data:
+ * @code
+ * // The maximum number of packets with duration TARGET_DURATION_MS occurs
+ * // when the frame size is 2.5 ms, for a total of (TARGET_DURATION_MS*2/5)
+ * // packets.
+ * unsigned char *data[(TARGET_DURATION_MS*2/5)+1];
+ * opus_int32 len[(TARGET_DURATION_MS*2/5)+1];
+ * int nb_packets;
+ * unsigned char out[1277*(TARGET_DURATION_MS*2/2)];
+ * opus_int32 out_len;
+ * int prev_toc;
+ * nb_packets = 0;
+ * while (get_next_packet(data+nb_packets, len+nb_packets))
+ * {
+ * int nb_frames;
+ * int err;
+ * nb_frames = opus_packet_get_nb_frames(data[nb_packets], len[nb_packets]);
+ * if (nb_frames < 1)
+ * {
+ * release_packets(data, nb_packets+1);
+ * return nb_frames;
+ * }
+ * nb_frames += opus_repacketizer_get_nb_frames(rp);
+ * // If adding the next packet would exceed our target, or it has an
+ * // incompatible TOC sequence, output the packets we already have before
+ * // submitting it.
+ * // N.B., The nb_packets > 0 check ensures we've submitted at least one
+ * // packet since the last call to opus_repacketizer_init(). Otherwise a
+ * // single packet longer than TARGET_DURATION_MS would cause us to try to
+ * // output an (invalid) empty packet. It also ensures that prev_toc has
+ * // been set to a valid value. Additionally, len[nb_packets] > 0 is
+ * // guaranteed by the call to opus_packet_get_nb_frames() above, so the
+ * // reference to data[nb_packets][0] should be valid.
+ * if (nb_packets > 0 && (
+ * ((prev_toc & 0xFC) != (data[nb_packets][0] & 0xFC)) ||
+ * opus_packet_get_samples_per_frame(data[nb_packets], 48000)*nb_frames >
+ * TARGET_DURATION_MS*48))
+ * {
+ * out_len = opus_repacketizer_out(rp, out, sizeof(out));
+ * if (out_len < 0)
+ * {
+ * release_packets(data, nb_packets+1);
+ * return (int)out_len;
+ * }
+ * output_next_packet(out, out_len);
+ * opus_repacketizer_init(rp);
+ * release_packets(data, nb_packets);
+ * data[0] = data[nb_packets];
+ * len[0] = len[nb_packets];
+ * nb_packets = 0;
+ * }
+ * err = opus_repacketizer_cat(rp, data[nb_packets], len[nb_packets]);
+ * if (err != OPUS_OK)
+ * {
+ * release_packets(data, nb_packets+1);
+ * return err;
+ * }
+ * prev_toc = data[nb_packets][0];
+ * nb_packets++;
+ * }
+ * // Output the final, partial packet.
+ * if (nb_packets > 0)
+ * {
+ * out_len = opus_repacketizer_out(rp, out, sizeof(out));
+ * release_packets(data, nb_packets);
+ * if (out_len < 0)
+ * return (int)out_len;
+ * output_next_packet(out, out_len);
+ * }
+ * @endcode
+ *
+ * An alternate way of merging packets is to simply call opus_repacketizer_cat()
+ * unconditionally until it fails. At that point, the merged packet can be
+ * obtained with opus_repacketizer_out() and the input packet for which
+ * opus_repacketizer_cat() needs to be re-added to a newly reinitialized
+ * repacketizer state.
+ */
+
+typedef struct OpusRepacketizer OpusRepacketizer;
+
+/** Gets the size of an <code>OpusRepacketizer</code> structure.
+ * @returns The size in bytes.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_size(void);
+
+/** (Re)initializes a previously allocated repacketizer state.
+ * The state must be at least the size returned by opus_repacketizer_get_size().
+ * This can be used for applications which use their own allocator instead of
+ * malloc().
+ * It must also be called to reset the queue of packets waiting to be
+ * repacketized, which is necessary if the maximum packet duration of 120 ms
+ * is reached or if you wish to submit packets with a different Opus
+ * configuration (coding mode, audio bandwidth, frame size, or channel count).
+ * Failure to do so will prevent a new packet from being added with
+ * opus_repacketizer_cat().
+ * @see opus_repacketizer_create
+ * @see opus_repacketizer_get_size
+ * @see opus_repacketizer_cat
+ * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to
+ * (re)initialize.
+ * @returns A pointer to the same repacketizer state that was passed in.
+ */
+OPUS_EXPORT OpusRepacketizer *opus_repacketizer_init(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1);
+
+/** Allocates memory and initializes the new repacketizer with
+ * opus_repacketizer_init().
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusRepacketizer *opus_repacketizer_create(void);
+
+/** Frees an <code>OpusRepacketizer</code> allocated by
+ * opus_repacketizer_create().
+ * @param[in] rp <tt>OpusRepacketizer*</tt>: State to be freed.
+ */
+OPUS_EXPORT void opus_repacketizer_destroy(OpusRepacketizer *rp);
+
+/** Add a packet to the current repacketizer state.
+ * This packet must match the configuration of any packets already submitted
+ * for repacketization since the last call to opus_repacketizer_init().
+ * This means that it must have the same coding mode, audio bandwidth, frame
+ * size, and channel count.
+ * This can be checked in advance by examining the top 6 bits of the first
+ * byte of the packet, and ensuring they match the top 6 bits of the first
+ * byte of any previously submitted packet.
+ * The total duration of audio in the repacketizer state also must not exceed
+ * 120 ms, the maximum duration of a single packet, after adding this packet.
+ *
+ * The contents of the current repacketizer state can be extracted into new
+ * packets using opus_repacketizer_out() or opus_repacketizer_out_range().
+ *
+ * In order to add a packet with a different configuration or to add more
+ * audio beyond 120 ms, you must clear the repacketizer state by calling
+ * opus_repacketizer_init().
+ * If a packet is too large to add to the current repacketizer state, no part
+ * of it is added, even if it contains multiple frames, some of which might
+ * fit.
+ * If you wish to be able to add parts of such packets, you should first use
+ * another repacketizer to split the packet into pieces and add them
+ * individually.
+ * @see opus_repacketizer_out_range
+ * @see opus_repacketizer_out
+ * @see opus_repacketizer_init
+ * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to which to
+ * add the packet.
+ * @param[in] data <tt>const unsigned char*</tt>: The packet data.
+ * The application must ensure
+ * this pointer remains valid
+ * until the next call to
+ * opus_repacketizer_init() or
+ * opus_repacketizer_destroy().
+ * @param len <tt>opus_int32</tt>: The number of bytes in the packet data.
+ * @returns An error code indicating whether or not the operation succeeded.
+ * @retval #OPUS_OK The packet's contents have been added to the repacketizer
+ * state.
+ * @retval #OPUS_INVALID_PACKET The packet did not have a valid TOC sequence,
+ * the packet's TOC sequence was not compatible
+ * with previously submitted packets (because
+ * the coding mode, audio bandwidth, frame size,
+ * or channel count did not match), or adding
+ * this packet would increase the total amount of
+ * audio stored in the repacketizer state to more
+ * than 120 ms.
+ */
+OPUS_EXPORT int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
+
+
+/** Construct a new packet from data previously submitted to the repacketizer
+ * state via opus_repacketizer_cat().
+ * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to
+ * construct the new packet.
+ * @param begin <tt>int</tt>: The index of the first frame in the current
+ * repacketizer state to include in the output.
+ * @param end <tt>int</tt>: One past the index of the last frame in the
+ * current repacketizer state to include in the
+ * output.
+ * @param[out] data <tt>const unsigned char*</tt>: The buffer in which to
+ * store the output packet.
+ * @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in
+ * the output buffer. In order to guarantee
+ * success, this should be at least
+ * <code>1276</code> for a single frame,
+ * or for multiple frames,
+ * <code>1277*(end-begin)</code>.
+ * However, <code>1*(end-begin)</code> plus
+ * the size of all packet data submitted to
+ * the repacketizer since the last call to
+ * opus_repacketizer_init() or
+ * opus_repacketizer_create() is also
+ * sufficient, and possibly much smaller.
+ * @returns The total size of the output packet on success, or an error code
+ * on failure.
+ * @retval #OPUS_BAD_ARG <code>[begin,end)</code> was an invalid range of
+ * frames (begin < 0, begin >= end, or end >
+ * opus_repacketizer_get_nb_frames()).
+ * @retval #OPUS_BUFFER_TOO_SMALL \a maxlen was insufficient to contain the
+ * complete output packet.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out_range(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
+
+/** Return the total number of frames contained in packet data submitted to
+ * the repacketizer state so far via opus_repacketizer_cat() since the last
+ * call to opus_repacketizer_init() or opus_repacketizer_create().
+ * This defines the valid range of packets that can be extracted with
+ * opus_repacketizer_out_range() or opus_repacketizer_out().
+ * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state containing the
+ * frames.
+ * @returns The total number of frames contained in the packet data submitted
+ * to the repacketizer state.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1);
+
+/** Construct a new packet from data previously submitted to the repacketizer
+ * state via opus_repacketizer_cat().
+ * This is a convenience routine that returns all the data submitted so far
+ * in a single packet.
+ * It is equivalent to calling
+ * @code
+ * opus_repacketizer_out_range(rp, 0, opus_repacketizer_get_nb_frames(rp),
+ * data, maxlen)
+ * @endcode
+ * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to
+ * construct the new packet.
+ * @param[out] data <tt>const unsigned char*</tt>: The buffer in which to
+ * store the output packet.
+ * @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in
+ * the output buffer. In order to guarantee
+ * success, this should be at least
+ * <code>1277*opus_repacketizer_get_nb_frames(rp)</code>.
+ * However,
+ * <code>1*opus_repacketizer_get_nb_frames(rp)</code>
+ * plus the size of all packet data
+ * submitted to the repacketizer since the
+ * last call to opus_repacketizer_init() or
+ * opus_repacketizer_create() is also
+ * sufficient, and possibly much smaller.
+ * @returns The total size of the output packet on success, or an error code
+ * on failure.
+ * @retval #OPUS_BUFFER_TOO_SMALL \a maxlen was insufficient to contain the
+ * complete output packet.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out(OpusRepacketizer *rp, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1);
+
+/** Pads a given Opus packet to a larger size (possibly changing the TOC sequence).
+ * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
+ * packet to pad.
+ * @param len <tt>opus_int32</tt>: The size of the packet.
+ * This must be at least 1.
+ * @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.
+ * This must be at least as large as len.
+ * @returns an error code
+ * @retval #OPUS_OK \a on success.
+ * @retval #OPUS_BAD_ARG \a len was less than 1 or new_len was less than len.
+ * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
+ */
+OPUS_EXPORT int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len);
+
+/** Remove all padding from a given Opus packet and rewrite the TOC sequence to
+ * minimize space usage.
+ * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
+ * packet to strip.
+ * @param len <tt>opus_int32</tt>: The size of the packet.
+ * This must be at least 1.
+ * @returns The new size of the output packet on success, or an error code
+ * on failure.
+ * @retval #OPUS_BAD_ARG \a len was less than 1.
+ * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len);
+
+/** Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence).
+ * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
+ * packet to pad.
+ * @param len <tt>opus_int32</tt>: The size of the packet.
+ * This must be at least 1.
+ * @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.
+ * This must be at least 1.
+ * @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.
+ * This must be at least as large as len.
+ * @returns an error code
+ * @retval #OPUS_OK \a on success.
+ * @retval #OPUS_BAD_ARG \a len was less than 1.
+ * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
+ */
+OPUS_EXPORT int opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len, int nb_streams);
+
+/** Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to
+ * minimize space usage.
+ * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
+ * packet to strip.
+ * @param len <tt>opus_int32</tt>: The size of the packet.
+ * This must be at least 1.
+ * @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.
+ * This must be at least 1.
+ * @returns The new size of the output packet on success, or an error code
+ * on failure.
+ * @retval #OPUS_BAD_ARG \a len was less than 1 or new_len was less than len.
+ * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_packet_unpad(unsigned char *data, opus_int32 len, int nb_streams);
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OPUS_H */
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h.meta
new file mode 100644
index 0000000..c2b2f85
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus.h.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 72578ffab4ae0496589fba45eddafd73
+timeCreated: 1531143153
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h
new file mode 100644
index 0000000..315412d
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h
@@ -0,0 +1,753 @@
+/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited
+ Written by Jean-Marc Valin and Koen Vos */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * @file opus_defines.h
+ * @brief Opus reference implementation constants
+ */
+
+#ifndef OPUS_DEFINES_H
+#define OPUS_DEFINES_H
+
+#include "opus_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @defgroup opus_errorcodes Error codes
+ * @{
+ */
+/** No error @hideinitializer*/
+#define OPUS_OK 0
+/** One or more invalid/out of range arguments @hideinitializer*/
+#define OPUS_BAD_ARG -1
+/** Not enough bytes allocated in the buffer @hideinitializer*/
+#define OPUS_BUFFER_TOO_SMALL -2
+/** An internal error was detected @hideinitializer*/
+#define OPUS_INTERNAL_ERROR -3
+/** The compressed data passed is corrupted @hideinitializer*/
+#define OPUS_INVALID_PACKET -4
+/** Invalid/unsupported request number @hideinitializer*/
+#define OPUS_UNIMPLEMENTED -5
+/** An encoder or decoder structure is invalid or already freed @hideinitializer*/
+#define OPUS_INVALID_STATE -6
+/** Memory allocation has failed @hideinitializer*/
+#define OPUS_ALLOC_FAIL -7
+/**@}*/
+
+/** @cond OPUS_INTERNAL_DOC */
+/**Export control for opus functions */
+
+#ifndef OPUS_EXPORT
+# if defined(WIN32)
+# if defined(OPUS_BUILD) && defined(DLL_EXPORT)
+# define OPUS_EXPORT __declspec(dllexport)
+# else
+# define OPUS_EXPORT
+# endif
+# elif defined(__GNUC__) && defined(OPUS_BUILD)
+# define OPUS_EXPORT __attribute__ ((visibility ("default")))
+# else
+# define OPUS_EXPORT
+# endif
+#endif
+
+# if !defined(OPUS_GNUC_PREREQ)
+# if defined(__GNUC__)&&defined(__GNUC_MINOR__)
+# define OPUS_GNUC_PREREQ(_maj,_min) \
+ ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))
+# else
+# define OPUS_GNUC_PREREQ(_maj,_min) 0
+# endif
+# endif
+
+#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
+# if OPUS_GNUC_PREREQ(3,0)
+# define OPUS_RESTRICT __restrict__
+# elif (defined(_MSC_VER) && _MSC_VER >= 1400)
+# define OPUS_RESTRICT __restrict
+# else
+# define OPUS_RESTRICT
+# endif
+#else
+# define OPUS_RESTRICT restrict
+#endif
+
+#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
+# if OPUS_GNUC_PREREQ(2,7)
+# define OPUS_INLINE __inline__
+# elif (defined(_MSC_VER))
+# define OPUS_INLINE __inline
+# else
+# define OPUS_INLINE
+# endif
+#else
+# define OPUS_INLINE inline
+#endif
+
+/**Warning attributes for opus functions
+ * NONNULL is not used in OPUS_BUILD to avoid the compiler optimizing out
+ * some paranoid null checks. */
+#if defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
+# define OPUS_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
+#else
+# define OPUS_WARN_UNUSED_RESULT
+#endif
+#if !defined(OPUS_BUILD) && defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
+# define OPUS_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x)))
+#else
+# define OPUS_ARG_NONNULL(_x)
+#endif
+
+/** These are the actual Encoder CTL ID numbers.
+ * They should not be used directly by applications.
+ * In general, SETs should be even and GETs should be odd.*/
+#define OPUS_SET_APPLICATION_REQUEST 4000
+#define OPUS_GET_APPLICATION_REQUEST 4001
+#define OPUS_SET_BITRATE_REQUEST 4002
+#define OPUS_GET_BITRATE_REQUEST 4003
+#define OPUS_SET_MAX_BANDWIDTH_REQUEST 4004
+#define OPUS_GET_MAX_BANDWIDTH_REQUEST 4005
+#define OPUS_SET_VBR_REQUEST 4006
+#define OPUS_GET_VBR_REQUEST 4007
+#define OPUS_SET_BANDWIDTH_REQUEST 4008
+#define OPUS_GET_BANDWIDTH_REQUEST 4009
+#define OPUS_SET_COMPLEXITY_REQUEST 4010
+#define OPUS_GET_COMPLEXITY_REQUEST 4011
+#define OPUS_SET_INBAND_FEC_REQUEST 4012
+#define OPUS_GET_INBAND_FEC_REQUEST 4013
+#define OPUS_SET_PACKET_LOSS_PERC_REQUEST 4014
+#define OPUS_GET_PACKET_LOSS_PERC_REQUEST 4015
+#define OPUS_SET_DTX_REQUEST 4016
+#define OPUS_GET_DTX_REQUEST 4017
+#define OPUS_SET_VBR_CONSTRAINT_REQUEST 4020
+#define OPUS_GET_VBR_CONSTRAINT_REQUEST 4021
+#define OPUS_SET_FORCE_CHANNELS_REQUEST 4022
+#define OPUS_GET_FORCE_CHANNELS_REQUEST 4023
+#define OPUS_SET_SIGNAL_REQUEST 4024
+#define OPUS_GET_SIGNAL_REQUEST 4025
+#define OPUS_GET_LOOKAHEAD_REQUEST 4027
+/* #define OPUS_RESET_STATE 4028 */
+#define OPUS_GET_SAMPLE_RATE_REQUEST 4029
+#define OPUS_GET_FINAL_RANGE_REQUEST 4031
+#define OPUS_GET_PITCH_REQUEST 4033
+#define OPUS_SET_GAIN_REQUEST 4034
+#define OPUS_GET_GAIN_REQUEST 4045 /* Should have been 4035 */
+#define OPUS_SET_LSB_DEPTH_REQUEST 4036
+#define OPUS_GET_LSB_DEPTH_REQUEST 4037
+#define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039
+#define OPUS_SET_EXPERT_FRAME_DURATION_REQUEST 4040
+#define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041
+#define OPUS_SET_PREDICTION_DISABLED_REQUEST 4042
+#define OPUS_GET_PREDICTION_DISABLED_REQUEST 4043
+
+/* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */
+
+/* Macros to trigger compilation errors when the wrong types are provided to a CTL */
+#define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
+#define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
+#define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
+#define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr)))
+/** @endcond */
+
+/** @defgroup opus_ctlvalues Pre-defined values for CTL interface
+ * @see opus_genericctls, opus_encoderctls
+ * @{
+ */
+/* Values for the various encoder CTLs */
+#define OPUS_AUTO -1000 /**<Auto/default setting @hideinitializer*/
+#define OPUS_BITRATE_MAX -1 /**<Maximum bitrate @hideinitializer*/
+
+/** Best for most VoIP/videoconference applications where listening quality and intelligibility matter most
+ * @hideinitializer */
+#define OPUS_APPLICATION_VOIP 2048
+/** Best for broadcast/high-fidelity application where the decoded audio should be as close as possible to the input
+ * @hideinitializer */
+#define OPUS_APPLICATION_AUDIO 2049
+/** Only use when lowest-achievable latency is what matters most. Voice-optimized modes cannot be used.
+ * @hideinitializer */
+#define OPUS_APPLICATION_RESTRICTED_LOWDELAY 2051
+
+#define OPUS_SIGNAL_VOICE 3001 /**< Signal being encoded is voice */
+#define OPUS_SIGNAL_MUSIC 3002 /**< Signal being encoded is music */
+#define OPUS_BANDWIDTH_NARROWBAND 1101 /**< 4 kHz bandpass @hideinitializer*/
+#define OPUS_BANDWIDTH_MEDIUMBAND 1102 /**< 6 kHz bandpass @hideinitializer*/
+#define OPUS_BANDWIDTH_WIDEBAND 1103 /**< 8 kHz bandpass @hideinitializer*/
+#define OPUS_BANDWIDTH_SUPERWIDEBAND 1104 /**<12 kHz bandpass @hideinitializer*/
+#define OPUS_BANDWIDTH_FULLBAND 1105 /**<20 kHz bandpass @hideinitializer*/
+
+#define OPUS_FRAMESIZE_ARG 5000 /**< Select frame size from the argument (default) */
+#define OPUS_FRAMESIZE_2_5_MS 5001 /**< Use 2.5 ms frames */
+#define OPUS_FRAMESIZE_5_MS 5002 /**< Use 5 ms frames */
+#define OPUS_FRAMESIZE_10_MS 5003 /**< Use 10 ms frames */
+#define OPUS_FRAMESIZE_20_MS 5004 /**< Use 20 ms frames */
+#define OPUS_FRAMESIZE_40_MS 5005 /**< Use 40 ms frames */
+#define OPUS_FRAMESIZE_60_MS 5006 /**< Use 60 ms frames */
+
+/**@}*/
+
+
+/** @defgroup opus_encoderctls Encoder related CTLs
+ *
+ * These are convenience macros for use with the \c opus_encode_ctl
+ * interface. They are used to generate the appropriate series of
+ * arguments for that call, passing the correct type, size and so
+ * on as expected for each particular request.
+ *
+ * Some usage examples:
+ *
+ * @code
+ * int ret;
+ * ret = opus_encoder_ctl(enc_ctx, OPUS_SET_BANDWIDTH(OPUS_AUTO));
+ * if (ret != OPUS_OK) return ret;
+ *
+ * opus_int32 rate;
+ * opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&rate));
+ *
+ * opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE);
+ * @endcode
+ *
+ * @see opus_genericctls, opus_encoder
+ * @{
+ */
+
+/** Configures the encoder's computational complexity.
+ * The supported range is 0-10 inclusive with 10 representing the highest complexity.
+ * @see OPUS_GET_COMPLEXITY
+ * @param[in] x <tt>opus_int32</tt>: Allowed values: 0-10, inclusive.
+ *
+ * @hideinitializer */
+#define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __opus_check_int(x)
+/** Gets the encoder's complexity configuration.
+ * @see OPUS_SET_COMPLEXITY
+ * @param[out] x <tt>opus_int32 *</tt>: Returns a value in the range 0-10,
+ * inclusive.
+ * @hideinitializer */
+#define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, __opus_check_int_ptr(x)
+
+/** Configures the bitrate in the encoder.
+ * Rates from 500 to 512000 bits per second are meaningful, as well as the
+ * special values #OPUS_AUTO and #OPUS_BITRATE_MAX.
+ * The value #OPUS_BITRATE_MAX can be used to cause the codec to use as much
+ * rate as it can, which is useful for controlling the rate by adjusting the
+ * output buffer size.
+ * @see OPUS_GET_BITRATE
+ * @param[in] x <tt>opus_int32</tt>: Bitrate in bits per second. The default
+ * is determined based on the number of
+ * channels and the input sampling rate.
+ * @hideinitializer */
+#define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, __opus_check_int(x)
+/** Gets the encoder's bitrate configuration.
+ * @see OPUS_SET_BITRATE
+ * @param[out] x <tt>opus_int32 *</tt>: Returns the bitrate in bits per second.
+ * The default is determined based on the
+ * number of channels and the input
+ * sampling rate.
+ * @hideinitializer */
+#define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, __opus_check_int_ptr(x)
+
+/** Enables or disables variable bitrate (VBR) in the encoder.
+ * The configured bitrate may not be met exactly because frames must
+ * be an integer number of bytes in length.
+ * @see OPUS_GET_VBR
+ * @see OPUS_SET_VBR_CONSTRAINT
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>0</dt><dd>Hard CBR. For LPC/hybrid modes at very low bit-rate, this can
+ * cause noticeable quality degradation.</dd>
+ * <dt>1</dt><dd>VBR (default). The exact type of VBR is controlled by
+ * #OPUS_SET_VBR_CONSTRAINT.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, __opus_check_int(x)
+/** Determine if variable bitrate (VBR) is enabled in the encoder.
+ * @see OPUS_SET_VBR
+ * @see OPUS_GET_VBR_CONSTRAINT
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>0</dt><dd>Hard CBR.</dd>
+ * <dt>1</dt><dd>VBR (default). The exact type of VBR may be retrieved via
+ * #OPUS_GET_VBR_CONSTRAINT.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, __opus_check_int_ptr(x)
+
+/** Enables or disables constrained VBR in the encoder.
+ * This setting is ignored when the encoder is in CBR mode.
+ * @warning Only the MDCT mode of Opus currently heeds the constraint.
+ * Speech mode ignores it completely, hybrid mode may fail to obey it
+ * if the LPC layer uses more bitrate than the constraint would have
+ * permitted.
+ * @see OPUS_GET_VBR_CONSTRAINT
+ * @see OPUS_SET_VBR
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>0</dt><dd>Unconstrained VBR.</dd>
+ * <dt>1</dt><dd>Constrained VBR (default). This creates a maximum of one
+ * frame of buffering delay assuming a transport with a
+ * serialization speed of the nominal bitrate.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, __opus_check_int(x)
+/** Determine if constrained VBR is enabled in the encoder.
+ * @see OPUS_SET_VBR_CONSTRAINT
+ * @see OPUS_GET_VBR
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>0</dt><dd>Unconstrained VBR.</dd>
+ * <dt>1</dt><dd>Constrained VBR (default).</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, __opus_check_int_ptr(x)
+
+/** Configures mono/stereo forcing in the encoder.
+ * This can force the encoder to produce packets encoded as either mono or
+ * stereo, regardless of the format of the input audio. This is useful when
+ * the caller knows that the input signal is currently a mono source embedded
+ * in a stereo stream.
+ * @see OPUS_GET_FORCE_CHANNELS
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd>
+ * <dt>1</dt> <dd>Forced mono</dd>
+ * <dt>2</dt> <dd>Forced stereo</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_FORCE_CHANNELS(x) OPUS_SET_FORCE_CHANNELS_REQUEST, __opus_check_int(x)
+/** Gets the encoder's forced channel configuration.
+ * @see OPUS_SET_FORCE_CHANNELS
+ * @param[out] x <tt>opus_int32 *</tt>:
+ * <dl>
+ * <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd>
+ * <dt>1</dt> <dd>Forced mono</dd>
+ * <dt>2</dt> <dd>Forced stereo</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_FORCE_CHANNELS(x) OPUS_GET_FORCE_CHANNELS_REQUEST, __opus_check_int_ptr(x)
+
+/** Configures the maximum bandpass that the encoder will select automatically.
+ * Applications should normally use this instead of #OPUS_SET_BANDWIDTH
+ * (leaving that set to the default, #OPUS_AUTO). This allows the
+ * application to set an upper bound based on the type of input it is
+ * providing, but still gives the encoder the freedom to reduce the bandpass
+ * when the bitrate becomes too low, for better overall quality.
+ * @see OPUS_GET_MAX_BANDWIDTH
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
+ * <dt>OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
+ * <dt>OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
+ * <dt>OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
+ * <dt>OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband (default)</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_MAX_BANDWIDTH(x) OPUS_SET_MAX_BANDWIDTH_REQUEST, __opus_check_int(x)
+
+/** Gets the encoder's configured maximum allowed bandpass.
+ * @see OPUS_SET_MAX_BANDWIDTH
+ * @param[out] x <tt>opus_int32 *</tt>: Allowed values:
+ * <dl>
+ * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband (default)</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_MAX_BANDWIDTH(x) OPUS_GET_MAX_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
+
+/** Sets the encoder's bandpass to a specific value.
+ * This prevents the encoder from automatically selecting the bandpass based
+ * on the available bitrate. If an application knows the bandpass of the input
+ * audio it is providing, it should normally use #OPUS_SET_MAX_BANDWIDTH
+ * instead, which still gives the encoder the freedom to reduce the bandpass
+ * when the bitrate becomes too low, for better overall quality.
+ * @see OPUS_GET_BANDWIDTH
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
+ * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __opus_check_int(x)
+
+/** Configures the type of signal being encoded.
+ * This is a hint which helps the encoder's mode selection.
+ * @see OPUS_GET_SIGNAL
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
+ * <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd>
+ * <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured signal type.
+ * @see OPUS_SET_SIGNAL
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
+ * <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd>
+ * <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x)
+
+
+/** Configures the encoder's intended application.
+ * The initial value is a mandatory argument to the encoder_create function.
+ * @see OPUS_GET_APPLICATION
+ * @param[in] x <tt>opus_int32</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>#OPUS_APPLICATION_VOIP</dt>
+ * <dd>Process signal for improved speech intelligibility.</dd>
+ * <dt>#OPUS_APPLICATION_AUDIO</dt>
+ * <dd>Favor faithfulness to the original input.</dd>
+ * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
+ * <dd>Configure the minimum possible coding delay by disabling certain modes
+ * of operation.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured application.
+ * @see OPUS_SET_APPLICATION
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>#OPUS_APPLICATION_VOIP</dt>
+ * <dd>Process signal for improved speech intelligibility.</dd>
+ * <dt>#OPUS_APPLICATION_AUDIO</dt>
+ * <dd>Favor faithfulness to the original input.</dd>
+ * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
+ * <dd>Configure the minimum possible coding delay by disabling certain modes
+ * of operation.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_int_ptr(x)
+
+/** Gets the total samples of delay added by the entire codec.
+ * This can be queried by the encoder and then the provided number of samples can be
+ * skipped on from the start of the decoder's output to provide time aligned input
+ * and output. From the perspective of a decoding application the real data begins this many
+ * samples late.
+ *
+ * The decoder contribution to this delay is identical for all decoders, but the
+ * encoder portion of the delay may vary from implementation to implementation,
+ * version to version, or even depend on the encoder's initial configuration.
+ * Applications needing delay compensation should call this CTL rather than
+ * hard-coding a value.
+ * @param[out] x <tt>opus_int32 *</tt>: Number of lookahead samples
+ * @hideinitializer */
+#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __opus_check_int_ptr(x)
+
+/** Configures the encoder's use of inband forward error correction (FEC).
+ * @note This is only applicable to the LPC layer
+ * @see OPUS_GET_INBAND_FEC
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>0</dt><dd>Disable inband FEC (default).</dd>
+ * <dt>1</dt><dd>Enable inband FEC.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x)
+/** Gets encoder's configured use of inband forward error correction.
+ * @see OPUS_SET_INBAND_FEC
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>0</dt><dd>Inband FEC disabled (default).</dd>
+ * <dt>1</dt><dd>Inband FEC enabled.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x)
+
+/** Configures the encoder's expected packet loss percentage.
+ * Higher values trigger progressively more loss resistant behavior in the encoder
+ * at the expense of quality at a given bitrate in the absence of packet loss, but
+ * greater quality under loss.
+ * @see OPUS_GET_PACKET_LOSS_PERC
+ * @param[in] x <tt>opus_int32</tt>: Loss percentage in the range 0-100, inclusive (default: 0).
+ * @hideinitializer */
+#define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured packet loss percentage.
+ * @see OPUS_SET_PACKET_LOSS_PERC
+ * @param[out] x <tt>opus_int32 *</tt>: Returns the configured loss percentage
+ * in the range 0-100, inclusive (default: 0).
+ * @hideinitializer */
+#define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __opus_check_int_ptr(x)
+
+/** Configures the encoder's use of discontinuous transmission (DTX).
+ * @note This is only applicable to the LPC layer
+ * @see OPUS_GET_DTX
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>0</dt><dd>Disable DTX (default).</dd>
+ * <dt>1</dt><dd>Enabled DTX.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __opus_check_int(x)
+/** Gets encoder's configured use of discontinuous transmission.
+ * @see OPUS_SET_DTX
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>0</dt><dd>DTX disabled (default).</dd>
+ * <dt>1</dt><dd>DTX enabled.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x)
+/** Configures the depth of signal being encoded.
+ *
+ * This is a hint which helps the encoder identify silence and near-silence.
+ * It represents the number of significant bits of linear intensity below
+ * which the signal contains ignorable quantization or other noise.
+ *
+ * For example, OPUS_SET_LSB_DEPTH(14) would be an appropriate setting
+ * for G.711 u-law input. OPUS_SET_LSB_DEPTH(16) would be appropriate
+ * for 16-bit linear pcm input with opus_encode_float().
+ *
+ * When using opus_encode() instead of opus_encode_float(), or when libopus
+ * is compiled for fixed-point, the encoder uses the minimum of the value
+ * set here and the value 16.
+ *
+ * @see OPUS_GET_LSB_DEPTH
+ * @param[in] x <tt>opus_int32</tt>: Input precision in bits, between 8 and 24
+ * (default: 24).
+ * @hideinitializer */
+#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured signal depth.
+ * @see OPUS_SET_LSB_DEPTH
+ * @param[out] x <tt>opus_int32 *</tt>: Input precision in bits, between 8 and
+ * 24 (default: 24).
+ * @hideinitializer */
+#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x)
+
+/** Configures the encoder's use of variable duration frames.
+ * When variable duration is enabled, the encoder is free to use a shorter frame
+ * size than the one requested in the opus_encode*() call.
+ * It is then the user's responsibility
+ * to verify how much audio was encoded by checking the ToC byte of the encoded
+ * packet. The part of the audio that was not encoded needs to be resent to the
+ * encoder for the next call. Do not use this option unless you <b>really</b>
+ * know what you are doing.
+ * @see OPUS_GET_EXPERT_FRAME_DURATION
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd>
+ * <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 5 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_EXPERT_FRAME_DURATION(x) OPUS_SET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured use of variable duration frames.
+ * @see OPUS_SET_EXPERT_FRAME_DURATION
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd>
+ * <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 5 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd>
+ * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int_ptr(x)
+
+/** If set to 1, disables almost all use of prediction, making frames almost
+ * completely independent. This reduces quality.
+ * @see OPUS_GET_PREDICTION_DISABLED
+ * @param[in] x <tt>opus_int32</tt>: Allowed values:
+ * <dl>
+ * <dt>0</dt><dd>Enable prediction (default).</dd>
+ * <dt>1</dt><dd>Disable prediction.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured prediction status.
+ * @see OPUS_SET_PREDICTION_DISABLED
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>0</dt><dd>Prediction enabled (default).</dd>
+ * <dt>1</dt><dd>Prediction disabled.</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x)
+
+/**@}*/
+
+/** @defgroup opus_genericctls Generic CTLs
+ *
+ * These macros are used with the \c opus_decoder_ctl and
+ * \c opus_encoder_ctl calls to generate a particular
+ * request.
+ *
+ * When called on an \c OpusDecoder they apply to that
+ * particular decoder instance. When called on an
+ * \c OpusEncoder they apply to the corresponding setting
+ * on that encoder instance, if present.
+ *
+ * Some usage examples:
+ *
+ * @code
+ * int ret;
+ * opus_int32 pitch;
+ * ret = opus_decoder_ctl(dec_ctx, OPUS_GET_PITCH(&pitch));
+ * if (ret == OPUS_OK) return ret;
+ *
+ * opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE);
+ * opus_decoder_ctl(dec_ctx, OPUS_RESET_STATE);
+ *
+ * opus_int32 enc_bw, dec_bw;
+ * opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&enc_bw));
+ * opus_decoder_ctl(dec_ctx, OPUS_GET_BANDWIDTH(&dec_bw));
+ * if (enc_bw != dec_bw) {
+ * printf("packet bandwidth mismatch!\n");
+ * }
+ * @endcode
+ *
+ * @see opus_encoder, opus_decoder_ctl, opus_encoder_ctl, opus_decoderctls, opus_encoderctls
+ * @{
+ */
+
+/** Resets the codec state to be equivalent to a freshly initialized state.
+ * This should be called when switching streams in order to prevent
+ * the back to back decoding from giving different results from
+ * one at a time decoding.
+ * @hideinitializer */
+#define OPUS_RESET_STATE 4028
+
+/** Gets the final state of the codec's entropy coder.
+ * This is used for testing purposes,
+ * The encoder and decoder state should be identical after coding a payload
+ * (assuming no data corruption or software bugs)
+ *
+ * @param[out] x <tt>opus_uint32 *</tt>: Entropy coder state
+ *
+ * @hideinitializer */
+#define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __opus_check_uint_ptr(x)
+
+/** Gets the encoder's configured bandpass or the decoder's last bandpass.
+ * @see OPUS_SET_BANDWIDTH
+ * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
+ * <dl>
+ * <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
+ * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
+ * <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband</dd>
+ * </dl>
+ * @hideinitializer */
+#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
+
+/** Gets the sampling rate the encoder or decoder was initialized with.
+ * This simply returns the <code>Fs</code> value passed to opus_encoder_init()
+ * or opus_decoder_init().
+ * @param[out] x <tt>opus_int32 *</tt>: Sampling rate of encoder or decoder.
+ * @hideinitializer
+ */
+#define OPUS_GET_SAMPLE_RATE(x) OPUS_GET_SAMPLE_RATE_REQUEST, __opus_check_int_ptr(x)
+
+/**@}*/
+
+/** @defgroup opus_decoderctls Decoder related CTLs
+ * @see opus_genericctls, opus_encoderctls, opus_decoder
+ * @{
+ */
+
+/** Configures decoder gain adjustment.
+ * Scales the decoded output by a factor specified in Q8 dB units.
+ * This has a maximum range of -32768 to 32767 inclusive, and returns
+ * OPUS_BAD_ARG otherwise. The default is zero indicating no adjustment.
+ * This setting survives decoder reset.
+ *
+ * gain = pow(10, x/(20.0*256))
+ *
+ * @param[in] x <tt>opus_int32</tt>: Amount to scale PCM signal by in Q8 dB units.
+ * @hideinitializer */
+#define OPUS_SET_GAIN(x) OPUS_SET_GAIN_REQUEST, __opus_check_int(x)
+/** Gets the decoder's configured gain adjustment. @see OPUS_SET_GAIN
+ *
+ * @param[out] x <tt>opus_int32 *</tt>: Amount to scale PCM signal by in Q8 dB units.
+ * @hideinitializer */
+#define OPUS_GET_GAIN(x) OPUS_GET_GAIN_REQUEST, __opus_check_int_ptr(x)
+
+/** Gets the duration (in samples) of the last packet successfully decoded or concealed.
+ * @param[out] x <tt>opus_int32 *</tt>: Number of samples (at current sampling rate).
+ * @hideinitializer */
+#define OPUS_GET_LAST_PACKET_DURATION(x) OPUS_GET_LAST_PACKET_DURATION_REQUEST, __opus_check_int_ptr(x)
+
+/** Gets the pitch of the last decoded frame, if available.
+ * This can be used for any post-processing algorithm requiring the use of pitch,
+ * e.g. time stretching/shortening. If the last frame was not voiced, or if the
+ * pitch was not coded in the frame, then zero is returned.
+ *
+ * This CTL is only implemented for decoder instances.
+ *
+ * @param[out] x <tt>opus_int32 *</tt>: pitch period at 48 kHz (or 0 if not available)
+ *
+ * @hideinitializer */
+#define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, __opus_check_int_ptr(x)
+
+/**@}*/
+
+/** @defgroup opus_libinfo Opus library information functions
+ * @{
+ */
+
+/** Converts an opus error code into a human readable string.
+ *
+ * @param[in] error <tt>int</tt>: Error number
+ * @returns Error string
+ */
+OPUS_EXPORT const char *opus_strerror(int error);
+
+/** Gets the libopus version string.
+ *
+ * Applications may look for the substring "-fixed" in the version string to
+ * determine whether they have a fixed-point or floating-point build at
+ * runtime.
+ *
+ * @returns Version string
+ */
+OPUS_EXPORT const char *opus_get_version_string(void);
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OPUS_DEFINES_H */
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h.meta
new file mode 100644
index 0000000..ff6e7d9
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_defines.h.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 973cb4f603dac46508105fc4878a81c3
+timeCreated: 1531143153
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h
new file mode 100644
index 0000000..3622e00
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h
@@ -0,0 +1,660 @@
+/* Copyright (c) 2011 Xiph.Org Foundation
+ Written by Jean-Marc Valin */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * @file opus_multistream.h
+ * @brief Opus reference implementation multistream API
+ */
+
+#ifndef OPUS_MULTISTREAM_H
+#define OPUS_MULTISTREAM_H
+
+#include "opus.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @cond OPUS_INTERNAL_DOC */
+
+/** Macros to trigger compilation errors when the wrong types are provided to a
+ * CTL. */
+/**@{*/
+#define __opus_check_encstate_ptr(ptr) ((ptr) + ((ptr) - (OpusEncoder**)(ptr)))
+#define __opus_check_decstate_ptr(ptr) ((ptr) + ((ptr) - (OpusDecoder**)(ptr)))
+/**@}*/
+
+/** These are the actual encoder and decoder CTL ID numbers.
+ * They should not be used directly by applications.
+ * In general, SETs should be even and GETs should be odd.*/
+/**@{*/
+#define OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST 5120
+#define OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST 5122
+/**@}*/
+
+/** @endcond */
+
+/** @defgroup opus_multistream_ctls Multistream specific encoder and decoder CTLs
+ *
+ * These are convenience macros that are specific to the
+ * opus_multistream_encoder_ctl() and opus_multistream_decoder_ctl()
+ * interface.
+ * The CTLs from @ref opus_genericctls, @ref opus_encoderctls, and
+ * @ref opus_decoderctls may be applied to a multistream encoder or decoder as
+ * well.
+ * In addition, you may retrieve the encoder or decoder state for an specific
+ * stream via #OPUS_MULTISTREAM_GET_ENCODER_STATE or
+ * #OPUS_MULTISTREAM_GET_DECODER_STATE and apply CTLs to it individually.
+ */
+/**@{*/
+
+/** Gets the encoder state for an individual stream of a multistream encoder.
+ * @param[in] x <tt>opus_int32</tt>: The index of the stream whose encoder you
+ * wish to retrieve.
+ * This must be non-negative and less than
+ * the <code>streams</code> parameter used
+ * to initialize the encoder.
+ * @param[out] y <tt>OpusEncoder**</tt>: Returns a pointer to the given
+ * encoder state.
+ * @retval OPUS_BAD_ARG The index of the requested stream was out of range.
+ * @hideinitializer
+ */
+#define OPUS_MULTISTREAM_GET_ENCODER_STATE(x,y) OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST, __opus_check_int(x), __opus_check_encstate_ptr(y)
+
+/** Gets the decoder state for an individual stream of a multistream decoder.
+ * @param[in] x <tt>opus_int32</tt>: The index of the stream whose decoder you
+ * wish to retrieve.
+ * This must be non-negative and less than
+ * the <code>streams</code> parameter used
+ * to initialize the decoder.
+ * @param[out] y <tt>OpusDecoder**</tt>: Returns a pointer to the given
+ * decoder state.
+ * @retval OPUS_BAD_ARG The index of the requested stream was out of range.
+ * @hideinitializer
+ */
+#define OPUS_MULTISTREAM_GET_DECODER_STATE(x,y) OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST, __opus_check_int(x), __opus_check_decstate_ptr(y)
+
+/**@}*/
+
+/** @defgroup opus_multistream Opus Multistream API
+ * @{
+ *
+ * The multistream API allows individual Opus streams to be combined into a
+ * single packet, enabling support for up to 255 channels. Unlike an
+ * elementary Opus stream, the encoder and decoder must negotiate the channel
+ * configuration before the decoder can successfully interpret the data in the
+ * packets produced by the encoder. Some basic information, such as packet
+ * duration, can be computed without any special negotiation.
+ *
+ * The format for multistream Opus packets is defined in
+ * <a href="https://tools.ietf.org/html/rfc7845">RFC 7845</a>
+ * and is based on the self-delimited Opus framing described in Appendix B of
+ * <a href="https://tools.ietf.org/html/rfc6716">RFC 6716</a>.
+ * Normal Opus packets are just a degenerate case of multistream Opus packets,
+ * and can be encoded or decoded with the multistream API by setting
+ * <code>streams</code> to <code>1</code> when initializing the encoder or
+ * decoder.
+ *
+ * Multistream Opus streams can contain up to 255 elementary Opus streams.
+ * These may be either "uncoupled" or "coupled", indicating that the decoder
+ * is configured to decode them to either 1 or 2 channels, respectively.
+ * The streams are ordered so that all coupled streams appear at the
+ * beginning.
+ *
+ * A <code>mapping</code> table defines which decoded channel <code>i</code>
+ * should be used for each input/output (I/O) channel <code>j</code>. This table is
+ * typically provided as an unsigned char array.
+ * Let <code>i = mapping[j]</code> be the index for I/O channel <code>j</code>.
+ * If <code>i < 2*coupled_streams</code>, then I/O channel <code>j</code> is
+ * encoded as the left channel of stream <code>(i/2)</code> if <code>i</code>
+ * is even, or as the right channel of stream <code>(i/2)</code> if
+ * <code>i</code> is odd. Otherwise, I/O channel <code>j</code> is encoded as
+ * mono in stream <code>(i - coupled_streams)</code>, unless it has the special
+ * value 255, in which case it is omitted from the encoding entirely (the
+ * decoder will reproduce it as silence). Each value <code>i</code> must either
+ * be the special value 255 or be less than <code>streams + coupled_streams</code>.
+ *
+ * The output channels specified by the encoder
+ * should use the
+ * <a href="https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9">Vorbis
+ * channel ordering</a>. A decoder may wish to apply an additional permutation
+ * to the mapping the encoder used to achieve a different output channel
+ * order (e.g. for outputing in WAV order).
+ *
+ * Each multistream packet contains an Opus packet for each stream, and all of
+ * the Opus packets in a single multistream packet must have the same
+ * duration. Therefore the duration of a multistream packet can be extracted
+ * from the TOC sequence of the first stream, which is located at the
+ * beginning of the packet, just like an elementary Opus stream:
+ *
+ * @code
+ * int nb_samples;
+ * int nb_frames;
+ * nb_frames = opus_packet_get_nb_frames(data, len);
+ * if (nb_frames < 1)
+ * return nb_frames;
+ * nb_samples = opus_packet_get_samples_per_frame(data, 48000) * nb_frames;
+ * @endcode
+ *
+ * The general encoding and decoding process proceeds exactly the same as in
+ * the normal @ref opus_encoder and @ref opus_decoder APIs.
+ * See their documentation for an overview of how to use the corresponding
+ * multistream functions.
+ */
+
+/** Opus multistream encoder state.
+ * This contains the complete state of a multistream Opus encoder.
+ * It is position independent and can be freely copied.
+ * @see opus_multistream_encoder_create
+ * @see opus_multistream_encoder_init
+ */
+typedef struct OpusMSEncoder OpusMSEncoder;
+
+/** Opus multistream decoder state.
+ * This contains the complete state of a multistream Opus decoder.
+ * It is position independent and can be freely copied.
+ * @see opus_multistream_decoder_create
+ * @see opus_multistream_decoder_init
+ */
+typedef struct OpusMSDecoder OpusMSDecoder;
+
+/**\name Multistream encoder functions */
+/**@{*/
+
+/** Gets the size of an OpusMSEncoder structure.
+ * @param streams <tt>int</tt>: The total number of streams to encode from the
+ * input.
+ * This must be no more than 255.
+ * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
+ * to encode.
+ * This must be no larger than the total
+ * number of streams.
+ * Additionally, The total number of
+ * encoded channels (<code>streams +
+ * coupled_streams</code>) must be no
+ * more than 255.
+ * @returns The size in bytes on success, or a negative error code
+ * (see @ref opus_errorcodes) on error.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_encoder_get_size(
+ int streams,
+ int coupled_streams
+);
+
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_surround_encoder_get_size(
+ int channels,
+ int mapping_family
+);
+
+
+/** Allocates and initializes a multistream encoder state.
+ * Call opus_multistream_encoder_destroy() to release
+ * this object when finished.
+ * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param channels <tt>int</tt>: Number of channels in the input signal.
+ * This must be at most 255.
+ * It may be greater than the number of
+ * coded channels (<code>streams +
+ * coupled_streams</code>).
+ * @param streams <tt>int</tt>: The total number of streams to encode from the
+ * input.
+ * This must be no more than the number of channels.
+ * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
+ * to encode.
+ * This must be no larger than the total
+ * number of streams.
+ * Additionally, The total number of
+ * encoded channels (<code>streams +
+ * coupled_streams</code>) must be no
+ * more than the number of input channels.
+ * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
+ * encoded channels to input channels, as described in
+ * @ref opus_multistream. As an extra constraint, the
+ * multistream encoder does not allow encoding coupled
+ * streams for which one channel is unused since this
+ * is never a good idea.
+ * @param application <tt>int</tt>: The target encoder application.
+ * This must be one of the following:
+ * <dl>
+ * <dt>#OPUS_APPLICATION_VOIP</dt>
+ * <dd>Process signal for improved speech intelligibility.</dd>
+ * <dt>#OPUS_APPLICATION_AUDIO</dt>
+ * <dd>Favor faithfulness to the original input.</dd>
+ * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
+ * <dd>Configure the minimum possible coding delay by disabling certain modes
+ * of operation.</dd>
+ * </dl>
+ * @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
+ * code (see @ref opus_errorcodes) on
+ * failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_encoder_create(
+ opus_int32 Fs,
+ int channels,
+ int streams,
+ int coupled_streams,
+ const unsigned char *mapping,
+ int application,
+ int *error
+) OPUS_ARG_NONNULL(5);
+
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_surround_encoder_create(
+ opus_int32 Fs,
+ int channels,
+ int mapping_family,
+ int *streams,
+ int *coupled_streams,
+ unsigned char *mapping,
+ int application,
+ int *error
+) OPUS_ARG_NONNULL(5);
+
+/** Initialize a previously allocated multistream encoder state.
+ * The memory pointed to by \a st must be at least the size returned by
+ * opus_multistream_encoder_get_size().
+ * This is intended for applications which use their own allocator instead of
+ * malloc.
+ * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
+ * @see opus_multistream_encoder_create
+ * @see opus_multistream_encoder_get_size
+ * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.
+ * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param channels <tt>int</tt>: Number of channels in the input signal.
+ * This must be at most 255.
+ * It may be greater than the number of
+ * coded channels (<code>streams +
+ * coupled_streams</code>).
+ * @param streams <tt>int</tt>: The total number of streams to encode from the
+ * input.
+ * This must be no more than the number of channels.
+ * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
+ * to encode.
+ * This must be no larger than the total
+ * number of streams.
+ * Additionally, The total number of
+ * encoded channels (<code>streams +
+ * coupled_streams</code>) must be no
+ * more than the number of input channels.
+ * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
+ * encoded channels to input channels, as described in
+ * @ref opus_multistream. As an extra constraint, the
+ * multistream encoder does not allow encoding coupled
+ * streams for which one channel is unused since this
+ * is never a good idea.
+ * @param application <tt>int</tt>: The target encoder application.
+ * This must be one of the following:
+ * <dl>
+ * <dt>#OPUS_APPLICATION_VOIP</dt>
+ * <dd>Process signal for improved speech intelligibility.</dd>
+ * <dt>#OPUS_APPLICATION_AUDIO</dt>
+ * <dd>Favor faithfulness to the original input.</dd>
+ * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
+ * <dd>Configure the minimum possible coding delay by disabling certain modes
+ * of operation.</dd>
+ * </dl>
+ * @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
+ * on failure.
+ */
+OPUS_EXPORT int opus_multistream_encoder_init(
+ OpusMSEncoder *st,
+ opus_int32 Fs,
+ int channels,
+ int streams,
+ int coupled_streams,
+ const unsigned char *mapping,
+ int application
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
+
+OPUS_EXPORT int opus_multistream_surround_encoder_init(
+ OpusMSEncoder *st,
+ opus_int32 Fs,
+ int channels,
+ int mapping_family,
+ int *streams,
+ int *coupled_streams,
+ unsigned char *mapping,
+ int application
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
+
+/** Encodes a multistream Opus frame.
+ * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
+ * @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interleaved
+ * samples.
+ * This must contain
+ * <code>frame_size*channels</code>
+ * samples.
+ * @param frame_size <tt>int</tt>: Number of samples per channel in the input
+ * signal.
+ * This must be an Opus frame size for the
+ * encoder's sampling rate.
+ * For example, at 48 kHz the permitted values
+ * are 120, 240, 480, 960, 1920, and 2880.
+ * Passing in a duration of less than 10 ms
+ * (480 samples at 48 kHz) will prevent the
+ * encoder from using the LPC or hybrid modes.
+ * @param[out] data <tt>unsigned char*</tt>: Output payload.
+ * This must contain storage for at
+ * least \a max_data_bytes.
+ * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
+ * memory for the output
+ * payload. This may be
+ * used to impose an upper limit on
+ * the instant bitrate, but should
+ * not be used as the only bitrate
+ * control. Use #OPUS_SET_BITRATE to
+ * control the bitrate.
+ * @returns The length of the encoded packet (in bytes) on success or a
+ * negative error code (see @ref opus_errorcodes) on failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode(
+ OpusMSEncoder *st,
+ const opus_int16 *pcm,
+ int frame_size,
+ unsigned char *data,
+ opus_int32 max_data_bytes
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
+
+/** Encodes a multistream Opus frame from floating point input.
+ * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
+ * @param[in] pcm <tt>const float*</tt>: The input signal as interleaved
+ * samples with a normal range of
+ * +/-1.0.
+ * Samples with a range beyond +/-1.0
+ * are supported but will be clipped by
+ * decoders using the integer API and
+ * should only be used if it is known
+ * that the far end supports extended
+ * dynamic range.
+ * This must contain
+ * <code>frame_size*channels</code>
+ * samples.
+ * @param frame_size <tt>int</tt>: Number of samples per channel in the input
+ * signal.
+ * This must be an Opus frame size for the
+ * encoder's sampling rate.
+ * For example, at 48 kHz the permitted values
+ * are 120, 240, 480, 960, 1920, and 2880.
+ * Passing in a duration of less than 10 ms
+ * (480 samples at 48 kHz) will prevent the
+ * encoder from using the LPC or hybrid modes.
+ * @param[out] data <tt>unsigned char*</tt>: Output payload.
+ * This must contain storage for at
+ * least \a max_data_bytes.
+ * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
+ * memory for the output
+ * payload. This may be
+ * used to impose an upper limit on
+ * the instant bitrate, but should
+ * not be used as the only bitrate
+ * control. Use #OPUS_SET_BITRATE to
+ * control the bitrate.
+ * @returns The length of the encoded packet (in bytes) on success or a
+ * negative error code (see @ref opus_errorcodes) on failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode_float(
+ OpusMSEncoder *st,
+ const float *pcm,
+ int frame_size,
+ unsigned char *data,
+ opus_int32 max_data_bytes
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
+
+/** Frees an <code>OpusMSEncoder</code> allocated by
+ * opus_multistream_encoder_create().
+ * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to be freed.
+ */
+OPUS_EXPORT void opus_multistream_encoder_destroy(OpusMSEncoder *st);
+
+/** Perform a CTL function on a multistream Opus encoder.
+ *
+ * Generally the request and subsequent arguments are generated by a
+ * convenience macro.
+ * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
+ * @param request This and all remaining parameters should be replaced by one
+ * of the convenience macros in @ref opus_genericctls,
+ * @ref opus_encoderctls, or @ref opus_multistream_ctls.
+ * @see opus_genericctls
+ * @see opus_encoderctls
+ * @see opus_multistream_ctls
+ */
+OPUS_EXPORT int opus_multistream_encoder_ctl(OpusMSEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);
+
+/**@}*/
+
+/**\name Multistream decoder functions */
+/**@{*/
+
+/** Gets the size of an <code>OpusMSDecoder</code> structure.
+ * @param streams <tt>int</tt>: The total number of streams coded in the
+ * input.
+ * This must be no more than 255.
+ * @param coupled_streams <tt>int</tt>: Number streams to decode as coupled
+ * (2 channel) streams.
+ * This must be no larger than the total
+ * number of streams.
+ * Additionally, The total number of
+ * coded channels (<code>streams +
+ * coupled_streams</code>) must be no
+ * more than 255.
+ * @returns The size in bytes on success, or a negative error code
+ * (see @ref opus_errorcodes) on error.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_decoder_get_size(
+ int streams,
+ int coupled_streams
+);
+
+/** Allocates and initializes a multistream decoder state.
+ * Call opus_multistream_decoder_destroy() to release
+ * this object when finished.
+ * @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param channels <tt>int</tt>: Number of channels to output.
+ * This must be at most 255.
+ * It may be different from the number of coded
+ * channels (<code>streams +
+ * coupled_streams</code>).
+ * @param streams <tt>int</tt>: The total number of streams coded in the
+ * input.
+ * This must be no more than 255.
+ * @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
+ * (2 channel) streams.
+ * This must be no larger than the total
+ * number of streams.
+ * Additionally, The total number of
+ * coded channels (<code>streams +
+ * coupled_streams</code>) must be no
+ * more than 255.
+ * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
+ * coded channels to output channels, as described in
+ * @ref opus_multistream.
+ * @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
+ * code (see @ref opus_errorcodes) on
+ * failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSDecoder *opus_multistream_decoder_create(
+ opus_int32 Fs,
+ int channels,
+ int streams,
+ int coupled_streams,
+ const unsigned char *mapping,
+ int *error
+) OPUS_ARG_NONNULL(5);
+
+/** Intialize a previously allocated decoder state object.
+ * The memory pointed to by \a st must be at least the size returned by
+ * opus_multistream_encoder_get_size().
+ * This is intended for applications which use their own allocator instead of
+ * malloc.
+ * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
+ * @see opus_multistream_decoder_create
+ * @see opus_multistream_deocder_get_size
+ * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.
+ * @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
+ * This must be one of 8000, 12000, 16000,
+ * 24000, or 48000.
+ * @param channels <tt>int</tt>: Number of channels to output.
+ * This must be at most 255.
+ * It may be different from the number of coded
+ * channels (<code>streams +
+ * coupled_streams</code>).
+ * @param streams <tt>int</tt>: The total number of streams coded in the
+ * input.
+ * This must be no more than 255.
+ * @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
+ * (2 channel) streams.
+ * This must be no larger than the total
+ * number of streams.
+ * Additionally, The total number of
+ * coded channels (<code>streams +
+ * coupled_streams</code>) must be no
+ * more than 255.
+ * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
+ * coded channels to output channels, as described in
+ * @ref opus_multistream.
+ * @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
+ * on failure.
+ */
+OPUS_EXPORT int opus_multistream_decoder_init(
+ OpusMSDecoder *st,
+ opus_int32 Fs,
+ int channels,
+ int streams,
+ int coupled_streams,
+ const unsigned char *mapping
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
+
+/** Decode a multistream Opus packet.
+ * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
+ * @param[in] data <tt>const unsigned char*</tt>: Input payload.
+ * Use a <code>NULL</code>
+ * pointer to indicate packet
+ * loss.
+ * @param len <tt>opus_int32</tt>: Number of bytes in payload.
+ * @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved
+ * samples.
+ * This must contain room for
+ * <code>frame_size*channels</code>
+ * samples.
+ * @param frame_size <tt>int</tt>: The number of samples per channel of
+ * available space in \a pcm.
+ * If this is less than the maximum packet duration
+ * (120 ms; 5760 for 48kHz), this function will not be capable
+ * of decoding some packets. In the case of PLC (data==NULL)
+ * or FEC (decode_fec=1), then frame_size needs to be exactly
+ * the duration of audio that is missing, otherwise the
+ * decoder will not be in the optimal state to decode the
+ * next incoming packet. For the PLC and FEC cases, frame_size
+ * <b>must</b> be a multiple of 2.5 ms.
+ * @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band
+ * forward error correction data be decoded.
+ * If no such data is available, the frame is
+ * decoded as if it were lost.
+ * @returns Number of samples decoded on success or a negative error code
+ * (see @ref opus_errorcodes) on failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode(
+ OpusMSDecoder *st,
+ const unsigned char *data,
+ opus_int32 len,
+ opus_int16 *pcm,
+ int frame_size,
+ int decode_fec
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
+
+/** Decode a multistream Opus packet with floating point output.
+ * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
+ * @param[in] data <tt>const unsigned char*</tt>: Input payload.
+ * Use a <code>NULL</code>
+ * pointer to indicate packet
+ * loss.
+ * @param len <tt>opus_int32</tt>: Number of bytes in payload.
+ * @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved
+ * samples.
+ * This must contain room for
+ * <code>frame_size*channels</code>
+ * samples.
+ * @param frame_size <tt>int</tt>: The number of samples per channel of
+ * available space in \a pcm.
+ * If this is less than the maximum packet duration
+ * (120 ms; 5760 for 48kHz), this function will not be capable
+ * of decoding some packets. In the case of PLC (data==NULL)
+ * or FEC (decode_fec=1), then frame_size needs to be exactly
+ * the duration of audio that is missing, otherwise the
+ * decoder will not be in the optimal state to decode the
+ * next incoming packet. For the PLC and FEC cases, frame_size
+ * <b>must</b> be a multiple of 2.5 ms.
+ * @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band
+ * forward error correction data be decoded.
+ * If no such data is available, the frame is
+ * decoded as if it were lost.
+ * @returns Number of samples decoded on success or a negative error code
+ * (see @ref opus_errorcodes) on failure.
+ */
+OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode_float(
+ OpusMSDecoder *st,
+ const unsigned char *data,
+ opus_int32 len,
+ float *pcm,
+ int frame_size,
+ int decode_fec
+) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
+
+/** Perform a CTL function on a multistream Opus decoder.
+ *
+ * Generally the request and subsequent arguments are generated by a
+ * convenience macro.
+ * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
+ * @param request This and all remaining parameters should be replaced by one
+ * of the convenience macros in @ref opus_genericctls,
+ * @ref opus_decoderctls, or @ref opus_multistream_ctls.
+ * @see opus_genericctls
+ * @see opus_decoderctls
+ * @see opus_multistream_ctls
+ */
+OPUS_EXPORT int opus_multistream_decoder_ctl(OpusMSDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);
+
+/** Frees an <code>OpusMSDecoder</code> allocated by
+ * opus_multistream_decoder_create().
+ * @param st <tt>OpusMSDecoder</tt>: Multistream decoder state to be freed.
+ */
+OPUS_EXPORT void opus_multistream_decoder_destroy(OpusMSDecoder *st);
+
+/**@}*/
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OPUS_MULTISTREAM_H */
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h.meta
new file mode 100644
index 0000000..afba4f1
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_multistream.h.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 83f21feacb8e34ecc91860206a0e2e84
+timeCreated: 1531143153
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h
new file mode 100644
index 0000000..b28e03a
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h
@@ -0,0 +1,159 @@
+/* (C) COPYRIGHT 1994-2002 Xiph.Org Foundation */
+/* Modified by Jean-Marc Valin */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+/* opus_types.h based on ogg_types.h from libogg */
+
+/**
+ @file opus_types.h
+ @brief Opus reference implementation types
+*/
+#ifndef OPUS_TYPES_H
+#define OPUS_TYPES_H
+
+/* Use the real stdint.h if it's there (taken from Paul Hsieh's pstdint.h) */
+#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H))
+#include <stdint.h>
+
+ typedef int16_t opus_int16;
+ typedef uint16_t opus_uint16;
+ typedef int32_t opus_int32;
+ typedef uint32_t opus_uint32;
+#elif defined(_WIN32)
+
+# if defined(__CYGWIN__)
+# include <_G_config.h>
+ typedef _G_int32_t opus_int32;
+ typedef _G_uint32_t opus_uint32;
+ typedef _G_int16 opus_int16;
+ typedef _G_uint16 opus_uint16;
+# elif defined(__MINGW32__)
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+ typedef int opus_int32;
+ typedef unsigned int opus_uint32;
+# elif defined(__MWERKS__)
+ typedef int opus_int32;
+ typedef unsigned int opus_uint32;
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+# else
+ /* MSVC/Borland */
+ typedef __int32 opus_int32;
+ typedef unsigned __int32 opus_uint32;
+ typedef __int16 opus_int16;
+ typedef unsigned __int16 opus_uint16;
+# endif
+
+#elif defined(__MACOS__)
+
+# include <sys/types.h>
+ typedef SInt16 opus_int16;
+ typedef UInt16 opus_uint16;
+ typedef SInt32 opus_int32;
+ typedef UInt32 opus_uint32;
+
+#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
+
+# include <sys/types.h>
+ typedef int16_t opus_int16;
+ typedef u_int16_t opus_uint16;
+ typedef int32_t opus_int32;
+ typedef u_int32_t opus_uint32;
+
+#elif defined(__BEOS__)
+
+ /* Be */
+# include <inttypes.h>
+ typedef int16 opus_int16;
+ typedef u_int16 opus_uint16;
+ typedef int32_t opus_int32;
+ typedef u_int32_t opus_uint32;
+
+#elif defined (__EMX__)
+
+ /* OS/2 GCC */
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+ typedef int opus_int32;
+ typedef unsigned int opus_uint32;
+
+#elif defined (DJGPP)
+
+ /* DJGPP */
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+ typedef int opus_int32;
+ typedef unsigned int opus_uint32;
+
+#elif defined(R5900)
+
+ /* PS2 EE */
+ typedef int opus_int32;
+ typedef unsigned opus_uint32;
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+
+#elif defined(__SYMBIAN32__)
+
+ /* Symbian GCC */
+ typedef signed short opus_int16;
+ typedef unsigned short opus_uint16;
+ typedef signed int opus_int32;
+ typedef unsigned int opus_uint32;
+
+#elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
+
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+ typedef long opus_int32;
+ typedef unsigned long opus_uint32;
+
+#elif defined(CONFIG_TI_C6X)
+
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+ typedef int opus_int32;
+ typedef unsigned int opus_uint32;
+
+#else
+
+ /* Give up, take a reasonable guess */
+ typedef short opus_int16;
+ typedef unsigned short opus_uint16;
+ typedef int opus_int32;
+ typedef unsigned int opus_uint32;
+
+#endif
+
+#define opus_int int /* used for counters etc; at least 16 bits */
+#define opus_int64 long long
+#define opus_int8 signed char
+
+#define opus_uint unsigned int /* used for counters etc; at least 16 bits */
+#define opus_uint64 unsigned long long
+#define opus_uint8 unsigned char
+
+#endif /* OPUS_TYPES_H */
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h.meta
new file mode 100644
index 0000000..f301bf9
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/include/opus/opus_types.h.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 3e375ec80f2bd4829b7127365cc11c30
+timeCreated: 1531143153
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/lib.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/lib.meta
new file mode 100644
index 0000000..13071ed
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/lib.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 263517b8357ef41c58771c6b6a15df83
+folderAsset: yes
+timeCreated: 1531143153
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a b/ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a
new file mode 100644
index 0000000..618a682
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a.meta b/ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a.meta
new file mode 100644
index 0000000..e2b081d
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/Opus/lib/libopus.a.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 0f1383e26d8b84952a28b98e009e4664
+timeCreated: 1531143153
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/File.txt b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/File.txt
new file mode 100644
index 0000000..021619d
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/File.txt
@@ -0,0 +1,79 @@
+鎴戜滑娣辩煡涓汉淇℃伅瀵规偍鐨勯噸瑕佹�э紝骞朵細灏藉叏鍔涗繚鎶ゆ偍鐨勪釜浜轰俊鎭畨鍏ㄥ彲闈犮�傛垜浠嚧鍔涗簬缁存寔鎮ㄥ鎴戜滑鐨勪俊浠伙紝鎭畧浠ヤ笅鍘熷垯锛屼繚鎶ゆ偍鐨勪釜浜轰俊鎭細鏉冭矗涓�鑷村師鍒欍�佺洰鐨勬槑纭師鍒欍�侀�夋嫨鍚屾剰鍘熷垯銆佺‘淇濆畨鍏ㄥ師鍒欍�佸叕寮�閫忔槑鍘熷垯绛夈�傚悓鏃讹紝鎴戜滑鎵胯锛屾垜浠皢鎸変笟鐣屾垚鐔熺殑瀹夊叏鏍囧噯锛岄噰鍙栫浉搴旂殑瀹夊叏淇濇姢鎺柦鏉ヤ繚鎶ゆ偍鐨勪釜浜轰俊鎭��
+璇峰湪浣跨敤鎴戜滑鐨勪骇鍝侊紙鎴栨湇鍔★級鍓嶏紝浠旂粏闃呰骞朵簡瑙f湰銆婇殣绉佹斂绛栥�嬨��
+涓�銆佹垜浠浣曟敹闆嗗拰浣跨敤鎮ㄧ殑涓汉淇℃伅
+涓汉淇℃伅鏄寚浠ョ數瀛愭垨鑰呭叾浠栨柟寮忚褰曠殑鑳藉鍗曠嫭鎴栬�呬笌鍏朵粬淇℃伅缁撳悎璇嗗埆鐗瑰畾鑷劧浜鸿韩浠芥垨鑰呭弽鏄犵壒瀹氳嚜鐒朵汉娲诲姩鎯呭喌鐨勫悇绉嶄俊鎭��
+鎴戜滑浠呬細鍑轰簬鏈斂绛栨墍杩扮殑浠ヤ笅鐩殑锛屾敹闆嗗拰浣跨敤鎮ㄧ殑涓汉淇℃伅锛�
+1銆佷笟鍔″姛鑳戒竴锛氭敞鍐屾垚涓虹敤鎴�
+涓哄畬鎴愬垱寤鸿处鍙凤紝鎮ㄩ渶鎻愪緵浠ヤ笅淇℃伅锛氭墜鏈哄彿銆佸垱寤虹殑鐢ㄦ埛鍚嶅拰瀵嗙爜銆�
+鍦ㄦ敞鍐岃繃绋嬩腑锛屽鏋滄偍鎻愪緵浠ヤ笅棰濆淇℃伅锛屽皢鏈夊姪浜庢垜浠粰鎮ㄦ彁渚涙洿濂界殑鏈嶅姟鍜屼綋楠岋細鐢靛瓙閭銆佸鍚嶃�佽韩浠借瘉銆備絾濡傛灉鎮ㄤ笉鎻愪緵杩欎簺淇℃伅锛屽皢涓嶄細褰卞搷浣跨敤鏈湇鍔$殑鍩烘湰鍔熻兘銆�
+鎮ㄦ彁渚涚殑涓婅堪淇℃伅锛屽皢鍦ㄦ偍浣跨敤鏈湇鍔℃湡闂存寔缁巿鏉冩垜浠娇鐢ㄣ�傚湪鎮ㄦ敞閿�璐﹀彿鏃讹紝鎴戜滑灏嗗仠姝娇鐢ㄥ苟鍒犻櫎涓婅堪淇℃伅銆�
+涓婅堪淇℃伅灏嗗瓨鍌ㄤ簬涓崕浜烘皯鍏卞拰鍥藉鍐呫�傚闇�璺ㄥ浼犺緭锛屾垜浠皢浼氬崟鐙緛寰楁偍鐨勬巿鏉冨悓鎰忋��
+浜屻�佹垜浠浣曞叡浜�佽浆璁┿�佸叕寮�鎶湶鎮ㄧ殑涓汉淇℃伅
+锛堜竴锛夊叡浜�
+鎴戜滑涓嶄細鍚戝叾浠栦换浣曞叕鍙搞�佺粍缁囧拰涓汉鍒嗕韩鎮ㄧ殑涓汉淇℃伅锛屼絾浠ヤ笅鎯呭喌闄ゅ锛�
+1銆佸湪鑾峰彇鏄庣‘鍚屾剰鐨勬儏鍐典笅鍏变韩锛氳幏寰楁偍鐨勬槑纭悓鎰忓悗锛屾垜浠細涓庡叾浠栨柟鍏变韩鎮ㄧ殑涓汉淇℃伅銆�
+2銆佹垜浠彲鑳戒細鏍规嵁娉曞緥娉曡瑙勫畾锛屾垨鎸夋斂搴滀富绠¢儴闂ㄧ殑寮哄埗鎬ц姹傦紝瀵瑰鍏变韩鎮ㄧ殑涓汉淇℃伅銆�
+3銆佷笌鎴戜滑鐨勫叧鑱斿叕鍙稿叡浜細鎮ㄧ殑涓汉淇℃伅鍙兘浼氫笌鎴戜滑鍏宠仈鍏徃鍏变韩銆傛垜浠彧浼氬叡浜繀瑕佺殑涓汉淇℃伅锛屼笖鍙楁湰闅愮鏀跨瓥涓墍澹版槑鐩殑鐨勭害鏉熴�傚叧鑱斿叕鍙稿瑕佹敼鍙樹釜浜轰俊鎭殑澶勭悊鐩殑锛屽皢鍐嶆寰佹眰鎮ㄧ殑鎺堟潈鍚屾剰銆�
+4銆佷笌鎺堟潈鍚堜綔浼欎即鍏变韩锛氫粎涓哄疄鐜版湰闅愮鏉冩斂绛栦腑澹版槑鐨勭洰鐨勶紝鎴戜滑鐨勬煇浜涙湇鍔″皢鐢辨巿鏉冨悎浣滀紮浼存彁渚涖�傛垜浠彲鑳戒細涓庡悎浣滀紮浼村叡浜偍鐨勬煇浜涗釜浜轰俊鎭紝浠ユ彁渚涙洿濂界殑瀹㈡埛鏈嶅姟鍜岀敤鎴蜂綋楠屻�傚湪杩欑鎯呭喌涓嬶紝杩欎簺鍏徃 蹇呴』閬靛畧鎴戜滑鐨勬暟鎹殣绉佸拰瀹夊叏瑕佹眰銆傛垜浠粎浼氬嚭浜庡悎娉曘�佹褰撱�佸繀瑕併�佺壒瀹氥�佹槑纭殑鐩殑鍏变韩鎮ㄧ殑涓汉淇℃伅锛屽苟涓斿彧浼氬叡浜彁渚涙湇鍔℃墍蹇呰鐨勪釜浜轰俊鎭��
+瀵规垜浠笌涔嬪叡浜釜浜轰俊鎭殑鍏徃銆佺粍缁囧拰涓汉锛屾垜浠細涓庡叾绛剧讲涓ユ牸鐨勪繚瀵嗗崗瀹氾紝瑕佹眰浠栦滑鎸夌収鎴戜滑鐨勮鏄庛�佹湰闅愮鏀跨瓥浠ュ強鍏朵粬浠讳綍鐩稿叧鐨勪繚瀵嗗拰瀹夊叏鎺柦鏉ュ鐞嗕釜浜轰俊鎭��
+锛堜簩锛夎浆璁�
+鎴戜滑涓嶄細灏嗘偍鐨勪釜浜轰俊鎭浆璁╃粰浠讳綍鍏徃銆佺粍缁囧拰涓汉锛屼絾浠ヤ笅鎯呭喌闄ゅ锛�
+1銆佸湪鑾峰彇鏄庣‘鍚屾剰鐨勬儏鍐典笅杞锛氳幏寰楁偍鐨勬槑纭悓鎰忓悗锛屾垜浠細鍚戝叾浠栨柟杞鎮ㄧ殑涓汉淇℃伅锛�
+2銆佸湪娑夊強鍚堝苟銆佹敹璐垨鐮翠骇娓呯畻鏃讹紝濡傛秹鍙婂埌涓汉淇℃伅杞锛屾垜浠細鍦ㄨ姹傛柊鐨勬寔鏈夋偍涓汉淇℃伅鐨勫叕鍙搞�佺粍缁囩户缁彈姝ら殣绉佹斂绛栫殑绾︽潫锛屽惁鍒欐垜浠皢瑕佹眰璇ュ叕鍙搞�佺粍缁囬噸鏂板悜鎮ㄥ緛姹傛巿鏉冨悓鎰忋��
+锛堜笁锛夊叕寮�鎶湶
+鎴戜滑浠呬細鍦ㄤ互涓嬫儏鍐典笅锛屽叕寮�鎶湶鎮ㄧ殑涓汉淇℃伅锛�
+1銆佽幏寰楁偍鏄庣‘鍚屾剰鍚庯紱
+2銆佸熀浜庢硶寰嬬殑鎶湶锛氬湪娉曞緥銆佹硶寰嬬▼搴忋�佽瘔璁兼垨鏀垮簻涓荤閮ㄩ棬寮哄埗鎬ц姹傜殑鎯呭喌涓嬶紝鎴戜滑鍙兘浼氬叕寮�鎶湶鎮ㄧ殑涓汉淇℃伅銆�
+涓夈�佹垜浠浣曚繚鎶ゆ偍鐨勪釜浜轰俊鎭�
+锛堜竴锛夋垜浠凡浣跨敤绗﹀悎涓氱晫鏍囧噯鐨勫畨鍏ㄩ槻鎶ゆ帾鏂戒繚鎶ゆ偍鎻愪緵鐨勪釜浜轰俊鎭紝闃叉鏁版嵁閬埌鏈粡鎺堟潈璁块棶銆佸叕寮�鎶湶銆佷娇鐢ㄣ�佷慨鏀广�佹崯鍧忔垨涓㈠け銆傛垜浠細閲囧彇涓�鍒囧悎鐞嗗彲琛岀殑鎺柦锛屼繚鎶ゆ偍鐨勪釜浜轰俊鎭�備緥濡傦紝鍦ㄦ偍鐨勬祻瑙堝櫒涓庘�滄湇鍔♀�濅箣闂翠氦鎹㈡暟鎹紙濡備俊鐢ㄥ崱淇℃伅锛夋椂鍙� SSL 鍔犲瘑淇濇姢锛涙垜浠悓鏃跺鎴戜滑缃戠珯鎻愪緵 https 瀹夊叏娴忚鏂瑰紡锛涙垜浠細浣跨敤鍔犲瘑鎶�鏈‘淇濇暟鎹殑淇濆瘑鎬э紱鎴戜滑浼氫娇鐢ㄥ彈淇¤禆鐨勪繚鎶ゆ満鍒堕槻姝㈡暟鎹伃鍒版伓鎰忔敾鍑伙紱鎴戜滑浼氶儴缃茶闂帶鍒舵満鍒讹紝纭繚鍙湁鎺堟潈浜哄憳鎵嶅彲璁块棶涓汉淇℃伅锛涗互鍙婃垜浠細涓惧姙瀹夊叏鍜岄殣绉佷繚鎶ゅ煿璁绋嬶紝鍔犲己鍛樺伐瀵逛簬淇濇姢涓汉淇℃伅閲嶈鎬х殑璁よ瘑銆�
+锛堜簩锛夋垜浠細閲囧彇涓�鍒囧悎鐞嗗彲琛岀殑鎺柦锛岀‘淇濇湭鏀堕泦鏃犲叧鐨勪釜浜轰俊鎭�傛垜浠彧浼氬湪杈炬垚鏈斂绛栨墍杩扮洰鐨勬墍闇�鐨勬湡闄愬唴淇濈暀鎮ㄧ殑涓汉淇℃伅锛岄櫎闈為渶瑕佸欢闀夸繚鐣欐湡鎴栧彈鍒版硶寰嬬殑鍏佽銆�
+锛堜笁锛夋湰搴旂敤甯愬彿鍧囨湁瀹夊叏淇濇姢鍔熻兘锛岃濡ュ杽淇濈鎮ㄧ殑鐢ㄦ埛鍚嶅強瀵嗙爜淇℃伅銆傛湰搴旂敤灏嗛�氳繃瀵圭敤鎴峰瘑鐮佽繘琛屽姞瀵嗙瓑瀹夊叏鎺柦纭繚鎮ㄧ殑淇℃伅涓嶄涪澶憋紝涓嶈婊ョ敤鍜屽彉閫犮�傚敖绠℃湁鍓嶈堪瀹夊叏鎺柦锛屼絾鍚屾椂涔熻鎮ㄦ敞鎰忓湪淇℃伅缃戠粶涓婁笉瀛樺湪鈥滃畬鍠勭殑瀹夊叏鎺柦鈥濄��
+鍦ㄤ娇鐢ㄦ湰搴旂敤缃戠粶鏈嶅姟杩涜缃戜笂浜ゆ槗鏃讹紝鎮ㄤ笉鍙伩鍏嶇殑瑕佸悜浜ゆ槗瀵规柟鎴栨綔鍦ㄧ殑浜ゆ槗瀵规柟鎶湶鑷繁鐨勪釜浜轰俊鎭紝 濡傝仈缁滄柟寮忔垨鑰呴偖鏀垮湴鍧�銆傝鎮ㄥΕ鍠勪繚鎶よ嚜宸辩殑涓汉淇℃伅锛屼粎鍦ㄥ繀瑕佺殑鎯呭舰涓嬪悜浠栦汉鎻愪緵銆� 濡傛偍鍙戠幇鑷繁鐨勪釜浜轰俊鎭硠瀵嗭紝灏ゅ叾鏄湰搴旂敤鐢ㄦ埛鍚嶅強瀵嗙爜鍙戠敓娉勯湶锛岃鎮ㄧ珛鍗宠仈缁滄湰搴旂敤瀹㈡湇锛屼互渚挎湰搴旂敤閲囧彇鐩稿簲鎺柦銆�
+锛堝洓锛変簰鑱旂綉鐜骞堕潪鐧惧垎涔嬬櫨瀹夊叏锛屾垜浠皢灏藉姏纭繚鎴栨媴淇濇偍鍙戦�佺粰鎴戜滑鐨勪换浣曚俊鎭殑瀹夊叏鎬с�傚鏋滄垜浠殑鐗╃悊銆佹妧鏈�佹垨绠$悊闃叉姢璁炬柦閬埌鐮村潖锛屽鑷翠俊鎭闈炴巿鏉冭闂�佸叕寮�鎶湶銆佺鏀广�佹垨姣佸潖锛屽鑷存偍鐨勫悎娉曟潈鐩婂彈鎹燂紝鎴戜滑灏嗘壙鎷呯浉搴旂殑娉曞緥璐d换銆�
+锛堜簲锛夊湪涓嶅垢鍙戠敓涓汉淇℃伅瀹夊叏浜嬩欢鍚庯紝鎴戜滑灏嗘寜鐓ф硶寰嬫硶瑙勭殑瑕佹眰锛屽強鏃跺悜鎮ㄥ憡鐭ワ細瀹夊叏浜嬩欢鐨勫熀鏈儏鍐靛拰鍙兘鐨勫奖鍝嶃�佹垜浠凡閲囧彇鎴栧皢瑕侀噰鍙栫殑澶勭疆鎺柦銆佹偍鍙嚜涓婚槻鑼冨拰闄嶄綆椋庨櫓鐨勫缓璁�佸鎮ㄧ殑琛ユ晳鎺柦绛夈�傛垜浠皢鍙婃椂灏嗕簨浠剁浉鍏虫儏鍐典互閭欢銆佷俊鍑姐�佺數璇濄�佹帹閫侀�氱煡绛夋柟寮忓憡鐭ユ偍锛岄毦浠ラ�愪竴鍛婄煡涓汉淇℃伅涓讳綋鏃讹紝鎴戜滑浼氶噰鍙栧悎鐞嗐�佹湁鏁堢殑鏂瑰紡鍙戝竷鍏憡銆�
+鍚屾椂锛屾垜浠繕灏嗘寜鐓х洃绠¢儴闂ㄨ姹傦紝涓诲姩涓婃姤涓汉淇℃伅瀹夊叏浜嬩欢鐨勫缃儏鍐点��
+鍥涖�佹偍鐨勬潈鍒�
+鎸夌収涓浗鐩稿叧鐨勬硶寰嬨�佹硶瑙勩�佹爣鍑嗭紝浠ュ強鍏朵粬鍥藉銆佸湴鍖虹殑閫氳鍋氭硶锛屾垜浠繚闅滄偍瀵硅嚜宸辩殑涓汉淇℃伅琛屼娇浠ヤ笅鏉冨埄锛�
+锛堜竴锛夎闂偍鐨勪釜浜轰俊鎭�
+鎮ㄦ湁鏉冭闂偍鐨勪釜浜轰俊鎭紝娉曞緥娉曡瑙勫畾鐨勪緥澶栨儏鍐甸櫎澶栥�傚鏋滄偍鎯宠浣挎暟鎹闂潈锛屽彲浠ラ�氳繃浠ヤ笅鏂瑰紡鑷璁块棶锛�
+璐︽埛淇℃伅鈥斺�斿鏋滄偍甯屾湜璁块棶鎴栫紪杈戞偍鐨勮处鎴蜂腑鐨勪釜浜鸿祫鏂欎俊鎭拰鏀粯淇℃伅銆佹洿鏀规偍鐨勫瘑鐮併�佹坊鍔犲畨鍏ㄤ俊鎭垨鍏抽棴鎮ㄧ殑璐︽埛绛夛紝鎮ㄥ彲浠ュ湪鎴戜滑鐨勫簲鐢ㄤ腑鎵ц姝ょ被鎿嶄綔銆�
+鎼滅储淇℃伅鈥斺�旀偍鍙互鍦ㄦ垜浠殑搴旂敤涓闂垨娓呴櫎鎮ㄧ殑鎼滅储鍘嗗彶璁板綍銆佹煡鐪嬪拰淇敼鍏磋叮浠ュ強绠$悊鍏朵粬鏁版嵁銆�
+濡傛灉鎮ㄦ棤娉曢�氳繃涓婅堪鏂瑰紡璁块棶杩欎簺涓汉淇℃伅锛屾偍鍙互闅忔椂鑱旂郴鎴戜滑鐨勫鏈嶄汉鍛樸�傛垜浠皢鍦ㄧ涓�鏃堕棿鍥炲鎮ㄧ殑璁块棶璇锋眰銆�
+瀵逛簬鎮ㄥ湪浣跨敤鎴戜滑鐨勪骇鍝佹垨鏈嶅姟杩囩▼涓骇鐢熺殑鍏朵粬涓汉淇℃伅锛屽彧瑕佹垜浠笉闇�瑕佽繃澶氭姇鍏ワ紝鎴戜滑浼氬悜鎮ㄦ彁渚涖��
+锛堜簩锛夋洿姝f偍鐨勪釜浜轰俊鎭�
+褰撴偍鍙戠幇鎴戜滑澶勭悊鐨勫叧浜庢偍鐨勪釜浜轰俊鎭湁閿欒鏃讹紝鎮ㄦ湁鏉冭姹傛垜浠仛鍑烘洿姝c�傛偍鍙互閫氳繃鈥滆闂偍鐨勪釜浜轰俊鎭�濅腑缃楀垪鐨勬柟寮忔彁鍑烘洿姝g敵璇枫��
+濡傛灉鎮ㄦ棤娉曢�氳繃涓婅堪鏂瑰紡璁块棶杩欎簺涓汉淇℃伅锛屾偍鍙互闅忔椂鑱旂郴鎴戜滑鐨勫鏈嶄汉鍛樸�傛垜浠皢鍦ㄧ涓�鏃堕棿鍥炲鎮ㄧ殑璁块棶璇锋眰銆�
+锛堜笁锛夊垹闄ゆ偍鐨勪釜浜轰俊鎭�
+鍦ㄤ互涓嬫儏褰腑锛屾偍鍙互鍚戞垜浠彁鍑哄垹闄や釜浜轰俊鎭殑璇锋眰锛�
+1銆佸鏋滄垜浠鐞嗕釜浜轰俊鎭殑琛屼负杩濆弽娉曞緥娉曡锛�
+2銆佸鏋滄垜浠敹闆嗐�佷娇鐢ㄦ偍鐨勪釜浜轰俊鎭紝鍗存湭寰佸緱鎮ㄧ殑鍚屾剰锛�
+3銆佸鏋滄垜浠鐞嗕釜浜轰俊鎭殑琛屼负杩濆弽浜嗕笌鎮ㄧ殑绾﹀畾锛�
+4銆佸鏋滄偍涓嶅啀浣跨敤鎴戜滑鐨勪骇鍝佹垨鏈嶅姟锛屾垨鎮ㄦ敞閿�浜嗚处鍙凤紱
+5銆佸鏋滄垜浠笉鍐嶄负鎮ㄦ彁渚涗骇鍝佹垨鏈嶅姟銆�
+鑻ユ垜浠喅瀹氬搷搴旀偍鐨勫垹闄よ姹傦紝鎴戜滑杩樺皢鍚屾椂閫氱煡浠庢垜浠幏寰楁偍鐨勪釜浜轰俊鎭殑瀹炰綋锛岃姹傚叾鍙婃椂鍒犻櫎锛岄櫎闈炴硶寰嬫硶瑙勫彟鏈夎瀹氾紝鎴栬繖浜涘疄浣撹幏寰楁偍鐨勭嫭绔嬫巿鏉冦��
+褰撴偍浠庢垜浠殑鏈嶅姟涓垹闄や俊鎭悗锛屾垜浠彲鑳戒笉浼氱珛鍗冲浠界郴缁熶腑鍒犻櫎鐩稿簲鐨勪俊鎭紝浣嗕細鍦ㄥ浠芥洿鏂版椂鍒犻櫎杩欎簺淇℃伅銆�
+锛堝洓锛変釜浜轰俊鎭富浣撴敞閿�璐︽埛
+鎮ㄩ殢鏃跺彲娉ㄩ攢姝ゅ墠娉ㄥ唽鐨勮处鎴凤紝鍦ㄦ敞閿�璐︽埛涔嬪悗锛屾垜浠皢鍋滄涓烘偍鎻愪緵浜у搧鎴栨湇鍔★紝骞朵緷鎹偍鐨勮姹傦紝鍒犻櫎鎮ㄧ殑涓汉淇℃伅锛屾硶寰嬫硶瑙勫彟鏈夎瀹氱殑闄ゅ銆�
+锛堜簲锛夌害鏉熶俊鎭郴缁熻嚜鍔ㄥ喅绛�
+鍦ㄦ煇浜涗笟鍔″姛鑳戒腑锛屾垜浠彲鑳戒粎渚濇嵁淇℃伅绯荤粺銆佺畻娉曠瓑鍦ㄥ唴鐨勯潪浜哄伐鑷姩鍐崇瓥鏈哄埗鍋氬嚭鍐冲畾銆傚鏋滆繖浜涘喅瀹氭樉钁楀奖鍝嶆偍鐨勫悎娉曟潈鐩婏紝鎮ㄦ湁鏉冭姹傛垜浠仛鍑鸿В閲婏紝鎴戜滑涔熷皢鎻愪緵閫傚綋鐨勬晳娴庢柟寮忋��
+锛堝叚锛夊搷搴旀偍鐨勪笂杩拌姹�
+涓轰繚闅滃畨鍏紝鎮ㄥ彲鑳介渶瑕佹彁渚涗功闈㈣姹傦紝鎴栦互鍏朵粬鏂瑰紡璇佹槑鎮ㄧ殑韬唤銆傛垜浠彲鑳戒細鍏堣姹傛偍楠岃瘉鑷繁鐨勮韩浠斤紝鐒跺悗鍐嶅鐞嗘偍鐨勮姹傘��
+鎴戜滑灏嗗湪涓冨ぉ鍐呭仛鍑虹瓟澶嶃�傚鎮ㄤ笉婊℃剰锛岃繕鍙互鎵惧埌鎴戜滑鐨勫鏈嶄汉鍛樿繘琛屾姇璇夈��
+瀵逛簬鎮ㄥ悎鐞嗙殑璇锋眰锛屾垜浠師鍒欎笂涓嶆敹鍙栬垂鐢紝浣嗗澶氭閲嶅銆佽秴鍑哄悎鐞嗛檺搴︾殑璇锋眰锛屾垜浠皢瑙嗘儏鏀跺彇涓�瀹氭垚鏈垂鐢ㄣ�傚浜庨偅浜涙棤绔噸澶嶃�侀渶瑕佽繃澶氭妧鏈墜娈碉紙渚嬪锛岄渶瑕佸紑鍙戞柊绯荤粺鎴栦粠鏍规湰涓婃敼鍙樼幇琛屾儻渚嬶級銆佺粰浠栦汉鍚堟硶鏉冪泭甯︽潵椋庨櫓鎴栬�呴潪甯镐笉鍒囧疄闄咃紙渚嬪锛屾秹鍙婂浠界甯︿笂瀛樻斁鐨勪俊鎭級鐨勮姹傦紝鎴戜滑鍙兘浼氫簣浠ユ嫆缁濄��
+鍦ㄤ互涓嬫儏褰腑锛屾寜鐓ф硶寰嬫硶瑙勮姹傦紝鎴戜滑灏嗘棤娉曞搷搴旀偍鐨勮姹傦細
+1銆佷笌鍥藉瀹夊叏銆佸浗闃插畨鍏ㄦ湁鍏崇殑锛�
+2銆佷笌鍏叡瀹夊叏銆佸叕鍏卞崼鐢熴�侀噸澶у叕鍏卞埄鐩婃湁鍏崇殑锛�
+3銆佷笌鐘姜渚︽煡銆佽捣璇夊拰瀹″垽绛夋湁鍏崇殑锛�
+4銆佹湁鍏呭垎璇佹嵁琛ㄦ槑鎮ㄥ瓨鍦ㄤ富瑙傛伓鎰忔垨婊ョ敤鏉冨埄鐨勶紱
+5銆佸搷搴旀偍鐨勮姹傚皢瀵艰嚧鎮ㄦ垨鍏朵粬涓汉銆佺粍缁囩殑鍚堟硶鏉冪泭鍙楀埌涓ラ噸鎹熷鐨勩��
+浜斻�佹垜浠浣曞鐞嗗効绔ョ殑涓汉淇℃伅
+鎴戜滑鐨勪骇鍝併�佺綉绔欏拰鏈嶅姟涓昏闈㈠悜鎴愪汉銆傚鏋滄病鏈夌埗姣嶆垨鐩戞姢浜虹殑鍚屾剰锛屽効绔ヤ笉寰楀垱寤鸿嚜宸辩殑鐢ㄦ埛璐︽埛銆�
+瀵逛簬缁忕埗姣嶅悓鎰忚�屾敹闆嗗効绔ヤ釜浜轰俊鎭殑鎯呭喌锛屾垜浠彧浼氬湪鍙楀埌娉曞緥鍏佽銆佺埗姣嶆垨鐩戞姢浜烘槑纭悓鎰忔垨鑰呬繚鎶ゅ効绔ユ墍蹇呰鐨勬儏鍐典笅浣跨敤鎴栧叕寮�鎶湶姝や俊鎭��
+灏界褰撳湴娉曞緥鍜屼範淇楀鍎跨鐨勫畾涔変笉鍚岋紝浣嗘垜浠皢涓嶆弧 14 鍛ㄥ瞾鐨勪换浣曚汉鍧囪涓哄効绔ャ��
+濡傛灉鎴戜滑鍙戠幇鑷繁鍦ㄦ湭浜嬪厛鑾峰緱鍙瘉瀹炵殑鐖舵瘝鍚屾剰鐨勬儏鍐典笅鏀堕泦浜嗗効绔ョ殑涓汉淇℃伅锛屽垯浼氳娉曞敖蹇垹闄ょ浉鍏虫暟鎹��
+鍏�佹偍鐨勪釜浜轰俊鎭浣曞湪鍏ㄧ悆鑼冨洿杞Щ
+鍘熷垯涓婏紝鎴戜滑鍦ㄤ腑鍗庝汉姘戝叡鍜屽浗澧冨唴鏀堕泦鍜屼骇鐢熺殑涓汉淇℃伅锛屽皢瀛樺偍鍦ㄤ腑鍗庝汉姘戝叡鍜屽浗澧冨唴銆�
+鐢变簬鎴戜滑閫氳繃閬嶅竷鍏ㄧ悆鐨勮祫婧愬拰鏈嶅姟鍣ㄦ彁渚涗骇鍝佹垨鏈嶅姟锛岃繖鎰忓懗鐫�锛屽湪鑾峰緱鎮ㄧ殑鎺堟潈鍚屾剰鍚庯紝鎮ㄧ殑涓汉淇℃伅鍙兘浼氳杞Щ鍒版偍浣跨敤浜у搧鎴栨湇鍔℃墍鍦ㄥ浗瀹�/鍦板尯鐨勫澶栫杈栧尯锛屾垨鑰呭彈鍒版潵鑷繖浜涚杈栧尯鐨勮闂��
+姝ょ被绠¤緰鍖哄彲鑳借鏈変笉鍚岀殑鏁版嵁淇濇姢娉曪紝鐢氳嚦鏈绔嬬浉鍏虫硶寰嬨�傚湪姝ょ被鎯呭喌涓嬶紝鎴戜滑浼氱‘淇濇偍鐨勪釜浜轰俊鎭緱鍒板湪涓崕浜烘皯鍏卞拰鍥藉鍐呰冻澶熷悓绛夌殑淇濇姢銆備緥濡傦紝鎴戜滑浼氳姹傛偍瀵硅法澧冭浆绉讳釜浜轰俊鎭殑鍚屾剰锛屾垨鑰呭湪璺ㄥ鏁版嵁杞Щ涔嬪墠瀹炴柦鏁版嵁鍘绘爣璇嗗寲绛夊畨鍏ㄤ妇鎺��
+涓冦�佹湰闅愮鏉冩斂绛栧浣曟洿鏂�
+鎴戜滑鍙兘閫傛椂浼氬鏈殣绉佹潈鏀跨瓥杩涜璋冩暣鎴栧彉鏇达紝鏈殣绉佹潈鏀跨瓥鐨勪换浣曟洿鏂板皢浠ユ爣娉ㄦ洿鏂版椂闂寸殑鏂瑰紡鍏竷鍦ㄦ垜浠綉绔欎笂锛岄櫎娉曞緥娉曡鎴栫洃绠¤瀹氬彟鏈夊己鍒舵�ц瀹氬锛岀粡璋冩暣鎴栧彉鏇寸殑鍐呭涓�缁忛�氱煡鎴栧叕甯冨悗鐨�7鏃ュ悗鐢熸晥銆傚鎮ㄥ湪闅愮鏉冩斂绛栬皟鏁存垨鍙樻洿鍚庣户缁娇鐢ㄦ垜浠彁渚涚殑浠讳竴鏈嶅姟鎴栬闂垜浠浉鍏崇綉绔欑殑锛屾垜浠浉淇¤繖浠h〃鎮ㄥ凡鍏呭垎闃呰銆佺悊瑙e苟鎺ュ彈淇敼鍚庣殑闅愮鏉冩斂绛栧苟鍙楀叾绾︽潫銆�
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/Root.plist b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/Root.plist
new file mode 100644
index 0000000..b1b6fea
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/Root.plist
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>StringsTable</key>
+ <string>Root</string>
+ <key>PreferenceSpecifiers</key>
+ <array>
+ <dict>
+ <key>Type</key>
+ <string>PSGroupSpecifier</string>
+ <key>Title</key>
+ <string>Group</string>
+ </dict>
+ <dict>
+ <key>Type</key>
+ <string>PSTextFieldSpecifier</string>
+ <key>Title</key>
+ <string>Name</string>
+ <key>Key</key>
+ <string>name_preference</string>
+ <key>DefaultValue</key>
+ <string></string>
+ <key>IsSecure</key>
+ <false/>
+ <key>KeyboardType</key>
+ <string>Alphabet</string>
+ <key>AutocapitalizationType</key>
+ <string>None</string>
+ <key>AutocorrectionType</key>
+ <string>No</string>
+ </dict>
+ <dict>
+ <key>Type</key>
+ <string>PSToggleSwitchSpecifier</string>
+ <key>Title</key>
+ <string>Enabled</string>
+ <key>Key</key>
+ <string>enabled_preference</string>
+ <key>DefaultValue</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>Type</key>
+ <string>PSSliderSpecifier</string>
+ <key>Key</key>
+ <string>slider_preference</string>
+ <key>DefaultValue</key>
+ <real>0.5</real>
+ <key>MinimumValue</key>
+ <integer>0</integer>
+ <key>MaximumValue</key>
+ <integer>1</integer>
+ <key>MinimumValueImage</key>
+ <string></string>
+ <key>MaximumValueImage</key>
+ <string></string>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQingConfig.plist b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQingConfig.plist
new file mode 100644
index 0000000..8f0fc01
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQingConfig.plist
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>APPID</key>
+ <string>1075</string>
+ <key>SID</key>
+ <string>59</string>
+</dict>
+</plist>
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_BG.png b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_BG.png
new file mode 100644
index 0000000..7e39020
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_BG.png
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Back_Icon.png b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Back_Icon.png
new file mode 100755
index 0000000..39706ed
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Back_Icon.png
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Close_Icon.png b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Close_Icon.png
new file mode 100755
index 0000000..1558aa1
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_Close_Icon.png
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_NormalBtn_icon@2x.png b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_NormalBtn_icon@2x.png
new file mode 100755
index 0000000..25cda3d
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_NormalBtn_icon@2x.png
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_seletedBtn_icon@2x.png b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_seletedBtn_icon@2x.png
new file mode 100755
index 0000000..880ae33
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/TianQing_seletedBtn_icon@2x.png
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/en.lproj/Root.strings b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/en.lproj/Root.strings
new file mode 100644
index 0000000..8cd87b9
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/en.lproj/Root.strings
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/userIcon.png b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/userIcon.png
new file mode 100644
index 0000000..9e54c72
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/TianQingResource.bundle/userIcon.png
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingHeader.h b/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingHeader.h
new file mode 100644
index 0000000..7402306
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingHeader.h
@@ -0,0 +1,48 @@
+//
+// TianQingHeader.h
+// TianQingSDK
+//
+// Created by lllll-xy on 18/3/28.
+// Copyright 漏 2018骞� lllll-xy. All rights reserved.
+//
+
+#ifndef TianQingHeader_h
+#define TianQingHeader_h
+
+@class TianQingUserAccount;
+
+typedef NS_ENUM(NSUInteger, TianQingToolStatus) {
+ AMGEL_FAIL = 0,
+ TianQing_SUCCESS,
+ TianQing_CANCEL,
+ TianQing_UNKNOW,
+};
+
+@protocol TianQingDelegate <NSObject>
+
+@optional
+
+/*
+ @brief SDK鐧诲綍鍥炶皟浜嬩欢
+ @param result 鐧诲綍缁撴灉
+ @param model 鐧诲綍鎴愬姛淇℃伅鎴栬�呭け璐ヤ俊鎭�
+ */
+- (void)accountLoginResult:(TianQingToolStatus)result User:(TianQingUserAccount *)model;
+
+/*
+ @brief 鑻规灉鏀粯鍥炶皟浜嬩欢
+ @param result 鏀粯鐘舵��
+ @param model 鏀粯杩斿洖鐨勪俊鎭� NSString淇℃伅 濡傛灉鎶ラ敊涔熸槸鑼冨洿NSString淇℃伅
+ */
+- (void)appstoreResult:(TianQingToolStatus)result data:(id)data;
+
+/*
+ @brief 娉ㄥ唽宸ュ叿杩斿洖淇℃伅
+ @param result 褰撳墠鐘舵��
+ @param model 杩斿洖缁撴灉Nsstring 鎴愬姛涓簄il
+ */
+- (void)toolResult:(TianQingToolStatus)result data:(id)data;
+
+@end
+
+#endif /* TianQingHeader_h */
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingSDK.h b/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingSDK.h
new file mode 100644
index 0000000..289da88
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingSDK.h
@@ -0,0 +1,74 @@
+//
+// TianQingSDK.h
+// TianQingSDK
+//
+// Created by lllll-xy on 18/1/30.
+// Copyright 漏 2018骞� lllll-xy. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "TianQingHeader.h"
+
+typedef enum
+{
+ TianQingInitErrorCodeNone = 0, //鍒濆鍖栨垚鍔�
+ TianQingInitErrorCodeNet = 1, //缃戠粶寮傚父
+ TianQingInitErrorCodeConig = 2, //appid閰嶇疆閿欒
+ TianQingInitErrorCodeUpdating = 3 //娓告垙鏇存柊涓�
+}TianQingInitErrorCode;
+
+typedef enum
+{
+ TianQingSuccess = 0, //鎴愬姛
+ TianQingFail = 1, //澶辫触
+
+}TianQingStatus;
+
+typedef void (^TianQingInitErrorCodeBlock)(TianQingInitErrorCode result);
+typedef void (^TianQingStatusBlock)(TianQingStatus result);
+
+@interface TianQingSDK : NSObject
+
+@property (strong,nonatomic,readonly)NSString *APPID;
+@property (assign,nonatomic)BOOL show;
+
++ (TianQingSDK *)defaultTianQing;
+
+/*
+ @brief SDK鍥炶皟浜嬩欢璁剧疆鎺ュ彛
+ @param delegate 鍥炶皟鏃堕棿鐨勮瀵熻��,寤鸿浣跨敤鍏ㄥ眬鍙橀噺浣滀负鍙傛暟
+ */
++ (void)setDelegate:(id<TianQingDelegate>)delegate;
+
+/*
+ @brief SDK搴旂敤鍒濆鍖栧嚱鏁�,寮傛鍑芥暟锛宺esult 0琛ㄧず鎴愬姛锛�1琛ㄧず缃戠粶寮傚父锛�2琛ㄧずappid銆乻ecret閿欒
+ @param appid 鐢宠鐨凙PPID
+ */
+- (void)TianQingSDKInitWithAPPID:(NSString *)appid Completion:(TianQingInitErrorCodeBlock)completion;
+
+- (void)TianQingUploadLoacationWithLatitude:(NSString*)latitude longitude:(NSString*)longitude Completion:(TianQingStatusBlock)completion;
+
+- (void)tool:(NSString *)LLSerialNumber andWithLLItemID:(NSString *)LLItemID andWithLLItemP:(NSInteger)LLItemP andWithLLReserved:(NSString *)LLReserved andWithLLDesc:(NSString *)LLDesc;
+
+- (void)TianQingUserInfo:(NSDictionary *)info;
+
+- (void)setInfo:(id)info;
+
+/*
+ @breif 璋冪敤鐧诲綍, 鐧诲綍缁撴灉浼氫互閫氱煡褰㈠紡杩斿洖锛岃嫢鐧诲綍鎴愬姛锛屽皢鑷姩閫�鍑虹櫥褰曢〉闈�
+ @param view 褰撳墠view 鍙~nil
+ @return 杩斿洖00杩涘叆sdk鐧诲綍鐣岄潰锛� 闈�0琛ㄧずsdk鐧诲綍鐜寮傚父
+ */
+- (int)TianQingLoginInView:(UIView *)view;
+
+/*
+ @brief 鍒ゆ柇鏄惁宸茬櫥褰曞苟涓旀湁鏁�
+ */
+- (BOOL)isLogined;
+
+/*
+ @brief 娉ㄩ攢锛屽悓姝ユ柟娉�
+ */
+- (void)LLLogout;
+
+@end
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingUserAccount.h b/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingUserAccount.h
new file mode 100644
index 0000000..8d21d6b
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/include/TianQingSDK/TianQingUserAccount.h
@@ -0,0 +1,19 @@
+//
+// TianQingUserAccount.h
+// TianQingSDK
+//
+// Created by lllll-xy on 18/4/4.
+// Copyright 漏 2018骞� lllll-xy. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface TianQingUserAccount : NSObject
+
+@property (nonatomic,copy) NSString *accountToken;
+
+@property (nonatomic,copy) NSString *accountUid;
+
+@property (nonatomic,copy) NSString *errorMsg;
+
+@end
diff --git a/ChannelDiff/iOS/jisusnyjjios/SDK/libTianQingSDK.a b/ChannelDiff/iOS/jisusnyjjios/SDK/libTianQingSDK.a
new file mode 100644
index 0000000..aafeff2
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/SDK/libTianQingSDK.a
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/JPUSHService.h b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/JPUSHService.h
new file mode 100644
index 0000000..c2b057f
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/JPUSHService.h
@@ -0,0 +1,608 @@
+/*
+ * | | | | \ \ / / | | | | / _______|
+ * | |____| | \ \/ / | |____| | / /
+ * | |____| | \ / | |____| | | | _____
+ * | | | | / \ | | | | | | |____ |
+ * | | | | / /\ \ | | | | \ \______| |
+ * | | | | /_/ \_\ | | | | \_________|
+ *
+ * Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
+ */
+
+#define JPUSH_VERSION_NUMBER 3.0.9
+
+#import <Foundation/Foundation.h>
+
+@class CLRegion;
+@class UILocalNotification;
+@class CLLocation;
+@class UNNotificationCategory;
+@class UNNotificationSettings;
+@class UNNotificationRequest;
+@class UNNotification;
+@protocol JPUSHRegisterDelegate;
+
+typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq);
+typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind);
+typedef void (^JPUSHAliasOperationCompletion)(NSInteger iResCode, NSString *iAlias, NSInteger seq);
+
+extern NSString *const kJPFNetworkIsConnectingNotification; // 姝e湪杩炴帴涓�
+extern NSString *const kJPFNetworkDidSetupNotification; // 寤虹珛杩炴帴
+extern NSString *const kJPFNetworkDidCloseNotification; // 鍏抽棴杩炴帴
+extern NSString *const kJPFNetworkDidRegisterNotification; // 娉ㄥ唽鎴愬姛
+extern NSString *const kJPFNetworkFailedRegisterNotification; //娉ㄥ唽澶辫触
+extern NSString *const kJPFNetworkDidLoginNotification; // 鐧诲綍鎴愬姛
+extern NSString *const kJPFNetworkDidReceiveMessageNotification; // 鏀跺埌娑堟伅(闈濧PNS)
+extern NSString *const kJPFServiceErrorNotification; // 閿欒鎻愮ず
+
+typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
+ JPAuthorizationOptionNone = 0, // the application may not present any UI upon a notification being received
+ JPAuthorizationOptionBadge = (1 << 0), // the application may badge its icon upon a notification being received
+ JPAuthorizationOptionSound = (1 << 1), // the application may play a sound upon a notification being received
+ JPAuthorizationOptionAlert = (1 << 2), // the application may display an alert upon a notification being received
+};
+
+/*!
+ * 閫氱煡娉ㄥ唽瀹炰綋绫�
+ */
+@interface JPUSHRegisterEntity : NSObject
+
+/*!
+ * 鏀寔鐨勭被鍨�
+ * badge,sound,alert
+ */
+@property (nonatomic, assign) NSInteger types;
+/*!
+ * 娉ㄥ叆鐨勭被鍒�
+ * iOS10 UNNotificationCategory
+ * iOS8-iOS9 UIUserNotificationCategory
+ */
+@property (nonatomic, strong) NSSet *categories;
+@end
+
+/*!
+ * 杩涜鍒犻櫎銆佹煡鎵炬帹閫佸疄浣撶被
+ */
+@interface JPushNotificationIdentifier : NSObject<NSCopying, NSCoding>
+
+@property (nonatomic, copy) NSArray<NSString *> *identifiers; // 鎺ㄩ�佺殑鏍囪瘑鏁扮粍
+@property (nonatomic, copy) UILocalNotification *notificationObj NS_DEPRECATED_IOS(4_0, 10_0); // iOS10浠ヤ笅鍙互浼燯ILocalNotification瀵硅薄鏁版嵁锛宨OS10浠ヤ笂鏃犳晥
+@property (nonatomic, assign) BOOL delivered NS_AVAILABLE_IOS(10_0); // 鍦ㄩ�氱煡涓績鏄剧ず鐨勬垨寰呮帹閫佺殑鏍囧織锛岄粯璁や负NO锛孻ES琛ㄧず鍦ㄩ�氱煡涓績鏄剧ず鐨勶紝NO琛ㄧず寰呮帹閫佺殑
+@property (nonatomic, copy) void (^findCompletionHandler)(NSArray *results); // 鐢ㄤ簬鏌ヨ鍥炶皟锛岃皟鐢╗findNotification:]鏂规硶鍓嶅繀椤昏缃紝results涓鸿繑鍥炵浉搴斿璞℃暟缁勶紝iOS10浠ヤ笅杩斿洖UILocalNotification瀵硅薄鏁扮粍锛沬OS10浠ヤ笂鏍规嵁delivered浼犲叆鍊艰繑鍥濽NNotification鎴朥NNotificationRequest瀵硅薄鏁扮粍锛坉elivered浼犲叆YES锛屽垯杩斿洖UNNotification瀵硅薄鏁扮粍锛屽惁鍒欒繑鍥濽NNotificationRequest瀵硅薄鏁扮粍锛�
+
+@end
+
+/*!
+ * 鎺ㄩ�佸唴瀹瑰疄浣撶被
+ */
+@interface JPushNotificationContent : NSObject<NSCopying, NSCoding>
+
+@property (nonatomic, copy) NSString *title; // 鎺ㄩ�佹爣棰�
+@property (nonatomic, copy) NSString *subtitle; // 鎺ㄩ�佸壇鏍囬
+@property (nonatomic, copy) NSString *body; // 鎺ㄩ�佸唴瀹�
+@property (nonatomic, copy) NSNumber *badge; // 瑙掓爣鐨勬暟瀛椼�傚鏋滀笉闇�瑕佹敼鍙樿鏍囦紶@(-1)
+@property (nonatomic, copy) NSString *action NS_DEPRECATED_IOS(8_0, 10_0); // 寮规鐨勬寜閽樉绀虹殑鍐呭锛圛OS 8榛樿涓�"鎵撳紑", 鍏朵粬榛樿涓�"鍚姩",iOS10浠ヤ笂鏃犳晥锛�
+@property (nonatomic, copy) NSString *categoryIdentifier; // 琛屼负鍒嗙被鏍囪瘑
+@property (nonatomic, copy) NSDictionary *userInfo; // 鏈湴鎺ㄩ�佹椂鍙互璁剧疆userInfo鏉ュ鍔犻檮鍔犱俊鎭紝杩滅▼鎺ㄩ�佹椂璁剧疆鐨刾ayload鎺ㄩ�佸唴瀹逛綔涓烘userInfo
+@property (nonatomic, copy) NSString *sound; // 澹伴煶鍚嶇О锛屼笉璁剧疆鍒欎负榛樿澹伴煶
+@property (nonatomic, copy) NSArray *attachments NS_AVAILABLE_IOS(10_0); // 闄勪欢锛宨OS10浠ヤ笂鏈夋晥锛岄渶瑕佷紶鍏NNotificationAttachment瀵硅薄鏁扮粍绫诲瀷
+@property (nonatomic, copy) NSString *threadIdentifier NS_AVAILABLE_IOS(10_0); // 绾跨▼鎴栦笌鎺ㄩ�佽姹傜浉鍏冲璇濈殑鏍囪瘑锛宨OS10浠ヤ笂鏈夋晥锛屽彲鐢ㄦ潵瀵规帹閫佽繘琛屽垎缁�
+@property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 鍚姩鍥剧墖鍚嶏紝iOS10浠ヤ笂鏈夋晥锛屼粠鎺ㄩ�佸惎鍔ㄦ椂灏嗕細鐢ㄥ埌
+
+@end
+
+/*!
+ * 鎺ㄩ�佽Е鍙戞柟寮忓疄浣撶被
+ * 娉細dateComponents銆乼imeInterval銆乺egion鍦╥OS10浠ヤ笂鍙�夋嫨鍏朵腑涓�涓弬鏁颁紶鍏ユ湁鏁堝�硷紝濡傛灉鍚屾椂浼犲叆鍊间細鏍规嵁浼樺厛绾銆両I銆両II浣垮叾涓竴绉嶈Е鍙戞柟寮忕敓鏁堬紝fireDate涓篿OS10浠ヤ笅鏍规嵁鏃堕棿瑙﹀彂鏃堕』浼犲叆鐨勫弬鏁�
+ */
+@interface JPushNotificationTrigger : NSObject<NSCopying, NSCoding>
+
+@property (nonatomic, assign) BOOL repeat; // 璁剧疆鏄惁閲嶅锛岄粯璁や负NO
+@property (nonatomic, copy) NSDate *fireDate NS_DEPRECATED_IOS(2_0, 10_0); // 鐢ㄦ潵璁剧疆瑙﹀彂鎺ㄩ�佺殑鏃堕棿锛宨OS10浠ヤ笂鏃犳晥
+@property (nonatomic, copy) CLRegion *region NS_AVAILABLE_IOS(8_0); // 鐢ㄦ潵璁剧疆瑙﹀彂鎺ㄩ�佺殑浣嶇疆锛宨OS8浠ヤ笂鏈夋晥锛宨OS10浠ヤ笂浼樺厛绾т负I锛屽簲鐢ㄩ渶瑕佹湁鍏佽浣跨敤瀹氫綅鐨勬巿鏉�
+@property (nonatomic, copy) NSDateComponents *dateComponents NS_AVAILABLE_IOS(10_0); // 鐢ㄦ潵璁剧疆瑙﹀彂鎺ㄩ�佺殑鏃ユ湡鏃堕棿锛宨OS10浠ヤ笂鏈夋晥锛屼紭鍏堢骇涓篒I
+@property (nonatomic, assign) NSTimeInterval timeInterval NS_AVAILABLE_IOS(10_0); // 鐢ㄦ潵璁剧疆瑙﹀彂鎺ㄩ�佺殑鏃堕棿锛宨OS10浠ヤ笂鏈夋晥锛屼紭鍏堢骇涓篒II
+
+@end
+
+/*!
+ * 娉ㄥ唽鎴栨洿鏂版帹閫佸疄浣撶被
+ */
+@interface JPushNotificationRequest : NSObject<NSCopying, NSCoding>
+
+@property (nonatomic, copy) NSString *requestIdentifier; // 鎺ㄩ�佽姹傛爣璇�
+@property (nonatomic, copy) JPushNotificationContent *content; // 璁剧疆鎺ㄩ�佺殑鍏蜂綋鍐呭
+@property (nonatomic, copy) JPushNotificationTrigger *trigger; // 璁剧疆鎺ㄩ�佺殑瑙﹀彂鏂瑰紡
+@property (nonatomic, copy) void (^completionHandler)(id result); // 娉ㄥ唽鎴栨洿鏂版帹閫佹垚鍔熷洖璋冿紝iOS10浠ヤ笂鎴愬姛鍒檙esult涓篣NNotificationRequest瀵硅薄锛屽け璐ュ垯result涓簄il;iOS10浠ヤ笅鎴愬姛result涓篣ILocalNotification瀵硅薄锛屽け璐ュ垯result涓簄il
+
+@end
+
+/*!
+ * JPush 鏍稿績澶存枃浠�
+ */
+@interface JPUSHService : NSObject
+
+
+///----------------------------------------------------
+/// @name Setup 鍚姩鐩稿叧
+///----------------------------------------------------
+
+/*!
+ * @abstract 鍚姩SDK
+ *
+ * @discussion 杩欐槸鏃х増鏈殑鍚姩鏂规硶, 渚濊禆浜� PushConfig.plist 鏂囦欢. 寤鸿涓嶈浣跨敤, 宸茬粡杩囨湡.
+ */
++ (void)setupWithOption:(NSDictionary *)launchingOption __attribute__((deprecated("JPush 2.1.0 鐗堟湰宸茶繃鏈�")));
+
+/*!
+ * @abstract 鍚姩SDK
+ *
+ * @param launchingOption 鍚姩鍙傛暟.
+ * @param appKey 涓�涓狫Push 搴旂敤蹇呴』鐨�,鍞竴鐨勬爣璇�. 璇峰弬鑰� JPush 鐩稿叧璇存槑鏂囨。鏉ヨ幏鍙栬繖涓爣璇�.
+ * @param channel 鍙戝竷娓犻亾. 鍙��.
+ * @param isProduction 鏄惁鐢熶骇鐜. 濡傛灉涓哄紑鍙戠姸鎬�,璁剧疆涓� NO; 濡傛灉涓虹敓浜х姸鎬�,搴旀敼涓� YES.
+ * App 璇佷功鐜鍙栧喅浜巔rofile provision鐨勯厤缃紝姝ゅ寤鸿涓庤瘉涔︾幆澧冧繚鎸佷竴鑷�.
+ * @param advertisingIdentifier 骞垮憡鏍囪瘑绗︼紙IDFA锛� 濡傛灉涓嶉渶瑕佷娇鐢↖DFA锛屼紶nil.
+ *
+ * @discussion 鎻愪緵SDK鍚姩蹇呴』鐨勫弬鏁�, 鏉ュ惎鍔� SDK.
+ * 姝ゆ帴鍙e繀椤诲湪 App 鍚姩鏃惰皟鐢�, 鍚﹀垯 JPush SDK 灏嗘棤娉曟甯稿伐浣�.
+ */
++ (void)setupWithOption:(NSDictionary *)launchingOption
+ appKey:(NSString *)appKey
+ channel:(NSString *)channel
+ apsForProduction:(BOOL)isProduction;
+
+
++ (void)setupWithOption:(NSDictionary *)launchingOption
+ appKey:(NSString *)appKey
+ channel:(NSString *)channel
+ apsForProduction:(BOOL)isProduction
+ advertisingIdentifier:(NSString *)advertisingId;
+
+
+///----------------------------------------------------
+/// @name APNs about 閫氱煡鐩稿叧
+///----------------------------------------------------
+
+/*!
+ * @abstract 娉ㄥ唽瑕佸鐞嗙殑杩滅▼閫氱煡绫诲瀷
+ *
+ * @param types 閫氱煡绫诲瀷
+ * @param categories 绫诲埆缁�
+ *
+ */
++ (void)registerForRemoteNotificationTypes:(NSUInteger)types
+ categories:(NSSet *)categories;
+/*!
+ * @abstract 鏂扮増鏈殑娉ㄥ唽鏂规硶锛堝吋瀹筰OS10锛�
+ *
+ * @param config 娉ㄥ唽閫氱煡閰嶇疆
+ * @param delegate 浠g悊
+ *
+ */
++ (void)registerForRemoteNotificationConfig:(JPUSHRegisterEntity *)config delegate:(id<JPUSHRegisterDelegate>)delegate;
+
+
++ (void)registerDeviceToken:(NSData *)deviceToken;
+
+
+/*!
+ * @abstract 澶勭悊鏀跺埌鐨� APNs 娑堟伅
+ */
++ (void)handleRemoteNotification:(NSDictionary *)remoteInfo;
+
+/*!
+ * Tags鎿嶄綔鎺ュ彛
+ * 鏀寔澧炲姞/瑕嗙洊/鍒犻櫎/娓呯┖/鏌ヨ鎿嶄綔
+ * 璇︽儏璇峰弬鑰冩枃妗o細https://docs.jiguang.cn/jpush/client/iOS/ios_api/锛�
+ */
+
+/**
+ 澧炲姞tags
+
+ @param tags 闇�瑕佸鍔犵殑tags闆嗗悎
+ @param completion 鍝嶅簲鍥炶皟
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)addTags:(NSSet<NSString *> *)tags
+ completion:(JPUSHTagsOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 瑕嗙洊tags
+ 璋冪敤璇ユ帴鍙d細瑕嗙洊鐢ㄦ埛鎵�鏈夌殑tags
+
+ @param tags 闇�瑕佽缃殑tags闆嗗悎
+ @param completion 鍝嶅簲鍥炶皟
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)setTags:(NSSet<NSString *> *)tags
+ completion:(JPUSHTagsOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 鍒犻櫎鎸囧畾tags
+
+ @param tags 闇�瑕佸垹闄ょ殑tags闆嗗悎
+ @param completion 鍝嶅簲鍥炶皟
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)deleteTags:(NSSet<NSString *> *)tags
+ completion:(JPUSHTagsOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 娓呯┖鎵�鏈塼ags
+ @param completion 鍝嶅簲鍥炶皟
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)cleanTags:(JPUSHTagsOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 鏌ヨ鍏ㄩ儴tags
+
+ @param completion 鍝嶅簲鍥炶皟锛岃鍦ㄥ洖璋冧腑鑾峰彇鏌ヨ缁撴灉
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)getAllTags:(JPUSHTagsOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 楠岃瘉tag鏄惁缁戝畾
+
+ @param completion 鍝嶅簲鍥炶皟锛屽洖璋冧腑鏌ョ湅鏄惁缁戝畾
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)validTag:(NSString *)tag
+ completion:(JPUSHTagValidOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 璁剧疆Alias
+
+ @param alias 闇�瑕佽缃殑alias
+ @param completion 鍝嶅簲鍥炶皟
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)setAlias:(NSString *)alias
+ completion:(JPUSHAliasOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 鍒犻櫎alias
+
+ @param completion 鍝嶅簲鍥炶皟
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)deleteAlias:(JPUSHAliasOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+/**
+ 鏌ヨ褰撳墠alias
+
+ @param completion 鍝嶅簲鍥炶皟
+ @param seq 璇锋眰搴忓垪鍙�
+ */
++ (void)getAlias:(JPUSHAliasOperationCompletion)completion
+ seq:(NSInteger)seq;
+
+
+/*!
+ * @abstract 杩囨护鎺夋棤鏁堢殑 tags
+ *
+ * @discussion 濡傛灉 tags 鏁伴噺瓒呰繃闄愬埗鏁伴噺, 鍒欒繑鍥為潬鍓嶇殑鏈夋晥鐨� tags.
+ * 寤鸿璁剧疆 tags 鍓嶇敤姝ゆ帴鍙f牎楠�. SDK 鍐呴儴涔熶細鍩轰簬姝ゆ帴鍙f潵鍋氳繃婊�.
+ */
++ (NSSet *)filterValidTags:(NSSet *)tags;
+
+///----------------------------------------------------
+/// @name Stats 缁熻鍔熻兘
+///----------------------------------------------------
+
+/*!
+ * @abstract 寮�濮嬭褰曢〉闈㈠仠鐣�
+ *
+ * @param pageName 椤甸潰鍚嶇О
+ */
++ (void)startLogPageView:(NSString *)pageName;
+
+/*!
+ * @abstract 鍋滄璁板綍椤甸潰鍋滅暀
+ *
+ * @param pageName 椤甸潰
+ */
++ (void)stopLogPageView:(NSString *)pageName;
+
+/*!
+ * @abstract 鐩存帴涓婃姤鍦ㄩ〉闈㈢殑鍋滅暀鏃堕棿
+ *
+ * @param pageName 椤甸潰
+ * @param seconds 鍋滅暀鐨勭鏁�
+ */
++ (void)beginLogPageView:(NSString *)pageName duration:(int)seconds;
+
+/*!
+ * @abstract 寮�鍚疌rash鏃ュ織鏀堕泦
+ *
+ * @discussion 榛樿鏄叧闂姸鎬�.
+ */
++ (void)crashLogON;
+
+/*!
+ * @abstract 鍦扮悊浣嶇疆涓婃姤
+ *
+ * @param latitude 绾害.
+ * @param longitude 缁忓害.
+ *
+ */
++ (void)setLatitude:(double)latitude longitude:(double)longitude;
+
+/*!
+ * @abstract 鍦扮悊浣嶇疆涓婃姤
+ *
+ * @param location 鐩存帴浼犻�� CLLocation * 鍨嬬殑鍦扮悊淇℃伅
+ *
+ * @discussion 闇�瑕侀摼鎺� CoreLocation.framework 骞朵笖 #import <CoreLocation/CoreLocation.h>
+ */
++ (void)setLocation:(CLLocation *)location;
+
+
+///----------------------------------------------------
+/// @name Local Notification 鏈湴閫氱煡
+///----------------------------------------------------
+/*!
+ * @abstract 娉ㄥ唽鎴栨洿鏂版帹閫� (鏀寔iOS10锛屽苟鍏煎iOS10浠ヤ笅鐗堟湰)
+ *
+ * JPush 2.1.9鏂版帴鍙�
+ * @param request JPushNotificationRequest绫诲瀷锛岃缃帹閫佺殑灞炴�э紝璁剧疆宸叉湁鎺ㄩ�佺殑request.requestIdentifier鍗虫洿鏂板凡鏈夌殑鎺ㄩ�侊紝鍚﹀垯涓烘敞鍐屾柊鎺ㄩ�侊紝鏇存柊鎺ㄩ�佷粎浠呭湪iOS10浠ヤ笂鏈夋晥锛岀粨鏋滈�氳繃request.completionHandler杩斿洖
+ * @discussion 鏃х殑娉ㄥ唽鏈湴鎺ㄩ�佹帴鍙h搴熷純锛屼娇鐢ㄦ鎺ュ彛鍙互鏇挎崲
+ *
+ */
++ (void)addNotification:(JPushNotificationRequest *)request;
+
+/*!
+ * @abstract 绉婚櫎鎺ㄩ�� (鏀寔iOS10锛屽苟鍏煎iOS10浠ヤ笅鐗堟湰)
+ *
+ * JPush 2.1.9鏂版帴鍙�
+ * @param identifier JPushNotificationIdentifier绫诲瀷锛宨OS10浠ヤ笂identifier璁剧疆涓簄il锛屽垯绉婚櫎鎵�鏈夊湪閫氱煡涓績鏄剧ず鎺ㄩ�佸拰寰呮帹閫佽姹傦紝涔熷彲浠ラ�氳繃璁剧疆identifier.delivered鍜宨dentifier.identifiers鏉ョЩ闄ょ浉搴斿湪閫氱煡涓績鏄剧ず鎺ㄩ�佹垨寰呮帹閫佽姹傦紝identifier.identifiers濡傛灉璁剧疆涓簄il鎴栫┖鏁扮粍鍒欑Щ闄ょ浉搴旀爣蹇椾笅鎵�鏈夊湪閫氱煡涓績鏄剧ず鎺ㄩ�佹垨寰呮帹閫佽姹傦紱iOS10浠ヤ笅identifier璁剧疆涓簄il锛屽垯绉婚櫎鎵�鏈夋帹閫侊紝identifier.delivered灞炴�ф棤鏁堬紝鍙﹀鍙互閫氳繃identifier.notificationObj浼犲叆鐗瑰畾鎺ㄩ�佸璞℃潵绉婚櫎姝ゆ帹閫併��
+ * @discussion 鏃х殑鎵�鏈夊垹闄ゆ帹閫佹帴鍙h搴熷純锛屼娇鐢ㄦ鎺ュ彛鍙互鏇挎崲
+ *
+ */
++ (void)removeNotification:(JPushNotificationIdentifier *)identifier;
+
+/*!
+ * @abstract 鏌ユ壘鎺ㄩ�� (鏀寔iOS10锛屽苟鍏煎iOS10浠ヤ笅鐗堟湰)
+ *
+ * JPush 2.1.9鏂版帴鍙�
+ * @param identifier JPushNotificationIdentifier绫诲瀷锛宨OS10浠ヤ笂鍙互閫氳繃璁剧疆identifier.delivered鍜宨dentifier.identifiers鏉ユ煡鎵剧浉搴斿湪閫氱煡涓績鏄剧ず鎺ㄩ�佹垨寰呮帹閫佽姹傦紝identifier.identifiers濡傛灉璁剧疆涓簄il鎴栫┖鏁扮粍鍒欒繑鍥炵浉搴旀爣蹇椾笅鎵�鏈夊湪閫氱煡涓績鏄剧ず鎺ㄩ�佹垨寰呮帹閫佽姹傦紱iOS10浠ヤ笅identifier.delivered灞炴�ф棤鏁堬紝identifier.identifiers濡傛灉璁剧疆nil鎴栫┖鏁扮粍鍒欒繑鍥炴墍鏈夋帹閫併�傞』瑕佽缃甶dentifier.findCompletionHandler鍥炶皟鎵嶈兘寰楀埌鏌ユ壘缁撴灉锛岄�氳繃(NSArray *results)杩斿洖鐩稿簲瀵硅薄鏁扮粍銆�
+ * @discussion 鏃х殑鏌ユ壘鎺ㄩ�佹帴鍙h搴熷純锛屼娇鐢ㄦ鎺ュ彛鍙互鏇挎崲
+ *
+ */
++ (void)findNotification:(JPushNotificationIdentifier *)identifier;
+
+/*!
+ * @abstract 鏈湴鎺ㄩ�侊紝鏈�澶氭敮鎸�64涓�
+ *
+ * @param fireDate 鏈湴鎺ㄩ�佽Е鍙戠殑鏃堕棿
+ * @param alertBody 鏈湴鎺ㄩ�侀渶瑕佹樉绀虹殑鍐呭
+ * @param badge 瑙掓爣鐨勬暟瀛椼�傚鏋滀笉闇�瑕佹敼鍙樿鏍囦紶-1
+ * @param alertAction 寮规鐨勬寜閽樉绀虹殑鍐呭锛圛OS 8榛樿涓�"鎵撳紑", 鍏朵粬榛樿涓�"鍚姩"锛�
+ * @param notificationKey 鏈湴鎺ㄩ�佹爣绀虹
+ * @param userInfo 鑷畾涔夊弬鏁帮紝鍙互鐢ㄦ潵鏍囪瘑鎺ㄩ�佸拰澧炲姞闄勫姞淇℃伅
+ * @param soundName 鑷畾涔夐�氱煡澹伴煶锛岃缃负nil涓洪粯璁ゅ0闊�
+ *
+ * @discussion 鏈�澶氭敮鎸� 64 涓畾涔夛紝姝ゆ柟娉曡[addNotification:]鏂规硶鍙栦唬
+ */
++ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
+ alertBody:(NSString *)alertBody
+ badge:(int)badge
+ alertAction:(NSString *)alertAction
+ identifierKey:(NSString *)notificationKey
+ userInfo:(NSDictionary *)userInfo
+ soundName:(NSString *)soundName __attribute__((deprecated("JPush 2.1.9 鐗堟湰宸茶繃鏈�")));
+
+/*!
+ * @abstract 鏈湴鎺ㄩ�� (鏀寔 iOS8 鏂板弬鏁�)
+ *
+ * IOS8鏂板弬鏁�
+ * @param region 鑷畾涔夊弬鏁�
+ * @param regionTriggersOnce 鑷畾涔夊弬鏁�
+ * @param category 鑷畾涔夊弬鏁�
+ * @discussion 姝ゆ柟娉曡[addNotification:]鏂规硶鍙栦唬
+ */
++ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
+ alertBody:(NSString *)alertBody
+ badge:(int)badge
+ alertAction:(NSString *)alertAction
+ identifierKey:(NSString *)notificationKey
+ userInfo:(NSDictionary *)userInfo
+ soundName:(NSString *)soundName
+ region:(CLRegion *)region
+ regionTriggersOnce:(BOOL)regionTriggersOnce
+ category:(NSString *)category NS_AVAILABLE_IOS(8_0) __attribute__((deprecated("JPush 2.1.9 鐗堟湰宸茶繃鏈�")));
+
+/*!
+ * @abstract 鍓嶅彴灞曠ず鏈湴鎺ㄩ��
+ *
+ * @param notification 鏈湴鎺ㄩ�佸璞�
+ * @param notificationKey 闇�瑕佸墠鍙版樉绀虹殑鏈湴鎺ㄩ�侀�氱煡鐨勬爣绀虹
+ *
+ * @discussion 榛樿App鍦ㄥ墠鍙拌繍琛屾椂涓嶄細杩涜寮圭獥锛屽湪绋嬪簭鎺ユ敹閫氱煡璋冪敤姝ゆ帴鍙e彲瀹炵幇鎸囧畾鐨勬帹閫佸脊绐椼��--iOS10浠ヤ笅杩樺彲缁х画浣跨敤锛宨OS10浠ヤ笂鍦╗UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:]鏂规硶涓皟鐢╟ompletionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert);鍗冲彲
+ */
++ (void)showLocalNotificationAtFront:(UILocalNotification *)notification
+ identifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 鐗堟湰宸茶繃鏈�")));
+/*!
+ * @abstract 鍒犻櫎鏈湴鎺ㄩ�佸畾涔�
+ *
+ * @param notificationKey 鏈湴鎺ㄩ�佹爣绀虹
+ * @discussion 姝ゆ柟娉曡[removeNotification:]鏂规硶鍙栦唬
+ */
++ (void)deleteLocalNotificationWithIdentifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 鐗堟湰宸茶繃鏈�")));
+
+/*!
+ * @abstract 鍒犻櫎鏈湴鎺ㄩ�佸畾涔�
+ * @discussion 姝ゆ柟娉曡[removeNotification:]鏂规硶鍙栦唬
+ */
++ (void)deleteLocalNotification:(UILocalNotification *)localNotification __attribute__((deprecated("JPush 2.1.9 鐗堟湰宸茶繃鏈�")));
+
+/*!
+ * @abstract 鑾峰彇鎸囧畾閫氱煡
+ *
+ * @param notificationKey 鏈湴鎺ㄩ�佹爣绀虹
+ * @return 鏈湴鎺ㄩ�佸璞℃暟缁�, [array count]涓�0鏃惰〃绀烘病鎵惧埌
+ * @discussion 姝ゆ柟娉曡[findNotification:]鏂规硶鍙栦唬
+ */
++ (NSArray *)findLocalNotificationWithIdentifier:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 鐗堟湰宸茶繃鏈�")));
+
+/*!
+ * @abstract 娓呴櫎鎵�鏈夋湰鍦版帹閫佸璞�
+ * @discussion 姝ゆ柟娉曡[removeNotification:]鏂规硶鍙栦唬
+ */
++ (void)clearAllLocalNotifications __attribute__((deprecated("JPush 2.1.9 鐗堟湰宸茶繃鏈�")));
+
+
+///----------------------------------------------------
+/// @name Server badge 鏈嶅姟鍣ㄧ badge 鍔熻兘
+///----------------------------------------------------
+
+/*!
+ * @abstract 璁剧疆瑙掓爣(鍒版湇鍔″櫒)
+ *
+ * @param value 鏂扮殑鍊�. 浼氳鐩栨湇鍔″櫒涓婁繚瀛樼殑鍊�(杩欎釜鐢ㄦ埛)
+ *
+ * @discussion 鏈帴鍙d笉浼氭敼鍙樺簲鐢ㄦ湰鍦扮殑瑙掓爣鍊�.
+ * 鏈湴浠嶉』璋冪敤 UIApplication:setApplicationIconBadgeNumber 鍑芥暟鏉ヨ缃剼鏍�.
+ *
+ * 鏈帴鍙g敤浜庨厤鍚� JPush 鎻愪緵鐨勬湇鍔″櫒绔鏍囧姛鑳�.
+ * 璇ュ姛鑳借В鍐崇殑闂鏄�, 鏈嶅姟鍣ㄧ鎺ㄩ�� APNs 鏃�, 骞朵笉鐭ラ亾瀹㈡埛绔師鏉ュ凡缁忓瓨鍦ㄧ殑瑙掓爣鏄灏�, 鎸囧畾涓�涓浐瀹氱殑鏁板瓧涓嶅お鍚堢悊.
+ *
+ * JPush 鏈嶅姟鍣ㄧ鑴氭爣鍔熻兘鎻愪緵:
+ *
+ * - 閫氳繃鏈� API 鎶婂綋鍓嶅鎴风(褰撳墠杩欎釜鐢ㄦ埛鐨�) 鐨勫疄闄� badge 璁剧疆鍒版湇鍔″櫒绔繚瀛樿捣鏉�;
+ * - 璋冪敤鏈嶅姟鍣ㄧ API 鍙� APNs 鏃�(閫氬父杩欎釜璋冪敤鏄壒閲忛拡瀵瑰ぇ閲忕敤鎴�),
+ * 浣跨敤 "+1" 鐨勮涔�, 鏉ヨ〃杈鹃渶瑕佸熀浜庣洰鏍囩敤鎴峰疄闄呯殑 badge 鍊�(淇濆瓨鐨�) +1 鏉ヤ笅鍙戦�氱煡鏃跺甫涓婃柊鐨� badge 鍊�;
+ */
++ (BOOL)setBadge:(NSInteger)value;
+
+/*!
+ * @abstract 閲嶇疆鑴氭爣(涓�0)
+ *
+ * @discussion 鐩稿綋浜� [setBadge:0] 鐨勬晥鏋�.
+ * 鍙傝�� [JPUSHService setBadge:] 璇存槑鏉ョ悊瑙e叾浣滅敤.
+ */
++ (void)resetBadge;
+
+///----------------------------------------------------
+/// @name Other Feature 鍏朵粬鍔熻兘
+///----------------------------------------------------
+
+/*!
+ * @abstract 璁剧疆鎵嬫満鍙风爜(鍒版湇鍔″櫒)
+ *
+ * @param mobileNumber 鎵嬫満鍙风爜. 浼氫笌鐢ㄦ埛淇℃伅涓�涓�瀵瑰簲銆傚彲涓虹┖锛屼负绌哄垯娓呴櫎鍙风爜
+ * @param completion 鍝嶅簲鍥炶皟銆傛垚鍔熷垯error涓虹┖锛屽け璐ュ垯error甯︽湁閿欒鐮佸強閿欒淇℃伅
+ *
+ * @discussion 璁剧疆鎵嬫満鍙风爜鍚庯紝鍙疄鐜扳�滄帹閫佷笉鍒扮煭淇″埌鈥濈殑閫氱煡鏂瑰紡锛屾彁楂樻帹閫佽揪鍒扮巼銆傜粨鏋滀俊鎭�氳繃completion寮傛杩斿洖锛屼篃鍙皢completion璁剧疆涓簄il涓嶅鐞嗙粨鏋滀俊鎭��
+ *
+ */
++ (void)setMobileNumber:(NSString *)mobileNumber completion:(void (^)(NSError *error))completion;
+
+///----------------------------------------------------
+/// @name Logs and others 鏃ュ織涓庡叾浠�
+///----------------------------------------------------
+
+/*!
+ * @abstract JPush鏍囪瘑姝よ澶囩殑 registrationID
+ *
+ * @discussion SDK娉ㄥ唽鎴愬姛鍚�, 璋冪敤姝ゆ帴鍙h幏鍙栧埌 registrationID 鎵嶈兘澶熻幏鍙栧埌.
+ *
+ * JPush 鏀寔鏍规嵁 registrationID 鏉ヨ繘琛屾帹閫�.
+ * 濡傛灉浣犻渶瑕佹鍔熻兘, 搴旇閫氳繃姝ゆ帴鍙h幏鍙栧埌 registrationID 鍚�, 涓婃姤鍒颁綘鑷繁鐨勬湇鍔″櫒绔�, 骞朵繚瀛樹笅鏉�.
+ * registrationIDCompletionHandler:鏄柊澧炵殑鑾峰彇registrationID鐨勬柟娉曪紝闇�瑕佸湪block涓幏鍙杛egistrationID,resCode涓鸿繑鍥炵爜,妯℃嫙鍣ㄨ皟鐢ㄦ鎺ュ彛resCode杩斿洖1011,registrationID杩斿洖nil.
+ * 鏇村鐨勭悊瑙h鍙傝�� JPush 鐨勬枃妗g綉绔�.
+ */
++ (NSString *)registrationID;
+
++ (void)registrationIDCompletionHandler:(void(^)(int resCode,NSString *registrationID))completionHandler;
+
+/*!
+ * @abstract 鎵撳紑鏃ュ織绾у埆鍒� Debug
+ *
+ * @discussion JMessage iOS 鐨勬棩蹇楃郴缁熷弬鑰� Android 璁捐浜嗙骇鍒�.
+ * 浠庝綆鍒伴珮鏄�: Verbose, Debug, Info, Warning, Error.
+ * 瀵规棩蹇楃骇鍒殑杩涗竴姝ョ悊瑙�, 璇峰弬鑰� Android 鐩稿叧鐨勮鏄�.
+ *
+ * SDK 榛樿寮�鍚殑鏃ュ織绾у埆涓�: Info. 鍙樉绀哄繀瑕佺殑淇℃伅, 涓嶆墦鍗拌皟璇曟棩蹇�.
+ *
+ * 璇峰湪SDK鍚姩鍚庤皟鐢ㄦ湰鎺ュ彛锛岃皟鐢ㄦ湰鎺ュ彛鍙墦寮�鏃ュ織绾у埆涓�: Debug, 鎵撳嵃璋冭瘯鏃ュ織.
+ */
++ (void)setDebugMode;
+
+/*!
+ * @abstract 鍏抽棴鏃ュ織
+ *
+ * @discussion 鍏充簬鏃ュ織绾у埆鐨勮鏄�, 鍙傝�� [JPUSHService setDebugMode]
+ *
+ * 铏借鏄叧闂棩蹇�, 浣嗚繕鏄細鎵撳嵃 Warning, Error 鏃ュ織. 杩欎簩绉嶆棩蹇楃骇鍒�, 鍦ㄧ▼搴忚繍琛屾甯告椂, 涓嶅簲鏈夋墦鍗拌緭鍑�.
+ *
+ * 寤鸿鍦ㄥ彂甯冪殑鐗堟湰閲�, 璋冪敤姝ゆ帴鍙�, 鍏抽棴鎺夋棩蹇楁墦鍗�.
+ */
++ (void)setLogOFF;
+
+///----------------------------------------------------
+///********************涓嬪垪鏂规硶宸茶繃鏈�********************
+///**************璇蜂娇鐢ㄦ柊鐗坱ag/alias鎿嶄綔鎺ュ彛**************
+///----------------------------------------------------
+/// @name Tag alias setting 璁剧疆鍒悕涓庢爣绛�
+///----------------------------------------------------
+
+/*!
+ * 涓嬮潰鐨勬帴鍙f槸鍙�夌殑
+ * 璁剧疆鏍囩鍜�(鎴�)鍒悕锛堣嫢鍙傛暟涓簄il锛屽垯蹇界暐锛涜嫢鏄┖瀵硅薄锛屽垯娓呯┖锛涜鎯呰鍙傝�冩枃妗o細https://docs.jiguang.cn/jpush/client/iOS/ios_api/锛�
+ * setTags:alias:fetchCompletionHandle:鏄柊鐨勮缃爣绛惧埆鍚嶇殑鏂规硶锛屼笉鍐嶉渶瑕佹樉绀哄0鏄庡洖璋冨嚱鏁帮紝鍙渶瑕佸湪block閲岄潰澶勭悊璁剧疆缁撴灉鍗冲彲.
+ * WARN: 浣跨敤block鏃堕渶瑕佹敞鎰忓惊鐜紩鐢ㄩ棶棰�
+ */
++ (void) setTags:(NSSet *)tags
+ alias:(NSString *)alias
+callbackSelector:(SEL)cbSelector
+ target:(id)theTarget __attribute__((deprecated("JPush 2.1.1 鐗堟湰宸茶繃鏈�")));
++ (void) setTags:(NSSet *)tags
+ alias:(NSString *)alias
+callbackSelector:(SEL)cbSelector
+ object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 鐗堟湰宸茶繃鏈�")));
++ (void) setTags:(NSSet *)tags
+callbackSelector:(SEL)cbSelector
+ object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 鐗堟湰宸茶繃鏈�")));
++ (void)setTags:(NSSet *)tags
+ alias:(NSString *)alias
+fetchCompletionHandle:(void (^)(int iResCode, NSSet *iTags, NSString *iAlias))completionHandler __attribute__((deprecated("JPush 3.0.6 鐗堟湰宸茶繃鏈�")));
++ (void) setTags:(NSSet *)tags
+aliasInbackground:(NSString *)alias __attribute__((deprecated("JPush 3.0.6 鐗堟湰宸茶繃鏈�")));
++ (void)setAlias:(NSString *)alias
+callbackSelector:(SEL)cbSelector
+ object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 鐗堟湰宸茶繃鏈�")));
+
+@end
+
+@class UNUserNotificationCenter;
+@class UNNotificationResponse;
+
+@protocol JPUSHRegisterDelegate <NSObject>
+
+/*
+ * @brief handle UserNotifications.framework [willPresentNotification:withCompletionHandler:]
+ * @param center [UNUserNotificationCenter currentNotificationCenter] 鏂扮壒鎬х敤鎴烽�氱煡涓績
+ * @param notification 鍓嶅彴寰楀埌鐨勭殑閫氱煡瀵硅薄
+ * @param completionHandler 璇allback涓殑options 璇蜂娇鐢║NNotificationPresentationOptions
+ */
+- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger options))completionHandler;
+/*
+ * @brief handle UserNotifications.framework [didReceiveNotificationResponse:withCompletionHandler:]
+ * @param center [UNUserNotificationCenter currentNotificationCenter] 鏂扮壒鎬х敤鎴烽�氱煡涓績
+ * @param response 閫氱煡鍝嶅簲瀵硅薄
+ * @param completionHandler
+ */
+- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler;
+
+@end
diff --git a/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jcore-ios-1.1.9.a b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jcore-ios-1.1.9.a
new file mode 100644
index 0000000..f4d727b
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jcore-ios-1.1.9.a
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jpush-ios-3.0.9.a b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jpush-ios-3.0.9.a
new file mode 100644
index 0000000..2858e14
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/JPush/jpush-ios-3.0.9.a
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png
new file mode 100644
index 0000000..7ac8e4d
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png
Binary files differ
diff --git a/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist
new file mode 100644
index 0000000..3011f70
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>JPush_AppKey</key>
+ <string>e315b993c9a7eee53585bf30</string>
+</dict>
+</plist>
diff --git a/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.h b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.h
new file mode 100644
index 0000000..7e38ad9
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.h
@@ -0,0 +1,73 @@
+//
+// UniversalSDK.h
+// Unity-iPhone
+//
+// Created by 钄$�� on 2018/4/24.
+//
+
+#ifndef __UNIVERSALSDK_H_
+#define __UNIVERSALSDK_H_
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#define UNITY_OBJ_NAME "SDKUtility"
+#define UNITY_FUNC_NAME "HandleSdkMessage"
+
+#define S2U_BatteryLevel 1
+#define S2U_BatteryCharging 2
+#define S2U_DeviceInfo 3
+#define S2U_PushClientID 4
+#define S2U_FreePlatformInitOk 10
+#define S2U_FreePlatformInitFail 11
+#define S2U_FreePlatformLoginOk 12
+#define S2U_FreePlatformLoginFail 13
+#define S2U_FreePlatformLoginCancel 14
+#define S2U_FreePlatformLogoutOk 15
+#define S2U_FreePlatformLogoutFail 16
+#define S2U_FreePlatformSwitchAccountOk 17
+#define S2U_FreePlatformPayOk 18
+#define S2U_FreePlatformPayFail 19
+#define S2U_FreePlatformPayCancel 20
+#define S2U_FreePlatformRegisterOk 21
+#define S2U_SdkInitComplete 90
+
+#define U2S_BatteryListenStart 1
+#define U2S_BatteryListenStop 2
+#define U2S_CopyContent 7
+#define U2S_OpenWebView 8
+#define U2S_Init 9
+#define U2S_FreePlatformInit 100
+#define U2S_FreePlatformLogin 101
+#define U2S_FreePlatformLogout 102
+#define U2S_FreePlatformSwitchAccount 103
+#define U2S_FreePlatformPay 104
+#define U2S_PayFinished 105
+#define U2S_CreateRole 106
+#define U2S_RoleLogin 107
+#define U2S_RoleLevelUp 108
+#define U2S_JPushAddLocalMessage 200
+#define U2S_JPushRemoveLocalMessage 201
+#define U2S_MakeKeyAndVisible 300
+
+#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
+
+static BOOL JPush_IsProduction = FALSE;
+
+@interface UniversalSDK : NSObject {
+ UIWebView* m_UIWebView;
+ UIButton* m_CloseBtn;
+}
+
+-(void) HandleUnityMessage:(NSString*) json;
+-(void) Init;
+-(void) FreeSDKInit;
+-(id) APNativeJSONObject:(NSData*) data;
+-(NSData*) APNativeJSONData:(id) obj;
+-(void) RemoveLocalNotificationWithIdentifierKey:(NSString*) idKey;
+
+-(void) JPushInit:(NSDictionary*)launchOptions;
+
+@end
+
+#endif
diff --git a/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.mm b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.mm
new file mode 100644
index 0000000..636440e
--- /dev/null
+++ b/ChannelDiff/iOS/jisusnyjjios/The2thWorldSDK/UniversalSDK.mm
@@ -0,0 +1,570 @@
+//
+// UniversalSDK.m
+// Unity-iPhone
+//
+// Created by 钄$�� on 2018/4/24.
+//
+
+#import "UniversalSDK.h"
+#import "JPUSHService.h"
+#import "AdSupport/AdSupport.h"
+#import "opus.h"
+#ifdef NSFoundationVersionNumber_iOS_9_x_Max
+#import <UserNotifications/UserNotifications.h>
+#endif
+#import "SystemConfiguration/CaptiveNetwork.h"
+#import "XHAuxiliarySDK.h"
+#import "XHAuxiliaryHeader.h"
+#import "XHAuxiliaryUserAccount.h"
+
+@interface UniversalSDK()<JPUSHRegisterDelegate,UIWebViewDelegate,XHAuxiliaryDelegate>
+@end
+
+@implementation UniversalSDK
+
+#define CHANNEL_NUM 1
+
+static int s_frequency = 16000;
+static int s_bitRate = 20000;
+static int s_bandMode = OPUS_BANDWIDTH_WIDEBAND;
+static int s_frameSize = 160;
+static int sBatteryLevel = -1;
+static int sBatteryState = -1;
+static NSThread * _thread;
+static NSString* APP_ID;
+
+-(void) Init
+{
+ UIDevice *_device = [UIDevice currentDevice];
+ _device.batteryMonitoringEnabled = true;
+
+ NSString* _uniqueID = [[NSUserDefaults standardUserDefaults] objectForKey:@"tsw_unique_id"];
+ //鑾峰彇IDFA
+ NSString* _idfa = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
+
+ if(_uniqueID == NULL || [_uniqueID length] <= 0)
+ {
+ //鍒ゆ柇IDFA鏄惁涓虹┖
+ BOOL isEmpty = [[_idfa stringByReplacingOccurrencesOfString:@"-" withString:@""] stringByReplacingOccurrencesOfString:@"0" withString:@""].length;
+ if (isEmpty) {
+ //涓嶄负绌猴紝灏咺DFA浣滀负鍞竴鏍囪瘑
+ _uniqueID = _idfa;
+ }
+ else {
+ //涓虹┖锛岃幏鍙朥UID浣滀负鍞竴鏍囪瘑
+ _uniqueID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
+ }
+
+ //淇濆瓨鍞竴璁惧鏍囪瘑,濡傚凡瀛樺湪鍒欎笉杩涜浠讳綍澶勭悊
+ [[NSUserDefaults standardUserDefaults] setObject:_uniqueID forKey:@"tsw_unique_id"];
+ [[NSUserDefaults standardUserDefaults] synchronize];
+ }
+
+ // 鍙栧緱UserAgent
+ UIWebView* _webView = [[UIWebView alloc] initWithFrame:CGRectZero];
+ NSString* _userAgent = [_webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
+
+ // 鍙戦�佽澶囦俊鎭�
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ _uniqueID,@"unique_id",
+ _idfa,@"android_id",
+ [NSNumber numberWithInt:S2U_DeviceInfo],@"code",
+ _userAgent,@"userAgent",nil];
+ [self SendMessageToUnity:_dict];
+
+ // 鑷敱sdk鍒濆鍖�
+ [self FreeSDKInit];
+
+ // 鍙戦�佷釜鎺╥d
+ [_dict removeAllObjects];
+ [_dict setObject:[JPUSHService registrationID] forKey:@"clientID"];
+ [_dict setObject:[NSNumber numberWithInt:S2U_PushClientID] forKey:@"code"];
+ [self SendMessageToUnity:_dict];
+
+ // 鍙戦�佸垵濮嬪寲瀹屾垚
+ [_dict removeAllObjects];
+ [_dict setObject:[NSNumber numberWithInt:S2U_SdkInitComplete] forKey:@"code"];
+ [_dict setObject:@"js" forKey:@"channelPlatform"];
+ [self SendMessageToUnity:_dict];
+}
+
+-(void)SendMessageToUnity:(NSDictionary*)dict
+{
+ BOOL _result = [NSJSONSerialization isValidJSONObject:dict];
+ if(_result)
+ {
+ NSData* _jsonData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:NULL];
+ UnitySendMessage(UNITY_OBJ_NAME, UNITY_FUNC_NAME,
+ [[[NSString alloc] initWithData:_jsonData encoding:NSUTF8StringEncoding] UTF8String]);
+ }
+}
+
+-(void) FreeSDKInit {
+ /* 鍒濆鍖朣DK */
+ [XHAuxiliarySDK setDelegate:self];
+
+ [[XHAuxiliarySDK defaultXHAuxiliary] XHAuxiliarySDKInitWithAPPID:@"1075" Completion:^(XHAuxiliaryInitErrorCode result) {
+
+ if (result == XHAuxiliaryInitErrorCodeNone) {
+ // 鍒濆鍖朣DK鎴愬姛
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformInitOk],@"code",nil];
+ [self SendMessageToUnity:_dict];
+ }else if (result == XHAuxiliaryInitErrorCodeConig){
+ // 閰嶇疆淇℃伅鏈夎
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformInitFail],@"code",nil];
+ [self SendMessageToUnity:_dict];
+ }else if(result == XHAuxiliaryInitErrorCodeNet){
+ // 缃戠粶閿欒
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformInitFail],@"code",nil];
+ [self SendMessageToUnity:_dict];
+ }else{
+ // 娓告垙鏇存柊涓�
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformInitFail],@"code",nil];
+ [self SendMessageToUnity:_dict];
+ }
+
+ }];
+}
+
+
+- (void)accountLoginResult:(XHAuxiliaryToolStatus)result User:(XHAuxiliaryUserAccount *)model{
+
+ if(result == XHAuxiliary_SUCCESS){
+
+ NSLog(@"token = %@, uid = %@",model.accountToken,model.accountUid);
+ NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSDictionary dictionaryWithObjectsAndKeys:model.accountToken, @"token",
+ model.accountUid, @"account_id",
+ model.accountUid, @"account", nil],@"info",
+ [NSNumber numberWithInt:S2U_FreePlatformLoginOk], @"code", nil];
+ [self SendMessageToUnity:_dict];
+ }
+}
+
+- (void)toolResult:(XHAuxiliaryToolStatus)result data:(id)data{
+ if (result == XHAuxiliary_SUCCESS) {
+ NSLog(@"鎴愬姛%@",data);
+ }else{
+ NSLog(@"閿欒");
+ }
+}
+
+- (void)appstoreResult:(XHAuxiliaryToolStatus)result data:(id)data{
+
+ if (result == XHAuxiliary_SUCCESS) {
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformPayOk],@"code",nil];
+ [self SendMessageToUnity:_dict];
+ }else if (result == XHAuxiliary_CANCEL){
+ NSLog(@"鍙栨秷 %@",data);
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformLoginCancel],@"code",nil];
+ [ self SendMessageToUnity:_dict];
+ }else if (result == XHAuxiliary_UNKNOW){
+ NSLog(@"閿欒 %@",data);
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformPayFail],@"code",nil];
+ [ self SendMessageToUnity:_dict];
+ }
+
+}
+
+-(void) BatteryThread {
+ while (TRUE)
+ {
+ [NSThread sleepForTimeInterval:1];
+
+ UIDevice *_device = [UIDevice currentDevice];
+
+ int _state = [_device batteryState];
+ if(_state != sBatteryState){
+ sBatteryState = _state;
+ NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:sBatteryState], @"status",
+ [NSNumber numberWithInt:S2U_BatteryCharging], @"code", nil];
+
+ [self SendMessageToUnity:_dict];
+ }
+
+ int _level = (int)([_device batteryLevel] * 100);
+ if(_level != sBatteryLevel){
+ sBatteryLevel = _level;
+ NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:sBatteryLevel], @"level",
+ [NSNumber numberWithInt:S2U_BatteryLevel], @"code", nil];
+
+ [self SendMessageToUnity:_dict];
+ }
+ }
+}
+
+-(void) OpenURL:(NSString*) url {
+
+ if(m_UIWebView != NULL) {
+ [self btnClick:NULL];
+ return;
+ }
+
+ CGRect _bounds = UnityGetMainWindow().bounds;
+
+ float _scale = _bounds.size.width / 1334;
+
+ float _width = 982 * _scale;
+ float _height = 560 * _scale;
+
+ float _offsetX = (_bounds.size.width - _width) * .5f;
+ float _offsetY = (_bounds.size.height - _height) * .5f;
+
+ m_UIWebView = [[UIWebView alloc] initWithFrame:CGRectMake(_offsetX, _offsetY, _width, _height)];
+ m_UIWebView.delegate = self;
+ m_UIWebView.scalesPageToFit = YES ;
+ m_UIWebView.scrollView.scrollEnabled = YES;
+ m_UIWebView.scrollView.bounces = NO;
+ NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:url]];
+ [m_UIWebView loadRequest:request];
+}
+
+-(void) btnClick:(UIButton*)sender {
+ [m_CloseBtn removeFromSuperview];
+ [m_CloseBtn removeTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
+ m_CloseBtn = NULL;
+
+ NSURLCache *_cache = [NSURLCache sharedURLCache];
+ [_cache removeAllCachedResponses];
+ [_cache setDiskCapacity:0];
+ [_cache setMemoryCapacity:0];
+
+ [m_UIWebView removeFromSuperview];
+ m_UIWebView = NULL;
+}
+
+-(void)webViewDidStartLoad:(UIWebView *)webView{
+}
+
+-(void)webViewDidFinishLoad:(UIWebView *)webView{
+
+ [UnityGetMainWindow().rootViewController.view addSubview:m_UIWebView];
+ CGRect _bounds = UnityGetMainWindow().bounds;
+
+ float _scale = _bounds.size.width / 1334;
+
+ float _width = 982 * _scale;
+ float _height = 560 * _scale;
+
+ m_CloseBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
+ [m_CloseBtn setFrame:CGRectMake(_width - 455 * _scale, _height - 86 * _scale, 180 * _scale, 72 * _scale)];
+ [m_CloseBtn setTitle:@"鎴戠煡閬撲簡" forState:UIControlStateNormal];
+
+ NSString *_bundlePath = [[NSBundle mainBundle] pathForResource:@"The2thWorldRES.bundle" ofType:nil];
+ NSBundle *_bundle = [NSBundle bundleWithPath:_bundlePath];
+ NSString *pic1Path = [_bundle pathForResource:@"TY_AN_34.png" ofType:nil];
+
+ [m_CloseBtn setBackgroundImage:[UIImage imageWithContentsOfFile:pic1Path] forState:UIControlStateNormal];
+ [m_CloseBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
+ [m_CloseBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
+
+ [m_UIWebView addSubview:m_CloseBtn];
+}
+
+-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
+}
+
+-(void)JPushInit:(NSDictionary*)launchOptions {
+
+ NSString *_bundlePath = [[NSBundle mainBundle] pathForResource:@"The2thWorldRES.bundle" ofType:nil];
+ NSString* _configPath = [[NSBundle bundleWithPath:_bundlePath] pathForResource:@"The2thWorldSDKConfig" ofType:@"plist"];
+ NSMutableDictionary *_configDict = [[NSMutableDictionary alloc] initWithContentsOfFile:_configPath];
+
+ JPUSHRegisterEntity *_entity = [[JPUSHRegisterEntity alloc] init];
+ _entity.types = JPAuthorizationOptionAlert | JPAuthorizationOptionBadge | JPAuthorizationOptionSound;
+ if([[UIDevice currentDevice].systemVersion floatValue] > 8.0){
+ }
+
+ [JPUSHService registerForRemoteNotificationConfig:_entity
+ delegate:self];
+ [JPUSHService setupWithOption:launchOptions
+ appKey:_configDict[@"JPush_AppKey"]
+ channel:@"develop"
+ apsForProduction:JPush_IsProduction
+ advertisingIdentifier:nil];
+}
+
+- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler {
+
+ NSDictionary * userInfo = response.notification.request.content.userInfo;
+ if([response.notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
+ [JPUSHService handleRemoteNotification:userInfo];
+ }
+ completionHandler();
+}
+
+- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler {
+
+ NSDictionary * userInfo = notification.request.content.userInfo;
+ if([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
+ [JPUSHService handleRemoteNotification:userInfo];
+ }
+ completionHandler(UNNotificationPresentationOptionAlert);
+}
+
+-(id) APNativeJSONObject:(NSData *)data{
+ if (!data) {
+ return nil;
+ }
+
+ NSError *error = nil;
+ id retId = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
+
+ if (error) {
+ NSLog(@"%s trans data to obj with error: %@", __func__, error);
+ return nil;
+ }
+
+ return retId;
+}
+
+-(NSData *)APNativeJSONData:(id)obj {
+ NSError *error = nil;
+ NSData *data = [NSJSONSerialization dataWithJSONObject:obj options:0 error:&error];
+ if (error) {
+ NSLog(@"%s trans obj to data with error: %@", __func__, error);
+ return nil;
+ }
+ return data;
+}
+
+-(void) RemoveLocalNotificationWithIdentifierKey:(NSString*) idKey{
+ JPushNotificationIdentifier *identifier = [[JPushNotificationIdentifier alloc] init];
+ identifier.identifiers = @[idKey];
+ identifier.delivered = YES; //iOS10浠ヤ笂鏈夋晥锛岀瓑浜嶻ES鍒欏湪閫氱煡涓績鏄剧ず鐨勯噷闈㈢Щ闄わ紝绛変簬NO鍒欎负鍦ㄥ緟鎺ㄩ�佺殑閲岄潰绉婚櫎锛沬OS10浠ヤ笅鏃犳晥
+ [JPUSHService removeNotification:identifier];
+}
+
+-(void)HandleUnityMessage:(NSString *)json {
+
+ NSLog(@"鏀跺埌Unity鍙戞潵鐨勬秷鎭� => %@", json);
+
+ NSData *_jsonData = [json dataUsingEncoding:NSUTF8StringEncoding];
+ NSDictionary *_dict = [self APNativeJSONObject:_jsonData];
+
+ switch([[_dict objectForKey:@"code"] intValue]){
+ case U2S_Init:
+ [self Init];
+ APP_ID = [_dict objectForKey:@"appID"];
+ break;
+ case U2S_CopyContent:
+ [UIPasteboard generalPasteboard].string = _dict[@"content"];
+ break;
+ case U2S_FreePlatformInit:
+ {
+ [self FreeSDKInit];
+ }
+ break;
+ case U2S_MakeKeyAndVisible:
+ {
+ UIWindow * _window = [[UIApplication sharedApplication].delegate window];
+ if (_window != nil && _window.rootViewController != nil) {
+ [_window makeKeyAndVisible];
+ }
+ }
+ break;
+ case U2S_OpenWebView:
+ [self OpenURL:_dict[@"url"]];
+ break;
+ case U2S_FreePlatformLogin:
+ {
+ int i = [[XHAuxiliarySDK defaultXHAuxiliary] XHAuxiliaryLoginInView:UnityGetMainWindow().rootViewController.view];
+
+ if (i == 0) {
+ /* 鎴愬姛 */
+
+ }else{
+ NSLog(@"灏氭湭鍒濆鍖朣DK");
+ }
+
+ }
+ break;
+ case U2S_FreePlatformLogout:
+ {
+ if ([XHAuxiliarySDK defaultXHAuxiliary].isLogined == YES) {
+ [[XHAuxiliarySDK defaultXHAuxiliary] LLLogout];
+ NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil];
+
+ [self SendMessageToUnity:_dict];
+ }else{
+ NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformLogoutFail], @"code", nil];
+
+ [self SendMessageToUnity:_dict];
+ NSLog(@"灏氭湭鐧诲綍锛屾敞閿�澶辫触锛�");
+ }
+ break;
+ }
+ case U2S_FreePlatformPay:
+ {
+ NSString* _roleName = [_dict objectForKey:@"roleName"];
+ _roleName = [_roleName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+ NSMutableString* _temp = [[NSMutableString alloc] initWithString:_roleName];
+ _roleName = [_temp stringByReplacingOccurrencesOfString:@"\u0000" withString:@""];
+
+ NSString* _extraData = [NSString stringWithFormat:@"{\"appid\":\"%@\",\"cpinfo\":\"%@\",\"cporderid\":\"%@\"}",
+ APP_ID,
+ [_dict objectForKey:@"cpInfo"],
+ [_dict objectForKey:@"orderId"]];
+
+ [[XHAuxiliarySDK defaultXHAuxiliary] tool:[_dict objectForKey:@"orderId"]
+ andWithLLItemID:[_dict objectForKey:@"cpInfo"]
+ andWithLLItemP:[[_dict objectForKey:@"mount"] intValue] * 100
+ andWithLLReserved:_extraData
+ andWithLLDesc:[_dict objectForKey:@"title"]];
+
+ NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:S2U_FreePlatformLoginCancel],@"code",nil];
+ [self SendMessageToUnity:_dict];
+
+ }
+ break;
+ case U2S_PayFinished:
+ break;
+ case U2S_BatteryListenStart:
+ {
+ if(_thread == NULL)
+ {
+ _thread = [[NSThread alloc] initWithTarget:self selector:@selector(BatteryThread) object:nil];
+ [_thread setName:@"BatteryCheck"];
+ }
+ if(![_thread isExecuting])
+ {
+ [_thread start];
+ }
+ }
+ break;
+ case U2S_BatteryListenStop:
+ break;
+ case U2S_JPushRemoveLocalMessage:
+ [self RemoveLocalNotificationWithIdentifierKey:_dict[@"id"]];
+ break;
+ case U2S_JPushAddLocalMessage:
+ {
+ JPushNotificationContent *_content = [[JPushNotificationContent alloc] init];
+ if (_dict[@"title"]) {
+ _content.title = _dict[@"title"];
+ }
+ if (_dict[@"subtitle"]) {
+ _content.subtitle = _dict[@"subtitle"];
+ }
+ if (_dict[@"content"]) {
+ _content.body = _dict[@"content"];
+ }
+ if (_dict[@"badge"]) {
+ _content.badge = @([_dict[@"badge"] intValue]);
+ }
+ if (_dict[@"action"]) {
+ _content.action = _dict[@"action"];
+ }
+ if (_dict[@"extra"]) {
+ _content.userInfo = _dict[@"extra"];
+ }
+ if (_dict[@"sound"]) {
+ _content.sound = _dict[@"sound"];
+ }
+ JPushNotificationTrigger *_trigger = [[JPushNotificationTrigger alloc] init];
+ if (_dict[@"fireTime"]) {
+ long _time = [_dict[@"fireTime"] longValue];
+ NSNumber *date = @(_time);
+ if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
+ NSTimeInterval currentInterval = [[NSDate date] timeIntervalSince1970];
+ NSTimeInterval interval = [date doubleValue] - currentInterval;
+ interval = interval > 0? interval : 0;
+ _trigger.timeInterval = interval;
+ } else {
+ _trigger.fireDate = [NSDate dateWithTimeIntervalSince1970: [date doubleValue]];
+ }
+ JPushNotificationRequest *_request = [[JPushNotificationRequest alloc] init];
+ _request.requestIdentifier = [NSString stringWithFormat:@"%@",_dict[@"id"]];
+ _request.content = _content;
+ _request.trigger = _trigger;
+ _request.completionHandler = ^(id result) {
+ // iOS10浠ヤ笂鎴愬姛鍒檙esult涓篣NNotificationRequest瀵硅薄锛屽け璐ュ垯result涓簄il;iOS10浠ヤ笅鎴愬姛result涓篣ILocalNotification瀵硅薄锛屽け璐ュ垯result涓簄il
+ NSLog(@"缁撴灉杩斿洖锛�%@", result);
+ };
+ [JPUSHService addNotification:_request];
+ break;
+ }
+ }
+ }
+}
+@end
+
+extern "C" void native_opus_init(int frequency, int bitRate, int bandMode)
+{
+ s_frequency = frequency;
+ s_bandMode = bandMode;
+ s_bitRate = bitRate;
+ s_frameSize = frequency / 100;
+}
+
+extern "C" int native_opus_encode(opus_int16 *pcm, int len, unsigned char *opus)
+{
+ int errorCode = 0;
+ opus_int32 skip = 0;
+ OpusEncoder *enc = opus_encoder_create(s_frequency, CHANNEL_NUM, OPUS_APPLICATION_VOIP, &errorCode);
+ if (OPUS_OK != errorCode) {
+ enc = NULL;
+ return -1;
+ }
+
+ opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(s_bandMode));
+ opus_encoder_ctl(enc, OPUS_SET_BITRATE(s_bitRate));
+ opus_encoder_ctl(enc, OPUS_SET_VBR(1));
+ opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10));
+ opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(0));
+ opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(OPUS_SIGNAL_VOICE));
+ opus_encoder_ctl(enc, OPUS_SET_DTX(0));
+ opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(0));
+ opus_encoder_ctl(enc, OPUS_GET_LOOKAHEAD(&skip));
+ opus_encoder_ctl(enc, OPUS_SET_LSB_DEPTH(16));
+
+ unsigned char *rbytes = opus;
+ opus_int16 *frame = pcm;
+ int totalSize = 0;
+ while (len >= s_frameSize)
+ {
+ opus_int32 length = opus_encode(enc, frame, s_frameSize, rbytes + sizeof(char), s_bitRate);
+ rbytes[0] = length;
+ frame += s_frameSize;
+ rbytes += length + sizeof(char);
+ len -= s_frameSize;
+ totalSize += length;
+ }
+ opus_encoder_destroy(enc);
+ return totalSize;
+}
+
+extern "C" int native_opus_decode(unsigned char *opus, int len, short *pcm)
+{
+ int err = 0;
+ //opus_int32 skip = 0;
+
+ OpusDecoder *dec = opus_decoder_create(s_frequency, CHANNEL_NUM, &err);
+ if (err != OPUS_OK) {
+ dec = NULL;
+ return -1;
+ }
+
+ while (len > 0)
+ {
+ int frame_opus_length = opus[0];
+ int length = opus_decode(dec, opus + sizeof(char), frame_opus_length, pcm, s_frameSize, 0);
+ opus += sizeof(char) + frame_opus_length;
+ pcm += s_frameSize;
+ len = len - frame_opus_length - sizeof(char);
+ }
+ opus_decoder_destroy(dec);
+ return 0;
+}
--
Gitblit v1.8.0