The integration of the HAVi L2 GUI API with JavaTV and JMF may be challenging. Related HAVi API classes are HScreen , HScreenConfiguration , HVideoDevice , HVideoConfiguration , and HVideoComponent . Related JavaTV classes are Locator and ServiceContext . Related JMF classes are MediaLocator , DataSource , MediaPlayer , and Player . One possible approach is depicted in Figure 8.18. The JMF DataSource class implements the ServiceContext interface. The method HVideoDevice.getSource() returns a DataSource that implements ServiceContext . The method HVideoComponent.getVideoComponent() returns a MediaPlayer object which implements the Player interface. The DataSource object implementing the ServiceContext and the MediaLocator object are constructed using the same Locator object. The MediaPlayer object has a setSource() method that is not included in the Player interface, that allows setting the source to a newly constructed DataSource that is actually a ServiceContext . Most other interactions can be unambiguously inferred from the Chapter 7 (JavaTV) and Chapter 9 (JMF). Figure 8.18. Relationship between object on the boundary.
|