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