Closed Bug 1115609 Opened 10 years ago Closed 9 years ago

[gonk-l] [nexus-5] Video can not play webm and mp4 correctly

Categories

(Firefox OS Graveyard :: General, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.2+, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S4 (23jan)
feature-b2g 2.2+
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: askeing, Assigned: jhlin, NeedInfo)

References

Details

Attachments

(5 files)

Attached file nexus-5-l_video.log
### STR
1. install test media.
> $ cd gaia
> $ make install-media-samples
> $ make install-test-media
2. launch Video app
3. play ogv, webm, and mp4 video files

### Expect
1. ogv, webm, and mp4 files can play correctly

### Actual
1. ogv can play
2. webm and mp4 can not play correctly. The Video app will show "Cannot ply video" message with description "Another app is currently using the video player."
### ENV
nexus-5-l build from github.com/mozilla-b2g/B2G
Build ID               20141226102321
Gaia Revision          6f2b5a28da17cb75a1802958a2c1dda225898bb8
Gaia Date              2014-12-25 15:54:33
Gecko Revision         n/a
Gecko Version          37.0a1
Device Name            hammerhead
Firmware(Release)      5.0
Firmware(Incremental)  eng.askeing.20141224.182448
Firmware Date          Wed Dec 24 18:24:58 CST 2014
Bootloader             HHZ12d
Porting issue. Marked as feature-b2g: 2.2+.

Hi Vincent, would you mind looking into this issue? thanks.
feature-b2g: --- → 2.2+
Flags: needinfo?(vliu)
this log's STR:
1. re-flash nexus-5-l build, finish FTU.
2. launch Video app
3. play webm file

result:
show "Cannot play video" on screen.
Yes, I will try to take a first look to narrow down the issue.
Assignee: nobody → vliu
Target Milestone: --- → 2.2 S3 (9jan)
Attached file video-3.log
The attached log was attached to track playback behavior. From the log information, it seems that audio was blocked to wait for output buffer.

E/OMXCodec( 6865): [OMX.google.aac.decoder] Timed out waiting for output buffers: 4/0
E/OMXCodec( 6865): [OMX.qcom.video.decoder.avc] called start in the unexpected state: 4
 
E/sdcard  (  200): missing packages.list; retrying
W/linker  ( 7326): could not load library "libsigchain.so" from LD_PRELOAD for "/system/bin/qseecomd"; caused by library "libsigchain.so" not found
D/QSEECOMD: ( 7326): qseecom listener services process entry PPID = 1
E/QSEECOMD: ( 7326): Listener: index = 0, hierarchy = 0
E/QSEECOMD: ( 7326): Init dlopen(librpmb.so, RLTD_NOW) is failed....
E/QSEECOMD: ( 7326): ERROR: RPMB_INIT failed, shall not start listener services
E/OMXCodec( 6865): [OMX.google.aac.decoder] Timed out waiting for output buffers: 4/0

Hi Wayne,
Could you please help me to see what's going on. Thanks
Flags: needinfo?(waychen)
Status: NEW → ASSIGNED
Attached file omx.log
The log is that open video app and then show video list.

12-29 22:43:39.284 E/OMXCodec( 1857): [OMX.qcom.video.decoder.vp8] called start in the unexpected state: 4

this unexpected state happened in http://dxr.mozilla.org/mozilla-central/source/dom/media/omx/OmxDecoder.cpp?from=OmxDecoder.cpp&case=true#780

Looks like it can't be played twice.
I'm not sure what's going on in here, maybe Blake can help.
Flags: needinfo?(bwu)
Currently John is looking into this. 
Forward this ni to John.
Flags: needinfo?(bwu) → needinfo?(jolin)
Assignee: vliu → jolin
Tried same version of Gecko (m-c) on Flame (v18D base image) and it works fine.
Since there are 100+ commits in stagefright log that are in caf/b2g_kk_3.5 but not in b2g/b2g-5.0.0_r6, I guess it could be some of the changes in those commits that makes flame work. Will try to trace the code to find out why.
Flags: needinfo?(jolin)
Turns out current Gecko code that uses HW/OMX codec only works on CAF's stagefright but not on AOSP's. The 'paused' state introduced in [1] makes 2nd calling to OMXCodec::start() return w/o err.

That commit cannot be merged trivially, and I'm not sure that
a. do we want to merge it to Nexus 5?
b. does QCOM OMX code synced from AOSP support 'pause' state as CAF does?

This might not be the only 'CAF vs. AOSP' difference problem we'll encounter during gonk-l porting. I wonder if there is any established process addressing this kind of problem from previous porting experience?

[1] https://www.codeaurora.org/cgit/external/gigabyte/platform/frameworks/av/commit/?h=caf/mozilla/b2g_kk_3.5&id=25e48f7cfc6c159427419e63d1d4bf197c43598f
Depends on: 1033935
Flags: needinfo?(waychen)
Flags: needinfo?(vliu)
Hi all,

There are some routine tasks should be handled while porting a new version of AOSP [1].

From comment 9, it seems |Problem 4| in [1] is not addressed during L porting.

[1] https://wiki.mozilla.org/TPESystem/Media/DevicePortingIssues
(In reply to Bruce Sun [:brsun] from comment #10)
> Hi all,
> 
> There are some routine tasks should be handled while porting a new version
> of AOSP [1].
> 
> From comment 9, it seems |Problem 4| in [1] is not addressed during L
> porting.
> 
> [1] https://wiki.mozilla.org/TPESystem/Media/DevicePortingIssues

 Should have cc/ni you in the 1st place 2 weeks ago... orz.
 We should consider creating a patch queue for these problems and make sure applying them is our/partners' 1st task when porting any new Android version or device.
We should need to avoid this kind of porting issues happening again :(
The resolution check is not very helpful. AFAIK, Android doesn't have this kind of check. 
it would be better to be remove.
what's our plan for this bug now? apply attachment#8340486 [details] [diff] [review] on Bug#919590 or still need to wait for Bug#1033935?
Target Milestone: 2.2 S3 (9jan) → 2.2 S4 (23jan)
Although not optimal, this seems to be a simple fix to the playback problem currently seen on Nexus 5 because merging CAF patches is not a trivial task.
Attachment #8547406 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8547406 [details] [review]
Change OMXCodec::pause() to support b2g.

Looks good.
Attachment #8547406 - Flags: review?(sotaro.ikeda.g) → review+
(In reply to Michael Wu [:mwu] from comment #16)
> Try cherry picking
> https://github.com/mozilla-b2g/platform_frameworks_av/commit/
> ee814270f52127febfcf29bacf9f1b327d7c4c29 , which is our own version of the
> patch.

Good point. Done and re-pushed. :)
Keywords: checkin-needed
(In reply to Steven Yang [:styang] from comment #13)
> what's our plan for this bug now? apply attachment#8340486 [details] [diff] [review] [diff]
> [review] on Bug#919590 or still need to wait for Bug#1033935?

 With this patch, I don't think we have to wait for bug 1033935.
 IMHO enabling MediaCodec decoder in v2.2 is still a good idea. It's your call now, Benjamin. :)
Flags: needinfo?(bechen)
b2g-5.0.0_r6: https://github.com/mozilla-b2g/platform_frameworks_av/commit/eda942b94e362eb1cc0611324a1b19b6fdd07e1b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
hi all, 
I still have same problem in firefox 39. 
I could not play video on mobile (apart.com)
mp4 link has same problem like this
http://hw15.asset.aparat.com/aparat-video/ca1e008a64633304ae0e3734d3372e092847653-360p__56992.mp4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: