MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / set_frame

Method set_frame

src/video.cpp:184–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 }
183
184 int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) override {
185 this->frame = frame;
186
187 // If it's a hwframe, allocate buffers for hardware
188 if (hw_frames_ctx) {
189 hw_frame.reset(frame);
190
191 if (av_hwframe_get_buffer(hw_frames_ctx, frame, 0)) {
192 return -1;
193 }
194 } else {
195 sw_frame.reset(frame);
196 }
197
198 return 0;
199 }
200
201 void apply_colorspace() override {
202 auto avcodec_colorspace = avcodec_colorspace_from_sunshine_colorspace(colorspace);

Callers 1

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected