Stagefright, a media playback engine issue, MediaExtractor issue

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Stagefright, a media playback engine issue, MediaExtractor issue

intecore dummy
I have a problem in extracting meta information for the mp2 and MPEG .bwf files on some Android Devices.

Whenever i try to extract meta information of the files the APP crashes.

I have used MediaExtractor   class  to extract the meta data (for e.g. bitrate, mime, duration, channel count, sample rate etc) of  the files.

But it gets failed for mp2 amd MPEG .bwf format files on specific devices e.g. 

Samsung S6, Android 7.0
Samsung Galaxy J3 (2016), Android 5.1.1
Samsung TAB A6, Android 5.1.1
Samsung Galaxy S5, Android 6.0.1
Redmi Note 5

Few devices could able to extract the meta information successfully.

As on going bit deeper i understood that MediaExtractor uses NUMediaExtractor class which included in libstagefright library.


Here is the stack trace:

E/AndroidRuntime: FATAL EXCEPTION: main

                 
Process: com.package.app, PID: 25198
                  java
.lang.RuntimeException: Unable to start activity ComponentInfo{com.app/com.app.Activity}: java.lang.IllegalArgumentException
                      at android
.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
                      at android
.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988)
                      at android
.app.ActivityThread.-wrap14(ActivityThread.java)
                      at android
.app.ActivityThread$H.handleMessage(ActivityThread.java:1631)
                      at android
.os.Handler.dispatchMessage(Handler.java:102)
                      at android
.os.Looper.loop(Looper.java:154)
                      at android
.app.ActivityThread.main(ActivityThread.java:6682)
                      at java
.lang.reflect.Method.invoke(Native Method)
                      at com
.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
                      at com
.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
                   
Caused by: java.lang.IllegalArgumentException
                      at android
.media.MediaExtractor.getTrackFormatNative(Native Method)
                      at android
.media.MediaExtractor.getTrackFormat(MediaExtractor.java:446)
                      at app
.Activity.readMethaInformation(Activity.java:491)
                      at app
.Activity.onCreate(Activity.java:157)
                      at android
.app.Activity.performCreate(Activity.java:6942)
                      at android
.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
                      at android
.app.ActivityThread.performLaunchActivity(ActivityThread.java:2880)



Anybody knows why this libstagefright extraction problem in specific devices ? As this library is OS specific can it be replaced ? Is there any alternative to this ? 

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.