1 <html devsite> 2 <head> 3 <title>SoC Vendor Dependencies for Media Resource Manager</title> 4 <meta name="project_path" value="/_project.yaml" /> 5 <meta name="book_path" value="/_book.yaml" /> 6 </head> 7 <body> 8 <!-- 9 Copyright 2017 The Android Open Source Project 10 11 Licensed under the Apache License, Version 2.0 (the "License"); 12 you may not use this file except in compliance with the License. 13 You may obtain a copy of the License at 14 15 http://www.apache.org/licenses/LICENSE-2.0 16 17 Unless required by applicable law or agreed to in writing, software 18 distributed under the License is distributed on an "AS IS" BASIS, 19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 See the License for the specific language governing permissions and 21 limitations under the License. 22 --> 23 24 25 26 <p>This document is intended to help system on chip vendors (SoCs) properly 27 implement support for priority, operating rate and the hooks needed for Android 28 media resource manager.</p> 29 30 <h2 id=1_omx_errorinsufficientresources>1. OMX_ErrorInsufficientResources</h2> 31 32 <p>The codec component should return 33 <code>OMX_ErrorInsufficientResources</code> on <code>GetHandle</code>, 34 <code>Init</code>, <code>UseBuffer</code>, <code>AllocateBuffer</code> or a 35 state transition if the failure is due to insufficient resource. The error code 36 will be used by the media resource manager as the indicator to potentially 37 preempt media resource from other lower priority process.</p> 38 39 <p>An Android Compatibility Test Suite (CTS) test exists to allocate, configure 40 and start each codec repeatedly until <code>catching 41 OMX_ErrorInsufficientResources</code> (pass) or any other error (fail).</p> 42 43 <h2 id=2_omx_indexconfigpriority>2. OMX_IndexConfigPriority</h2> 44 45 <p>This configuration lets the application describe desired codec priority.</p> 46 47 <p>The associated value is an integer. Higher value means lower priority. 48 Currently, only two levels are supported:</p> 49 50 <ul> 51 <li>0: realtime priority - meaning that the codec shall support the given 52 performance configuration (e.g. framerate) at realtime. This will only be used 53 by media playback, capture, and possibly by realtime communication scenarios if 54 best effort performance is not suitable.</li> 55 <li>1: non-realtime priority (best effort). This is the default value.</li> 56 </ul> 57 58 <p>Vendor is suggested to use this as a hint used at codec configuration and 59 resource planning - to understand the realtime requirements of the application.</p> 60 61 <p>Dont assume realtime priority unless it is configured to 0.</p> 62 63 <h2 id=3_omx_indexconfigoperatingrate>3. OMX_IndexConfigOperatingRate</h2> 64 65 <p>This configuration lets the application describe operating frame rate for 66 video or sample rate for audio at which the codec will need to operate.</p> 67 68 <p>This is used for cases like high-speed/slow-motion video capture, where the 69 video encoder format contains the target playback rate (e.g. 30fps), but the 70 component must be able to handle the high operating capture rate (e.g. 240fps).</p> 71 72 <p>This rate should be used for resource planning and setting the operating 73 points.</p> 74 75 </body> 76 </html> 77