directshow.net

Seeking keyframes using DirectShowNet

十年热恋 提交于 2019-12-08 05:33:48
问题 My task is : I create a graph, attach a SampleGrabber to it, and grab the keyframes using the IMediaSeeking interface after building the graph. The following is what I have done : In the Main method : Type comType = Type.GetTypeFromCLSID ( new Guid ( "e436ebb3-524f-11ce-9f53-0020af0ba770" ) ); IGraphBuilder graphBuilder = (IGraphBuilder) Activator.CreateInstance ( comType ); comType = Type.GetTypeFromCLSID ( new Guid ( "C1F400A0-3F08-11d3-9F0B-006008039E37" ) ); ISampleGrabber sampleGrabber =

Seeking keyframes using DirectShowNet

只愿长相守 提交于 2019-12-08 05:27:28
My task is : I create a graph, attach a SampleGrabber to it, and grab the keyframes using the IMediaSeeking interface after building the graph. The following is what I have done : In the Main method : Type comType = Type.GetTypeFromCLSID ( new Guid ( "e436ebb3-524f-11ce-9f53-0020af0ba770" ) ); IGraphBuilder graphBuilder = (IGraphBuilder) Activator.CreateInstance ( comType ); comType = Type.GetTypeFromCLSID ( new Guid ( "C1F400A0-3F08-11d3-9F0B-006008039E37" ) ); ISampleGrabber sampleGrabber = (ISampleGrabber) Activator.CreateInstance ( comType ); graphBuilder.AddFilter ( (IBaseFilter)

C# : How to use directshow.net to show this dialog?

时光怂恿深爱的人放手 提交于 2019-12-08 05:23:14
问题 How to call this dialog using Directshow.net? Filter graph 回答1: Something like this would work, assuming you have an IBaseFilter reference: [DllImport("oleaut32.dll", CharSet = CharSet.Auto)] internal static extern int OleCreatePropertyFrame( IntPtr hwndOwner, uint x, uint y, [MarshalAs(UnmanagedType.LPWStr)] string caption, uint objectCount, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.IUnknown)] object[] lplpUnk, int cPages, IntPtr pageClsID, Guid lcid, uint dwReserved,

Grab frame from .mov file using DirectShow.net

五迷三道 提交于 2019-12-08 04:53:15
问题 How to grab frame from .mov file in c#.net by using DirectShow.net 回答1: DirectShow and DirectShow.NET don't make it any special with .MOV files. You typically create a filter graph with a Sample Grabber filter that you manage, and its callback gives you frames of video stream that passes through. You might want to look at DxScan sample in DirectShow.NET, \Samples\Editing\DxScan. It grabs frames from a given movie file. A sample application scanning a media file looking for black frames Most

DirectShow: how to change filter properties?

佐手、 提交于 2019-12-08 03:17:26
问题 I'm working on an application that helps users configure their TV tuner cards. Basically the user selects a device, and the application generates a graph file (.GRF) as output. However, there are a few settings the user should be able to change. These settings include the video standard (PAL, NTSC, SECAM), video input (Tuner, Composite, SVideo), and so on. In GraphEdit this can be accomplished by right clicking the desired filter, and select "Filter Properties...". However, I have no clue how

Dynamically change filter value without Property Page

荒凉一梦 提交于 2019-12-07 18:26:48
问题 I just wrote a simple DirectShow Filter (which inherits from CTransformFilter). But I want to be able to set a variable of my filter dynamically. This can be done today using Property Page. But what i want is change this property programatically. I defined a custom COM interface to set a variable in the filter but can not figure out how to use it -access it... How to set a DirectShow filter's properties value without open the filter's property page ? Any one has idea? More Details: Well i)

How To Get A List Of Available Video Capture Devices

给你一囗甜甜゛ 提交于 2019-12-07 15:12:30
I am creating a project using DirectShow.Net that shows a preview of a webcam view within a windows form using Visual C#. I would like to start with gaining a collection of available video devices so I can choose between either the built in webcam or the USB webcam. I have seen several examples of this being done in C++, e.g. on the msdn " http://msdn.microsoft.com/en-us/library/windows/desktop/dd377566(v=vs.85).aspx ". However as I do not know any C++ I do not know how to convert this code into C#. Roman R. DirectShow.NET sample \Samples\Capture\DxLogo\Capture.cs shows how to do it: // Get

C# : How to use directshow.net to show this dialog?

元气小坏坏 提交于 2019-12-06 21:22:36
How to call this dialog using Directshow.net? Filter graph David Paxson Something like this would work, assuming you have an IBaseFilter reference: [DllImport("oleaut32.dll", CharSet = CharSet.Auto)] internal static extern int OleCreatePropertyFrame( IntPtr hwndOwner, uint x, uint y, [MarshalAs(UnmanagedType.LPWStr)] string caption, uint objectCount, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.IUnknown)] object[] lplpUnk, int cPages, IntPtr pageClsID, Guid lcid, uint dwReserved, IntPtr lpvReserved); public void DisplayPropertyPages(Form form, IBaseFilter filter) { var

Get WebCam status using C#

纵饮孤独 提交于 2019-12-06 09:31:52
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? 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-status-using-c-sharp

how to use x264 encoder with directshow

放肆的年华 提交于 2019-12-05 04:37:00
问题 i can't figure out how to use x264 with directshow. i installed many thinks that pretend to have x264 encoder in with no use i downloaded the videoLAN x264 binary and when i run it, it shows so fast a console windows, and nothing happen after that these is the encoders that i have i am working on windows 8.1 x64 please help with this issue it's just going to make me crazy hhh, i wanna use x264 because the other encoders that i have installed, either didn't work or encode with so big size. 回答1