Android Dev - third-party SDK media players or other options?

I am writing an application for a multimedia website . I often meet, and I had a problem.

After capturing the URL of the video stream (h264 wrapped in an mp4 container) and trying to play it using the native video player, it fails.

This is on my Moto Droid 2.2 (BB) and 2.3 (CM7). I tested the application on my Xoom (3.1 stock) and it works great.

I also had a friend who tested this on her Xperia Arc (stock 2.3, as far as I know), and it worked for her. It seems to me that this is a problem <hardware decoder , since I can play the stream normally using RockPlayer software decoder , but I can’t use the hardware.

So, I have three things I want to know:

  • Does the custom Android player support decoding software. if so, how can I determine if it uses hardware or software and is it possible to switch?
  • Are there any third-party media players with easily accessible SDKs (free).
  • How can I simply open the video in another application, such as Rock Player, since I know that it works. When I upload a video using a browser, it asks which video player I want to use. How can I make this pop up in my application and then send the video to it?
+4
source share
1 answer
  • Yes, Android provides the h264 software decoder, but it may not be available in version 2.2. You may prefer a software codec, see AOSP source code for stagefright :

    usage: stagefright [options] [input_filename] … -s(oftware) prefer software codec …

  • There are many Android derivatives and shells in ffmpeg that are available with various license restrictions.

  • It is very easy to run Intent for a specific application. You can use setComponent () to exactly match the required Activity. A better and more flexible way to solve this problem is to create a custom Chooser (see, for example, Custom intent filtering based on the installed Android package name ) so that the user decides which player he prefers. With custom choices, you can hide some of the handlers registered in the action (for example, do not use the system player on Android versions below 3.0).

0
source

All Articles