Closed Bug 1210045 Opened 9 years ago Closed 9 years ago

Fix GonkVideoDecoderManager shutdown during initialization

Categories

(Core :: Audio/Video: Playback, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 2 obsolete files)

GonkVideoDecoderManager seems not handle shutdown during initialization(video codec is not reserved).
Assignee: nobody → sotaro.ikeda.g
Attachment #8668001 - Flags: review?(bwu)
I think you are trying to fix the same problem in bug 1204622 as well.
Comment on attachment 8668001 [details] [diff] [review]
patch - Fix GonkVideoDecoderManager shutdown during initialization

Add Alfredo to review this as well since he is working on bug 1204622.
Attachment #8668001 - Flags: review?(ayang)
(In reply to Blake Wu [:bwu][:blakewu] from comment #3)
> Comment on attachment 8668001 [details] [diff] [review]
> patch - Fix GonkVideoDecoderManager shutdown during initialization
> 
> Add Alfredo to review this as well since he is working on bug 1204622.

I saw bug 1204622. It seems not ensure thread safety in all cases.
Comment on attachment 8668001 [details] [diff] [review]
patch - Fix GonkVideoDecoderManager shutdown during initialization

Review of attachment 8668001 [details] [diff] [review]:
-----------------------------------------------------------------

It is good idea to use promise for resource manager here. IMHO it'd be better to use promise in MediaSystemResourceClient, not just GonkVideoDecoderManager.
For example, refactory MediaSystemResourceClient->Acquire() to return a promise and then eliminating the callback MediaSystemResourceReservationListener.
So we can remove a lot of code like GonkVideoDecoderManager::VideoResourceListener and simplify the codes in MediaCodecProxy.

What do you think?
Attachment #8668001 - Flags: review?(ayang)
(In reply to Alfredo Yang (:alfredo) from comment #5)
> Comment on attachment 8668001 [details] [diff] [review]
> patch - Fix GonkVideoDecoderManager shutdown during initialization
> 
> Review of attachment 8668001 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> It is good idea to use promise for resource manager here. IMHO it'd be
> better to use promise in MediaSystemResourceClient, not just
> GonkVideoDecoderManager.
> For example, refactory MediaSystemResourceClient->Acquire() to return a
> promise and then eliminating the callback
> MediaSystemResourceReservationListener.
IIRC, main reasons are in bug 1112219 comment 42.
OS: Unspecified → Gonk (Firefox OS)
Hardware: Unspecified → ARM
Comment on attachment 8668001 [details] [diff] [review]
patch - Fix GonkVideoDecoderManager shutdown during initialization

Review of attachment 8668001 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me!
Sorry to the late review.
Attachment #8668001 - Flags: review?(bwu) → review+
(In reply to Alfredo Yang (:alfredo) from comment #5)
> Comment on attachment 8668001 [details] [diff] [review]
> patch - Fix GonkVideoDecoderManager shutdown during initialization
> 
> Review of attachment 8668001 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> It is good idea to use promise for resource manager here. IMHO it'd be
> better to use promise in MediaSystemResourceClient, not just
> GonkVideoDecoderManager.
> For example, refactory MediaSystemResourceClient->Acquire() to return a
> promise and then eliminating the callback
> MediaSystemResourceReservationListener.
> So we can remove a lot of code like
> GonkVideoDecoderManager::VideoResourceListener and simplify the codes in
> MediaCodecProxy.
> 
> What do you think?

Thanks for the comment. I am going to think about it in a different bug.
(In reply to Blake Wu [:bwu][:blakewu] from comment #6)
> > 
> > It is good idea to use promise for resource manager here. IMHO it'd be
> > better to use promise in MediaSystemResourceClient, not just
> > GonkVideoDecoderManager.
> > For example, refactory MediaSystemResourceClient->Acquire() to return a
> > promise and then eliminating the callback
> > MediaSystemResourceReservationListener.
> IIRC, main reasons are in bug 1112219 comment 42.

The situation seems to be changed since the comment. I am going to think about it in a different bug.
See Also: → 1214997
Rebased.
Attachment #8668001 - Attachment is obsolete: true
Attachment #8674074 - Flags: review+
Fix build failure on KK.
Attachment #8674074 - Attachment is obsolete: true
Attachment #8674628 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/cd6fd71be8de
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: