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

Function testFrame

framework/ffmpeg/ffmpeg_test.cpp:134–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132#if 1
133
134void testFrame()
135{
136 AVFrame *frame = av_frame_alloc();
137 frame->format = AV_PIX_FMT_YUV420P;
138 frame->width = 1920;
139 frame->height = 1080;
140 int ret = av_frame_get_buffer(frame, 32);
141
142 if (ret < 0) {
143 AF_LOGE("Could not allocate the video frame data\n");
144 }
145
146 frame->pts = 100;
147 AVAFFrame avafFrame{frame};
148 av_frame_free(&frame);
149 auto clone_frame = avafFrame.clone();
150 auto &info = clone_frame->getInfo();
151 info.pts = 200;
152 clone_frame->dump();
153 avafFrame.dump();
154}
155
156void testPacket()
157{

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected