MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / testFrame

Function testFrame

framework/ffmpeg/sdl_test.cpp:199–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197#if 1
198
199void testFrame()
200{
201 AVFrame *frame = av_frame_alloc();
202 frame->format = AV_PIX_FMT_YUV420P;
203 frame->width = 1920;
204 frame->height = 1080;
205 int ret = av_frame_get_buffer(frame, 32);
206
207 if (ret < 0) {
208 AF_LOGE("Could not allocate the video frame data\n");
209 }
210
211 frame->pts = 100;
212 AVAFFrame avafFrame{frame};
213 av_frame_free(&frame);
214 auto clone_frame = avafFrame.clone();
215 auto &info = clone_frame->getInfo();
216 info.pts = 200;
217 clone_frame->dump();
218 avafFrame.dump();
219}
220
221void testPacket()
222{

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected