Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it possible to create multiple instances of OMXCodec using stagefright
    text
    copied!<p>I want to use <code>libstagefright.so</code> in android phones for media operations. I have explored example given in <a href="http://vec.io/posts/use-android-hardware-decoder-with-omxcodec-in-ndk" rel="nofollow">this</a> page. I have been trying to implement the same. While testing this implementation for multiple <code>OMXCodec</code> instances, it's output buffer conflicts with each other.</p> <p>I have developed an android project in eclipse and linked <code>libstagefright</code> under JNI. I have added two classes <code>CustomDataSource</code> (Which derives <code>MediaSource</code>) and <code>CustomOmxDecoder</code>. <code>CustomDataSource</code> class implements all virtual methods of <code>MediaSource</code>. In <code>CustomOmxDecoder</code> class, I call <code>OMXCodec::Create</code> method. Then I have created two threads which have individual instance of <code>CustomOmxDecoder</code>. Using this instances I call a method <code>ProcessNextFrame</code> in which I call the main, <code>videoDecoder-&gt;read()</code> method. This is how my setup is.</p> <p>Now, When I run the app with above mentioned setup. <code>OMXCodec</code> decodes frames of both source but when I render it on surface, is shows me conflicted output. It seems like decoded buffer of both source get meshed up internally somehow. I am creating two h264 decoder simultaneously. What can be the problem here? Can it be related to <code>MediaBufferGroup</code>? I acquirebuffer in <code>CustomDataSource</code> and release buffer in <code>CustomOmxDecoder</code>'s <code>ProcessNextFrame</code> after calling <code>videoDecoder-&gt;read()</code> call.</p> <p>Any suggestion will be great. Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload