Skip to main content

Where can I find ParentalControlRatings?

10 replies [Last post]
david_crandall
Offline
Joined: 2010-01-05
Points: 0

I'm looking for the 'ParentalControlRatings' class and all the constants therein, such as MPAA_G, TV_Y, etc---but I don't see it in 1.1.4-RelD I'm using it for MediaAccessHandlerRegistrar's settings for ratings to adjust accordingly for content.
I might be up a tree here, but I think this is the road I'm on.
Thanks in Advance,
David

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cpratt
Offline
Joined: 2008-12-18
Points: 0

Here's the ECN-972 ParentalControlRatings, fwiw:

public interface ParentalControlRatings
{
/**
* See CEA-766-A April 2001 for definitions.
*/
public static final int TV_NONE = 0;
public static final int TV_Y = 1;
public static final int TV_Y7 = 2;
public static final int TV_G = 3;
public static final int TV_PG = 4;
public static final int TV_PG_D = 5;
public static final int TV_PG_L = 6;
public static final int TV_PG_S = 7;
public static final int TV_PG_V = 8;
public static final int TV_PG_D_L = 9;
public static final int TV_PG_D_S = 10;
public static final int TV_PG_D_V = 11;
public static final int TV_PG_L_S = 12;
public static final int TV_PG_L_V = 13;
public static final int TV_PG_S_V = 14;
public static final int TV_PG_D_L_S = 15;
public static final int TV_PG_D_L_V = 16;
public static final int TV_PG_D_S_V = 17;
public static final int TV_PG_L_S_V = 18;
public static final int TV_PG_D_L_S_V = 19;
public static final int TV_14 = 20;
public static final int TV_14_D = 21;
public static final int TV_14_L = 22;
public static final int TV_14_S = 23;
public static final int TV_14_V = 24;
public static final int TV_14_D_L = 25;
public static final int TV_14_D_S = 26;
public static final int TV_14_D_V = 27;
public static final int TV_14_L_S = 28;
public static final int TV_14_L_V = 29;
public static final int TV_14_S_V = 30;
public static final int TV_14_D_L_S = 31;
public static final int TV_14_D_L_V = 32;
public static final int TV_14_D_S_V = 33;
public static final int TV_14_L_S_V = 34;
public static final int TV_14_D_L_S_V = 35;
public static final int TV_MA = 36;
public static final int TV_MA_L = 37;
public static final int TV_MA_S = 38;
public static final int TV_MA_V = 39;
public static final int TV_MA_L_S = 40;
public static final int TV_MA_L_V = 41;
public static final int TV_MA_S_V = 42;
public static final int TV_MA_L_S_V = 43;
public static final int MPAA_G = 0x100;
public static final int MPAA_PG = 0x200;
public static final int MPAA_PG13 = 0x300;
public static final int MPAA_R = 0x400;
public static final int MPAA_NC_17 = 0x500;
public static final int MPAA_X = 0x600;
public static final int MPAA_NOT_RATED = 0x700;
}

 
cpratt
Offline
Joined: 2008-12-18
Points: 0

ParentalControlRatings was part of ECN-972, which didn't make the OCAP 1.1.1 cut.
Let me see if I can find the files from that ECN and provide you the relevant constants...

david_crandall
Offline
Joined: 2010-01-05
Points: 0

I appreciate the lookup. Thank you!
On further analysis, it looks like there really isn't any 'guts', so-to-speak, that I see as it regards to any 'set' functionality, specifically, MediaAccessHandlerRegistrar.setSignaledBlocking(rating). That is, it defaults to the parent class's stubs as it sets the ratings. Near as I can tell. I could be wrong and completely missing something.

cpratt
Offline
Joined: 2008-12-18
Points: 0

MediaAccessHandlerRegistrar.setSignaledBlocking() is also part of the ECN-972 functionality But it was implemented on the RI before it moved to OCAP 1.1.1.
Essentially this call instructs the OCAP implementation to block the presentation of content (by presenting alternative content) "above" the designated rating based on the content_advisory_descriptor- or the VBI/XDS-signaled ratings. There hasn't been a substitute API for this functionality defined as of yet.

david_crandall
Offline
Joined: 2010-01-05
Points: 0

Ahhh... one of the tests was asking about parental controls, is why I found myself here.
I see something in UserPreferenceManager that cites "Parental Ratings", but the only hooks throughout the rest of the code I see is in AbstractServicePlayer.java line 212 where it does a reselect, but it doesn't seem to look at whatever preference I set, was. I could set it to "North Korea" and it would go through the same motions.
So, just to reiterate, there isn't a parental controls API that's really geared to work, currently?

scottdeboy
Offline
Joined: 2009-02-02
Points: 0

Updating the "parental rating" user preference will result in a call to the registered MediaAccessHandler's checkMediaAccessAuthorization method, and if the result is not full authorization, presentation switches to alternative content. It doesn't matter what the "parental rating" preference is set to - just setting it results in the re-evaluation of authorization.
This is essentially the same calling MediaAccessConditionControl.conditionhasChanged(MediaPresentationEvaluationTrigger.USER_RATING_CHANGED).

david_crandall
Offline
Joined: 2010-01-05
Points: 0

That's all well and good, but say there was an occasion as a user of this software where I wanted to limit viewing to anything over TV_Y. How would I set that?
Likewise, say the presentation was blocked for some reason, how would I let a user know that their authorizations are invalid?

scottdeboy
Offline
Joined: 2009-02-02
Points: 0

See section 16.2.1.8, Parental Control, and Annex S (MediaAccessRegistrar/MediaAccessHandler/MediaAccessAuthorization) of the OCAP spec for more information on support for limiting viewing via parental control.
To communicate invalid authorizations to a user, when presentation is blocked due to lack of full authorization in MediaAccessAuthorization, an AlternativeContentErrorEvent with reason RATING_PROBLEM is sent to registered ServiceContextListeners.

david_crandall
Offline
Joined: 2010-01-05
Points: 0

I really appreciate your patience with me through this.
Ok, so I write this MediaAccessHandler that implements a checkMediaAccessAuthorization function.
This 'checkMediaAccessAuthorization' is responsible for checking authorization---and gets called whenever the parental rating is set, or any other reason for reevaluating ratings and permissions.
checkMediaAccessAuthorization has five parameters:
* Player p
* OcapLocator sourceURL
* boolean isSourceDigital
* ElementaryStream[] esList
* MediaPresentationEvaluationTrigger evaluationTrigger
isSourceDigital, sourceURL, and evaluationTrigger have no capacity of letting me know the ratings of any events going on that triggered this 'checkMediaAccessAuthorization'. They can let me know about the source, the reason, and the URL that was in charge of it.
That leaves Player p, and our list of streams 'esList', to contain any rating information.

I'm looking through the documentation, and Player isn't an entity that lets me know anything about ratings.

This leaves esList, a list of ElementaryStreams to be judged individually. ...and the one last piece of the puzzle... how do I get rating information out of an ElementaryStream, if you would be so kind to direct me.

cpratt
Offline
Joined: 2008-12-18
Points: 0

I don't know how widely ratings are signaled, as most guide apps use their own metadata for this kind of thing.
For digital programming, ratings can be carried in the content_advisory_descriptor of the PMT associated with the program - and would therefore be retrievable via the ProgramMapTableManager.
There are a couple of issues, however: (1) SCTE-65 only mandates the CAD on "Profile 3" networks - and many networks are still Profile 1, (2) to use the CAD, other tables (out-of-band tables) may need to be retrieved, (3) for analog programming XDS metadata provides the same function of the CAD and can be extracted by an OCAP via the VBIFilter, but this class isn't widely implemented I believe.
So like I say, I believe the currently-deployed solutions for PC is to use application-provided channel metadata. Perhaps someone out there can corroborate or correct me...