久久久久久久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 入門)
主站蜘蛛池模板: 一级片片| 人人艹人人 | 日韩精品视频在线观看一区二区三区 | 亚洲电影第1页 | 在线一区二区三区 | 亚洲欧美日韩在线 | a视频在线观看 | 欧美猛交| 久久里面有精品 | 久久精品日产第一区二区三区 | 四虎最新地址 | 中文字幕一级 | 欧美888| 国产精品一区二区在线播放 | 日本中出视频 | 欧美精品三区 | 激情五月婷婷 | 精品国产青草久久久久福利 | 91精品国产高清久久久久久久久 | 久久久在线视频 | 欧美一级二级视频 | 国产精品1区2区3区 一区中文字幕 | 久久男人 | 国际精品久久 | 中文字幕亚洲欧美日韩在线不卡 | 亚洲精品久久久蜜桃 | 一区二区三区在线观看视频 | 美女黄网 | 久久综合av| 国产极品车模吞精高潮呻吟 | 久久日韩精品一区二区三区 | 亚洲午夜精品 | 亚洲狠狠爱 | 日韩av一区二区在线观看 | 日韩欧美精品一区 | 欧美久久天堂 | 成人精品一区二区三区四区 | 国产日韩欧美在线播放 | 日日夜夜操天天干 | 亚洲最大av | 超碰在线国产 |