Closed Bug 1296198 Opened 6 years ago Closed 6 years ago

Somewhat of improvement on MediaCodecDataDecoder on Fennec

Categories

(Firefox for Android Graveyard :: Audio/Video, defect, P5)

defect

Tracking

(firefox51 fixed)

RESOLVED FIXED
Firefox 51
Tracking Status
firefox51 --- fixed

People

(Reporter: JamesCheng, Assigned: JamesCheng)

Details

Attachments

(1 file)

1. Use a switch case statement to convert State to string instead of table mapping.

2. Use strong type enum class instead of enum.

3. Remove unnecessary function call State().

4. Change State(...) to SetState(...)
Comment on attachment 8782293 [details]
Bug 1296198 - Somewhat of improvement on MediaCodecDataDecoder on Fennec.

https://reviewboard.mozilla.org/r/72494/#review70106

::: dom/media/platforms/android/MediaCodecDataDecoder.cpp:664
(Diff revision 2)
>  nsresult
>  MediaCodecDataDecoder::Drain()
>  {
>    MonitorAutoLock lock(mMonitor);
> -  if (State() == kDrainDecoder || State() == kDrainQueue) {
> +  if (mState == ModuleState::kDrainDecoder ||
> +      mState ==  ModuleState::kDrainQueue) {

one extra space around "=="
Attachment #8782293 - Flags: review?(jwwang) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6ac44ef858a
Somewhat of improvement on MediaCodecDataDecoder on Fennec. r=jwwang
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e6ac44ef858a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.