|
|
Comments and Discussions
|
|
 |

|
Great work and very usefull
|
|
|
|

|
I am able to build the graph. But, running it has no effect. It doesn't run it. Any idea why? There are no errors displayed too.
Josh
|
|
|
|

|
Could someone in this discussion help me to locate a function / method in the source files which does retrieve the filters and puts them into the tree control? Just a source file name would do. I do not have access to any .NET developments so I would have to just search for it using text search in Windows. It would help. Thanks Vaclav
|
|
|
|
|

|
Hi,
first of all I'd like to say that you did really great work with this application. I have a question though:
I want to stream webcam data encoded MJPEG over a network connection. Is this possible? I found everything except a suitable output writer (WriterNetworkSink) for this task.
Can anyone help?
Thanks in advance
Philipp
|
|
|
|

|
Ok, probably a simple question, but I've got a "Graph" Video Capture Device -> AVI Decompressor -> Video Renderer
With this, I see my live video (that I want), but how do I figure out the base code for just that function (I.E. The Actual C# Code to put this in my app?)
|
|
|
|

|
I too haven't found anything that really gives you workable code to use. --- Looked at the link below but the code it generated didn't work for my complex DirectX Graph: http://www.infognition.com/GraphEditPlus/ Unless you pay for the "Graph Edit Plus" program, the generated code for your DirectX Graph is not editable or copyable. So you have to print a lot of screenshots then hand type the code into your own program before you can even test it to make sure it works or not! --- Perhaps the MontiVision Development Kit Library might be helpful to you... Didn't help me much. http://www.montivision.com/ --- So for DirectX Graphs, unless doing a similar graph... I still have to do a LOT of internet searching and a LOT of testing when I get code close to what I need in the long run. Maybe if we were to trace this program when it does the connecting of 2 blocks of the graph together such as [File Source (Async)] to [AVI Splitter] then perhaps it would show how the links are accomplished.
|
|
|
|

|
The link below won't help you build your DirectX DirectShow Graph but it will let you know how it is pieced together. DirectShow Filter Graph Spy: http://alax.info/blog/777 Hopefully that will help someone along the way to resolve their issue(s).
|
|
|
|

|
Excellent project just in the library code used, DirectShow just puts it over the top!
|
|
|
|

|
I'm trying to adapt your code to control a remote graph in a native C++ app as follows:
List rot_list = DaggerDSUtils.GetFilterGraphsFromROT();
IFilterGraph ifg = null;
IBaseFilter filter = null;
foreach (DSGrapheditROTEntry ds_entry in rot_list)
{
if (ds_entry.ToString().Contains("MyString"))
{
ifg = ds_entry.ConnectToROTEntry(); // returns correct ifg
break;
}
}
if (ifg != null)
{
ifg.FindFilterByName("Smart Tee", out filter); /// finds correct filter
IPin capture_pin = DsFindPin.ByName(filter, "Capture"); /// cannot find pin ... returns null as does filter.enumpins, etc
IGraphBuilder graph = ifg as IGraphBuilder;
int res = graph.Render(capture_pin); /// fails since capture_pin is null
}
What am I doing wrong??
Thanks for any help and thanks again for such GREAT CODE!!
TF
|
|
|
|

|
I can't believe I just now found this. This is an exceptional piece of work. Although I do agree, the feature from grapheditplus that gives you sample code to build the graph would be a much appreciated feature. either way this is a great piece.
I actually found this looking for how to play video with direct show. all the examples I find work, but the video playback is choppy, and I'm looking for a way around that. I think digging around in this code might tell me everything I need to know and then some.
Thanks for sharing.
|
|
|
|

|
It's been a while since I've seen choppy video playback. However I do know that if you're on an XP system and your video is using VMR9 on your non primary display, you are going to get a HUGE performance hit. If you're on Vista or win7 you should try dragging an EVR onto the canvas and build your graph onto that.
|
|
|
|

|
I found that GraphEdit plus is a nice demo but alas the sample code it gave me didn't work at all for a complex DirectX DirectShow Graph. This is a nice program... well done. Now I have to find out why when I create my complex video graph in MFC C++ - Visual Studio 2005 project that it returns E_FAIL or S_FALSE when starting my complex video graph. My complex video graph builds correctly with no errors but when attempting to use the graph it doesn't work properly. So will be using this program to try to track down how to fix that issue. Thanks for a very well done project!
-- Modified Friday, March 4, 2011 5:44 PM
|
|
|
|

|
This question has come up a few times, so I'll just make a quick excerpt on the subject:
Issue:
"somehow they (directshow filters) don't show up in the list of filters in DSGraphEdit"
Solution:
This happens on 64bit versions of windows. When you run DSGraphedit,
the .Net JIT compiler will automatically make it a 32 or 64 bit
application depending on your operating system. If DSGraphedit runs
as a 64bit app, it won't be able to see 32bit directshow filters
(which a vast majority of them are). You can use the corflags utility
to force the dsgraphedit assembly to always be 32bit:
CorFlags dsgraphedit.exe /32BIT+
CorFlags is available from the the visual studio 2008/2005 command prompt.
What I do is make two copies of dsgraphedit and call one 'dsgraphedit32'
and the other 'dsgraphedit64', then use the corflags utility on
dsgraphedit32 to make a 32bit application.
Peace Love and Hippy Chicks..... Johnny
|
|
|
|

|
Hi,
its a fine work, but when ich compile the Code, the *.exe doesn't run.
How is the problem?
|
|
|
|

|
The most likely cause is if some of the required assemblies aren't in the same folder as the exe. Ensure these DLLs are in the folder before you run it:
DaggerLib.dll
DaggerLib.DSGraphEdit.dll
DaggerLib.UI.Windows.dll
DirectShowLib-2005.dll
MediaFoundation.dll
WeifenLuo.WinFormsUI.Docking.dll
|
|
|
|

|
I'm trying to use a free QuickTime ds decoder edited by River Past Corporation (http://www.riverpast.com/en/prod/quicktime/). It run well with GraphEdit but using it with dsgraphedit return an 0x80004005 error wich is "Unspecified error". Have you an idea which could help me?
|
|
|
|

|
Hello,
is it possible to use some of your code (e.g. canvas) in a professional code?
|
|
|
|

|
Most certainly. I've not placed any restrictions on using any of the code in DaggerLib or DsGraphEdit in commercial applications.
|
|
|
|

|
Hi, Do you know of any way to attach your version of Graph Edit to a graph running on Windows Mobile 6.0 without DCOM support? The usual mechanism for creating and registering an ItemMoniker in the ROT fails. Thanks
|
|
|
|

|
Hi,
First, you did a beautiful, amazing job. Congratualtions.
Second, why did you write this great piece of software? Are you planning to sell it? You ould easily sell it for $29.95 and sell 10,000 copies in a year. I know, I sell a lot of software.
Third, the one feature that is missing is the only feature that GraphEditPlus sells which is their code generation--you can select C++ or C# and the code is written to load the graph and play it in a console application and the code generated to do this is displyed in a popup window so you can copy and paste it, and compile it. This is the feature that would make your program beat GraphEditPlus.
Fourth, every good application needs a demo that blows people out of the water. I have that demo for you. Did you know that you can easily compile VLC as a DirectShow filter and a free sample of the source code to do this is avaailable on the Internet--FREE? If you add this VLC as a DirectShow SOURCE filter to a sample graph it will play virtually any file format and RTSP streams from ip cameras and it has the best free multiplexer. That would give you a demo filter that literally does everything including RIPPING copy protected DVDs.
Anyway, congratulations again on a really beautiful piece of work.
If you ever need an investor for a project, call me and let's talk.
Bill SerGio, The Infomercial King
www.SlickSkins.net GUI Guy
|
|
|
|

|
Hi, This sounds too good to be true. Where can the sample source code be found to compile VLC as a DirectShow source filter ? Thanks
|
|
|
|

|
An opensource VLC DirectShow Source Filter for multiplexing captured audio/video for file writing or RTP streaming is available for download at http://www.sensoray.com/support/videoLan.htm
|
|
|
|

|
Hi,
I have been working with a "Philips SPC 900 NC/00 PC Camera" in several different software systems trying to understand how to handle display of the "Properties" window. I was hoping your software would be able to handle it so I could see what I was doing wrong but alas, your software "hangs" when I try to bring up the "Properties" window. You have to kill the program using the Task Manager or, if your are debugging, simply stop debugging. The statement that is hanging is this: "pp.Activate(tp.Handle, ref rect, false);", line 130 of PropertyPagePanel.cs. This behavior is also exhibited by GraphStudio which is in C++. Essentially the same problem.
In my software (HandyAvi), I have been using "OleCreatePropertyFrame" to bring up the window. That works and displays the "General" and "Video" tabs correctly but when the user hits the "Audio" tab, it crashes the whole application! Very annoying! (At least it doesn't "hang" so it is a little easier for the user )
These problems do not occur with other cameras so I assume Philips did something peculiar.
Also, the problem does not occur in GraphEdit or in GraphEditPlus (which I just bought) or in the Philips application that came with the camera so there must be some way to handle this?
What do we have to do to get the "SPC 900" "Properties" panel to display and behave properly?
Thanks,
Howard
Howard C. Anderson
HTTP://www.astroshow.com
modified on Monday, June 23, 2008 6:58 PM
|
|
|
|

|
Oh-oh.
I just tried my application on XP and it works. I compiled on Vista and the problem occurs in Vista. When I run the executable (without recompiling) it runs fine on XP without crashing when I hit the "Audio" tab.
So what was that you were saying about proxies in Vista? I have latest stuff installed on Vista. What else do I have to do I wonder?
I need the application to work on XP AND Vista... I don't want to have to tell the users to install other "proxy" stuff or whatever. It needs to be self-contained so that it installs and works.
Thanks,
Howard
Howard C. Anderson
HTTP://www.astroshow.com
|
|
|
|

|
I'm using Vista x64 and DSGraphEdit launches in 64-bit mode, but the filters I need to use are 32-bit only. Is there a way I can launch DSGraphEdit in 32-bit mode?
|
|
|
|

|
Hi,
I'm new to the whole subject and would like to read a bit more about it as I have to admit that I don't have a clou
I got currently a problem on my PC that I can not view videos, but hear the sound, and if I start your program everything works magically (only if I load also a film to render).
I'm surer there is an easy? explanation to it, but don't have the necessary knowledge yet to find the problem.
So - do you have any recommendation on books or articles I could read to learn more about
the subject?
Look really forward for any recommendation,
Best regards
Chris
modified on Sunday, January 27, 2008 5:41:52 PM
|
|
|
|

|
How/where can I post questions concerning the DaggerLib code?
Is there an easy way to make the daggerlib graphs top down? Instead of left right?
|
|
|
|

|
BryanWilkins wrote: How/where can I post questions concerning the DaggerLib code?
You can email me at JohnnyLocust@gmail.com
BryanWilkins wrote:
Is there an easy way to make the daggerlib graphs top down? Instead of left right?
I'll work on that this week. In DaggerUINode.cs, UpdatePaths, UpdateTargetRegions, UpdateRegion, and CreateBackImage have to be extended to allow for vertical alignment, plus DaggerNoodle.cs has to be changed. If you let me know what you're trying to achieve, I may be able to help you. I made DaggerLib to be able to create flow based visual languages as seamless as possible.
|
|
|
|

|
I found your article here while looking for some library or code showing some stuff for making precisely the type of application you do here (except, nothing to do with DirectShow). I looked through many others, but your Daggerlib looks perfect! Do you happen to have a web page dedicated to it? I would love to make sure I've got the latest and greatest code. Do you update this project when you make changes just to Daggerlib?
I would really recommend that you write an article about Daggerlib specifically. It looks wonderful and fills a niche that doesn't seem to be handled by anything else on CodeProject as far as I can tell. I haven't gotten into the code yet, but I am very much looking forward to it as your screenshots make it look like exactly what I was looking for! (Even down to using triangular "pins" rather than squares... something I've found hard to find)
|
|
|
|

|
I like your project. It has some good ideas. I have a volume mixer that I have put together programmatically using C++ and MFC, which captures music from an mp3 file and feeds it to the audio mixer filter as an input. It also has three microphones as inputs, and a set of speakers as well as two pairs of headsets as outputs. So it has 4 inputs and three outputs. That was my first shot at building a filtergraph to capture audio. I want to take it one step further and capture audio from the Windows Media Player in place of the mp3 file to feed as an input to the audio mixer. Does anyone know how to capture the audio from the back end of the WMP just before it goes out to the sound renderer? I tried using a moniker for rendered output and that didn't work. I also tried using a moniker for the sound card to feed into the audiomixer, and I didn't get very far. Is there a better strategy that I should be using, or are there filters out there that capture the wmp audio from audio CDs as well as video DVDs, that might help me in solving this problem. I'm trying to keep it generic as far as the audio, so I want to capture the audio further down the line where it has been converted to a standard format, such as a wave or some other standard format, just before it goes to the sound renderer. Any help in the form of code samples would be greatly appreciated.
Thanks in advance!
GrizMan
modified on Friday, December 21, 2007 10:10:13 AM
|
|
|
|

|
Have you looked into using the SampleGrabber filter that comes with DirectShow? There's also the DC-DSP filter[^] that's incredibly versatile (by far my favorite DirectShow filter). Even though it's written in Delphi, there's a typelib available for it. If you really want to access WMP, there's a SDK for creating plugins for it: http://msdn2.microsoft.com/en-us/library/bb249681(VS.85).aspx[^], though I've never looked at it.
|
|
|
|

|
With the Sample Grabber Filter, do you have an opportunity to select from several sources? If so, can it be audio output from a DVD or CD that is playing in the WMP? Basically, does it take it from the back end just before it goes to the renderer?
As you can see I'm a newbie to this filter stuff. I did a little more research and found that the sample grabber is a transform filter, so it looks like it needs an input and an output. I read that if you add the filter to your graph and give a source, it will add in the filters it needs to capture the feed from the source. My question: When you setup the sample grabber in the code and you give the Major type as MediaType_Audio, is that good enough, and then it will look at all audio in the system and grab the system level audio before it gets rendered, as well as add any filters it needs? I guess my basic question is how do you make the system audio an input to the Sample Grabber filter?
After a little more research and a test that I built up in code I have a variation on my last question above. I was wondering if there is a filter that could be the first filter in a graph that would capture the system audio before it goes to the audio renderer and then I could use it to feed into the sample grabber or my volume mixer that I described above? It would probably have to be a source filter (I think that's the type) that would use the system audio as the source, as opposed to a transform or sink filter.
Thanks in advance
GrizMan
modified on Saturday, December 22, 2007 2:14:43 PM
|
|
|
|

|
Audio capture source filters for sound cards usually expose a Wave Out or Wave Mix pin (the name varies by sound card vendor) that can be used to capture the audio that is currently being played on a device. You can't modify it before it is sent to the device though. If you're looking to capture audio from WMP, I'd really recommend looking at the WMP plugin sdk. It explains how to create and register a DMO for it. There are also examples of how to create a DMO in the DirectShowLib samples. They're actually much easier to create than a regular DirectShow filter.
|
|
|
|

|
So what your suggesting is that I can create a DMO (DirectX Media Object) programmatically that is associated with the WMP and I can feed that directly into some type of DMO filter, which can have it's connection rendered to the volume mixer as the first input, and which would be the start of my filtergraph with the system sound. Then I can render the connections for the mic's as additional input capture devices to the volume mixer, as well as render the connections to the output devices, which are the speaker system, and two earphone headsets. If this all sounds correct, do you remember the name of a code sample or project that creates the DMO and has a DMO filter that accesses the DMO for the WMP so I can Google it and check out the code as well as any descriptions I may need that describe the process?
Also, for the audio capture source filter, if we wanted to capture the sound, it sounds like we would have to go to the vendor of the sound card to get a filter to capture the sound in a wave format, which could then be fed into the volume mixer? Do you think this is a filter I could just download from the vendor of the sound card?
As you can tell from my questions, and previous statements, I am a novice and I just want to make sure I am doing this properly. That's why I'm asking the question about the example.
Again, thanks in advance for your assistance.
GrizMan
|
|
|
|

|
I'm replying to myself just to let anyone out there that is in this situation that there is an input device filter for Stereo Mix or Wave Out Mix, which captures the sound as it goes to the speakers and you can use that filter to start the graph.
I ran into one thing though. I set the stereo mix filter in my graph and then it needs some kind of enable of the Main Input Mix or the Pin Line Input Mix and I am not able to enable either of them.
Any help would be great and as always, thanks in advance.
GrizMan
|
|
|
|

|
Well deserved 5!
God bless,
Ernest Laurentin
modified on Thursday, December 06, 2007 9:00:58 PM
|
|
|
|

|
I have just started to study c#.
I want to know how to draw lines, especially in line connection.
So could you please send me a copy of DraggerLib?
My Email address: lwinne@gmail.com
Thanks very much.
BR
Winne
|
|
|
|

|
The updated version of DSGraphEdit now has the full source for DaggerLib in it. Sorry it took so long.
|
|
|
|

|
Thanks a lot! Now we can receive your original codes.
It's excellent.
www.codeproject.com is a good web for our programer.
I like life and I think it is living.
|
|
|
|

|
I'll need a little more info from ya to figure out why. Which filters are not appearing? Do they appear in the AddFilters dialog in GraphEdit? If they do appear in GraphEdit, what category are they under?
|
|
|
|

|
I re-regestered the filters and they did show up.
One filter video source (a camera) and another creates some effects in video sequences.
Before re-regestering, the filters did show up in GraphEdit.
Anyway, I was able to work around the issue.
DSGraphEdit is AWESOME!!!!
|
|
|
|

|
Great Program -- I love it.
One problem, some of my filters don't appear in the list even though they are registered and in the windows/system32 directory. Any suggestions?
|
|
|
|

|
I really like the look and feel of your rendering engine. You stated that this DaggerLib would be covered in a future article.
Can you give us soime info on it? I have an application that I am working on that uses a graph like for flow from screen to screen in a kiosk engine program and I am having trouble with my connecting lines. Just wondering... You got my 5!
|
|
|
|

|
I'll have the articles up in a few weeks. (Hopefully) What sort of problem are you having connecting the lines?
|
|
|
|

|
No problen connecting the lines, just wanting to get an auto arrange working. If you already have "skinned the cat" so to speak, that would make my life a little easier
|
|
|
|

|
Ah, the proverbial cat skinning If your graph is a Directed Acyclic Graph[^], you can perform a topological sort[^] on it to find the order of execution of the nodes (the ordinals). I'd recommend the depth-first-search[^] because it's the easiest to implement. There's pseudo, and java code on the wikipedia page. I use a more extensive algorithm in DaggerLib involving unions of sets, so it would probably be overkill for what you need. Once you have your nodes sorted into ordinals, just line them up into columns:
public void ArrangeNodes(AutoArrangeStyle style)
{
if (style == AutoArrangeStyle.None || (_graph == null) )
{
return;
}
if (_graph.AllNodes.Count == 0)
{
return;
}
int subgraphoffset = 0;
for (int sgraph = 0; sgraph < _graph.SubGraphCount; sgraph++)
{
int maxPrcHeight = 0;
int numOrdinals = _graph.OrdinalCount(sgraph);
int ordOffset = 0;
int[] precHeights = new int[numOrdinals];
int[] precWidths = new int[numOrdinals];
for (int i = 0; i < numOrdinals; i++)
{
foreach (DaggerNode node in _graph[sgraph, i])
{
if (node.UINode != null)
{
precHeights[i] += (node.UINode as DaggerUINode).AutoArrangeSize.Height + 10;
precWidths[i] = Math.Max(precWidths[i], (node.UINode as DaggerUINode).AutoArrangeSize.Width);
maxPrcHeight = Math.Max(maxPrcHeight, precHeights[i]);
}
}
}
for (int i = 0; i < numOrdinals; i++)
{
int ordTop = 0;
List<DaggerNode> ordinalList = _graph[sgraph, i];
ordinalList.Sort(new UINodePositionComparer());
foreach (DaggerNode node in ordinalList)
{
if (node.UINode != null)
{
Point loc = loc = new Point(ordOffset, node.UINode.Top);
if (style == AutoArrangeStyle.All)
{
loc.Y = subgraphoffset + ordTop;
ordTop += node.UINode.Height + _autoArrangeHeightOffSet;
loc.X += (node.UINode as DaggerUINode).AutoArrangeOffset.X;
loc.Y += (node.UINode as DaggerUINode).AutoArrangeOffset.Y;
}
(node.UINode as DaggerUINode).Location = loc;
}
}
ordOffset += precWidths[i] + _autoArrangeWidthOffset;
}
subgraphoffset += maxPrcHeight;
}
}
-- modified at 12:26 Tuesday 13th November, 2007
|
|
|
|

|
Wow! This is pretty interesting stuff. I shall definately read the wikis and look over your code carefully. Thank you for your info!
|
|
|
|

|
Does it work with CF 2.0 sp2?
|
|
|
|

|
I'm pretty sure it won't work with cf 2.0. I've never worked with the version of DirecShow that comes with windows CE. Actually, most people aren't even aware that DirectShow is in windows CE.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A library for adding DirectShow GraphEdit-like abilities to .NET applications.
| Type | Article |
| Licence | CPOL |
| First Posted | 30 Oct 2007 |
| Views | 136,022 |
| Downloads | 6,799 |
| Bookmarked | 125 times |
|
|