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

Windows 上最快的屏幕捕獲方法

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

問(wèn)題描述

我想為 Windows 平臺(tái)編寫(xiě)一個(gè)截屏程序,但不確定如何截屏.我知道的唯一方法是使用 GDI,但我很好奇是否有其他方法可以解決這個(gè)問(wèn)題,如果有,哪種方法產(chǎn)生的開(kāi)銷(xiāo)最少?速度是重中之重.

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.

截屏程序?qū)⒂糜阡浿朴螒虍?huà)面,不過(guò),如果這確實(shí)縮小了選擇范圍,我仍然愿意接受超出此范圍的任何其他建議.畢竟,知識(shí)還不錯(cuò).

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.

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

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 之類的截屏程序使用它們自己的捕獲驅(qū)動(dòng)程序.有人能給我一個(gè)關(guān)于它是如何工作的以及為什么它更快的深入解釋嗎?我可能還需要有關(guān)實(shí)施此類內(nèi)容的指導(dǎo),但我確信無(wú)論如何都有現(xiàn)有文檔.

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.

此外,我現(xiàn)在知道 FRAPS 如何記錄屏幕.它掛鉤底層圖形 API 以從后臺(tái)緩沖區(qū)讀取.據(jù)我了解,這比從前端緩沖區(qū)讀取要快,因?yàn)槟菑南到y(tǒng) 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.

推薦答案

這是我用來(lái)收集單幀的,但如果你修改它并保持兩個(gè)目標(biāo)一直打開(kāi),那么你可以將它流式傳輸"到磁盤(pán)使用靜態(tài)計(jì)數(shù)器作為文件名.- 我不記得我在哪里找到的,但它已被修改,感謝誰(shuí)!

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();
}

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

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

相關(guān)文檔推薦

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++ 中獲得控制臺(tái)輸出?)
How do I calculate the week number given a date?(如何計(jì)算給定日期的周數(shù)?)
OpenCV with Network Cameras(帶有網(wǎng)絡(luò)攝像機(jī)的 OpenCV)
Export all symbols when creating a DLL(創(chuàng)建 DLL 時(shí)導(dǎo)出所有符號(hào))
Getting started with OpenCV 2.4 and MinGW on Windows 7(Windows 7 上的 OpenCV 2.4 和 MinGW 入門(mén))
主站蜘蛛池模板: 国产午夜三级 | 一区二区精品 | 日韩中文字幕在线视频 | 日韩精品一区二区视频 | 三级视频在线 | 日本黄色录像 | 久久99精品久久久久久琪琪 | av片在线观看 | 日本国产视频 | 午夜天堂av | 欧美黄色一区二区 | 毛片免费观看视频 | 男男成人高潮片免费网站 | 久久综合久 | 亚洲精品一区二区三区蜜桃久 | 国产一区久久 | 午夜激情在线观看 | 亚洲欧美在线播放 | 一区二区三区不卡视频 | 欧美精品网 | 亚洲一级特黄 | 秋霞午夜鲁丝一区二区老狼 | 色综合一区二区 | 久久夜色精品国产欧美乱极品 | 中国a一片一级一片 | 91视频一区二区三区 | 久久国产精品一区二区三区 | 日韩黄网 | 成人黄色在线 | 亚洲毛片网 | 国产视频一区二区在线 | 精品国产一区二区三区久久久蜜月 | 日韩一级片 | 久久久久久久网 | 日韩在线免费播放 | 亚洲一区二区在线播放 | 国产成人精品一区二区三区福利 | 国产精品一区二区在线播放 | 国产天堂在线观看 | 国产精品视频专区 | 天天综合永久入口 |