Video View Fullscreen And On Top On Ouya

RedSun

Member
Licensed User
Longtime User
Is there any way to force the video view to not be fullscreen and on top?

I am creating a program on the Ouya and I want a controls overlay on top of the video playback, but the video always goes fullscreen and forces itself on top of everything else, even toast messages do not appear.

I have tried the videoviewextras, and vvelib libraries. The aspect ratio could be changed, but it still forced its way into fullscreen.

It works if I use vitamob4a library, but I would like for users not to have to download anything extra if possible as I would think that may put a lot of people off.

I am kind of thinking this may be an Ouya specific issue.

New to all this, so I am probably missing something obvious, but any help would be appreciated.

B4X:
vv.MediaControllerEnabled=False
Activity.AddView(Panel3, 0dip, 0dip, Activity.width, Activity.height)
Panel3.AddView(vv, 0dip, 0dip, Panel3.width, Panel3.height)
vv.LoadVideo("http", "videofile location")
vv.Play
Activity.AddView(Panel2, 400dip, 400dip, 60dip, 60dip)
Panel2.AddView(ImageView3, 0dip, 0dip, 60dip, 60dip)
ImageView3.Bitmap = LoadBitmap(File.DirAssets, "ouya_o.png")
ImageView3.Gravity=Gravity.fill
Panel2.BringToFront
ImageView3.BringToFront
 

Rick Harris

Well-Known Member
Licensed User
Longtime User
Yes, I also found that large libarm.so file before I contacted you. I don't think that whether or not this file is compressed is relevant. It's the size of the App in RAM while it is running that is important. Do you know of any tricks by which I can make my app claim more memory? I have already added "SetApplicationAttribute(android:largeHeap,"true")" to the manifest.

I have always been surprised how frugally Android assigns RAM to an App. Most devices now have at least 500 MB RAM, but running apps that are larger than about 25 MB still cause Out of Memory problems. Also hi-res pictures cause problems.

The main reason why I tried Vitamio is that I want to be able to play "mms" and "rtmp" Radio and TV streams. If there are other (less RAM consuming) alternatives than Vitamio then please let me know. Thank you in advance.

NB. I noticed that Vitamio cannot play .asx files (e.g. the BBC radio streams). Only after opening the asx file and digging out the actual stream was I able to get it to play.
 
Last edited:
Upvote 0

warwound

Expert
Licensed User
Longtime User
I know of no other library that is similar to Vitamio.

Looking at the Vitamio source code i see this method is used to install the libarm.so library:

B4X:
  private static String copyCompressedLib(Context ctx, int rawID, String destName) {
  byte[] buffer = new byte[1024];
  InputStream is = null;
  BufferedInputStream bis = null;
  FileOutputStream fos = null;
  String destPath = null;

  try {
  try {
  String destDir = getLibraryPath();
  destPath = destDir + destName;
  File f = new File(destDir);
  if (f.exists() && !f.isDirectory())
  f.delete();
  if (!f.exists())
  f.mkdirs();
  f = new File(destPath);
  if (f.exists() && !f.isFile())
  f.delete();
  if (!f.exists())
  f.createNewFile();
  } catch (Exception fe) {
  Log.e("loadLib", fe);
  }

  is = ctx.getResources().openRawResource(rawID);
  bis = new BufferedInputStream(is);
  fos = new FileOutputStream(destPath);
  while (bis.read(buffer) != -1) {
  fos.write(buffer);
  }
  } catch (Exception e) {
  Log.e("loadLib", e);
  return null;
  } finally {
  IOUtils.closeSilently(fos);
  IOUtils.closeSilently(bis);
  IOUtils.closeSilently(is);
  }

  return destPath;
  }

Look at the line:

B4X:
is = ctx.getResources().openRawResource(rawID);

is is an InputStream obtained from the android Resource class.

Could that method be updated so that if it fails to find the libarm.so asset, it looks elsewhere in the file system?
Could i make including libarm.so optional, if you do not include it then your app would have to download it from the internet and save it to the device external memory?

Some psuedo code might be:

B4X:
  VitamioVideoView1.LIB_INSTALL_PATH=File.Combine(File.DirRootExternal, "libarm.so")

   If VitamioVideoView1.CheckVitamioLibs Then
     VitamioVideoView1.Initialize("VitamioVideoView1")
     Activity.AddView(VitamioVideoView1, 0, 0, 100%x, 100%y)
     VitamioMediaController1.Initialize("VitamioMediaController1")
     VitamioVideoView1.SetMediaController(VitamioMediaController1)
     VitamioVideoView1.SetVideoQuality(VitamioVideoView1.VIDEO_QUALITY_HIGH)
     VitamioVideoView1.SetVideoPath("http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8")
   End If

So you have to set the path to the downloaded libarm.so file before calling CheckVitamioLibs.
The library method copyCompressedLib would fail to find libarm.so in the apk assets, and check to see if a path to libarm.so has been set.
If set it'd install libarm.so from that path, otherwise installation of the library would fail.

Sounds like a backwards step to me - reverting to how the older versions of Vitamio required a download.

What do you think?

Martin.
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
Longtime User
I know of no other library that is similar to Vitamio.


So you have to set the path to the downloaded libarm.so file before calling CheckVitamioLibs.
The library method copyCompressedLib would fail to find libarm.so in the apk assets, and check to see if a path to libarm.so has been set.
If set it'd install libarm.so from that path, otherwise installation of the library would fail.

Sounds like a backwards step to me - reverting to how the older versions of Vitamio required a download.

What do you think?

Martin.


i think i'm losing the thread here. are we still talking about bundle 4 or have you been able to take a look at 4.1? messages 56 & 57 come in sequence, but i get the impression 57 refers to something done before 56...
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
My suggestion in post #63 applies to any version of Vitamio - if i can update the library so that you can compile it without the libarm.so file then would that be useful?

Unfortunately i haven't had time to look at the new version yet.

Martin.
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
Longtime User
My suggestion in post #63 applies to any version of Vitamio - if i can update the library so that you can compile it without the libarm.so file then would that be useful?

Unfortunately i haven't had time to look at the new version yet.

Martin.

no pressure; just wondering if i missed something in the flurry.
for those of us nearing the end of the trail, learning android development with, eg, eclipse at this stage is a non-starter. in addition, it seems to me that the less the user - assuming someone other than the developer ever gets to use the app - has to do to be up and running, the better. that, among others, is the main benefit to version 4: it's all there in the .apk. besides, hard-coded download links don't always work. (for version 3, the link to download the plug-in from vitamio was broken. and google allows what it wants to allow when it wants to allow it.) in any case, thanks for the time you have been able to spare.
-go
 
Upvote 0

elitevenkat

Active Member
Licensed User
Longtime User
Hi,
Just want to know if i could stream the camera video ? I went through the entire thread but i could not find (missed?) the info!
if it is possible kindly let me have any link to it.
venkat
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
Hi,

I have the following issue with this bundle. As I'm playing with ffmpeg recompilation for other formats support (mainly audio), I'm continuously changing the libarm.so file. If I just replace the one in res/raw folder nothing happen after the first app installation. The original one is kept in the tablet filesystem and the new one is not overwritten. I have to uninstall the app each time in order to load a new libarm.so file.
I'm doing something wrong?

Thank you,
Dan
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
I have the following issue with this bundle. As I'm playing with ffmpeg recompilation for other formats support (mainly audio), I'm continuously changing the libarm.so file. If I just replace the one in res/raw folder nothing happen after the first app installation. The original one is kept in the tablet filesystem and the new one is not overwritten. I have to uninstall the app each time in order to load a new libarm.so file.
I'm doing something wrong?

No that is the default behaviour.
The library checks for the existence of libarm.so, if it is not found then libarm.so is copied from the apk to the android device.
If libarm.so is found on the device then no action is taken.

You can speed up the uninstallation process by using a Command Prompt and adb:

B4X:
adb uninstall my.package.name

Saves the hassle of clicking through the menus on the device.
Once you've executed this command once, keep the Command Prompt window open and when you need to again uninstall press the UP cursor key and you should find the previous command auto-completed to save you re-typing it.

Martin.
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
Hi Martin,

Thank you for your answer. I have now another issue. I've tried to compile ffmpeg library using the procedure here:
http://www.vitamio.org/en/2013/Tutorial_0509/13.html
It compiles without error.
If I replace libffmpeg.so with the new one, when I'm trying to play a network stream I get the error:
"Fatal Signal 11 (SIGSEGV)"
Looking at the file I've seen that the recompiled one is:
build/ffmpeg/neon/libffmpeg.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped
and the original one from the package is:
71/libffmpeg.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), stripped

May be the missing "(used shared libs)" the root cause for the error?

I need opus support in libffmpeg which is not available in the included library.

Thank you,
Dan
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Hi Dan.

I'm afraid that's not something i understand.
I've got next to no experience of compiling C/C++ for use within android.

Martin.
 
Upvote 0

hears

Active Member
Licensed User
ACE STREAM is more better,can you change it to B4A ? ace stream can use P2P VIDEO,it is populer stream video format now
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I told it in the past: ALWAYS create a NEW Thread for each question.
Do NOT post to old threads.
 
Upvote 0
Top