问题描述
我开发了一个MFC VC ++应用程序来记录Windows桌面上的用户操作并以avi文件的形式存储它。我使用过Microsoft Windows的VFW库。我在我的函数中使用以下代码片段来创建avi视频。
I have developed a MFC VC++ application to record the user action on a windows desktop and store it in the form of avi file. I have used the VFW library of Microsoft Windows. I am using the below code snippets in my function to create the avi video.
//写第一帧
// Write the first frame
AVIFileInit();
AVIFileInit();
hr = AVIFileOpen(& pfile,szFileName,OF_WRITE | OF_CREATE,NULL);
if(hr!= AVIERR_OK)goto error;
hr = AVIFileOpen(&pfile, szFileName, OF_WRITE | OF_CREATE, NULL);
if (hr != AVIERR_OK) goto error;
// And create the stream;
hr = AVIFileCreateStream(pfile, &ps, &strhdr);
if (hr != AVIERR_OK) goto error;
hr = AVIMakeCompressedStream(&psCompressed, ps, &opts, NULL);
if (hr != AVIERR_OK) goto error;
hr = AVIStreamSetFormat(psCompressed, 0,
alpbi, // stream format
alpbi->biSize + // format size
alpbi->biClrUsed * sizeof(RGBQUAD));
if (hr != AVIERR_OK) goto error;
当我直接在桌面上运行应用程序并创建avi文件时,代码工作正常。但是,当我从mstsc远程桌面运行相同的应用程序时,avi视频正在创建整个视频中有一些屏幕闪烁。当我在远程桌面上运行我的应用程序时,如何以
来避免AVI视频中的屏幕闪烁?请帮帮我。
The code is working fine when I am running the application directly on a desktop and creating the avi file. But, when I am running the same application from mstsc remote desktop, the avi video is creating with some screen flickering throughout the video. How can I avoid the screen flickering in the avi video when I am running my application on remote desktop? Please help me.
谢谢
Phani Kumar T
Phani Kumar T
推荐答案
感谢您在此发布。
>>但是,当我在从mstsc远程桌面运行相同的应用程序,avi视频正在整个视频中创建一些屏幕闪烁。当我在
远程桌面上运行我的应用程序时,如何避免avi视频中的屏幕闪烁?
如果您的avi文件是远程计算机上的本地文件或文件?是远程会话窗口模式还是全屏模式?
If your avi file a local file or file on remote computer? Is your remote session window mode or full-screen mode?
这似乎因为本地计算机上的双缓冲方法与远程桌面连接上的传统非双缓冲方法之间存在差异。
This seems because the difference between the double buffered approach on local machines and the traditional non-double buffered approach on remote desktop connections.
当用户通过远程桌面连接进行连接时,视频操作是通过网络连接传输到客户端进行显示。由于网络具有高延迟且无处可靠本地PCI或AGP总线的带宽,这可能会影响
结果。
When the user is connected via a Remote Desktop Connection, video operations are transferred over the network connection to the client for display. Since networks have high latency and nowhere near the bandwidth of a local PCI or AGP bus, this may effect result.
最好的问候,
Sera Yu
这篇关于当我使用mstsc在远程桌面上运行我的应用程序时,AVi视频中的屏幕闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!