directshow

Get WebCam status using C#

三世轮回 提交于 2019-12-10 11:20:01
问题 I use DirectShowLib .Net to capture images from WebCam. How get state of my WebCam in C#? I mean if it's alredy using by another app? 回答1: Build a capture graph, such as Camera -> Null Renderer and put it into paused state. If you succeeded, the camera is (was) idle becuase otherwise this third party app would lock it exclusively. You could possibly use IAMResourceControl too, but it's unlikely to be available for a camera device. 来源: https://stackoverflow.com/questions/8655951/get-webcam

Are there any modern Windows PCs that don't have at least one DirectShow capture device in them? [closed]

与世无争的帅哥 提交于 2019-12-10 11:18:59
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I am considering doing something that might seem strange to get a reliable time clock . I have to push buffers to a WiFi connected

Pixel modifying code runs quick in main app, really slow in Delphi 6 DirectShow filter with other problems

只愿长相守 提交于 2019-12-10 10:56:43
问题 I have a Delphi 6 application that sends bitmaps to a DirectShow DLL in real-time, 25 frames a second. The DirectShow DLL is my code too and is also written in Delphi 6 using the DSPACK DirectShow component suite. I have a simple block of code that goes through each pixel in the bitmap modifying the brightness and contrast of the image, if a certain flag is set, otherwise the bitmap is pushed out the DirectShow DLL unmodified (push source video filter). The code used to be in the main

About “Using DirectShow filters outside DirectShow?”

南楼画角 提交于 2019-12-10 10:41:25
问题 I have exactly the same question in the following link, Using DirectShow filters outside DirectShow? I am a fresh to direct show and the two answers in that stack is not clear enough to me. And I can not find a way to contact with the author to ask if he solved his problem. Is there a way to do this? Or, could some one give more detail explain about these two answers? What does it means about " "by hand" call the various filter " and what does it means about "wrap the entire filter graph"?

How to take a still photo in either DirectShow or Media Foundation

◇◆丶佛笑我妖孽 提交于 2019-12-10 09:28:02
问题 Is there a way to make a photo (still image) with either DirectShow or Media Foundation APIs? I got video capture working and I can just capture the very first frame and call it a day, but that's not what a photo is. Usually cameras have distinct video and photo modes, where photo mode allows for a lot greater resolution. For example, I have Logitech HD Pro Webcam C920 and it claims to allow to do 15mp photos. The software that came with it takes 5168x2907 photo images. So far I haven't seen

Forcing Mpeg2Demultiplexer to use ffdshow to render H264 Digital TV Video

巧了我就是萌 提交于 2019-12-10 00:42:33
问题 I spend a lot of time trying to make DTVViewer sample of DirectShow work unfortunately with no success. The video format of DVBT network is H264 and I found that the IntelliConnect behavior of IFilterGraph prefers to use Mpeg2 Video format. For those who want to see the code, here it is. If you do not know anything about DirectShow I shared my experience with this code. And the most probably problem is described in step 5 and 6 of the tutorial. The code for helper function which connects

“Preferred” method to access webcam from C# in Windows Vista / 7

人走茶凉 提交于 2019-12-09 17:56:46
问题 I've found plenty of posts discussing WIA, Windows Portable Devices API and DirectShow (and giving example code) for accessing a webcam from C# but when you research each method you seem to come across references that these are "old" methods. So, question is, when running nothing earlier than Windows Vista, what is the "preferred" method for accessing a webcam from C#? Thanks, John. 回答1: I think what you are looking for is Windows Media Fundation. Extracted from MSDN: Microsoft Media

Directshow in C# for windows mobile- strategy?

流过昼夜 提交于 2019-12-09 07:41:31
I'm trying to figure out how to add some directshow capabilities to a C# application (.net cf 3.5 running on mobile 6 and up), and I'm having a hard time figuring out how to bridge the gap between using unmanaged c++ class(es) in managed C#. I've already written the functionality I need in C++: Basically, I have a manager class that uses COM to tap into the needed directshow functionality. Quick Disclaimer: I'm new to COM, and I'm VERY new to integrating C++ with C#. I'm really hoping that someone knowledgeable can suggest a basic strategy for me to research further. Here are some that I've

SampleGrabber Parameter is Incorrect

前提是你 提交于 2019-12-09 07:20:13
问题 I'm banging my head over trying to save a jpg file using the samplegrabber in my directshow application. The graph runs fine however when I launch the CaptureImage() function it gets as far as GetCurrentBuffer and returns "parameter is incorrect".. hr = -2147024809. AMMediaType mediaType = new AMMediaType(); VideoInfoHeader videoInfo = new VideoInfoHeader(); (pSampleGrabber as ISampleGrabber).GetConnectedMediaType(mediaType); videoInfo = (VideoInfoHeader)Marshal.PtrToStructure(mediaType

How to make screen capture video using Direct Show.net Library?

人盡茶涼 提交于 2019-12-09 07:18:28
问题 How to make screen capture video using Direct Show.net Library? I read msdn Direct show document and find the way to change video source device within the following code. This code got webcamera as video device. public IBaseFilter FindCaptureDevice() { int hr = 0; IEnumMoniker classEnum = null; IMoniker[] moniker = new IMoniker[1]; object source = null; // Create the system device enumerator ICreateDevEnum devEnum = (ICreateDevEnum) new CreateDevEnum(); // Create an enumerator for the video