void AppBusiLogic::SDKGetAppIconAndShow(bool show, int width, int height) {
if (!show && mAppIconView) {
bytertc::ScreenCaptureSourceInfo info = mCurScreenSourceInfo;
bytertc::IVideoFrame* videoFrame = mByteEngineWrapper->GetWindowAppIcon(info.source_id, width, height);
if (info.type != bytertc::kScreenCaptureSourceTypeWindow || !videoFrame) {
ToastForm::toast(TEXT("获取应用图标失败"), 2000, ToastForm::TipsToast,
WindowMgr::GetInstance().Find(WindowMgr::RTC_CALL_SETTTING));
if (videoFrame->pixelFormat() == bytertc::kVideoPixelFormatRGBA) {
image = QImage(videoFrame->getPlaneData(0), videoFrame->width(),
videoFrame->height(), QImage::Format_RGBA8888);
} else if (videoFrame->pixelFormat() == bytertc::kVideoPixelFormatARGB) {
image = QImage(videoFrame->getPlaneData(0), videoFrame->width(),
videoFrame->height(), QImage::Format_ARGB32);
mAppIconView = new PixmapButton();
auto settingWdg = WindowMgr::GetInstance().Find(WindowMgr::RTC_CALL_SETTTING);
mAppIconView->move(settingWdg->x(), 0);
QString title = QString::number(videoFrame->width()) + "x" + QString::number(videoFrame->height());
mAppIconView->setWindowTitle(title);
mAppIconView->makePixmapBtn(QPixmap::fromImage(image));
mAppIconView->setMinimumSize(200, 200);