Files
2026-02-01 22:23:06 +08:00

37 lines
763 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef FRAMEDATA_H
#define FRAMEDATA_H
#include <cstring>
//帧数据
struct FrameData
{
static const int FRAME_SIZE = 1024;
int m_nFrameNo;
int m_nRealLength; //帧数据的实际长度, 一般为1024不足1024时为实际的字节数
char m_data[FRAME_SIZE];
FrameData()
{
m_nFrameNo = 0;
m_nRealLength = 0;
memset(m_data, 0xFF, sizeof(m_data));//无效数据用FF填充
}
FrameData& operator=(const FrameData& other)
{
if (this == &other)
{
return *this;
}
m_nFrameNo = other.m_nFrameNo;
m_nRealLength = other.m_nRealLength;
memcpy(m_data, other.m_data, sizeof(m_data));
return *this;
}
};
#endif // FRAMEDATA_H