mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 20:17:04 +03:00
update opus and remove certs
This commit is contained in:
@@ -198,7 +198,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_encoder_get_size(int channels);
|
||||
* 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 [in] application <tt>int</tt>: Coding mode (one of @ref OPUS_APPLICATION_VOIP, @ref OPUS_APPLICATION_AUDIO, or @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
|
||||
@@ -222,7 +222,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusEncoder *opus_encoder_create(
|
||||
* 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)
|
||||
* @param [in] application <tt>int</tt>: Coding mode (one of OPUS_APPLICATION_VOIP, OPUS_APPLICATION_AUDIO, or OPUS_APPLICATION_RESTRICTED_LOWDELAY)
|
||||
* @retval #OPUS_OK Success or @ref opus_errorcodes
|
||||
*/
|
||||
OPUS_EXPORT int opus_encoder_init(
|
||||
|
||||
@@ -104,7 +104,8 @@ typedef struct OpusCustomDecoder OpusCustomDecoder;
|
||||
/** The mode contains all the information necessary to create an
|
||||
encoder. Both the encoder and decoder need to be initialized
|
||||
with exactly the same mode, otherwise the output will be
|
||||
corrupted.
|
||||
corrupted. The mode MUST NOT BE DESTROYED until the encoders and
|
||||
decoders that use it are destroyed as well.
|
||||
@brief Mode configuration
|
||||
*/
|
||||
typedef struct OpusCustomMode OpusCustomMode;
|
||||
@@ -178,7 +179,7 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encode
|
||||
) OPUS_ARG_NONNULL(1);
|
||||
|
||||
|
||||
/** Destroys a an encoder state.
|
||||
/** Destroys an encoder state.
|
||||
* @param[in] st <tt>OpusCustomEncoder*</tt>: State to be freed.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT void opus_custom_encoder_destroy(OpusCustomEncoder *st);
|
||||
@@ -286,7 +287,7 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decode
|
||||
int *error
|
||||
) OPUS_ARG_NONNULL(1);
|
||||
|
||||
/** Destroys a an decoder state.
|
||||
/** Destroys a decoder state.
|
||||
* @param[in] st <tt>OpusCustomDecoder*</tt>: State to be freed.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT void opus_custom_decoder_destroy(OpusCustomDecoder *st);
|
||||
|
||||
@@ -64,7 +64,7 @@ extern "C" {
|
||||
/**Export control for opus functions */
|
||||
|
||||
#ifndef OPUS_EXPORT
|
||||
# if defined(WIN32)
|
||||
# if defined(_WIN32)
|
||||
# if defined(OPUS_BUILD) && defined(DLL_EXPORT)
|
||||
# define OPUS_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
@@ -482,7 +482,8 @@ extern "C" {
|
||||
* @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>
|
||||
* <dt>1</dt><dd>Inband FEC enabled. If the packet loss rate is sufficiently high, Opus will automatically switch to SILK even at high rates to enable use of that FEC.</dd>
|
||||
* <dt>2</dt><dd>Inband FEC enabled, but does not necessarily switch to SILK if we have music.</dd>
|
||||
* </dl>
|
||||
* @hideinitializer */
|
||||
#define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x)
|
||||
@@ -491,7 +492,8 @@ extern "C" {
|
||||
* @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>
|
||||
* <dt>1</dt><dd>Inband FEC enabled. If the packet loss rate is sufficiently high, Opus will automatically switch to SILK even at high rates to enable use of that FEC.</dd>
|
||||
* <dt>2</dt><dd>Inband FEC enabled, but does not necessarily switch to SILK if we have music.</dd>
|
||||
* </dl>
|
||||
* @hideinitializer */
|
||||
#define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x)
|
||||
|
||||
Binary file not shown.
@@ -69,7 +69,7 @@ static void register_deep_sleep();
|
||||
static void register_light_sleep();
|
||||
static void register_factory_boot();
|
||||
static void register_restart_ota();
|
||||
static void register_update_certs();
|
||||
//static void register_update_certs();
|
||||
static void register_set_services();
|
||||
#if WITH_TASKS_INFO
|
||||
static void register_tasks();
|
||||
@@ -86,7 +86,7 @@ void register_system()
|
||||
register_restart();
|
||||
register_deep_sleep();
|
||||
register_light_sleep();
|
||||
register_update_certs();
|
||||
//register_update_certs();
|
||||
register_factory_boot();
|
||||
register_restart_ota();
|
||||
#if WITH_TASKS_INFO
|
||||
@@ -562,6 +562,7 @@ static void register_tasks()
|
||||
|
||||
#endif // WITH_TASKS_INFO
|
||||
|
||||
/*
|
||||
extern esp_err_t update_certificates(bool force);
|
||||
static int force_update_cert(int argc, char **argv){
|
||||
return update_certificates(true);
|
||||
@@ -577,7 +578,7 @@ static void register_update_certs()
|
||||
};
|
||||
ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) );
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/** 'deep_sleep' command puts the chip into deep sleep mode */
|
||||
|
||||
@@ -349,7 +349,7 @@ esp_err_t init_config(ota_thread_parms_t * p_ota_thread_parms){
|
||||
}
|
||||
switch (ota_status->ota_type) {
|
||||
case OTA_TYPE_HTTP:
|
||||
http_client_config.cert_pem =get_certificate();
|
||||
//http_client_config.cert_pem =get_certificate();
|
||||
http_client_config.event_handler = _http_event_handler;
|
||||
http_client_config.disable_auto_redirect=false;
|
||||
http_client_config.skip_cert_common_name_check = false;
|
||||
|
||||
@@ -47,9 +47,11 @@
|
||||
#include "cmd_system.h"
|
||||
#include "tools.h"
|
||||
|
||||
/*
|
||||
static const char certs_namespace[] = "certificates";
|
||||
static const char certs_key[] = "blob";
|
||||
static const char certs_version[] = "version";
|
||||
*/
|
||||
const char unknown_string_placeholder[] = "unknown";
|
||||
const char null_string_placeholder[] = "null";
|
||||
EventGroupHandle_t network_event_group;
|
||||
@@ -67,8 +69,10 @@ RTC_NOINIT_ATTR uint16_t ColdBootIndicatorFlag;
|
||||
bool cold_boot=true;
|
||||
|
||||
static bool bNetworkConnected=false;
|
||||
/*
|
||||
extern const uint8_t server_cert_pem_start[] asm("_binary_github_pem_start");
|
||||
extern const uint8_t server_cert_pem_end[] asm("_binary_github_pem_end");
|
||||
*/
|
||||
|
||||
// as an exception _init function don't need include
|
||||
extern void services_init(void);
|
||||
@@ -159,8 +163,8 @@ void set_log_level(char * tag, char * level){
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
esp_err_t update_certificates(bool force){
|
||||
|
||||
nvs_handle handle;
|
||||
esp_err_t esp_err;
|
||||
esp_app_desc_t running_app_info;
|
||||
@@ -231,6 +235,9 @@ esp_err_t update_certificates(bool force){
|
||||
nvs_close(handle);
|
||||
return ESP_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
const char * get_certificate(){
|
||||
nvs_handle handle;
|
||||
esp_err_t esp_err;
|
||||
@@ -266,6 +273,7 @@ const char * get_certificate(){
|
||||
}
|
||||
return blob;
|
||||
}
|
||||
*/
|
||||
|
||||
#define DEFAULT_NAME_WITH_MAC(var,defval) char var[strlen(defval)+sizeof(macStr)]; strcpy(var,defval); strcat(var,macStr)
|
||||
void register_default_string_val(const char * key, char * value){
|
||||
@@ -495,9 +503,11 @@ void app_main()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
ESP_LOGI(TAG,"Checking if certificates need to be updated");
|
||||
update_certificates(false);
|
||||
MEMTRACE_PRINT_DELTA();
|
||||
*/
|
||||
|
||||
ESP_LOGD(TAG,"Getting firmware OTA URL (if any)");
|
||||
fwurl = process_ota_url();
|
||||
|
||||
Reference in New Issue
Block a user