That is an excellent idea.
Trial and error the first time a card is detected and then strore the correct pins in DB for future reference.
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.Hi misterd, looks like you've done quite a bit of work. I can shed a bit of light on why it is so slow to build the analog graph sometimes. The problem is with pin connections. It takes forever when a pin connection is rejected (you can see this in graphedit) and is the reason for my special hack with the hauppauge cards. An ideal fix (which I've been too busy to implement) would be to create the graph using the current methods and
1. iterate through the graph and get each filter's CLSID, the order of the filter in the graph, and the pin connections (by name)
2. Store this information in the database (or an xml file)
3. When the tv server is run again, if the card is in the system and nothing has changed, it will check the database, add all of the filters by CLSID, and connect each pin on the correct filter by pin name. This will make the appropriate connections directly instead of using trial and error.
This would be extremely fast.
The TvServer tries different filters, but only while it tries to add a specific one. There is no retry if there an error occurs somewhere later in the graph building process.Having just rolled back my tuner drivers to CATS 6.2 which are NSP software only drivers (ie no posibility of a confusion of hardware mpeg) there is a fundimental flaw in the auto graph build of the TVSEREVR whcih probably affects quite a few software cards.
The problem is there may be two or more filters that essentialy do one job and may share jobs between audio and video ;the TVSERVER is only finding the first and ignoring the second before it moves on.
With the ATI cards I have tested the x-bar has two filters (ATI TV audio crosbar and ATI rage theatre video cross bar ) before the capture filter.
The tv audio crossbar handles audio and video, the TV server can't cope with this
When the TVserver tries a filter and fails it doesn't seem to try another filter but closes the graph build .
1. If I have an Hauppauge card (PVR-250MCE) - which is a H/W encoding card - would you expect any benefit??
2. Do you plan to roll this patch into the SVNs?
3. I'd like to test the patch but I'm not sure how to roll back - can you provide any information about how to delete the new table "SoftwareEncoder" in the db?? (I use Microsoft SQL). (sorry for the Noob question!!)
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.
Interest for sure, but I will promise that you won't be able recognize the old code anymore. The reason is that I find the two classes almost readable and would split-up theme in several more or something else.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.