View Single Post
Old 2008-01-02, 22:48   #16 (permalink)
diehard2
Portal Developer
 
Join Date: Apr 2006
Location: Chicago
Posts: 509
Thanks: 2
Thanked 13 Times in 9 Posts

Country:


Default

Quote:
Graph building takes here ~1 second. For me this is fast enough, but for sure there are improvements and your idea is really good. My problem is that you need a fallback system when something has changed and than update the db etc.
During my tests I found out that it only takes very long to connect pins, if you try to connect to a pin that is already connected to a different pin. Therefor my modifications just checks at first, if the pin is already connected.
This is driver specific. My hauppauge card still takes a long time to connect even for unconnected pins, and it is in the graph building section. I would suggest that in the graph building section from the database, you will add filters by CLSID from the database. If a filter cannot be added, rebuild using the trial and error method, save to the new configuration to the database. If all filters are added successfully, start to connect all pin connections in the database. If a pin connection fails, rebuild based on trial and error. Just a suggestion if you have time and you are interested.

BTW, if you get heavy into the directshow stuff, you might find the hresult class useful. It uses PInvoke to get directx error messages. I don't know if the dll source is in the tree, but you can PM me if you would like access to that. There is a function in there that translates hresults into helpful human readable messages.
diehard2 is offline   Reply With Quote