/// 在内存中的录像文件链表的节点结构体
//链表节点
typedef struct _tMEDIA_LIST_NODE_INFO_
{
char szFileName[64]; //录像文件全路径
int channel_id;
U32 starttime; //开始时间
U64 firstTimeTick; //第一帧的时间戳
U32 totaltick; //总时间, 毫秒总数
U32 blockSize; //数据块大小, 字节
U32 createId; //创建序列---唯一值
U32 iCurrentIndex; //在索引文件的位置ID, 从零开始, 该值在未录满时会累积, 覆盖阶段重用。
U32 validBlock; //是否合法, 默认不合法
U32 eventRecord;
U32 frameCnt;
U32 channelID;
struct _tMEDIA_LIST_NODE_INFO_ *pNext;
struct _tMEDIA_LIST_NODE_INFO_ *pPrv;
}tMEDIA_LIST_NODE_INFO;
struct CMUX_H264_INFO {
AM_U16 width; //1280
AM_U16 height; //720
AM_U32 fps; //25
AM_U16 M;
AM_U16 N;
AM_U32 rate; //40
AM_U32 scale; //1000
};
//索引文件 .index.bin 头部
#define MEDIA_INDEX_FILE_HEAD_MAGIC_STRING "INDEX FILE HEAD"
typedef struct MediaIndexFileHead_S
{
char szMagicString[32];
unsigned int iTotalIndexEntryCnt; //索引项的总数, 此值只加不减
unsigned int iTotalCoverCnt; //覆盖后仍不能满足要求, 这样的节点不能存于链表中
unsigned int iTotalValidIndexEntryCnt; //包括所有的合法块和断电后的非法块
char szReserved[468];
}MediaIndexFileHead_T; //512 Bytes
//// @brief 存储在/tmp/sd0下的隐藏索引文件 .index.bin 中
//64位时间戳
typedef struct MediaIndexFileEntry_S
{
char szMagicString[32];
char szRecordFileName[64];
U64 firstTimeTick; //第一帧的时间戳, 64位值
U32 iFileSize; //Bytes
U32 iCreateSeqID; //生命周期的创建序列
U32 iCurrentIndex; //在索引文件的位置ID
U32 iEventBlockFlag;
U32 iStartTime;
U32 iTotalTime;
U32 validBlock; //合法标记
U32 coverBlock; //覆盖块, 但空间仍不够, 该槽位不使用
U32 frameCnt;
U32 channelID; //通道号
char szReserved[368];
}MediaIndexFileEntry_T; //512 Bytes
typedef struct
{
uint64_t timeTick; //时间戳
uint32_t videoLen; //视频长度
uint16_t audioLen; //音频长度
uint8_t frameVer:2; //FrameHead version
uint8_t resolution:6; //VideoResolutionType_E
uint8_t iFrame :1; //位域|0:非关键帧 1:关键帧|
uint8_t videoCodec :3; //VideoCodecType_E
uint8_t audioCodec :4; //AudioCodecType_E
uint8_t audioChannels:1; //AudioChannelType_E
uint8_t audioSampleRate:3; //AudioSampleRate_E
uint8_t audioSampleFormat:4; //AudioSampleFormat_E
uint8_t reverse[7];
char body[0]; ///< 帧数据
} FrameHead_V1_S;
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。