Video output to window

I’m new to OpenMAX, so forgive my naivete.

I want to play video in an application using OpenMAX on the Raspberry Pi, and maybe also on Android.
I have sample source code from the Raspbian distro on how that might go.

The sample code plays a video in full-screen mode. Is there a way to restrict that to
a window if I’m running X on the Pi, using the IL layer?

I see that the AL layer has a MediaPlayer abstraction, which on Android, appears
to be available through Java. Is that a better way to go? But I don’t see the AL
layer abstractions on the Pi.