Using the PlayReady Device Porting Kit Test Transmitter

The PlayReady-ND sample app (PRNDSampleApp) demonstrates how to enable playback of PlayReady protected content streamed from a PlayReady-ND based transmitter (see Sample: PlayReady-ND Sample App for a description of the PlayReady-ND sample app). In addition, the PlayReady Device Porting Kit contains a test transmitter (PRNDTransmitter.exe) that can serve as a test source of the protected streams played back from the sample app which leverages the PlayReady-ND receiver capabilities.

Note

Before you can install the PlayReady Device Porting Kit and use the PRNDTransmitter app, you must first obtain a PlayReady license from Microsoft. To find out more about how to obtain a PlayReady license, see Microsoft PlayReady Licensing Options.

Legal Notice

MPEG-2 Transport Stream—The PlayReady-ND sample receiver app for Windows 8.1 supports processing of data in an MPEG-2 Transport Stream container. This is provided for development purposes only. You are responsible for any licensing obligations related to the MPEG-2 Transport Stream in your final shipping product.

Installing and Setting Up the Test Transmitter

Once you have obtained a license for the PlayReady Device Porting Kit and have installed the porting kit from the PlayReadyPK.msi file, you can now install and set up the test transmitter.

Note

For more information on setting up the porting kit test transmitter, see the PRNDTransmitter.exe topic in the PlayReady Device Porting Kit section of the PlayReady SDK documentation.

To install and set up the test transmitter

  1. Copy the PRNDTransmitter.exe file from the PlayReady Device Porting Kit \Tools folder to a new folder (for example, to c:\transmitter). Give this folder "everyone" permission.

Note

In most cases, the precompiled PRNDTransmitter.exe file from the PlayReady Device Porting Kit is sufficient to test your receiver app. However, if you require changes to the test transmitter to successfully communicate with your receiver app, you can edit and compile the test transmitter source code located in the \source\tools\prnd\transmitter folder of the PlayReady Device Porting Kit installation folder. For more information, see Compiling the PlayReady-ND Test Transmitter.

  1. Copy the following files to the transmitter folder (in this example, c:\transmitter):
    • \samples\bgroupcert.dat
    • \samples\ConnectionManager_UPnP_PRND.xml
    • \samples\ContentDirectory_UPnP_TransmitterServiceDescription.xml
    • \samples\PlayReady_UPnP_TransmitterServiceDescription.xml
    • \samples\zgpriv.dat
    • \source\tools\prnd\transmitter\PRNDTransmitter.xml
    • \test\licgen\keyfile.dat
  2. Edit the following sections of the PRNDTransmitter.xml file:
    • Change the value of the <TransmitterUPnPDeviceName> tag to uniquely identify the device you are using as a test transmitter.
    • Uncomment the <CDSMediaSource> tag.
    • Change the value of the UniqueID attribute of the <CDSMediaSource> tag to the identifier from the properties dialog of the discovered transmitter network device from the Windows Explorer’s Network folder.
    • You may also need to change the values of the FolderName and BrowserFlag attributes. These values are used as filters for the UPnP Browse function.
    • Ensure that the value of the <TransmitterPort> tag is set to a port number that is unique and not used or reserved by other apps. This tag specifies the TCP port that the transmitter listens to for the PlayReady-ND messages. In most cases the default value of 10000 can be used. If you are running more than one test transmitter on a single computer, you will need to enter a different value in each transmitter's PRNDTransmitter.xml file (for example, 10000 for the first transmitter and 10001 for the second transmitter).
    • Ensure that the value of the <MediaStreamerPort> tag is set to a port number that is unique and not used or reserved by other apps. This tag specifies the TCP port that the transmitter will use for media streaming. In most cases the default value of 15000 can be used. If you are running more than one test transmitter on a single computer, you will need to enter a different value in each transmitter's PRNDTransmitter.xml file (for example, 15000 for the first transmitter and 15001 for the second transmitter).
    • Optionally, you can generate licenses with different policy descriptions by setting the Enabled attribute to true and entering the policy description in the <DefaultPolicyDescriptor> tag.

The test transmitter is now set up and ready to run.

Compiling the PlayReady-ND Test Transmitter

When you first get started testing your PlayReady-ND receiver app, in most cases the precompiled PRNDTransmitter.exe test transmitter app will be sufficient to test your code. However, in some cases you may need to modify the test transmitter code and build your own version.

The source code for the test transmitter can be found in the \source\tools\prnd\transmitter folder of the PlayReady Device Porting Kit installation folder. Once you have modified the test transmitter source code, use the following procedure to compile the test transmitter. This procedure assumes that you have installed the PlayReady Device Porting Kit in the C:\PK\Device_PK_2.11.XXXX folder (where XXXX is the build number of the PlayReady Device Porting Kit).

To compile the PlayReady-ND test transmitter

  1. Open a Visual Studio native tools x86 command prompt and set the following environment variables:
    • set DRM_BUILD_ARCH=X86
    • set DRM_BUILD_PLATFORM=ANSI
    • set DRM_ROOT_PATH=C:\PK\Device_PK_2.11.XXXX.0\
    • set DRM_BUILD_PROFILE=OEM
    • set DRM_BUILD_TYPE=CHECKED
  2. If you are building the test transmitter for the first time, change directory to C:\PK\Device_PK_2.11.XXXX.0\source and compile the test transmitter using nmake clean all from there. Subsequent rebuilding of PRNDTransmitter.exe can be done from the C:\PK\Device_PK_2.11.XXXX.0\source\tools\prnd folder.

Known Issues and Limitations

The following known issues and limitations pertain to the test transmitter.

  • The test transmitter folder should be copied to the root folder, and be given “everyone” permission to the folder. If not, the test transmitter will error out immediately due to a "file not found" error returned by RegisterRunningDevice.
  • The test transmitter does not support multi-network interface card (NIC) configurations; it may not function correctly on computers with more than one NIC.
  • Certain channels, specifically those that are encrypted, do not play back.
  • The test transmitter expects the client to fetch a license before streaming.

See Also

Sample: PlayReady-ND Sample App