The examples on this page are designed to give developers an idea of how to use the various MHP APIs. Some of these are more complex than others, but all of them will hopefully give you an idea of good MHP programming practise and will show you how to use the different MHP APIs.
These code samples have been tested on real MHP implementations, but there will always be some differences between some implementations. If you find a problem, please let us know (ideally with a solution), and we will do our best to maintain code that works on all MHP implementations.
- A simple Xlet example (Download)
- Using the HAVi UI API (Download)
- Using JMF Players in MHP (Download)
- Using JMF Players in XleTView is slightly different from a full MHP implementation(Download)
- The service selection API (Download)
- Tuning to a new transport stream (Download)
- Accessing DVB service information (Download)
- Using MPEG section filters (Download)
- Using the JavaTV SI API to get data for an EPG (Download) – this example has not been tested as thoroughly as the others. If you find a bug, please contact us.
These samples are all copyright Steve Morris, and are free for non-commercial use. If you wish to use this code commercially (e.g. in a training course), please contact us to discuss license terms.
The MHPTester application provides a way of testing some of the features of an MHP receiver:
The following applications are provided by the XleTView project:
The following applications are provided by Arvid as part of their support for the OpenMHP project:
If you are using an MHP emulator such as XleTView, you may need a set of stub classes to compile your application against. The stubs below include all of the javax.* and org.* packages included in MHP 1.0.3. This source code is placed in the public domain, so feel free to do anything you like with it. Important note: These are stub classes only. These are not a full MHP implementation and can not be used for funning your Xlets. They are only suitable for compiling Xlets.