[unagi weekly build 13.05.16]tara video playback will be stuck, if repeat play short video

RESOLVED WONTFIX

Status

--
blocker
RESOLVED WONTFIX
6 years ago
10 months ago

People

(Reporter: james.zhang, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

6 years ago
Created attachment 742265 [details] [diff] [review]
tara device use softcodec when generate video thumbnail

tara device(spreadtrum's sp8810ea) can't support multi-instance hardware video codec. 
Video app will easily crash when generate video thumbnail and video playback at the same time.
We add preSoftCodecs interface, and use softcodec to generate video thumbnail and hardware codec to video playback, avoid video app crash. 
Can you help us to support this WEBAPI or another way to fix this bug.
This bug seems to be like Bug 859650. If you agree this, you may set this as a duplicate with Bug 859650. Thanks.
(Reporter)

Comment 2

6 years ago
(In reply to Marco Chen [:mchen] from comment #1)
> This bug seems to be like Bug 859650. If you agree this, you may set this as
> a duplicate with Bug 859650. Thanks.

Hi Marco,
These two bug maybe the same reason.
But video app will crash on tara, not crash on leo. This issue block our smoke test now.
(Reporter)

Comment 3

6 years ago
Created attachment 742284 [details] [diff] [review]
Video player is stuck when switch quickly

Video playback use hardware codec, if switch to next quickly,  video player is stuck.
(Reporter)

Comment 4

6 years ago
Hi Sotaro, can you review this patch ? Maybe it's another way to resolve Bug 856542.
(Reporter)

Updated

6 years ago
Attachment #742265 - Flags: review?(mchen)
(Reporter)

Updated

6 years ago
Attachment #742284 - Flags: review?(mchen)
Hi James,

I would give you the feedback first then after all general issues are clear then they will be passed to suitable reviewer.

First of all, Thanks for your contribution here. Then some issues here.

  1. Please refer to the link as below for coding style and naming convention. I think patches here should do some change for this requirement.
     https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style

  2. nsIDOMHTMLVideoElement.idl is modified and it means this is a change on Web API level. A super review will be needed for this and normally it should be discussed in Mozilla's dev-webapi mail list or W3C forum first. After we make sure it is worth to do then start to review it's implementation.
(Reporter)

Comment 6

6 years ago
Hi Sotaro and Macro, 
Please play the attachment video repeat, unagi and tara will stuck about 1~2 seconds.
Because qcom hw codec is not support multi-instance and google native code is not support 'pause' interface.
After applied the patch, it will be ok.

E/OMXCodec(  906): [OMX.qcom.video.decoder.mpeg4] Video O/P format.eColorFormat 0x7fa30c01
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): Successfully allocated OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): [OMX.qcom.video.decoder.mpeg4] Timed out waiting for output buffers: 0/5
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.TI.DUCATI1.VIDEO.DECODER'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.Nvidia.mp4.decode'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.qcom.7x30.video.decoder.mpeg4'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.qcom.video.decoder.mpeg4'
E/OMXCodec(  906): Successfully allocated OMX node 'OMX.qcom.video.decoder.mpeg4'
E/OMXCodec(  906): [OMX.qcom.video.decoder.mpeg4] Video O/P format.eColorFormat 0x7fa30c01
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): Successfully allocated OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.TI.DUCATI1.VIDEO.DECODER'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.Nvidia.mp4.decode'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.qcom.7x30.video.decoder.mpeg4'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.qcom.video.decoder.mpeg4'
E/OMXCodec(  906): Successfully allocated OMX node 'OMX.qcom.video.decoder.mpeg4'
E/OMXCodec(  906): [OMX.qcom.video.decoder.mpeg4] Video O/P format.eColorFormat 0x7fa30c01
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): Successfully allocated OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): [OMX.qcom.video.decoder.mpeg4] Timed out waiting for output buffers: 0/5
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.TI.DUCATI1.VIDEO.DECODER'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.Nvidia.mp4.decode'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.qcom.7x30.video.decoder.mpeg4'
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.qcom.video.decoder.mpeg4'
E/OMXCodec(  906): Successfully allocated OMX node 'OMX.qcom.video.decoder.mpeg4'
E/OMXCodec(  906): [OMX.qcom.video.decoder.mpeg4] Video O/P format.eColorFormat 0x7fa30c01
E/OMXCodec(  906): Attempting to allocate OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): Successfully allocated OMX node 'OMX.google.amrnb.decoder'
E/OMXCodec(  906): [OMX.qcom.video.decoder.mpeg4] Timed out waiting for output buffers: 0/5
Summary: [tara]tara device can't support multi-instance hardware video codec → [unagi weekly build 13.05.16]uangi and tara device can't support multi-instance hardware video codec
(Reporter)

Comment 7

6 years ago
Created attachment 750388 [details]
repeat play this video will stuck
(Reporter)

Comment 8

6 years ago
(In reply to Marco Chen [:mchen] from comment #5)
> Hi James,
> 
> I would give you the feedback first then after all general issues are clear
> then they will be passed to suitable reviewer.
> 
> First of all, Thanks for your contribution here. Then some issues here.
> 
>   1. Please refer to the link as below for coding style and naming
> convention. I think patches here should do some change for this requirement.
>      https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style
> 
>   2. nsIDOMHTMLVideoElement.idl is modified and it means this is a change on
> Web API level. A super review will be needed for this and normally it should
> be discussed in Mozilla's dev-webapi mail list or W3C forum first. After we
> make sure it is worth to do then start to review it's implementation.

Hi Macro,
The code is just an example, I suggest that we can find a better way to fix this issue without change the WEBAPI.
(Reporter)

Updated

6 years ago
Summary: [unagi weekly build 13.05.16]uangi and tara device can't support multi-instance hardware video codec → [unagi weekly build 13.05.16]uangi and tara video playback will be stuck, if repeat play short video
(Reporter)

Comment 9

6 years ago
Hi Macro and Sotaro,
   Can you help me how to distinguish between thumbnail generate and video playback without changing WEBAPI , then I can fix this issue in tara.
(Reporter)

Comment 10

6 years ago
Because tara has some limitations, some video can play but can't generate thumbnails by hw codec.
If use hw codec only, many video can't be shown in video thumbnail list.
(Reporter)

Updated

6 years ago
Summary: [unagi weekly build 13.05.16]uangi and tara video playback will be stuck, if repeat play short video → [unagi weekly build 13.05.16]tara video playback will be stuck, if repeat play short video

Comment 11

6 years ago
Getting bug 869289 fixed would at least show the video in the list, but with a black thumbnail. Nexus S has similar issue.
(In reply to James Zhang from comment #10)
> Because tara has some limitations, some video can play but can't generate
> thumbnails by hw codec.
> If use hw codec only, many video can't be shown in video thumbnail list.

Why hw codec can't generate some video's thumbnails? From this explanation, it seems spreadtrum's parts defect. Why doesn't spreadturm fix this problem?

From v1.1, any apps and web contents can use video tag for video playback generation and drawing video to canvas. Video codec need to be capable of them. Otherwise, the apps ans web contents failed to handle video.
(Reporter)

Comment 13

6 years ago
Hi Sotaro,

   As Chris said, can we discuss this issue, maybe gecko can use "ro.moz.omx.thumbnail = software" to resolve tara and nexus-s black thumbnail issue, just like "ro.moz.omx.hw.max_width/max_height".
   Because this is hardware issue, we can't modify the chipset rom code anymore, we can only use software method to avoid it, and this method works fine on android.

Comment 14

6 years ago
(In reply to James Zhang from comment #13)
>    Because this is hardware issue, we can't modify the chipset rom code
> anymore, we can only use software method to avoid it, and this method works
> fine on android.

We're discussing an API for providing a thumbnail directly. The implementation would then use hardware or software as needed and be optimized to get a good thumbnail efficiently instead of having to seek in video element, etc. Would that suit your needs?
(Reporter)

Comment 15

6 years ago
(In reply to Chris Double (:doublec) from comment #14)
> (In reply to James Zhang from comment #13)
> >    Because this is hardware issue, we can't modify the chipset rom code
> > anymore, we can only use software method to avoid it, and this method works
> > fine on android.
> 
> We're discussing an API for providing a thumbnail directly. The
> implementation would then use hardware or software as needed and be
> optimized to get a good thumbnail efficiently instead of having to seek in
> video element, etc. Would that suit your needs?

Yes!
followings are summarize of the discussions with :doublec and :cpearce.

- When a codec is used under video tag, the codec needs capability for video playback and drawing to canvas. On web platform, video tag can be used for any way. We can not restrict how the video tag is used. It is different things from android. Android provides dedicate ways.
- v1.01 and v1.1 products' hardware do not have the problem.
- Though, some hw codecs can not be used for thumbnail generation.
- Add a way to specify "use hw codec"/"use sw codec" to video tag is not a good thing. It does not slove a problem for general web applications, but adds problems. 
- In fure Firefox OS(1.2?/2.0?), we could add a dedicated way for thumbnail generation. It is neessary from performance point of view. It could be used also for workaround of the problem.
(Reporter)

Comment 17

6 years ago
(In reply to Sotaro Ikeda [:sotaro] from comment #16)
> followings are summarize of the discussions with :doublec and :cpearce.
> 
> - When a codec is used under video tag, the codec needs capability for video
> playback and drawing to canvas. On web platform, video tag can be used for
> any way. We can not restrict how the video tag is used. It is different
> things from android. Android provides dedicate ways.
> - v1.01 and v1.1 products' hardware do not have the problem.
> - Though, some hw codecs can not be used for thumbnail generation.
> - Add a way to specify "use hw codec"/"use sw codec" to video tag is not a
> good thing. It does not slove a problem for general web applications, but
> adds problems. 
> - In fure Firefox OS(1.2?/2.0?), we could add a dedicated way for thumbnail
> generation. It is neessary from performance point of view. It could be used
> also for workaround of the problem.

Sotaro, can you file a new bug and let me track this feature, thank you.
:doublec created Bug 873959.
Comment on attachment 742284 [details] [diff] [review]
Video player is stuck when switch quickly

This is solved by Bug 873371 with a patch landed to CAF.
Attachment #742284 - Flags: review?(mchen)
Comment on attachment 742265 [details] [diff] [review]
tara device use softcodec when generate video thumbnail

This would depends on new Web API introduced from Bug 873959
Attachment #742265 - Flags: review?(mchen)

Updated

6 years ago
Depends on: 873959

Updated

6 years ago
Blocks: 883051

Comment 21

10 months ago
Firefox OS is not being worked on
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.