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

Method NotifyCaptureScreen

mediaPlayer/player_notifier.cpp:188–203  ·  view source on GitHub ↗

TODO: change releaseAppleImage to a parameter of NotifyCaptureScreen

Source from the content-addressed store, hash-verified

186
187 // TODO: change releaseAppleImage to a parameter of NotifyCaptureScreen
188 void PlayerNotifier::NotifyCaptureScreen(uint8_t *buffer, int width, int height)
189 {
190 if (!mEnable || mListener.CaptureScreen == nullptr) {
191 return;
192 }
193
194 if (width == -1 && height == -1) {
195 auto *event = new player_event(width, height, buffer, mListener.CaptureScreen, false, releaseAppleImage);
196 pushEvent(event);
197 return;
198 }
199 auto *dupBuffer = static_cast<uint8_t *>(malloc(width * height * 4));
200 memcpy(dupBuffer, buffer, width * height * 4);
201 auto *event = new player_event(width, height, dupBuffer, mListener.CaptureScreen, false);
202 pushEvent(event);
203 }
204
205 void PlayerNotifier::NotifyPosition(int64_t pos)
206 {

Callers 1

CaptureScreenMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected