TPESystem/Media: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 9: Line 9:


* Device Porting Issues
* Device Porting Issues
** Make sure '''''ro.moz.omx.hw.max_width''''' & '''''ro.moz.omx.hw.max_height''''' values are suitable for the target device.
** Make sure '''''ro.moz.omx.hw.max_width''''' & '''''ro.moz.omx.hw.max_height''''' values are suitable for video decoding on the target device.
*** Each time one video clip is going to be played, ''OMXCodecProxy'' is used to handle resource management of hardware video decoders.
*** Each time one video clip is going to be played, ''OMXCodecProxy'' is used to handle resource management of hardware video decoders.
*** After one video ''OMXCodec'' has been created successfully, ''OMXCodecProxy'' will double check the product of these two values with the actual video resolution.
*** After one video ''OMXCodec'' has been created successfully, ''OMXCodecProxy'' will double check the product of these two values with the actual video resolution.
Line 18: Line 18:
*** The way how ''HAL_PIXEL_FORMAT_XXX'' should be ported in Firefox OS will be improved in the near future.
*** The way how ''HAL_PIXEL_FORMAT_XXX'' should be ported in Firefox OS will be improved in the near future.
*** reference: {{bug|931733}}
*** reference: {{bug|931733}}
** Make sure all the buffers allocated from '''''ANativeWindows''''' can be used for video decoding.
*** In AOSP, ANativeWindow is used as a buffer source and also as a render target. ANativeWindow needs to keep at least ''minUndequeuedBufs'' while rendering video. Each buffer in the queue takes turns to be filled, be rendered, and be emptied.
*** In Firefox OS, ANativeWindow is used as a buffer source, but not as a render target. If we keep ''minUndequeuedBufs'' buffers in ANativeWindow, these buffers will never have chances to be filled. As a result, it's very easy to encounter buffer starvation during video decoding.
*** reference: {{attachment|744257}} on {{bug|864230}}
** Make sure to return '''''ERROR_UNSUPPORTED''''' in '''''OMXCodec::pause()''''' if underlying OMX IL component doesn't support pause and resume function.
*** reference: {{attachment|8340486}} on {{bug|919590}}

Revision as of 11:49, 4 December 2013

TPESystem/Media

Media playback on Firefox OS

  • Members
    • Marco Chen
    • Bruce Sun
    • Star Cheng
    • Blake Wu
  • Device Porting Issues
    • Make sure ro.moz.omx.hw.max_width & ro.moz.omx.hw.max_height values are suitable for video decoding on the target device.
      • Each time one video clip is going to be played, OMXCodecProxy is used to handle resource management of hardware video decoders.
      • After one video OMXCodec has been created successfully, OMXCodecProxy will double check the product of these two values with the actual video resolution.
      • If the video resolution is bigger than the product of these two values, OMXCodecProxy will destroy this newly created OMXCodec. As a result, the playback of this video clip will be abandoned in this case.
      • reference: bug 911113
    • Check HAL_PIXEL_FORMAT_XXX enum definition for color format.
      • Currently HAL_PIXEL_FORMAT_XXX is hardcoded in GrallocImages.h.
      • The way how HAL_PIXEL_FORMAT_XXX should be ported in Firefox OS will be improved in the near future.
      • reference: bug 931733
    • Make sure all the buffers allocated from ANativeWindows can be used for video decoding.
      • In AOSP, ANativeWindow is used as a buffer source and also as a render target. ANativeWindow needs to keep at least minUndequeuedBufs while rendering video. Each buffer in the queue takes turns to be filled, be rendered, and be emptied.
      • In Firefox OS, ANativeWindow is used as a buffer source, but not as a render target. If we keep minUndequeuedBufs buffers in ANativeWindow, these buffers will never have chances to be filled. As a result, it's very easy to encounter buffer starvation during video decoding.
      • reference: attachment 744257 [edit] on bug 864230
    • Make sure to return ERROR_UNSUPPORTED in OMXCodec::pause() if underlying OMX IL component doesn't support pause and resume function.