change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
+25 -27
View File
@@ -25,28 +25,28 @@
#include <QObject>
#include <QTimer>
namespace olive {
class FrameManager : public QObject
namespace olive
{
Q_OBJECT
class FrameManager : public QObject {
Q_OBJECT
public:
static void CreateInstance();
static void CreateInstance();
static void DestroyInstance();
static void DestroyInstance();
static FrameManager* instance();
static FrameManager *instance();
static char* Allocate(int size);
static char *Allocate(int size);
static void Deallocate(int size, char* buffer);
static void Deallocate(int size, char *buffer);
private:
FrameManager();
FrameManager();
virtual ~FrameManager() override;
virtual ~FrameManager() override;
/**
/**
* @brief Allocate buffer
*
* Caller takes ownership of buffer and can delete it if they want. It can also be returned to
@@ -54,9 +54,9 @@ private:
*
* Thread-safe.
*/
char* AllocateFromPool(int size);
char *AllocateFromPool(int size);
/**
/**
* @brief Deallocate buffer
*
* Manager will take ownership and buffer will stay allocated for some time in case it can be
@@ -64,27 +64,25 @@ private:
*
* Thread-safe.
*/
void DeallocateToPool(int size, char* buffer);
void DeallocateToPool(int size, char *buffer);
static FrameManager* instance_;
static FrameManager *instance_;
static const int kFrameLifetime;
static const int kFrameLifetime;
struct Buffer
{
qint64 time;
char* data;
};
struct Buffer {
qint64 time;
char *data;
};
std::map< int, std::list<Buffer> > pool_;
std::map<int, std::list<Buffer>> pool_;
QMutex mutex_;
QMutex mutex_;
QTimer clear_timer_;
QTimer clear_timer_;
private slots:
void GarbageCollection();
void GarbageCollection();
};
}