MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server » Help on Development » Development


Development You want to code something for the TV-Server? Share it in here!

Reply
 
Thread Tools Display Modes
Old 2007-11-26, 03:51   #11 (permalink)
Portal Member
 
Join Date: Oct 2007
Posts: 58
Thanks: 1
Thanked 4 Times in 4 Posts

Country:


Default

Hi Gemx. There is problem with star rating entirely. Fo NA providers, I've looked at the epg in MT and Mediaportal, and they don't even correspond to each other. I can't even find any correlation between them. I think the epgparser must be decoding that value incorrectly. Maybe it is in NA only? You'll notice the other poster is from Canada as well, so I think that is why everything looks OK to you but we see "<undefined>" all over the guide (as well as wrong ratings). I think MT is right because it gave "The Dukes of Hazzard" 2 stars and MP gave it 3...

At any rate, I've looked at the C++ portion of the code, but without any knowlege of how the epg in encoded, I can't be of much help.

Also, I would be really nice to change the "<undefined>" to string.Empty so it isn't cluttering up the guide...

<Edit>
I did some more digging and I think the problem may be in DecodeCombinedStarRating_MPAARatingDescriptor in epgDecoder.cpp I think the star rating code is wrong. In the comments it shows the data is based on a post in the dvbn boards. I found a later post that says the data is in bits 13-15 not 1-3:

http://dvbn.happysat.org/viewtopic.p...ating&start=45

The relavent post is:
Here is what I have found in the 0x89 descriptor (view it as a 16 bit word, big endian):

bits 13-15 of descriptor 0x89 data: star rating
000 = not rated
001 = 1 star
010 = 1.5 stars
...
111 = 4 stars

bits 10-12: MPAA rating
000 = NR/AO (pr0n)
001 = G ?
010 = PG
011 = PG-13
100 = R
101 = NC-17 ?
110 = unrated / not a movie
111 = ???

bit 9 = violent
bit 8 || bit 0 = sexual content? my 301.013 sees SC on every single movie, I think dish is screwing this up
bit 6 = nudity
bit 5 = unknown but sometimes set
bit 1 = language

I found a C program called tv_grab_dvb which, with some tweaking, parses the dish network epg/eepg into an xmltv file. It's still not all that great but I haven't found any other open source programs which do this.


This could be helpful as well:
http://board.mytheatre.ru/viewtopic....ht=star+rating

Could that be the problem for NA users? I haven't really had time to go over the code enough to see which bits it is actually using...

Last edited by dalmer; 2007-11-26 at 05:32. Reason: Automerged Doublepost
dalmer is offline   Reply With Quote
Old 2007-11-26, 11:41   #12 (permalink)
Portal Developer
 
gemx's Avatar
 
Join Date: Oct 2006
Age: 32
Posts: 1,321
Thanks: 25
Thanked 201 Times in 108 Posts

Country:

My System

Default

Just commited the following changes:
- changed decoding of the starrating and mpaa rating infos to the method suggested above (wrong bits were used before)
SINCE I CAN'T CHECK IF THE CHANGES ARE CORRECT PLEASE REPORT BACK ASAP.
- missing starrating or mpaa infos evaluate to an empty string when used in templates instead of "<unknown>" as it was before.
Please test with snapshots from rev. 16570
__________________
ACCENT HT-100 | 2x16 VFD | ADM Athlon 64 3500+ | Win XP SP2 | SkyStar 2 DVB-S PCI | TT connect S2-3600
gemx is online now   Reply With Quote
Old 2007-11-26, 23:02   #13 (permalink)
Portal Member
 
Join Date: Oct 2007
Posts: 58
Thanks: 1
Thanked 4 Times in 4 Posts

Country:


Default

The removal of undefined works great.

The star rating does not. I checked the DB and it's all 0.

Now, keep in mind that my C++ is about as rusty as the Titanic (I mostly use C# nowadays). So don't laugh if I'm way off base. I took a quick peek at the code and you've got this:

int starRating=(int)data[3]&0xE0; // bits 13-15

Don't you have to shift the bits before casting to an int? I'm gussing that it is creating a number thatis much larger than 7 so it always gets set to 0 a few lines down?

Don't laugh if I'm out to lunch, I told you my c++ was rusty.

EDIT:
I finally got some time to comple and test some stuff on my own. (I was completly rebuilding my computer etc). At any rate, I believe I've got this working. I have to test against the Guide in MT, but so far the numbers look correct. I also believe I've discovered a bug in classification as it never writes anything to the DB.

More Later... I might not be able to get back to this for a couple of days. I have a new computer comming, I'll be switching it with my current one. I'll be switching the current one with my HTPC and installing an ATI HD 2400... Lots on the go. After that, I can hopefully look at helping out geting the NA EPG tuned as long as you can help me with my rusty c++.

EDIT2:
I fixed it and uploaded the epgDecoder.cpp to the patch queue. It turns out that both links (in the comments) were correct if depending on how you interpreted them. I've found another problem though, it seems that classification never gets written to the db for some reason. If I find out more details, I'll let you know...

Last edited by dalmer; 2007-12-12 at 03:19.
dalmer is offline   Reply With Quote
Reply

Bookmarks

Tags
added, based, description, dvb, epg, naming, template, title

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrong title in EPG from dutch DVB-c VpR 0.2.3.0 RC1 and SVN Builds 1 2007-09-01 20:47
epg description - strange symbol bindalf Electronic Program Guide 0 2007-06-21 21:58
[PATCH]: Epg mhw program description grabber crazyboy pre 1.0 RC1 2 2007-03-14 22:55
EPG description when searching using genre Nemulate Improvement Suggestions 1 2007-01-13 12:28
Movie title and description are not shown in videoOSD Ralph 0.2.0.0 Release Candidate 2 CVS Bugs 1 2006-03-03 11:59


All times are GMT +1. The time now is 12:31.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden