久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Windows 上最快的屏幕捕獲方法

Fastest method of screen capturing on Windows(Windows 上最快的屏幕捕獲方法)
本文介紹了Windows 上最快的屏幕捕獲方法的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我想為 Windows 平臺編寫一個截屏程序,但不確定如何截屏.我知道的唯一方法是使用 GDI,但我很好奇是否有其他方法可以解決這個問題,如果有,哪種方法產生的開銷最少?速度是重中之重.

I want to write a screencasting program for the Windows platform, but am unsure of how to capture the screen. The only method I'm aware of is to use GDI, but I'm curious whether there are other ways to go about this, and, if there are, which incurs the least overhead? Speed is a priority.

截屏程序將用于錄制游戲畫面,不過,如果這確實縮小了選擇范圍,我仍然愿意接受超出此范圍的任何其他建議.畢竟,知識還不錯.

The screencasting program will be for recording game footage, although, if this does narrow down the options, I'm still open for any other suggestions that fall out of this scope. Knowledge isn't bad, after all.

編輯:我看到這篇文章:捕獲屏幕的各種方法一>.它向我介紹了執行此操作的 Windows Media API 方式和執行此操作的 DirectX 方式.它在結論中提到禁用硬件加速可以顯著提高捕獲應用程序的性能.我很好奇這是為什么.誰能幫我填一下缺失的空格?

Edit: I came across this article: Various methods for capturing the screen. It has introduced me to the Windows Media API way of doing it and the DirectX way of doing it. It mentions in the Conclusion that disabling hardware acceleration could drastically improve the performance of the capture application. I'm curious as to why this is. Could anyone fill in the missing blanks for me?

編輯:我讀到諸如 Camtasia 之類的截屏程序使用它們自己的捕獲驅動程序.有人能給我一個關于它是如何工作的以及為什么它更快的深入解釋嗎?我可能還需要有關實施此類內容的指導,但我確信無論如何都有現有文檔.

Edit: I read that screencasting programs such as Camtasia use their own capture driver. Could someone give me an in-depth explanation on how it works, and why it is faster? I may also need guidance on implementing something like that, but I'm sure there is existing documentation anyway.

此外,我現在知道 FRAPS 如何記錄屏幕.它掛鉤底層圖形 API 以從后臺緩沖區讀取.據我了解,這比從前端緩沖區讀取要快,因為您是從系統 RAM 讀取,而不是從視頻 RAM 讀取.您可以閱讀文章 這里.

Also, I now know how FRAPS records the screen. It hooks the underlying graphics API to read from the back buffer. From what I understand, this is faster than reading from the front buffer, because you are reading from system RAM, rather than video RAM. You can read the article here.

推薦答案

這是我用來收集單幀的,但如果你修改它并保持兩個目標一直打開,那么你可以將它流式傳輸"到磁盤使用靜態計數器作為文件名.- 我不記得我在哪里找到的,但它已被修改,感謝誰!

This is what I use to collect single frames, but if you modify this and keep the two targets open all the time then you could "stream" it to disk using a static counter for the file name. - I can't recall where I found this, but it has been modified, thanks to whoever!

void dump_buffer()
{
   IDirect3DSurface9* pRenderTarget=NULL;
   IDirect3DSurface9* pDestTarget=NULL;
     const char file[] = "Pickture.bmp";
   // sanity checks.
   if (Device == NULL)
      return;

   // get the render target surface.
   HRESULT hr = Device->GetRenderTarget(0, &pRenderTarget);
   // get the current adapter display mode.
   //hr = pDirect3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT,&d3ddisplaymode);

   // create a destination surface.
   hr = Device->CreateOffscreenPlainSurface(DisplayMde.Width,
                         DisplayMde.Height,
                         DisplayMde.Format,
                         D3DPOOL_SYSTEMMEM,
                         &pDestTarget,
                         NULL);
   //copy the render target to the destination surface.
   hr = Device->GetRenderTargetData(pRenderTarget, pDestTarget);
   //save its contents to a bitmap file.
   hr = D3DXSaveSurfaceToFile(file,
                              D3DXIFF_BMP,
                              pDestTarget,
                              NULL,
                              NULL);

   // clean up.
   pRenderTarget->Release();
   pDestTarget->Release();
}

這篇關于Windows 上最快的屏幕捕獲方法的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

boost_1_60_0 .zip installation in windows(Windows 中的 boost_1_60_0 .zip 安裝)
How do I get console output in C++ with a Windows program?(如何使用 Windows 程序在 C++ 中獲得控制臺輸出?)
How do I calculate the week number given a date?(如何計算給定日期的周數?)
OpenCV with Network Cameras(帶有網絡攝像機的 OpenCV)
Export all symbols when creating a DLL(創建 DLL 時導出所有符號)
Getting started with OpenCV 2.4 and MinGW on Windows 7(Windows 7 上的 OpenCV 2.4 和 MinGW 入門)
主站蜘蛛池模板: 99免费在线观看视频 | 久久久精品国产 | 亚洲丝袜天堂 | 午夜一区 | 一级片在线免费播放 | 久久精品福利视频 | 久久丝袜视频 | 国产乱码精品一区二区三区忘忧草 | 亚洲欧美精品在线观看 | 成人无遮挡毛片免费看 | 91在线资源 | 国产精品久久久久久久久久久久久久 | 国产视频中文字幕在线观看 | 欧美一区二区三区在线观看 | 一区免费看 | 中文字幕在线观看日韩 | 91精品国产91久久久久游泳池 | 欧美日本在线观看 | 美女视频一区二区三区 | 性一交一乱一透一a级 | 国产午夜精品一区二区 | 久久精品成人一区 | 亚洲国产高清高潮精品美女 | 欧美成人第一页 | 国产成人精品一区二区三区在线 | 亚洲欧美综合精品另类天天更新 | 亚洲欧美国产一区二区三区 | 亚洲网在线 | 日韩美女爱爱 | 国产麻豆乱码精品一区二区三区 | 日韩精品成人一区二区三区视频 | 国产精品一区二区久久 | 亚洲精品一区二区三区蜜桃久 | h视频免费在线观看 | 国产精品99久久久久久动医院 | 久久综合国产精品 | 亚洲精品乱码久久久久久9色 | 精品av天堂毛片久久久借种 | 亚洲一区二区三区在线视频 | 亚洲国产一区二区三区, | 国产高清免费 |