- Thread starter
- #21
looks like I've got a lot of work to do. just about 50% of the channel changes I did succeeded but failed (program info changed but video froze)
Dim selectChannel As TvDatabase.Channel = myitem.Tag
Dim tuningDetail As TvDatabase.TuningDetail = selectChannel.ReferringTuningDetail(0)
Dim myChannel As TvLibrary.Channels.ATSCChannel = New TvLibrary.Channels.ATSCChannel()
myChannel.FreeToAir = tuningDetail.FreeToAir
myChannel.Frequency = tuningDetail.Frequency
myChannel.IsRadio = tuningDetail.IsRadio
myChannel.IsTv = tuningDetail.IsTv
myChannel.MajorChannel = tuningDetail.MajorChannel
myChannel.MinorChannel = tuningDetail.MinorChannel
myChannel.Name = tuningDetail.Name
myChannel.NetworkId = tuningDetail.NetworkId
myChannel.PmtPid = tuningDetail.PmtPid
myChannel.Provider = tuningDetail.Provider
myChannel.ServiceId = tuningDetail.ServiceId
myChannel.TransportId = tuningDetail.TransportId
Dim tuningDetail As TvDatabase.TuningDetail = selectChannel.ReferringTuningDetail(0)
myChannel.PhysicalChannel = tuningDetail.ChannelNumber
myChannel.ModulationType = tuningDetail.Modulation
Indeed. As far as I'm aware your attempt is fairly unique.all of the existing efforts appear to be aimed at watching shows on the device, not making the device a more comprehensive remote.
Again, I strongly recommend you use the function I pointed to in my previous reply to create a correctly populated, tunable, IChannel instance from a TuningDetail. This will automatically handle all channel types properly, not just the ATSCChannel type you currently [may] have [partially] working. You shouldn't have to know or care what each channel property is connected to.anyway I'm going back to the drawing board to try and collect the correct information to do tuning correctly. (physicalchannel and modulationtype).
...
added in the two following lines and everything appears much more stable.
when I first looked at this I didn't connect PhysicalChannel with ChannelNumber nor ModulationType with Modulation so I wasn't sure what to put there.
That would be one reason. Another would be if you merged SD and HD versions of the same channel.the only reason there'd be multiple tuning details is if there were more than one way to get to the channel?
Don't feel like you have to do that if you're going to be the only person who ever uses your plugin. I was only trying to point out that your current approach has some limitations....and handling the multiple ways to get to a channel issue