Persistent Storage Management

One of the great features mandatory on every HD DVD player is at least 128 MB of persistent storage.  Many discs on the market are taking advantage of this feature to allow you to do things like save bookmarked scenes, download new trailers, or cache your login information to access network enabled content.

The players do have a persistent storage management interface that will allow users to delete this saved content if the user so chooses.  However, the player's persistent storage management menu only allows the user to delete ALL the content for a disc.  So, it is HIGHLY RECOMMENDED that if you are using persistent storage for your disc, that you...

  1. Provide your users with the ability to modify the contents saved on persistent storage for your disc from outside the player's persistent storage management menu. For instance, if your disc allows for the downloading trailers, make sure you also provide your user with the ability to delete these trailers from persistent storage via an application on the disc.
  2. Label your content and provider folders by setting a [language]-explanation and/or [language]-icon key as specified in chapter 10 of the DVD Specification for High Definition Video. (sample code and downloadable sample application provided below). When a user does use the player's persistent storage management menu, your disc's folder will be appropriately labeled and the user can avoid confusing it with another disc and accidentally deleting it.

Launching the Persistent Storage Management Menu

To access the player's persistent storage management menu on a Toshiba player:

  1. Press "SETUP" on the remote.
  2. From the Setup menu, navigate to General > Maintenance > Persistent Storage
  3. Press "SETUP" on the remote again to launch the Persistent Storage Management Menu

To access the player's persistent storage management menu on the Xbox:

  1. Launch the Xbox dashboard
  2. Navigate to the System blade
  3. Select Memory
  4. Choose HD DVD

There is a good possibility that you will see several folders labeled "Unknown Provider" and "Unknown Content".  When a disc saves content to persistent storage, a unique folder is created based on that disc's content ID and nested under a folder based on its provider ID. The content and provider IDs are set in the DISCID.DAT file on the disc.  If a disc sets the [language]-explanation and/or [language]-icon keys, the user will be provided with meaningful labels.  If the disc does not set these keys, the specification states that the player should use "Unknown Provider" and "Unknown Content" as a label.  As you can probably imagine or even see for yourself - it quickly becomes difficult to distinguish between your content and provider folders if you do not set these keys.

Creating Labels for the Content and Provider Directories

The simplest way to create a label for your content and provider directories is to set the [language]-explanation keys for these directories to a string that describes your disc title and studio.  The value selected by the persistent storage management menu is determined by the user's menu language. So, if you only set the content folder's en-explanation key and the user's menu language is set to Spanish (es), the user will still see "Unknown Content".  Thus, you will want to specify several languages in order to cover your anticipated audience.

To set the key for your content directory, on the PersistentStorageDevice object for your required persistent storage, you would call

setContentInformation(PersistentStorageManager.contentId, "en-explanation", "Title of My Movie", contentCallbackFunction)

where contentCallbackFunction is the callback function that handles the result from your call.

And, similarly, to set the key for your provider directory, on the PersistentStorageDevice object for your required persistent storage, you would call

setProviderInformation("en-explanation", "Title of Movie Studio", providerCallbackFunction)

where providerCallbackFunction is the callback function that handles the result from your call.

But, as I stated earlier, you will want to set this key for multiple languages.  And, as you noticed, these functions have a callback and thus operate asynchronously.  So, to set multiple language keys without stepping on a previous call, you will need to wait for the callback from the previous call before calling the function a second time.

The code to do this for the provider folder looks something like:

function setProviderLabel(providerInfo, languages)
{
  //get reference to required p-storage devices
  var pstoreDevices = PersistentStorageManager.getPersistentStorageDevices(PersistentStorageManager.STORAGE_REQUIRED);
  var psd = pstoreDevices[0];
  var provider_index = 0;

  function setProviderExplanation( )
  {
    psd.setProviderInformation( languages[ provider_index ] + "-explanation", providerInfo, setProviderExCB);
  }

  function setProviderExCB( result, key )
  {
    if (result == PersistentStorageManager.SUCCEEDED && provider_index < languages.length - 1)
    {
        //interate through languages
        provider_index++;
        setProviderExplanation();
    }
  }
}

setProviderLabel("Title of Movie Studio", ["en","es","fr"]);

At the end of this post is a sample application which sets the [language]-explanation keys for both provider and content using a function called setPStorLabel which takes your content description(s), provider description(s), and array of languages as arguments.  Including this script in your project will allow you to specify the labels for your provider and content folders in a single call:

setPStorLabel("Title of My Movie", "My Movie Studio", ["en","es","fr"]);

A Note About [language]-icon

10.8 in the spec states that you may also set the [language]-icon key as a way to label your content and provider directories.  This requires creating a 1024x96 pixel PNG or JPEG, copying it to the content or provider directory, and setting the [language]-icon key to the location of the image.  However, it should be noted that the player may only use the [language]-explanation key and not the [language]-icon key, so if you should chose to use [language]-icon, be sure to set [language]-explanation as a backup.

 

PStorLabel.zip