views:

174

answers:

1

I'm developing a blackberry application that plays video from the server. I've used Player.start() and Player.stop() for playing and pausing a video. But I also need rewind, forward and seek bar controls in my application. I tried using FramePositioningControl for these controls. But the following code is returning null.

FramePositioningControl framePositioningControl =
        (FramePositioningControl) player.getControl("FramePositioningControl");

I searched several forums and they say many players do not support FramePositioningControl. What players support FramePositioningControl? And what else should I do to add these controls in my application?

A: 

You right, FramePositioningControl returns null at least at specific formats (reproduced on mp4, avi, 3gp)

See also Java Media Framework - JMF/FOBS4JMF FramePositioningControl Problem:

It's a pretty well known and documented issue that JOBS4JMF doesn't support the FramePositioningControl on a lot of different formats. AVIs, for instance, don't work well, and MPEGs don't work at all.

Maybe you can try to write custom seekable datasource like here or here (with a difference RANDOM_ACCESSIBLE in getSeekType() and appropriate seek implementation) but I have no idea how to accomplish this for video...

Max Gontar