Display (and position) video on top of other graphical content

by Daniel » Wed, 17 Mar 2010 01:08:15 GMT

Sponsored Links

I need to display video (using the MediaPlayer API) on top of other
graphical content. I currently do this the following way:

* Create one subclass of SurfaceView, and render graphics to it using
* Create another subclass of SurfaceView, and associate a MediaPlayer
with it using MediaPlayer.setDisplay(holder), where holder is the
SurfaceHolder of the SurfaceView.
* Add both SurfaceViews to my Activity using addContentView.

This basically works; the video is displayed on top of the graphical
content and plays ok. Some problems though:

1) According to Google, multiple SurfaceViews are not supposed to be
used in a window. The fact that it works for me seems to be by chance,
and behaviour could change in future versions of Android.

2) The video is placed in the upper left corner, and I haven't found a
way to position it differently.

Any suggestions on a different approach to implement this, that would
not make use of multiple surface views, and also allow me to position
the video, would be much appreciated.



Other Threads

1. 鈥淐onnection reset by peer鈥? exception when connecting android g1 to rs232 adapter

Hi all, I'm trying to connect my android G1 phone (I installed Android
2.1 on it) to an rs232 adapter but continue to get a "Connection reset
by peer" exception. I have the right UUID set up
(00001101-0000-1000-8000-00805F9B34FB) but continue to get this
exception. Unfortunately, there doesn't appear to be any stacktrace in
eclipse. Any help would be greatly appreciated.

2. How to disable user interaction arising from a long press to an EditText

A long press on an EditText brings up a menu of options that the user
can select. The only messages or options that I want users of my apps
to get, I want to come from me via the app. How do you disable this so
that nothing happens when you long press the EditText? What other
situations like this should I be aware of?

3. How to feed MediaPlayer with AMR chunks properly

4. android, How develop a vedio call programe?

5. Looking for Stellar Android Developer/Contract in Seattle

6. Getting Current Signal Strength

7. How to store and retrieve email id and password using SharedPreferences?