MCPcopy Create free account
hub / github.com/Anttwo/SuGaR / encode

Method encode

gaussian_splatting/SIBR_viewers/src/core/video/FFmpegVideoEncoder.cpp:230–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228
229#ifndef HEADLESS
230 bool FFVideoEncoder::encode(AVFrame * frame)
231 {
232 int got_picture = 0;
233
234 int ret = avcodec_encode_video2(pCodecCtx, pkt, frameYUV, &got_picture);
235 if (ret < 0) {
236 SIBR_WRG << "[FFMPEG] Failed to encode frame." << std::endl;
237 return false;
238 }
239 if (got_picture == 1) {
240 pkt->stream_index = video_st->index;
241 ret = av_write_frame(pFormatCtx, pkt);
242 av_packet_unref(pkt);
243 }
244
245 return true;
246 }
247#endif
248
249}

Callers 1

write_images_binaryFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected