Hi Jim,
> I've been working on an alternate approach to doing the PID <-> Virtual Channel mapping in dvbhdhomerun. Basically, in HdhomerunTuner::StartStreaming, I call hdhomerun_device_get_tuner_streaminfo to get virtual channel information for the currently tuned frequency. For each program found, I select it using hdhomerun_device_set_tuner_program, then call hdhomerun_device_get_tuner_filter to get the PID filter that has been applied as a result of the set_tuner_program call. If it matches the PID passed to the StartStreaming call, then I have the correct program. If I can't find a program that matched the PID, I fall back to the original logic of setting the PID filter directly.
>
I did not know about the hdhomerun_device_get_tuner_streaminfo(), sounds like that'll make everything much easier.
> I've got this implemented, but I still have to test it. I'd be interested in any comments or suggestions you might have. In particular, do you see any reason why this can't work or is a really bad idea? If not that, then I'd appreciate anything you can tell me about how to test this.
>
Hmmm, to keep it simple just do the hdhomerun_device_get_tuner_streaminfo() + hdhomerun_device_set_tuner_program() for starters. get_tuner_filter() and checking wait with that.
One thing to keep in mind, is that StartStreaming() will be called a bunch of times when a program is tuned. One for each video/audio/teletext PID. That is just the way it is done in the linux kernel. But I don't see any harm in calling streaminfo() + set_tuner_program() each time it is hit.
Also keep in mind that set_tuner_program() only seems to work for one program per mux, so don't schedule two program on the same mux for starters - that'll screw things up. Otherwise, go go go! :-)