|
|
@@ -3,6 +3,8 @@
|
|
|
|
|
|
#include "screencapture.h"
|
|
|
#include <screencodec.h>
|
|
|
+#include "../..//Other/libvideoframework/videoutil.h"
|
|
|
+#include "../../Other/rvcmediacommon/rvc_media_common.h"
|
|
|
|
|
|
#include "mod_assistantchannel/AssistantChannel_client_g.h"
|
|
|
using namespace AssistantChannel;
|
|
|
@@ -203,7 +205,6 @@ public:
|
|
|
m_pChannelClient = NULL;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
return Error;
|
|
|
}
|
|
|
|
|
|
@@ -286,6 +287,7 @@ public:
|
|
|
LOG_TRACE("capture screen failed! %d", err);
|
|
|
return;
|
|
|
}
|
|
|
+ Dbg("capture screen, cx: %d, cy: %d, size: %d", cx, cy, size);
|
|
|
void *buf = malloc(size);
|
|
|
err = screencapture_capture(&rc, buf, &size);
|
|
|
if (err != 0) {
|
|
|
@@ -343,6 +345,17 @@ public:
|
|
|
m_pChannelClient->Send(Info);
|
|
|
}
|
|
|
|
|
|
+#if 0
|
|
|
+ int linesize = size / cy;
|
|
|
+ video_frame tmp_frame;
|
|
|
+ video_frame_alloc(linesize/3, cy, VIDEO_FORMAT_RGB24, &tmp_frame);
|
|
|
+ video_frame_fill_black(&tmp_frame);
|
|
|
+ memcpy(tmp_frame.data[0], buf, size);
|
|
|
+ video_frame_save_bmpfile("screenshot_abc.bmp", &tmp_frame);
|
|
|
+ video_frame_free(&tmp_frame);
|
|
|
+ //video_frame_save_bmpfile("d:\\ab.bmp", &rtp_frame);
|
|
|
+ Dbg("capture screen, linesize: %d.", linesize);
|
|
|
+#endif
|
|
|
free(buf);
|
|
|
LOG_TRACE("encode size = %d Bytes, time = %d", Info.data.m_iLength, SP::Module::Comm::RVCGetTickCount());
|
|
|
}
|