Fix compile error on Linux platform and use c++ style header file(<cstddef> instead of <stddef.h>)

This commit is contained in:
dijunkun
2024-05-23 14:41:51 +08:00
parent 5decc4b007
commit 3fc8f9f616
21 changed files with 40 additions and 37 deletions

View File

@@ -7,8 +7,8 @@
#ifndef _FEC_DECODER_H_ #ifndef _FEC_DECODER_H_
#define _FEC_DECODER_H_ #define _FEC_DECODER_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -7,8 +7,8 @@
#ifndef _FEC_ENCODER_H_ #ifndef _FEC_ENCODER_H_
#define _FEC_ENCODER_H_ #define _FEC_ENCODER_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -1,8 +1,7 @@
#include "audio_frame.h" #include "audio_frame.h"
#include <string.h> #include <cstring>
#include <utility>
#include <string>
AudioFrame::AudioFrame() {} AudioFrame::AudioFrame() {}

View File

@@ -7,8 +7,8 @@
#ifndef _AUDIO_FRAME_H_ #ifndef _AUDIO_FRAME_H_
#define _AUDIO_FRAME_H_ #define _AUDIO_FRAME_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
class AudioFrame { class AudioFrame {
public: public:

View File

@@ -1,8 +1,7 @@
#include "video_frame.h" #include "video_frame.h"
#include <string.h> #include <cstring>
#include <utility>
#include <string>
VideoFrame::VideoFrame() {} VideoFrame::VideoFrame() {}

View File

@@ -7,8 +7,8 @@
#ifndef _VIDEO_FRAME_H_ #ifndef _VIDEO_FRAME_H_
#define _VIDEO_FRAME_H_ #define _VIDEO_FRAME_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
class VideoFrame { class VideoFrame {
public: public:

View File

@@ -1,7 +1,6 @@
#include "ice_agent.h" #include "ice_agent.h"
#include <string.h> #include <cstring>
#include <iostream> #include <iostream>
#include "log.h" #include "log.h"

View File

@@ -9,8 +9,8 @@
#define DLLAPI #define DLLAPI
#endif #endif
#include <stdint.h> #include <cstddef>
#include <stdlib.h> #include <cstdint>
enum DATA_TYPE { VIDEO = 0, AUDIO, DATA }; enum DATA_TYPE { VIDEO = 0, AUDIO, DATA };
enum ConnectionStatus { enum ConnectionStatus {

View File

@@ -1,8 +1,7 @@
#include "audio_encoder.h" #include "audio_encoder.h"
#include <stdlib.h>
#include <chrono> #include <chrono>
#include <cstdlib>
#include <cstring> #include <cstring>
#include "log.h" #include "log.h"

View File

@@ -7,6 +7,9 @@
#ifndef _VIDEO_DECODER_H_ #ifndef _VIDEO_DECODER_H_
#define _VIDEO_DECODER_H_ #define _VIDEO_DECODER_H_
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <functional> #include <functional>
#include "video_frame.h" #include "video_frame.h"

View File

@@ -1,6 +1,9 @@
#ifndef _VIDEO_ENCODER_H_ #ifndef _VIDEO_ENCODER_H_
#define _VIDEO_ENCODER_H_ #define _VIDEO_ENCODER_H_
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <functional> #include <functional>
class VideoEncoder { class VideoEncoder {

View File

@@ -1,7 +1,7 @@
#ifndef _RINGBUFFER_H_ #ifndef _RINGBUFFER_H_
#define _RINGBUFFER_H_ #define _RINGBUFFER_H_
#include <string.h> #include <cstring>
int RingBufferDummy(); int RingBufferDummy();

View File

@@ -1,7 +1,8 @@
#ifndef _RTCP_HEADER_H_ #ifndef _RTCP_HEADER_H_
#define _RTCP_HEADER_H_ #define _RTCP_HEADER_H_
#include <stdint.h> #include <cstddef>
#include <cstdint>
#include "log.h" #include "log.h"

View File

@@ -1,7 +1,8 @@
#ifndef _RTCP_TYPEDEF_H_ #ifndef _RTCP_TYPEDEF_H_
#define _RTCP_TYPEDEF_H_ #define _RTCP_TYPEDEF_H_
#include <stdint.h> #include <cstddef>
#include <cstdint>
#define DEFAULT_RTCP_VERSION 2 #define DEFAULT_RTCP_VERSION 2
#define DEFAULT_RTCP_HEADER_SIZE 4 #define DEFAULT_RTCP_HEADER_SIZE 4

View File

@@ -1,6 +1,6 @@
#include "byte_buffer.h" #include "byte_buffer.h"
#include <string.h> #include <cstring>
ByteBufferReader::ByteBufferReader(const char* bytes, size_t len) { ByteBufferReader::ByteBufferReader(const char* bytes, size_t len) {
Construct(bytes, len); Construct(bytes, len);

View File

@@ -7,8 +7,8 @@
#ifndef _BYTE_BUFFER_H_ #ifndef _BYTE_BUFFER_H_
#define _BYTE_BUFFER_H_ #define _BYTE_BUFFER_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
class ByteBufferReader { class ByteBufferReader {
public: public:

View File

@@ -7,8 +7,8 @@
#ifndef _OBU_H_ #ifndef _OBU_H_
#define _OBU_H_ #define _OBU_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
#include "aom/aom_codec.h" #include "aom/aom_codec.h"

View File

@@ -7,9 +7,8 @@
#ifndef _OBU_PARSER_H_ #ifndef _OBU_PARSER_H_
#define _OBU_PARSER_H_ #define _OBU_PARSER_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
#include <vector> #include <vector>
#include "obu.h" #include "obu.h"

View File

@@ -1,8 +1,8 @@
#ifndef _RTP_CODEC_H_ #ifndef _RTP_CODEC_H_
#define _RTP_CODEC_H_ #define _RTP_CODEC_H_
#include <stdint.h> #include <cstddef>
#include <cstdint>
#include <vector> #include <vector>
#include "fec_encoder.h" #include "fec_encoder.h"

View File

@@ -1,10 +1,9 @@
#ifndef _RTP_PACKET_H_ #ifndef _RTP_PACKET_H_
#define _RTP_PACKET_H_ #define _RTP_PACKET_H_
#include <stddef.h> #include <cstddef>
#include <stdint.h> #include <cstdint>
#include <string.h> #include <cstring>
#include <vector> #include <vector>
#include "log.h" #include "log.h"

View File

@@ -1,6 +1,7 @@
#ifndef _RTP_TRANSCEIVER_H_ #ifndef _RTP_TRANSCEIVER_H_
#define _RTP_TRANSCEIVER_H_ #define _RTP_TRANSCEIVER_H_
#include <cstddef>
#include <functional> #include <functional>
class RtpTransceiver { class RtpTransceiver {