Menu
  • HOME
  • TAGS

Memory corrupted in CBaseVideoRenderer-derived class

c++,visual-studio-2012,com,directshow

It seems that you just cannot debug a DirectShow filter this way. It works fine if I register it "normally", so COM seems to do some important things here...

DirectShow graph separate Avi and Wav (play back, not saving)?

audio,directshow

You can achieve this both ways: by adding two separate chains into the same graph, or using two separate filter graphs. The first method will give you a graph like this: Second method will get you two graphs: The first approach has advantage that you have lipsync between video and...

Video Mixing Renderer 9 (VMR9): get FPS from the input pin's AM_MEDIA_TYPE

c++,windows,video,directshow

You are coming from the assumption that filter and pin, interfaces of which you hold, are connected and they are exactly the objects you are interested in. This is not necessarily true and quite a few question in past showed that people incorrectly understand the topologies they create. You need...

DirectShow Pixels Are Out of Order When Capturing NTSC Analog Board

c++,video,directx,directshow,directx-11

Maybe texture is padded to keep rows aligned at (multiply of) 32 bytes per row? Mind you that I did not ever use DirectShow but that's what I would expect in D3D.In other words, your input might have different stride than you think. Unfortunately I do not know DS so...

My DirectShow failed on dynamic format changes

winapi,visual-c++,video,directshow

Your MSDN section is QueryAccept (Downstream). This type of format change only works when you are switching from higher resolution to lower, that is when the connection does not need to re-agree memory allocator and the buffers which are already allocated are suitable for new updated resolution. You should see...

Blackmagic DirectShow Framerate - Why am I not getting all of the video modes that my capture device is capable of?

c++,visual-studio,video,directshow,video-capture

Blackmagic offers their SDK as a primary API and then their DirectShow filters are built on top of this SDK. That is, DirectShow filters offer a subset of SDK functionality, and this is where in particular you see issues with interlaced/progressive media type overlap (their filters don't do interlaced capture...

C#.NET DirectShow Lib: Saving custom graph to a file

c#,.net,graph,directshow

I think that the solution is much more simple CSharp DirectShow lib allows you to save the graph in a file. This code works for me : using DirectShowLib.Utils; FilterGraphTools.SaveGraphFile(this.m_TheGraphBuilder, FilePath);...

Black video using multiple instances VMR 9

video,directshow,directshow.net

VMR9s/EVRs are backed by limited resource, you are hitting the limit. There is no distinctive error code or otherwise well known/reliable way to detect that you are in trouble. Your workaround is to either implement custom allocator/presenter to manage surfaces, or use VMR7 instead. See also: StressEvr: So, how many...

Audio/Video synchronization issues using samplegrabber filter

c++,directshow,samplegrabber,audio-video-sync

On the sample grabber callback you receive data time stamped. If you keep the time stamps you get, and you make sure you have the data playback sync'ed using these time stamps in terms of playing data with equal time stamps on all streams at any time - then you...

Directshow Push Source Filter, sync Audio and Video Streams

c++,directshow

The given information suggests that you push data from the same thread or otherwise ignore pre-buffering and blocking taking place during delivery. This would add interference between the streams, be sure to push data from independent worker threads.

RTSP stream to virtual video device on Windows 8

video,driver,virtual,directshow,rtsp

Actually VMIX video mixing software will pull from just about any stream, diretx compatible video capture card (including the easy cap 9$ capture card on ebay) and then output to a directshow compatible virtual device, AND it can do it to two virtual devices at the same time.. AND the...

get filters(com devices) using DirectShow

c#,filter,com,directshow

You are using [undocumented] managed wrapper over native API, however the API itself is well-documented on MSDN and the interface names have direct mappings. See Using the System Device Enumerator, which describes the identifiers in question. To use the System Device Enumerator, do the following: Create the system device enumerator...

How to query directshow interface in directshow.net?

c#,directshow,directshow.net

The interfaces "exist" in certain form regardless of availability of their declaration in your project. That is, if you don't have certain interfaces defined, and then you don't have them from third party component vendor, and you don't have them via reference or type library import - then you need...

Does VMR9 support native YUV rendering?

c++,directshow

VMR-9 is backed by Direct3D and availability of specific pixel format support depends respectively. In most cases you have quite some choice of pixel formats to render in, most popular are YUY2, YV12, NV12. The video is displayed without conversion to RGB.

VARIANT structure (COM) seems to have no member [on hold]

c++,com,directshow,visual-studio-2015,variant

It seems just a capitalization problem, between bStrVal (in the code) and bstrVal (in the structure definition). Note that the S is different. C and C++ are case-sensitive languages.

Switching from EVR to VMR with GMFBridge

c#,directshow,directshow.net,ms-media-foundation

At some point video renderers allocate resources on hardware, esp. Direct3D devices, and this initialization is not instant, and causes some delay or flickering. When you bridge, your strategy should be to keep video renderer and its hosting graph, and switch stuff behind it. This gets you smooth and flicker-less...

Why EC_DISPLAY_CHANGED is sent even though a monitor change / switch didn't occur?

directshow,video-capture,video-processing

EC_DISPLAY_CHANGE on MSDN: If the display mode changes, the video renderer might need to choose another format. By sending this message, the renderer signals to the filter graph manager that it needs to be reconnected. During the reconnection, the renderer can select a new format. The typical scenario is a...

Get the DLL-file for a COM-Object without using CLSID and registry in c++

c++,dll,com,directshow

Only using some hacks, naturally. The object itself is on the heap, which is shared, but you could see where the its virtual table resides - it should be almost universally in the read-only data section of the creator's binary. So load the first pointer in the object, as that's...

DirectShow Audio Device has no pins

c#,directshow,directshow.net

Audio (and video) capture devices like this cannot be instantiated using CoCreateInstance (using CLSID - Activator.CreateInstance in C#). You have to create them using monikers, typically through enumeration, as described on MSDN (with source code snippet): Selecting a Capture Device. Below is code snippet from DirectShow.NET samples for video capture,...

Tried to modify Videocapture::retrieve() fun

c++,opencv,video,com,directshow

You need to define INITGUID to resolve mentioned linker errors (see Referencing GUIDs for details). However I don't see how it is going to help you in the part of supplying your H.264 decoder (too far from there). To reference H.264 subtype identifier you need #include <wmcodecdsp.h> #pragma comment(lib, "wmcodecdspuuid.lib")...

Is it possible to for a directshow source filter to read data from application?

c++,directshow

Thanks roman. I am now able to pass data to the source driver from application through an interface. I took pushsource filter from the directshow samples and added an additional interface to it using the sample below Including this in a common header file DECLARE_INTERFACE_(IMySettingsInterface, IUnknown) { STDMETHOD(GetParamInt)(char* szName, int...

RGB32 byte array memory access optimization

c++,memory,optimization,directshow,rgb

I solved the issue. So the problem was that the data was a pointer pointing to data in video memory. I was trying to use data and transferring it from video to computer RAM causing memory bandwidth errors. Copy all the data at once (memcpy) was faster but still very...

Distribute webm/VP8 player without installing directShow filters

windows,video,directshow,webm,vp8

A DirectShow filter is operational once it gets added to filter graph. So you don't necessarily need filter COM registration: you can add it there yourself by explicit call. Then you can instantiate it through COM or otherwise. If you need standard filter registration just to instantiate the filter, you...

Direct Show SetNotifyWindow function

c#,winapi,directshow,directshow.net

You are setting up the notification. You tell FGM what message to send back to you when you are supposed to jump in with some processing. From MSDN on IMediaEventEx::SetNotifyWindow: When the window receives the message, it should call the IMediaEvent::GetEvent method to retrieve the event. Events are asynchronous, so...

Microsoft UVC driver streaming RAW data with web camera instead of Compressed data [closed]

camera,driver,directshow

You can check camera capabilities using DirectShowCaptureCapabilities tool: Win32 build - DirectShowCaptureCapabilities-Win32.exe x64 build - DirectShowCaptureCapabilities-x64.exe The app gives a textual representation of capabilities available through DirectShow API, where you can get the information in question. In particular, some output is presented here, posted by tool users. Let's look at...

DirectShow SampleGrabber changes the ratio of image source

c#,directx,directshow,mpeg2-ts

It is likely that video stream is not compatible with Sample Grabber (interlaced etc.) and then another filter is being inserted into pipeline to resolve the connectivity. You should inspect the topologies you create and check media types to get better understanding what is going on and, yes, most likely...

Forcably Terminating DirectShow

webcam,directshow,video-capture,directshow.net

If it is frozen, the only way to break the deadlock (esp. to release lock on exclusive resource such as camera) is to kill the entire process.

What's the best way to fix Pixel Aspect Ratio (PAR) issues on DirectShow?

c++,windows,directshow,samplegrabber

Sample Grabber gets you frames with original pixels. It is not exactly a problem if there is aspect ratio attached and the pixels are not "square pixels". To convert to square pixels you simply need to stretch the image respectively. It would be easier for you to do this scale...

connect x264vfw to custom source filter

c++,visual-c++,directshow

x264vfw is not a standard filter. Old VFW (Video for Windows) codecs are wrapped and all share the same CLSID. You need to look it up using the friendly name or moniker name. This code line is not applicable: hr = InitFilter(x264EncodeGUID, &pEncoder); Instructions here: Choosing a Compression Filter See...

How to set aspec ratio with EVR in DirectShow?

video,directshow,aspect-ratio,directshow.net

You cannot instruct EVR to override aspect ratio, it only has option to maintain AR or not. If you want to change aspect ratio of displayed video, you have to workaround methods instead: You can transform the video feed and change media type of the stream leaving payload intact and...

ISampleGrabber undeclared identifier

c++,image-processing,directshow,graphedit

Microsoft deprecated Sample Grabber and the entire DES API, however you if you import the type library, or just copy the declarations into your project - the component is still usable except some very latest OS releases (Windows Server 2008?) where it is completely gone and you might need another...

How to get the default filter name for an unregistered DirectShow filter

directshow

Filter graph assigns unique name to the filter when filter is joining the graph. The name can be suggested by filter adder, then in case of collision filter graph might append a number as a suffix. When no name is given by the adder, filter graph takes "default" name from...

How to feed video data into a DirectShow filter to compress/encode and save to file?

c++,winapi,video,directshow

You don't give details to help you with your modification of the filters, however Ball sample generates output which can be written to a file. Your choice of WM ASF Writer filter is okay - it is a stock filter and it is more or less easy to deal with....

how to implement source filter property page?

directshow

The problem was my DllRegisterServer only registered my filter. I can use AMovieDllRegisterServer2 to register all components in g_Templates but that function does not register source filters properly so for the moment I am just calling AMovieDllRegisterServer2 and then re-registering my filter with source filter specific code....

to capture the buffer of a microphone

visual-c++,audio,directshow

If you want to distribute your application then I will suggest to use Sample Grabber instead of Lame DirectShow Encoder filter. This will avoid filter registration but you will need to handle conversion logic. Regarding using LAME encoder, what is the return value of hr = pOutputDevice->FindPin(). you can give...