Lines Matching full:code
39 callable from Java programming language code:
47 of shared libraries to be called from Java programming language code via Java Native
69 The video sink is an <code>ANativeWindow *</code> abstract handle,
70 derived from an <code>android.view.Surface</code> ("surface").
71 A Surface from <code>SurfaceHolder.getSurface()</code> should be used when displaying
73 <code>new Surface(SurfaceTexture)</code> allows streaming the decoded
76 Be sure to <code>release()</code> the Surface as soon as possible after
77 calling <code>setSurface</code> or ANativeWindow_fromSurface.
84 <h3>Example code</h3>
88 Supported and tested example code, usable as a model
89 for your own code, is located in NDK folder
90 <code>platforms/android-14/samples/native-media/</code>.
94 The OpenMAX AL 1.0.1 specification contains example code in the
96 specification). However, the examples in Appendix D: Sample Code
101 though the code may be helpful in understanding the full OpenMAX AL
104 <h3>Adding OpenMAX AL to your application source code</h3>
106 OpenMAX AL is a C API, but is callable from both C and C++ code.
108 Add the following lines to your code:
134 For robustness, we recommend that you examine the <code>XAresult</code>
135 value which is returned by most APIs. Use of <code>assert</code>
139 for more information. In the supplied example, we have used <code>assert</code>
145 result code. These log entries provide additional detail which can
147 <code>Engine::CreateMediaPlayer</code>.
166 <li><code>xaCreateEngine</code>
167 <li><code>xaQueryNumSupportedEngineInterfaces</code>
168 <li><code>xaQuerySupportedEngineInterfaces</code>
187 The audio stream type cannot be configured; it is always <code>AudioManager.STREAM_MUSIC</code>.
193 <code>RemoveInterface</code> and <code>ResumeInterface</code> are not supported.
199 <li><code>CreateMediaPlayer</code>
204 <li><code>CreateCameraDevice</code>
205 <li><code>CreateRadioDevice</code>
206 <li><code>CreateLEDDevice</code>
207 <li><code>CreateVibraDevice</code>
208 <li><code>CreateMetadataExtractor</code>
209 <li><code>CreateExtensionObject</code>
210 <li><code>GetImplementationInfo</code>
213 For <code>CreateMediaPlayer</code>, these restrictions apply:
217 <li>soundbank, LED array, and vibra sinks must be <code>NULL</code>
226 The source data locator must be <code>XA_DATALOCATOR_ANDROIDBUFFERQUEUE</code>
229 The source data format must be <code>XADataFormat_MIME</code>.
230 Initialize <code>mimeType</code> to <code>XA_ANDROID_MIME_MP2TS</code>,
231 and <code>containerType</code> to <code>XA_CONTAINERTYPE_MPEG_TS</code>.
238 <code>Resume</code>, <code>RegisterCallback</code>,
239 <code>AbortAsyncOperation</code>, <code>SetPriority</code>,
240 <code>GetPriority</code>, and <code>SetLossOfControlInterfaces</code>
252 <li><code>RegisterStreamChangeCallback</code>
253 <li><code>QueryMediaContainerInformation</code>
254 <li><code>QueryStreamInformation</code>
255 <li><code>QueryStreamType</code>
260 <li><code>QueryActiveStreams</code>
261 <li><code>QueryStreamName</code>
262 <li><code>SetActiveStream</code>
271 These fields in <code>XAVideoCodecDescriptor</code> are filled:
273 <li><code>codecId</code>
274 <li><code>profileSetting</code>
275 <li><code>levelSetting</code>
311 Set the <code>hWindow</code> field to an
312 <code>ANativeWindow *</code> and set <code>hDisplay</code> to <code>NULL</code>.
313 You can get a <code>ANativeWindow *</code> handle from an <code>android.view.Surface</code>,
320 Don't forget to free this handle in your shutdown code with <code>ANativeWindow_release</code>.
331 <code>xaCreateEngine</code> recognizes, but ignores, these engine options:
333 <li><code>XA_ENGINEOPTION_THREADSAFE</code>
334 <li><code>XA_ENGINEOPTION_LOSSOFCONTROL</code>
369 your application source code to conform to the new API. We expect
381 Do not depend on a particular result code for an unsuccessful
382 operation; be prepared to deal with a different result code.
405 As mentioned, source code incompatibilities are expected in the next
409 <li>Addition of <code>const</code> to input parameters passed by reference,
410 and to <code>XAchar *</code> struct fields used as input values.
411 This should not require any changes to your code.
414 <code>XAint32</code> to <code>XAuint32</code> or similar, or add a cast.
423 <li><code>XAchar</code> will change from <code>unsigned char</code>
424 to <code>char</code>. This primarily affects the MIME data format.
425 <li><code>XADataFormat_MIME.mimeType</code> will be renamed to <code>pMimeType</code>.
426 We recommend that you initialize the <code>XADataFormat_MIME</code>
428 rather than by field name, to isolate your code
429 In the example code we have used this technique.
434 The API for Android extensions is defined in <code>OMXAL/OpenMAXAL_Android.h</code>
442 with <code>#ifdef</code> etc.
461 optionally specified by the application at time of <code>Enqueue</code>.
476 recorder object), and a <code>void *</code> for application.
477 <li>The callback returns a value, which must be <code>XA_RESULT_SUCCESS</code>.
480 The data locator type code is <code>XA_DATALOCATOR_ANDROIDBUFFERQUEUE</code> and
481 the associated structure is <code>XADataLocator_AndroidBufferQueue</code>.
483 The interface ID is <code>XA_IID_ANDROIDBUFFERQUEUESOURCE</code>.
496 (command key/value pairs) at <code>Enqueue</code>:
500 The application must not call <code>Enqueue</code> again.
501 There is no associated value, so <code>itemSize</code> must be zero.
507 expressed in <code>itemData</code> as a 64-bit unsigned integer in units of 90 kHz clock ticks.
508 The <code>itemSize</code> should be either zero or 8.
517 for these use <code>XA_ANDROID_ITEMKEY_FORMAT_CHANGE</code>.
532 <dd>Buffer queue event mask. The <code>itemSize</code> is 4, and <code>itemData</code> contains
533 the bit-wise "or" of zero or more of the <code>XA_ANDROIDBUFFERQUEUEEVENT_*</code>
540 <code>Engine::QueryNumSupportedExtensions</code>,
541 <code>Engine::QuerySupportedExtension</code>,
542 <code>Engine::IsExtensionSupported</code> report these extensions:
544 <li><code>ANDROID_SDK_LEVEL_#</code>
563 <code>XAObjectItf</code>. There is no handle for an object itself,
564 only a handle to the <code>XAObjectItf</code> interface of the object.
567 <code>XAObjectItf</code>, then "realized". This is similar to the
590 <code>GetInterface</code> on the initial <code>XAObjectItf</code>.
603 For a media player, <code>Object::Realize</code> allocates resources
606 either <code>XA_PLAYSTATE_PAUSED</code> or <code>XA_PLAYSTATE_PLAYING</code>.
610 <code>XA_PREFETCHEVENT_FILLLEVELCHANGE</code> and
611 <code>XA_PREFETCHEVENT_STATUSCHANGE</code> events. If both of these
613 <code>PrefetchStatus::GetFillLevel</code> reports a zero level, and
614 <code>PrefetchStatus::GetPrefetchStatus</code> reports
615 <code>XA_PREFETCHSTATUS_UNDERFLOW</code>, then this indicates a
623 In summary, a recommended code sequence is:
647 of interfaces. After you call <code>Object::Destroy</code>, all extant
668 handler. In the example code, such as for buffer queues, we have
670 proper mutual exclusion would be critical for any production code.
678 (e.g. beyond an <code>Enqueue</code> or something else simple such as the "Get"
705 process level. Java programming language code can't do anything more than native code, nor
706 can native code do anything more than Java programming language code. The only differences
714 network resources need <code>android.permission.NETWORK</code>.
725 <code>DynamicInterfaceManagement::AddInterface</code> does not work.
738 Android NDK discussion group</a> (for developers of native code, including OpenMAX AL)
739 <li><a href="http://code.google.com/p/android/issues/">
755 <code>docs/openmaxal/OpenMAX_AL_1_0_1_Specification.pdf</code>.