|
|
Comments and Discussions
|
|
 |

|
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.
|
|
|
|

|
I wonder your Idea. How are you think about it?
|
|
|
|

|
A few weeks ago another GraphEdit replacement came out:
http://www.thedeemon.com/GraphEditPlus/
That's a really useful tool for DirectShow developers.
A quote from the site:
With GraphEditPlus you can:
* Edit several graphs at one time.
* Load and save .grf files compatible with MS GraphEdit.
* Connect to remote graphs (in ROT - Running Objects Table). All graphs in GraphEditPlus are always available in ROT.
* See all filters registered in the system, register new filters.
* Render media files and URLs.
* For each filter in your system you can:
o See in what file on hard disk it is. For VfW codecs you'll see actual codec file, not the wrapper.
o See all information about its file: creation and modification times, version, vendor, size, etc.
o See and copy to clipboard filter's CLSID.
o See and change filter's merit.
o Unregister filter.
* For each actual filter in your graph you can:
o See what interfaces this filter supports (scan for 280+ known DirectShow interfaces).
o Open its property page (if present).
o See its own state in each moment (stopped/paused/running).
o See all its pins.
o Add it to favorites, so you can quickly insert such filter again.
* Connect pins using intelligent connect and direct connect.
* For each unconnected pin you can:
o See list of its desired mediatypes.
o See list of filters that may connect to this pin. You'll see the order in which DirectShow will try different filters when it renders pin or uses intelligent connect. You can add filters to your graph right from that list.
o Render pin.
o If it supports IAMStreamConfig, set media type.
* For each connection between filters you can see its mediatype.
* For each mediatype you can see full information: not only major and sub types, but also all the fields of all popular format blocks (like VideoInfo, VideoInfo2, WaveFormatEx, etc.) including all fields of nested structures like BitmapInfoHeader etc.
* See what samples go through your graph. You can insert Sample Grabber filter between any two filters in graph, select mediatype you want Sample Grabber to get samples in, and for each sample that goes through Sample Grabber you can see when it arrived, its timestamps, actual data length and first few bytes of the data.
* Control your graph: run, pause, stop, seek. See current position and duration.
* For each video window see graph and renderer it belongs to.
* Once you've built your graph GraphEditPlus can generate source code in C++ of a simple application that builds this graph and runs it. It will include all necessary filters definitions and actions of building the graph.
|
|
|
|
|

|
How true. In the next release, I'll make the auto-arrange and pin names a little more intelligent. Thanks for the input.
|
|
|
|

|
This can be the basis of a cooperative development project - you should consider putting this up on SourceForge or in some other place where you can invite add-ons. Improvements could include timing analysis, sample recording, test scenario scripting, alternate property pages, rendering of intermediate sample values, filter affinity databases, tracing of "intelligent connect", support for GMFBridge, ...
|
|
|
|

|
tracing of "intelligent connect"
That is a really good idea. I'd have to completely simulate how DirectShow does intelligent connect, but I it should be doable.
|
|
|
|

|
You got my five.
|
|
|
|
|

|
This is a great gift. Many thanks. Gets my 5 too. The noodle stuff is great, tee-hee.
One thing. Loading a DRM'd WMA file (from Napster) causes the expected exception although it is displayed as an empty message box. I'm not sure of the .NET equivalent but there is a WMIsContentProtected() API.
Best wishes.
Jerry.
|
|
|
|

|
Got my 5
|
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
A library for adding DirectShow GraphEdit-like abilities to .NET applications.
| Type | Article |
| Licence | CPOL |
| First Posted | 30 Oct 2007 |
| Views | 136,012 |
| Downloads | 6,799 |
| Bookmarked | 125 times |
|
|