Guide Editor 2.1.0.2

A place for App developers to hang out / post
glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

Guide Editor 2.1.0.2

#1

Post by glugglug » Fri Jun 17, 2011 4:43 am

I have created a new user-added channel manager for 7MC. Source is included.
Before I start describing the features I have to start with a warning:
THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES. BE SURE TO HAVE A WORKING BACKUP BEFORE TRYING THIS PROGRAM
Most if not all of the APIs used in this app are undocumented, and I am guessing at the usage by trial and error. There are probably many bugs.

GuideEditor.2.1.0.2.zip
version 2.1.0.2, including source
(241.85 KiB) Downloaded 2799 times
Changes in 2.1.0.2
[*] Standard Channel and DVB Channel tabs shown for all tuner types. Apparently the exception seen in 2.1 was because ATI tuners return false from IsChannelTuningInfoSupported even though this is what they actually use. If you try to add a DVB Channel on a non-DVB tuner (and probably vice-versa) the attempt to add it will fail.

Changes in 2.1.0.1
[*] Extra debug info added to track down exception some users get when adding a channel.

Changes in 2.1
[*] When you add a channel, it now refreshes the grid views and automatically selects the newly added channel. Before it wasn't clear that the channel was successfully added.
[*] When creating a new channel, if you enter a guide channel # before entering the channel/subchannel to tune it won't undo your entering of the guide channel number to make it match the tuning channel # you are entering.
[*] Columns added to indicate which channels are encrypted or HD. You can change the HD flag on a channel, but it is kind of useless to do so as WMC will change it back when it downloads new guide data.
[*] May be possible to add DVB tuning infos. If you have a DVB tuner, it should have a different tab when adding the channel. Can't test it on my machine as I have no DVB tuner, and attempting to add a DVBTuningInfo on a non-DVB tuner it throws an exception casting a DigitalCableTuningRequest to a DVBTuningRequest

Changes in 2.0.0.3
[*] Fixed an error that was occurring when trying to figure out the appropriate modulation type when the scanned lineup of a tuner using DvbTuningInfos is selected to add channels to. It won't be able to create proper channels for such a tuner, but other functionality like channel merging and listing selection should work.
Changes in 2.0.0.2
[*] Available channels grid in the Source Channel Management form is now sortable.
[*] Got rid of extra non-functional close button.
Changes in 2.0.0.1
[*] appropriate modulation selected by default based on existing channels in lineup.


I strongly suspect this will only work on x64, as it references mcEPG.dll, mcstore.dll, mcstoredb.dll, and Microsoft.MediaCenter.UI.dll from the C:\Windows\ehome directory. The source is included, so someone with the x86 version of Win7 could recompile it with the references updated to x86 DLLs to make an x86 build of the app.

Among the advantages of using the MCE interface to add/edit channels are are:
1. No restriction to 3 digit subchannels. FIOS users can now add all their ClearQAM stations.
2. When you select add a channel source, it adds it only to tuners in the currently selected lineup. Meaning that if you add a channel to the "Scanned (Digital Cable (ClearQAM))" lineup, it will add the channels only to the ClearQAM tuners and not to the InfiniTV like MCE normally does. If you really want to add them to the InfiniTV you can add them to the "Scanned (Digital Cable (CableCARD™))" lineup - but why would you do this?
3. It's much faster than in MCE.

Screenshots:
Here is the main screen of the app:
Image

Tuner count reflects the # of sources available for that channel. For example, Discovery Kids says 12 tuners because it can use any of the 4 InfiniTV tuners on channels 22, 842, or 1904.
"User blocked state" is normally "Unknown". When you disable a channel, it changes to "Blocked", and when you re-enable it it changes to "Enabled". I believe Unknown and Enabled are functionally equivalent, as are "Blocked" and "Disabled".

The channel logos in the left hand column are from "My Channel Logos". They are just displayed, not editable here.

Most column headers are clickable to re-sort the channels by that column. They can also be dragged to reorder them. If the current selection includes multiple rows, the Merge Selected Channels button becomes enabled, which brings up a form asking which channel they should be merged into and how to order the sources of the new channel.

Most columns you can edit in the grid, or for the "Listing" and "Source Channels" columns, clicking them brings up a separate form for editing those columns. Screenshots of those forms are shown below:

Image

In the form above, using the promote or demote buttons will re-order the sources for the merged channel to control which tuners get used first. Channel type "Wmis" are channels in the downloaded lineups, not associated with your actual tuners, which I think MCE is using to propagate changes in the downloaded lineups to those in your guide.

The bottom half of the form lets you select other channels to merge into the currently shown channel. You can click the "Create Source Channel" tab to create new source channels that will be automatically merged into the channel that was clicked to bring up this form.
Image

The bottom half of the "Scanned/Wmis Lineups" tab of the main form can be used to add new channels to the guide, rather than managing sources of existing channels:
Image

When adding a channel, you will need to choose a Modulation. If there are already user channels in the lineup, the modulation of the first existing channel it finds will be the default.
The modulation should match the "type" column from your local channel list at the silicondust site or the InfiniTV channel map.
Some other tips on modulation choice:
US OTA = 8VSB
The vast majority of Cable companies in the U.S. should be QAM256 for most channels. We have a few channels here that are QAM64, near the frequencies used by some GSM phones, so I guess they use this when there is less bandwidth from interference?
Not sure if analog cable should be ANALOG_FREQUENCY or RF. Maybe you can tell me?

Channel numbers aren't editable in the "Scanned" lineups, because most of the stuff in the TuningInfos associated with each tuner for the channel isn't editable, so it would require removing and re-adding the associated tuninginfos from both the scanned channel and the connected channels in the guide. So instead, much like in MCE, the user-added channels are added and removed if you need to edit them, for now. Maybe a future version will have an option to alter the associated modulation & channel number when your cable company moves stuff around.

Other known issues:
[*]The background thread from the MCE libraries that wakes up after adding a channel to update your scheduled recordings was crashing the app with an InvalidOperationException("Access Denied"). I block this thread in the app to prevent this. So after updating your channels, I'd recommend going to settings->TV->Guide->"Get Latest Guide Listings" in MCE.
[*]Adding DVB channels may or may not work. Can't test it on my machine as it will throw an exception attempting to add a DVB channel to non-DVB tuners.
[*] If a subchannel number is more than 3 digits, MCE will hide the subchannel input in the edit channels screen. This is one of the reasons I added the guide channel # as separate inputs from the physical channel #.
[*] No sanity check is done to make sure the absense or presense of a physical subchannel matches the selected modulation. I haven't tried seeing what happens if you mismatch this.
[*] An exception has been reported when attempting to add a CableCARD channel - I've added a bunch of them, YMMV.

I've been doing 98% C++ at work for the past 5 years. This is a great little project to keep my .NET skills from getting too rusty/dated.
GuideEditor.2.1.0.2.zip
version 2.1.0.2, including source
(241.85 KiB) Downloaded 2799 times
Attachments
guide editor 2.1 main screen.PNG
guide editor 2.1 main screen.PNG (171.17 KiB) Viewed 14405 times
ChannelSerializer.zip
Utility to serialize the list of channels & tuning infos in the guide to XML.
(14.66 KiB) Downloaded 379 times
Last edited by glugglug on Sun Jul 31, 2011 4:05 am, edited 21 times in total.

User avatar
STC

Posts: 6808
Joined: Mon Jun 06, 2011 4:58 pm
Location:

HTPC Specs: Show details

#2

Post by STC » Sat Jul 02, 2011 5:12 pm

Moved to Developers Corner ;)
By the Community, for the Community. 100% Commercial Free.

Want decent guide data back? Check out EPG123

milli260876

Posts: 726
Joined: Wed Jun 08, 2011 2:56 pm
Location: Barnsley Sth Yorks

HTPC Specs: Show details

#3

Post by milli260876 » Thu Jul 07, 2011 12:35 pm

i get corrupt archive with ie9 and google chrome....
Lee

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#4

Post by glugglug » Thu Jul 07, 2011 8:14 pm

Re-uploaded it. Don't know what was wrong with the previous upload.

milli260876

Posts: 726
Joined: Wed Jun 08, 2011 2:56 pm
Location: Barnsley Sth Yorks

HTPC Specs: Show details

#5

Post by milli260876 » Sat Jul 09, 2011 10:29 pm

tried it to no avail, wouldn't initiate on my PC?? sorted now too so i won't have the time to test(the wife won't let me!!)
Lee

User avatar
holidayboy

Posts: 2715
Joined: Sun Jun 05, 2011 1:44 pm
Location: Northants, UK

HTPC Specs: Show details

#6

Post by holidayboy » Sun Jul 10, 2011 7:41 am

Hi.

I ran the ChannelSerializer (DVB-T and DVB-S):

https://skydrive.live.com/?cid=b9f43836 ... 47F%211202#
Rob.

TGB.tv - the one stop shop for the more discerning Media Center user.

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#7

Post by glugglug » Mon Jul 11, 2011 2:59 am

holidayboy wrote:Hi.

I ran the ChannelSerializer (DVB-T and DVB-S):

https://skydrive.live.com/?cid=b9f43836 ... 47F%211202#
This makes a lot more sense than what sialivi posted on the Windows Experts site. At least it generally has only 1 DvbTuningInfo per channel-tuner combo as you would have ChannelTuningInfos here, and the parameters are the same for both tuners tuning to the same channel.

Unfortunately it looks like if I am going to make DvbTuningInfo creation functionality, there will need to be 5-6 numeric inputs to define what the tuner should tune to. I think LCN probably stands for "logical channel number" and isn't really used to control the tuner so much as suggest an appropriate guide channel #. But still, it looks like TSID, SID, ONID, NID, and Frequency all need to be separate inputs.
The inputs would at least be dropdown menus, as a lot of the channels re-use the same numbers for some of these, in fact in your case ONID and NID are the same for all channels except those added by DVBLink, and a lot of channels share the same TSID. The frequencies seem to at least be limited to multiples of 6000 (which I think means 6MHz, same as in the U.S, with the units being kHz). But are people really going to know what to enter for TSID and SID for channels not picked up by the scan? Especially when I don't see this info online, unless 1 of them is the program ID shown on http://www.silicondust.com/support/channels/? Actually, entering random UK zipcodes into there, some of them I see duplicates of each channel on very close frequencies to each other, not multiples of 6MHz, like what sialivi had, and I'm wondering if all 3 entries are required for the channel to work or if any one of them would do it.

I'll probably add a tab to switch the channel adding part of the app between adding ChannelTuningInfos and DvbTuningInfos if the selected lineup has any DVB capable tuners. Might be awhile.. my wife & son just got back from vacation.

The DVBLink tuning infos would be simpler to input, as all the numbers are the same except frequency, with frequency being 10000x the other values, but I'm kinda doubting it will work without something setting up a virtual channel map somewhere for it, which is probably done by the DVBLink software adding the channels to your guide anyway, so it would be kind of pointless to add them outside of that?

Does MCE itself provide an interface for adding DVB channels manually, like the "Add QAM Channel" button we get going to Settings->TV->Guide->Add Missing Channels" with a QAM tuner present or is it just what gets automatically added when you do TV setup?

It's also interesting that you have 12 internet TV channels when we have only 7 here in the U.S. I wonder if those can be hacked in 8-) ... I'm thinking something like the Peter Near hack might work for this.

One other question: Do the channels for your Pinnacle PCTV 3010iX and those through DVBLink show up in 2 separate scanned lineups in the "Scanned/Wmis Lineups" tab of the app, or are they grouped together as one scanned lineup?

User avatar
holidayboy

Posts: 2715
Joined: Sun Jun 05, 2011 1:44 pm
Location: Northants, UK

HTPC Specs: Show details

#8

Post by holidayboy » Tue Jul 12, 2011 12:06 pm

Sorry, I've been offline for a while.

I'll load up the editor and grab some screens for you if it's helpful.

To be honest, adding DVB channels isn't really an issue for users as you can scan satellite transponders in the MC interface and you can also force a full scan for DVB-T.

In addidtion to that, there is a built in background scanner DVB-T (which can actually cause problems) that will peridically scan for new services and grab the OTA EPG data.

The main issue for non US users is really guide data - either getting the data in the first place, or getting it mapped to the correct channel.

Regarding the 12 "Internet TV" channels, I'd save your energy as there's nothing interesting there and half of the channels will soon disappear once the Sky Player stuff gets removed.

You'd be better off looking at Tunerfree MCE from milliesoft and paying for a vpn connection - that would get you a lot more British content :)
Rob.

TGB.tv - the one stop shop for the more discerning Media Center user.

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#9

Post by glugglug » Thu Jul 14, 2011 1:36 am

holidayboy wrote:Sorry, I've been offline for a while.

I'll load up the editor and grab some screens for you if it's helpful.

To be honest, adding DVB channels isn't really an issue for users as you can scan satellite transponders in the MC interface and you can also force a full scan for DVB-T.

In addidtion to that, there is a built in background scanner DVB-T (which can actually cause problems) that will peridically scan for new services and grab the OTA EPG data.
The screen I would be interested in would actually be tricky to grab (at least with snipping tool), because the menus undrop when the window loses focus.
Specifically, what options are on the circled menu (attached)?

We also can force a full scan here for ClearQAM (and have the built in background scan), but I find it causes more problems than its worth because of 4 issues:
1) It doesn't enable any channel for which it doesn't think it can tell what EPG data should go with it, which is fine for OTA, but with digital cable that means it enables a very small fraction of channels.
2) It creates around a thousand disabled channels to search through in "Edit Channels" to find the working unencrypted ones, maybe more (There are subchannels sent on the cable that aren't even actually channels, both encrypted and not), which means you end up using the silicondust list rather than digging through that anyway.
3) The channels it thinks it identified the EPG data for are often wrong (at least with cable. With OTA, the metadata it picks up is generally accurate).
3b) Even if it identified the right EPG data for a channel today, the background scan might change that tomorrow.
4) The background scan can keep the tuners busy awhile. In fact, even the initial full scan takes a good 30+ minutes, and since it does more harm than good with cable anyway, I cancel out of it as soon as it starts before it picks up any channels and have the background scan disabled in the registry.

Are those roughly the same issues present with DVB-T? Actually, I thought -T stood for terrestrial, as in OTA?
Attachments
lower_menu_screenshot.PNG
lower_menu_screenshot.PNG (51.97 KiB) Viewed 14543 times

User avatar
holidayboy

Posts: 2715
Joined: Sun Jun 05, 2011 1:44 pm
Location: Northants, UK

HTPC Specs: Show details

#10

Post by holidayboy » Thu Jul 14, 2011 7:46 am

The main issue with the background scanner for DVB-T is that it adds sources for every frequency that a channel can be found on, people often live within range of several transmitters that use different frequencies for the same channel - the trouble is that Media Center isn't smart enought to select the strongest source for each channel and we have to go and edit each channel manually.

Vista (pre TVPack) used a different tuning method that didn't have this behaviour. We're mid digital switchover and I guess this new method is better as MC should pick up channels when they move, it does need some tweaking though!

Media Center will add any DVB-T channel that it picks up - even if there's no EPG data for it. The same applies for satellite channels found during a transponder scan.

You're correct about the DVB standards: -T is terrestrial, -S is satellite and -C is cable (there are also T2, S2 and C2 variants)

I'm guessing that the DVB-S lineup would appear in the list if I ran the DVB-S tuners natively in MC (I can run TV setup on a spare machine if it will help shed more light?):
GuideEditor2.0_Scanned_Wmis.png
GuideEditor2.0_Scanned_Wmis.png (158.08 KiB) Viewed 14537 times
Rob.

TGB.tv - the one stop shop for the more discerning Media Center user.

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#11

Post by glugglug » Thu Jul 14, 2011 2:23 pm

No, this screenshot is just what I needed to know. :-) The DVBLink is it's own lineup (actually oddly 4 lineups), making it easy to have separate input logic here for DVB-* vs. DVBLogic tuners vs. tuners using ChannelTuningInfos.

User avatar
holidayboy

Posts: 2715
Joined: Sun Jun 05, 2011 1:44 pm
Location: Northants, UK

HTPC Specs: Show details

#12

Post by holidayboy » Thu Jul 14, 2011 4:28 pm

This machine is running the new v4 beta of DVBLink, I think the v3 version may well show up differently - probably as a DVB-S lineup.

In the past, you had to run through TV setup and set up the DVBLink tuners as a satellite source, the new version uses PBDA stuff and does things differently.
Rob.

TGB.tv - the one stop shop for the more discerning Media Center user.

User avatar
holidayboy

Posts: 2715
Joined: Sun Jun 05, 2011 1:44 pm
Location: Northants, UK

HTPC Specs: Show details

#13

Post by holidayboy » Thu Jul 14, 2011 4:40 pm

This is from a machine that has a native DVB-T tuner as well as DVBLink v3 DVB-S tuners.
DVBLink_v3_Client_PC.png
DVBLink_v3_Client_PC.png (174.24 KiB) Viewed 14520 times
Rob.

TGB.tv - the one stop shop for the more discerning Media Center user.

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#14

Post by glugglug » Sun Jul 17, 2011 4:00 am

I made a version that should hopefully be able to add DVB channels.
GuideEditor.2.1.debug_build.rar
debug build of version 2.1
Added completely untested DVB channel support.
HD & Encrypted columns in the grid.
(139.65 KiB) Downloaded 163 times
The DVB and DVBLink channel adding functionality is completely untested. If I get rid of the check for what TuningInfo types the tuners support, and run it on my non-DVB tuners, it throws an exception failing to cast a DigitalCableTuningRequest to a DVBTuningRequest. Because I would actually be surprised if it worked the first shot, in order to ensure that the debug callstack if it fails doesn't have stuff optimized out, the attached archive has a debug rather than release build in the top level directory of it.

It also has a new column to indicate if channels are encrypted or HD ...and you can change the HD flag for the channel (or more specifically for the listing) .... but unfortunately MCE overwrites this change when it goes to download new listings. Still, the new columns could be useful as a sorting filter, i.e. to find all the encrypted channels added to QAM tuners if you let it scan.

steveo67

Posts: 4
Joined: Sun Jul 24, 2011 11:23 am
Location:

HTPC Specs: Show details

#15

Post by steveo67 » Sun Jul 24, 2011 11:28 am

Is it possible you could use Lyngsat or KingOfSats info to help the process along? This lists a regularly updated collection of Satellite feed info along with SID/PID info to assist in the exact matching.

http://www.lyngsat.com/28east.html
http://en.kingofsat.net/pos-28.2E.php

The latter looks to have a more defined format (.ini) that could be used to help the population process.

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#16

Post by glugglug » Sun Jul 24, 2011 2:37 pm

Looks interesting. Where is the .ini format?
Does the debug build of the app work when you add the DVB channels?

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#17

Post by glugglug » Sat Jul 30, 2011 3:15 am

Updated to version 2.1.
Attachments
GuideEditor.2.1.DebugBinary.zip
Debug binary
(92.6 KiB) Downloaded 88 times
GuideEditor.2.1.ReleaseBinary.zip
Release binary
(84.44 KiB) Downloaded 152 times
GuideEditor.2.1 .source.zip
source
(59.36 KiB) Downloaded 93 times

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#18

Post by glugglug » Sun Jul 31, 2011 2:01 am

Updated to 2.1.0.1
Attachments
GuideEditor.2.1.0.1.Debug.rar
(81.33 KiB) Downloaded 109 times
GuideEditor.2.1.0.1.Release.rar
(69.99 KiB) Downloaded 95 times
GuideEditor.2.1.0.1.Source.rar
(28.42 KiB) Downloaded 107 times

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#19

Post by glugglug » Sun Jul 31, 2011 4:13 am

Updated to 2.1.0.2
Attachments
GuideEditor.2.1.0.2.Debug.rar
(75.67 KiB) Downloaded 122 times
GuideEditor.2.1.0.2.Release.rar
(70.01 KiB) Downloaded 205 times
GuideEditor.2.1.0.2.Source.rar
(28.47 KiB) Downloaded 121 times

User avatar
gpsguru

Posts: 3
Joined: Thu Dec 01, 2011 11:22 pm
Location:

HTPC Specs: Show details

#20

Post by gpsguru » Thu Dec 01, 2011 11:30 pm

I've been playing around with the tool and poking through the source and can't find any way to control what tuners are used or their order. I have several tuners (CableCard, OTA, and Analog Cable) and would like to configure things en masse to first chose OTA, then CableCard, and for the lower channels to only use the analog cable tuner.

Right now I'm having to do all of this through WMC's Edit Channels->Channel X->Edit Sources page. I've tried using the TuningInfo.GetOverride method, and it appears to correctly only return an object for channels that I've overriden, but the values don't match what I would expect.

Code: Select all

foreach (TuningInfo tuningInfo in channel.TuningInfos)
{
    Console.WriteLine("\t{0} ({1})", tuningInfo.Device.Name, tuningInfo.GetIsBlocked(channel));
    ChannelTuningInfo channelTuningInfo = tuningInfo as ChannelTuningInfo;
    Console.WriteLine("\t\tTuningInfo: {0} {1}", tuningInfo.GetPreferredOrder(channel), tuningInfo.GetUserBlockedState(channel));

    TuningInfoOverride tuningInfoOverride = tuningInfo.GetOverride(channel);
    if (tuningInfoOverride != null)
    {
        Console.WriteLine("\t\tOverride: {0} {1} {2}", tuningInfoOverride.PreferredOrder, tuningInfoOverride.UserBlockedState, tuningInfoOverride.IsUserOverride);
    }
}
On a test computer where channel 3 was left alone, channel 5 had tuners 0 & 1 disabled, and channel 5 was reordered to be 2, 1, 0 I get the following output:

Code: Select all

3 : KCTV - A347 = { (3 : KCTV - 64CF) + [ 3 : KCTV - 9CEC] }
	HDHomeRun Prime Tuner 131106DD-0 (False)
		TuningInfo: 9000 Unknown
	HDHomeRun Prime Tuner 131106DD-2 (False)
		TuningInfo: 9000 Unknown
	HDHomeRun Prime Tuner 131106DD-1 (False)
		TuningInfo: 9000 Unknown
5 : ZAP2IT - A369 = { (5 : ZAP2IT - 6513) + [ 5 : ZAP2IT - 9DB8] }
	HDHomeRun Prime Tuner 131106DD-0 (False)
		TuningInfo: 9000 Unknown
		Override: 2147483647 Unknown False
	HDHomeRun Prime Tuner 131106DD-2 (False)
		TuningInfo: 9000 Unknown
		Override: 2147483647 Unknown False
	HDHomeRun Prime Tuner 131106DD-1 (False)
		TuningInfo: 9000 Unknown
		Override: 2147483647 Unknown False
6 : WDAF - A2D6 = { (6 : WDAF - 63F3) + [ 6 : WDAF - 9A58] }
	HDHomeRun Prime Tuner 131106DD-0 (False)
		TuningInfo: 9000 Unknown
		Override: 2147483647 Unknown False
	HDHomeRun Prime Tuner 131106DD-2 (False)
		TuningInfo: 9000 Unknown
		Override: 2147483647 Unknown False
	HDHomeRun Prime Tuner 131106DD-1 (False)
		TuningInfo: 9000 Unknown
		Override: 2147483647 Unknown False
Any suggestions would be greatly appreciated.

Post Reply