directshow

Get bitmap info from MPEG-2 Program / Transport Stream?

£可爱£侵袭症+ 提交于 2019-12-30 11:33:47
问题 In order to render a DirectShow graph in my WPF application, I use a sample grabber to write a bitmap to memory, and read it elsewhere in code. This may seem as a wierd solution, but seems to be the only way to get a WPF brush out of it. The following code gives me the information I need about the bitmap: AMMediaType mt = grabber.GetConnectedMediaType(); VideoInfoHeader header = (VideoInfoHeader)Marshal.PtrToStructure(mt.formatPtr, typeof VideoInfoHeader); header.BmiHeader // ... Now, header

Drawing video with text on top

拥有回忆 提交于 2019-12-30 08:54:28
问题 I am working on an application and I have a problem I just cant seem to find a solution for. The application is written in vc++. What I need to do is display a YUV video feed with text on top of it. Right now it works correctly by drawing the text in the OnPaint method using GDI and the video on a DirectDraw overlay. I need to get rid of the overlay because it causes to many problems. It wont work on some video cards, vista, 7, etc. I cant figure out a way to complete the same thing in a more

Drawing video with text on top

穿精又带淫゛_ 提交于 2019-12-30 08:54:10
问题 I am working on an application and I have a problem I just cant seem to find a solution for. The application is written in vc++. What I need to do is display a YUV video feed with text on top of it. Right now it works correctly by drawing the text in the OnPaint method using GDI and the video on a DirectDraw overlay. I need to get rid of the overlay because it causes to many problems. It wont work on some video cards, vista, 7, etc. I cant figure out a way to complete the same thing in a more

How to play multiple videos in sync over multiple monitors using directshow?

天大地大妈咪最大 提交于 2019-12-29 04:05:47
问题 I´ve successfully managed to play up to 8 videos in sync using a single video window with multiple streams using the directshowlib for c#. The problem is the video window plays only on a single screen - when I try to have it span over many screens it does not work. The app window spans correctly, but the video plays only on one screen. Any ideas? Thanks a lot in advance. 回答1: I assume that you're using the VMR with multiple input pins. The VMR is going to render to a single surface, which

Directshow filter access threading

我是研究僧i 提交于 2019-12-29 01:28:10
问题 I made a TV-Player in c# using directshowlib-2005. now I made a method to search for available channels. I want this method to run in a different thread so my GUI won't freeze, but I get an error when I try to set the channel in the method. It can't find the IAMTVTuner interface in my graph, altough I know it's there. If I don't use a different thread, the method works just fine (but my GUI freezes for a while) I know it has to do something with apartments, but is there a way I can acces that

How to change Directshow filter properties C++

血红的双手。 提交于 2019-12-28 04:33:07
问题 How to change Filter Properties programmatically? I am using a filter AAC encoder , and I can manually change its bitrate in graphedit by right clicking on the filter and entering the bitrate value. Is it possible to do the same through code? Please give me valuable suggestions and if possible with code. 回答1: You do this via private filter-specific interface. You need to refer to filter documentation or SDK to get details on this (VSS Tech Support). Sometimes you can obtain the necessary

使用VC和DirectShow从摄像头中读取图像(一)

假如想象 提交于 2019-12-25 21:26:06
  在图像处理时经常会用到从摄像头读取图像。 OPENCV 有提供的方法来实现 ,非常简单,不用多说。而使用 VC++ 则没有那么容易,下面介绍使用 CImage 和 DirectShow 读取摄像头图像,并显示的对话框中。 我用的开发工具是 VS2010 。 源代码下载,使用VS2010编译通过。 http://download.csdn.net/detail/sdlypyzq/4087013 一、 创建一个 MFC 对话框程序,工程起名为 CameraVCTest 。 二、删除无用的控件和按钮。添加一个图片控件, ID 为 IDC_PICTURE ,并为其添加 CStatic 类型变量 m_picture 。添加四个按钮,名称分别为预览,拍照,保存,关闭。 ID 分别为 IDC_VIEW,IDC_TAKEPHOTO,IDC_SAVE,IDC_CLOSE 。分别为其添加变量 m_view,m_takePhoto,m_save,m_close 。双击四个按钮,生成四个响应函数。 三、将 DirectShow 文件夹和 CameraDS 类的头文件和源文件拷贝到项目源文件夹下。并在项目属性 VC++ Directories 添加 include Directories ,“ .\DirectShow ”。在 Solution Exlporer 添加上 CameraDS

Set properties of filter in DirectShow.NET

那年仲夏 提交于 2019-12-25 07:20:22
问题 How can I set properties of a DirectShow filter in c#? For example I want to set resolution of a webcam or the clippings of a cropping filter. 回答1: Filters typically have their "private interfaces", custom filter specific interfaces to control the filter in specific way, such as to set it up and/or alter its runtime behavior. There is no universal interface because filters are different. You normally know in advance what filter you are dealing with, so you QueryInterface its interface of

How to use EZrgb24 filter

对着背影说爱祢 提交于 2019-12-25 03:59:27
问题 Context I'm trying to apply filter such as contrast, color change, brightness on every frame of a .avi video. The video is playing just fine with directshow.net and c#. after a couple hours of research, I found out that buffercb was not the way to go to do the job. Apparantly, EZrgb24 is a filter I can add to my graph that does exactly what I want. However, I can't get it to work. Added in the beggining of my class [DllImport("ole32.dll", EntryPoint = "CoCreateInstance", CallingConvention =

How to connect EZrgb24 filter to my graph

谁都会走 提交于 2019-12-25 02:39:06
问题 Context I successfully loaded a 32 bit ezrgb24 COM (compiled it from the samples) The video is playing just fine with directshow.net and c#. However, I dont know how to connect the ezrgb24 filter I created to my graph. Added in the beggining of my class [ComImport, System.Security.SuppressUnmanagedCodeSecurity, Guid("fd5010a3-8ebe-11ce-8183-00aa00577da1"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IIPEffect { [PreserveSig] void get_IPEffect([Out] out int effectNum,