MCPcopy Create free account
hub / github.com/defold/defold / WriteIvfFrameHeader

Function WriteIvfFrameHeader

engine/record/src/record/record.cpp:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97
98 static bool WriteIvfFrameHeader(HRecorder recorder, const vpx_codec_cx_pkt_t *pkt)
99 {
100 char header[12];
101 vpx_codec_pts_t pts;
102
103 if(pkt->kind != VPX_CODEC_CX_FRAME_PKT)
104 return true;
105
106 pts = pkt->data.frame.pts;
107 MemPutLE32(header, pkt->data.frame.sz);
108 MemPutLE32(header+4, pts&0xFFFFFFFF);
109 MemPutLE32(header+8, pts >> 32);
110
111 return fwrite(header, 1, sizeof(header), recorder->m_File) == sizeof(header);
112 }
113
114 Result New(const NewParams* params, HRecorder* recorder)
115 {

Callers 1

RecordFrameFunction · 0.85

Calls 1

MemPutLE32Function · 0.85

Tested by

no test coverage detected