directshow

How to get pointer to IUnknown in C#

让人想犯罪 __ 提交于 2020-01-22 18:52:13
问题 .NET interop wraps COM objects into .NET objects (runtime-callable wrappers, RCWs), which hide the usual interface querying. In order to register a COM object representing a filter graph with the Running Objects Table, I need the (native) address of its IUnknown interface (see How can I reverse engineer a DirectShow graph?). So the question is: How can I get a COM object's IUnknown pointer in C#? 回答1: Use Marshal.GetIUnknownForObject(). 来源: https://stackoverflow.com/questions/3941349/how-to

Appropriate codec for real-time video compression with DirectShow

半世苍凉 提交于 2020-01-22 16:10:07
问题 Can anybody suggest a good codec for real-time video compression? Here is a list of key requirements: Must be represented as DirectShow video compression filter Royalty-free Good quality/bitrate output comparable to the DivX on relatively low resolutions (640x480 max) Fast and resources-efficient for real-time compression Compatibility with some popular format (like MPEG-4) for wide support in different video players I mentioned DivX and I think it is a very good codec, but if I understand

How can i tell when a Directshow.net conversion is done?

谁都会走 提交于 2020-01-17 04:38:30
问题 right now I have a Directshow.net graph that takes in a video file and encodes it to a file, however it just continues to run int x = program.Run() in DirectShow.net and i want the program to close when the full conversion is done instead of me having to guess. how can i tell if its done encoding programatically? 回答1: If you have a mediaEvent variable you can check against the WaitForCompletion function to see if the code is done running. if the result of the waitforcompletion ( gh in this

Extract frame from VOB(DVD) file

依然范特西╮ 提交于 2020-01-16 08:08:10
问题 I need to generate thumbnail from video files, i m using IMediaDet to get frame from video, it not working for (*.vob) file DVD, how can i get thumbnail from DVD in C# .. 回答1: It isn't clear whether or not you are using an unencrypted DVD. For the sake of this answer, I'm going to assume you are. IMediaDet uses the Sample Grabber filter to perform most of its operations. Unfortunately the Sample Grabber doesn't support the VIDEOINFOHEADER2 format as indicated here. Some MPEG-2 decoders will

Visual c++中运行DirectShow sdk中的例子

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-15 22:19:42
Visual c++中运行DirectShow sdk中的例子 在运行DirectShow例子时必须先用设置Visual C++编辑环境,要不然交会发生连接错误或者是找不到定义等等众多错误。设置直要是指定编绎器去查找程序所引用的头文件,库文件或者是资源文件的所在文件夹的路径。 设置步骤:菜单栏中的工具->选项->项目和解决方案->Vc++目录,然后就要以在右边的下拉框中选择可执行文件,头文件,库文件等待,这样就可以设置其所在文件的路径了。 所包含的文件可能放在:1.DirctX 安装所在文件夹中的:Lib和Include文件夹中;2.Platform 安装所在文件夹中的:Lib,Include,Samples\Multimedia\DirectShow\BaseClass,和Samples\Multimedia\DirectShow\Common文件中。 怎么确定项目所需要那些文件: 在SDK中查找编译出错,提示没有定义的成员的帮助,看看它所需要那些头文件和库文件,就可以用#include 与#pragma comment 把它们引用代码文件中如 #include <dshow.h> #pragma comment(lib, "ole32.lib" ) 如里它所提供的例子没有存在VC++解决方案,而自己新建空解决方案把所提供的源文件添加进行,运行起来可能会遇到很多难以想像的问题

Is it possible to use an http url as your source location of a Source Filter in DirectShow .Net?

做~自己de王妃 提交于 2020-01-15 08:41:26
问题 I'm using the DirectShow.Net Library to create a filter graph that streams video by using an http address and the WM Asf Writer. Then on the webpage I'm able to use the object element to render the video feed in a Windows Media Player object. So now I'm curious if it is possible to read from that http address with some type of FilterSource. I have seen that some people use the AsyncReader as an IBaseFilter, and then casting it as an IFileSourceFilter and calling the load method and passing it

Fliped cursor icon on desktop recording using directshow

杀马特。学长 韩版系。学妹 提交于 2020-01-14 12:55:09
问题 Using Directshow.NET I have developed an application which will record the desktop screen, to get mouse pointer we need to paint mouse pointer by our own. So I added SampleGrabber adn in BufferCB I have written below code: public const Int32 CURSOR_SHOWING = 0x00000001; [StructLayout(LayoutKind.Sequential)] public struct ICONINFO { public bool fIcon; public Int32 xHotspot; public Int32 yHotspot; public IntPtr hbmMask; public IntPtr hbmColor; } [StructLayout(LayoutKind.Sequential)] public

Add Watermark to Capture stream

坚强是说给别人听的谎言 提交于 2020-01-14 06:13:09
问题 I am using DirectX.Capture and Direct Show. Using existing project http://www.codeproject.com/KB/directx/directxcapture.aspx?msg=2490488 want to add water mark is it possible? if yes how? 回答1: To add a watermark in the recorder video, you would have to insert some watermarking filter into the graph that does capture and recording. In my apps, I am doing it via sample grabber filter which enables me to access every video frame as it is captured from the input source. Beware though: the frame

Add Watermark to Capture stream

安稳与你 提交于 2020-01-14 06:12:09
问题 I am using DirectX.Capture and Direct Show. Using existing project http://www.codeproject.com/KB/directx/directxcapture.aspx?msg=2490488 want to add water mark is it possible? if yes how? 回答1: To add a watermark in the recorder video, you would have to insert some watermarking filter into the graph that does capture and recording. In my apps, I am doing it via sample grabber filter which enables me to access every video frame as it is captured from the input source. Beware though: the frame

How to capture frames using Delphi/DSPack without displaying it on TVideoWindow?

这一生的挚爱 提交于 2020-01-13 14:07:33
问题 DSpack has example code to play a DirectShow compatible video device and to capture the video frames simultaneously. A TVideoWindow is attached to the FilterGraph to display the video (Firgure-1). If you remove the TVideoWindow, then the Operating System (Windows) will automatically bring up ActiveMovie and display the video on a separate window (Figure-2). Is there a way to use DSPack to capture video frames without using any of the GUI components and without displaying the video? DSPack