views:

122

answers:

2

Here is a code snippet from DirectShowNet library, used to open a video file:

this.graphBuilder = (IGraphBuilder) new FilterGraph();
// Have the graph builder construct its the appropriate graph automatically
hr = this.graphBuilder.RenderFile(filename, null);

but the RenderFile method fails. At the same time, Windows Media Player opens the same file nicely. What can be the problem.

I got the same behavior without DirectShowNet, but using native C++ code...

A: 

Windows media player uses the WMF sdk and MF as well as directshow.

Geraint Davies
if i understand well, WMF is used for windows video formats (like WMV)...but I'm having problems with various file types (but not all files of some type, just some of the files are opened well in WMP and not in my application).
vucetica
A: 

As Geraint Davies pointed in the comment: "Graphedt's Render File menu option calls RenderFile. If these are behaving differently, then perhaps you are running in different environments (eg x64 vs x86 or admin vs non-admin)."...actually the problem was not architecture or privileges, but some other part of the code related to seeking in the video, which was not performed well on the video that I have tested with.

vucetica