mirror of
https://github.com/niellun/FastCarPlay.git
synced 2026-06-07 09:38:25 +02:00
fix headers
This commit is contained in:
+2
-2
@@ -1,9 +1,9 @@
|
||||
#ifndef SRC_PCM_AUDIO
|
||||
#define SRC_PCM_AUDIO
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include "common/status.h"
|
||||
|
||||
class AESCipher
|
||||
{
|
||||
public:
|
||||
@@ -20,11 +19,11 @@ public:
|
||||
bool decrypt(uint8_t *data, uint32_t length, char *err) const;
|
||||
|
||||
uint32_t seed() const { return _seed; }
|
||||
const std::string& key() const { return _baseKey; }
|
||||
const std::string &key() const { return _baseKey; }
|
||||
|
||||
static bool error(char* error, const char* message)
|
||||
static bool error(char *error, const char *message)
|
||||
{
|
||||
if(error)
|
||||
if (error)
|
||||
strcpy(error, message);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "connection.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
|
||||
#include "libavcodec/defs.h"
|
||||
|
||||
@@ -220,7 +220,7 @@ void Connection::readLoop()
|
||||
break;
|
||||
}
|
||||
|
||||
if (result != LIBUSB_SUCCESS || transferred != message->headerSize())
|
||||
if (result != LIBUSB_SUCCESS || transferred != static_cast<int>(message->headerSize()))
|
||||
{
|
||||
if (result != LIBUSB_ERROR_TIMEOUT)
|
||||
log_w("Header read failed > transfered %d / %d status %d", transferred, message->headerSize(), result);
|
||||
@@ -310,7 +310,6 @@ void Connection::processLoop()
|
||||
{
|
||||
if (!_processQueue.wait(_connected))
|
||||
continue;
|
||||
;
|
||||
|
||||
std::unique_ptr<Message> message = _processQueue.pop();
|
||||
if (!message)
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
#include "struct/atomic_queue.h"
|
||||
#include "protocol/aes_cipher.h"
|
||||
@@ -23,7 +21,6 @@
|
||||
#define AUDIO_QUEUE_SIZE 128
|
||||
#define PROCESS_QUEUE_SIZE 128
|
||||
|
||||
|
||||
#define ENCRYPTION_BASE "SkBRDy3gmrw1ieH0"
|
||||
|
||||
class Connection
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "protocol/protocol_const.h"
|
||||
#include "common/functions.h"
|
||||
#include "settings.h"
|
||||
#include "protocol/message.h"
|
||||
|
||||
|
||||
Recorder::Recorder()
|
||||
: _queue(nullptr), _active(false), _device(0)
|
||||
|
||||
+1
-3
@@ -1,7 +1,6 @@
|
||||
#ifndef SRC_RECORDER
|
||||
#define SRC_RECORDER
|
||||
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
@@ -20,11 +19,10 @@ public:
|
||||
|
||||
private:
|
||||
static void AudioCallback(void *userdata, Uint8 *stream, int len);
|
||||
void runner();
|
||||
|
||||
AtomicQueue<Message> *_queue;
|
||||
std::atomic<bool> _active;
|
||||
SDL_AudioDeviceID _device;
|
||||
SDL_AudioDeviceID _device;
|
||||
};
|
||||
|
||||
#endif /* SRC_RECORDER */
|
||||
|
||||
Reference in New Issue
Block a user