use android binary omx codec

Aihua Zhao halley.zhaoaihua at gmail.com
Sun Mar 1 17:50:01 PST 2015


thanks, some questions.
 "media service is needed only because OMXClient tries to use it."
1. where is the service running now? in android container, or in native
host?
2. you mean the full media service (player service, MediaCodec service) is
running now, but only a small part to load omx lib are used. right?

3. in your gst-omx, there is some change in hardwareAPI.h
struct UseAndroidNativeBufferParams {
   // ....
    OMX_BUFFERHEADERTYPE **bufferHeader;
    const struct ANativeWindowBuffer *nativeBuffer;
};
in Android code, there used to be "const sp<ANativeWindowBuffer>&
nativeBuffer;".
I confuse how it works, could your explain?
thanks

2015-02-27 9:01 GMT+08:00 Mohammed Sameer <msameer at foolab.org>:

> On Thu, Feb 26, 2015 at 10:53:39AM +0800, Aihua Zhao wrote:
> >  Hi Sameer:
> >  thanks for your kindly explanation.
> >  when you talks about " integrate with Android at stagefright level", do
> >  you mean to run android media service on Jolla?
>
> We run camera service and media service.
> Camera service is used for camera access. We have evaluated a few options
> and picking
> anything else up would mean reimplementing what camera service does.
>
> media service is needed only because OMXClient tries to use it. It can be
> disabled but
> that is pending some investigation.
>
> We also need to run a mock up of surface flinger that returns an allocator
> (An alternative
> approach would be patching the camera clients in libcameraservice).
>
> >  where are your codes?
>
> 1) The code consists of 2 parts. The bionic library which gets built
> against your
> android source tree: https://github.com/sailfishos/droidmedia (master
> branch)
>
> The GStreamer elements using this library:
> https://gitorious.org/gstreamer1-0/gst-droid/
> (droidmedia branch).
>
> There are still some issues and quite a lot of refactor to be done there.
>
>
> >  do you run the full android media service on Jolla, or extract the part
> >  for MediaCodec and Camera only?
>
> Here is the code for the media services (camera and media):
> https://github.com/sailfishos/droidmedia/blob/master/minimedia.cpp
>
> Cheers,
>
> >  2015-02-26 8:19 GMT+08:00 Mohammed Sameer <[1]msameer at foolab.org>:
> >
> >  On Wed, Feb 25, 2015 at 04:52:35PM +0800, Aihua Zhao wrote:
> >  > Hi Experts:
> >  Hi,
> >  > I'm trying to use android omx binary codec in some way, and
> >  noticed the
> >  > implementation from Ubuntu and Jolla.
> >  > Ubuntu
> >  > touch:
> >  [1][2]https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1
> >  > .0
> >  > Jolla: [2][3]https://github.com/sailfishos/gst-omx
> >  I created the implementation for Jolla.
> >  Just note that this implementation is for GStreamer 0.10
> >  Currently Jolla is migrating to GStreamer 1.x with a new homegrown
> >  modules that integrate with Android at stagefright level for media
> >  decoding
> >  and encoding and at camera service level for camera access.
> >  The code is open and I can point you at it if you are interested.
> >  It's still
> >  in development but the results are promising.
> >  Just note that even though the code is meant to be generic, it's
> >  meant to be
> >  built per device against the specific version of Android used by
> >  Sailfish OS.
> >  > from my understanding, Jolla uses omx binary directly
> >  > by android_dlopen(); while Ubuntu touch uses the codec from
> >  android
> >  > media codec service. both are in gstreamer world.
> >  True for Jolla, we load android OMX libraries via libhybris and
> >  enable Android
> >  native buffers. The code is heavily patched for only this use-case.
> >  I had plans to forward port the needed changes to GStreamer 1.x and
> >  push them
> >  to upstream gst-omx after discussing it with slomo but I
> >  unfortunately got busy.
> >  > I wonder one possible implementation away from gstreamer:
> >  > the Android MediaCodec API is also convenient to use. on
> >  non-android
> >  > Linux, is it possible to load omx binary by hybris, then simply
> >  wrapped
> >  > it into MediaCodec interface?
> >  This is going to be a huge task, Each OMX codec has its own set of
> >  quirks.
> >  I also noticed that if you deviate much from the "Android behavior"
> >  then
> >  the binary you are using can at best case error out and at worst
> >  case crash on you.
> >  > you may say that is what android does; however, I think the
> >  > implementation in Android is over-complex and depends on android
> >  > toolkit.
> >  It's just tailored to Android :-)
> >  Cheers,
> >  --
> >  GPG-Key: 0xA3FD0DF7 - 9F73 032E EAC9 F7AD 951F 280E CB66 8E29 A3FD
> >  0DF7
> >  Debian User and Developer.
> >  Homepage: [4]www.foolab.org
> >
> >  _______________________________________________
> >  gstreamer-devel mailing list
> >  [5]gstreamer-devel at lists.freedesktop.org
> >  [6]http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> > References
> >
> >  1. mailto:msameer at foolab.org
> >  2. https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1
> >  3. https://github.com/sailfishos/gst-omx
> >  4. http://www.foolab.org/
> >  5. mailto:gstreamer-devel at lists.freedesktop.org
> >  6. http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> --
> GPG-Key: 0xA3FD0DF7 - 9F73 032E EAC9 F7AD 951F  280E CB66 8E29 A3FD 0DF7
> Debian User and Developer.
> Homepage: www.foolab.org
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150302/f5a09fc8/attachment.html>


More information about the gstreamer-devel mailing list