Android Media Framework

627 views
Skip to first unread message

ezmora

unread,
Nov 26, 2010, 2:38:13 AM11/26/10
to android-platform
As far as I understand, the Android media framework consists of a
number of
native libraries (.so files), some of which are: libmedia.so,
libmedia_jni.so, libmediaplayerservice.so etc...
When I launch an Android application that plays video, a chain of
method
calls taks place from the Java layer all the way up until the video
is
rendered on the screen.
Does anyone know which libraries (.so files) are involved in this
chain of
calls and in which order?


For example:
Java app calls a method in libmedia_jni.so
libmedia_jni.so calls a method in libmedia.so
... etc, until -
<someLibrary>.so renders the video


which libraries are involved? when is each library being loaded (only
when
one of its methods is called, or at boot time)?


Thanks,
Eyal


FrankG

unread,
Nov 27, 2010, 5:28:30 PM11/27/10
to android-platform
I asume, that you have to "consult" the code ?!

qin xiaofen

unread,
Nov 27, 2010, 10:09:45 PM11/27/10
to FrankG, android-platform
hi,

Take mediarecorder for example:
App: videocamera.java
framework: MediaRecorder.java
JNI: android_media_MediaRecorder.cpp
Native code: MediaRecorder.cpp/MediaPlayService.cpp/
opencore/stagefright multimedia framework

Which .so is linked, you can check the Android.mk file under the same dir with source code.

Details you can check the code.
>--
>You received this message because you are subscribed to the Google Groups "android-platform" group.
>To post to this group, send email to android-...@googlegroups.com.
>To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
>For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>
>



ezmora

unread,
Nov 29, 2010, 1:37:36 AM11/29/10
to android-platform
Thanks for your reply.
Any idea how the system decides whether to use opencore libraries or
stagefright libraries?
Does that depend on the content's source/type?
Is there a plan to change the media framework in 'GingerBread'?

On Nov 28, 5:09 am, "qin xiaofen" <qinxiao...@vmkid.com> wrote:
> hi,
>
> Take mediarecorder for example:
> App: videocamera.java
> framework: MediaRecorder.java
> JNI: android_media_MediaRecorder.cpp
> Native code: MediaRecorder.cpp/MediaPlayService.cpp/
> opencore/stagefright multimedia framework
>
> Which .so is linked, you can check the Android.mk file under the same dir with source code.
>
> Details you can check the code.
>
> >For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.- Hide quoted text -
>
> - Show quoted text -

iblues

unread,
Nov 29, 2010, 1:57:56 AM11/29/10
to android-platform
Hi,

from my knowledge, choosing the media framework is done during compile
time. I dont think it happens during the phone operation. The OEM has
the freedom to choose which framework he wants to support for his
phone.
> > >For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.-Hide quoted text -

ezmora

unread,
Nov 30, 2010, 2:59:45 AM11/30/10
to android-platform
The path up to MediaRecorder.cpp (or any other file comiled into
limedia.so), is clear.
What is not really clear to me is what happens from there onwards.
For example, suppose I use StageFright, besides all StageFright's
libraries (libstagefright.so, libstagefright_omx.so,
libstagefright_color_conversion...) which will be used,
other libraries are also loaded and used (libmediaserver.so,
libmediaplayerservice.so...). Can anyone enlighten me about that?
Is there some sort of document which describes a simple flow of
playing video?

Eyal


On Nov 28, 5:09 am, "qin xiaofen" <qinxiao...@vmkid.com> wrote:
> hi,
>
> Take mediarecorder for example:
> App: videocamera.java
> framework: MediaRecorder.java
> JNI: android_media_MediaRecorder.cpp
> Native code: MediaRecorder.cpp/MediaPlayService.cpp/
> opencore/stagefright multimedia framework
>
> Which .so is linked, you can check the Android.mk file under the same dir with source code.
>
> Details you can check the code.
>
> >For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages