mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
Optimize build script
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
#ifndef _X_H_
|
||||
#define _X_H_
|
||||
|
||||
#ifdef DLL_EXPORTS
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
#else
|
||||
#define DLLAPI __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -34,20 +40,20 @@ typedef struct {
|
||||
NetStatusReport net_status_report;
|
||||
} Params;
|
||||
|
||||
PeerPtr* CreatePeer(const Params* params);
|
||||
DLLAPI PeerPtr* CreatePeer(const Params* params);
|
||||
|
||||
int Init(PeerPtr* peer_ptr, const char* user_id);
|
||||
DLLAPI int Init(PeerPtr* peer_ptr, const char* user_id);
|
||||
|
||||
int CreateConnection(PeerPtr* peer_ptr, const char* transmission_id,
|
||||
const char* password);
|
||||
DLLAPI int CreateConnection(PeerPtr* peer_ptr, const char* transmission_id,
|
||||
const char* password);
|
||||
|
||||
int JoinConnection(PeerPtr* peer_ptr, const char* transmission_id,
|
||||
const char* password);
|
||||
DLLAPI int JoinConnection(PeerPtr* peer_ptr, const char* transmission_id,
|
||||
const char* password);
|
||||
|
||||
int LeaveConnection(PeerPtr* peer_ptr);
|
||||
DLLAPI int LeaveConnection(PeerPtr* peer_ptr);
|
||||
|
||||
int SendData(PeerPtr* peer_ptr, DATA_TYPE data_type, const char* data,
|
||||
size_t size);
|
||||
DLLAPI int SendData(PeerPtr* peer_ptr, DATA_TYPE data_type, const char* data,
|
||||
size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
#define SAVE_H264_STREAM 0
|
||||
|
||||
#define YUV420P_BUFFER_SIZE 1280 * 720 * 3 / 2
|
||||
unsigned char yuv420p_buffer[YUV420P_BUFFER_SIZE];
|
||||
static unsigned char yuv420p_buffer[YUV420P_BUFFER_SIZE];
|
||||
|
||||
int NV12ToYUV420PFFmpeg(unsigned char *src_buffer, int width, int height,
|
||||
unsigned char *dst_buffer) {
|
||||
static int NV12ToYUV420PFFmpeg(unsigned char *src_buffer, int width, int height,
|
||||
unsigned char *dst_buffer) {
|
||||
AVFrame *Input_pFrame = av_frame_alloc();
|
||||
AVFrame *Output_pFrame = av_frame_alloc();
|
||||
struct SwsContext *img_convert_ctx = sws_getContext(
|
||||
|
||||
@@ -23,10 +23,10 @@ extern "C" {
|
||||
#define SAVE_H264_STREAM 0
|
||||
|
||||
#define YUV420P_BUFFER_SIZE 1280 * 720 * 3 / 2
|
||||
unsigned char yuv420p_buffer[YUV420P_BUFFER_SIZE];
|
||||
static unsigned char yuv420p_buffer[YUV420P_BUFFER_SIZE];
|
||||
|
||||
int NV12ToYUV420PFFmpeg(unsigned char *src_buffer, int width, int height,
|
||||
unsigned char *dst_buffer) {
|
||||
static int NV12ToYUV420PFFmpeg(unsigned char *src_buffer, int width, int height,
|
||||
unsigned char *dst_buffer) {
|
||||
AVFrame *Input_pFrame = av_frame_alloc();
|
||||
AVFrame *Output_pFrame = av_frame_alloc();
|
||||
struct SwsContext *img_convert_ctx = sws_getContext(
|
||||
|
||||
Reference in New Issue
Block a user