Skip to main content

Unable to Playing Video files on OCAP-RI

6 replies [Last post]
Joined: 2008-07-30
Points: 0


I'm trying to develop a VOD application on Tru2Way RI platform.

However, I can't create an instance.
(Video files that are in the '../resources/tunedata' directory was used.)

The code and outputs are like this

-------------------- Code ---------------------------------------------------------
url = new URL("http://localhost:18080/Temp/background.mpg");
dataSource = Manager.createDataSource(url);

// For Debugging - Start
System.out.println("######## Contents Type : "+dataSource.getContentType());
System.out.println("######## mimeTypeToPackageName : "+ContentDescriptor.mimeTypeToPackageName(dataSource.getContentType()));

Enumeration e = Manager.getHandlerClassList(ContentDescriptor.mimeTypeToPackageName(dataSource.getContentType())).elements();

Object obj = e.nextElement();
System.out.println("######## Handler : "+obj);
// For Debugging - End

player = Manager.createPlayer(dataSource);

-------------------- Console Output ---------------------------------------------------------

######## Contents Type : video/mpeg
######## mimeTypeToPackageName : video.mpeg
######## Handler :
######## Handler :
at org.ocapproject.xlet.MovieView.initPlayer(
at org.ocapproject.xlet.MovieView.(


Do I need to use another type of Video file?

Message was edited by: lanore

Reply viewing options

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

Note that while OCAP supports drip feed data sources, the RI does not currently.

RI Platform support for drip feed should be available in a future release.

Joined: 2008-07-30
Points: 0

Thank you for the information.... :)

Joined: 2009-02-02
Points: 0

The OCAP spec defines support for a drip feed player and datasource (see the OCAP spec section, as well as MHP 1.0.3 sections 7.1.3 and 11.11.9). A drip feed datasource allows you to 'feed' individual MPEG2 I and P frames to a decoder (not B frames).

See OCAP section 9.1 for a correlation table describing the supported media formats.

DripFeedDataSource is the only mechanism supporting playback of standalone MPEG2 video files. The OCAP spec does not include support for other video formats (AVI, etc).

There is an example xlet which demonstrates how to use a DripFeedDataSource in:

Joined: 2008-07-30
Points: 0

Thank you scottdeboy

I was able to create the instance of the Player, and start playing.

However the RI emulator screen doesn't display anyting. (It shows just black screen).

Do I miss anything?

The modified code is

--------------------------------- Code ------------------------------------------------

MediaLocator mediaLocator = new MediaLocator("dripfeed://localhost:18080/Temp/background.mpg");
dataSource = Manager.createDataSource(mediaLocator);

player = Manager.createPlayer(dataSource);
while (!(player.getState() == Player.Realized)) {}


while(!(player.getState() == Player.Prefetched)) {}



Joined: 2008-07-30
Points: 0

Does any body know what types of Video file are supported by the OCAP-RI?

I think there is an implementation of Video file.

There is "" class in the ocap-classes.jar file, that looks like an implementation of Video file

However, I couldn't find any Video file types that is matched with this Player(Handler).

Creating an instance of the class is also seems to be not possible.

I get "ClassNotFoundException" When I try to create an instance of the class instance.
This is weird, because the ocap-classes.jar(containg the class file) file is in the class path.

Joined: 2008-07-03
Points: 0

I can help answer part of your question. As an OCAP Xlet, you can not access because it is not a public OCAP API as specified by OCAP, MHP, JavaTV, or PBP. This is an internal implementation class. Access to any APIs outside the ones that are publicly defined is explicitly denied by the specifications.

The goal of OCAP is to define a middleware such that a single application will run exactly the same no matter who created the middleware implementation.

I'm not very familiar with JMF, so I can't help with your underlying question. Hopefully, someone else will jump on here and help out.