<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>ekwang</title>
    <link>https://ekwang.tistory.com/</link>
    <description>Developer, Engineer</description>
    <language>ko</language>
    <pubDate>Fri, 31 Jul 2026 12:14:16 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>ekwang</managingEditor>
    <image>
      <title>ekwang</title>
      <url>https://t1.daumcdn.net/cfile/tistory/2133F0455453845E17</url>
      <link>https://ekwang.tistory.com</link>
    </image>
    <item>
      <title>OPEN API</title>
      <link>https://ekwang.tistory.com/70</link>
      <description>&lt;p&gt;남는 시간에 몇가지 android application 관련 공부를 좀 하다가,&lt;/p&gt;&lt;p&gt;쉽게 그럴싸한 app을 만들 수 있는 방법으로 포털이나 정부에서 제공하는 open api를 이용하는 방법으로&lt;/p&gt;&lt;p&gt;방향을 잡았다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;몇가지 OPEN API 제공 사이트&lt;/p&gt;&lt;p&gt;- 네이버 :&amp;nbsp;&lt;a href=&quot;http://developer.naver.com/wiki/pages/OpenAPI&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://developer.naver.com/wiki/pages/OpenAPI&lt;/a&gt;&lt;/p&gt;&lt;p&gt;- API STORE :&amp;nbsp;&lt;a href=&quot;http://www.apistore.co.kr/api/apiList.do&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://www.apistore.co.kr/api/apiList.do&lt;/a&gt;&lt;/p&gt;&lt;p&gt;- DAUM API :&amp;nbsp;&lt;a href=&quot;http://dna.daum.net/apis/dashboard&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://dna.daum.net/apis/dashboard&lt;/a&gt;&lt;/p&gt;&lt;p&gt;- 공공 데이터 포탈 :&amp;nbsp;&lt;a href=&quot;https://www.data.go.kr/#/L21haW4=&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;https://www.data.go.kr/#/L21haW4=&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그 외 google, twitter, facebook, kakao 등에서도 각 회사에서 제공하는 여러 서비스들에 대한 open api를 제공하고 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;open api 사용을 위해서 기본적으로&amp;nbsp;&lt;/p&gt;&lt;p&gt;open api 사용에 대한 권한 획들을 위한&amp;nbsp;&lt;b&gt;OAUTH&lt;/b&gt;,&amp;nbsp;&lt;/p&gt;&lt;p&gt;서비스 request를 위해&amp;nbsp;&lt;b&gt;REST, HTTP(POST, GET)&lt;/b&gt;,&amp;nbsp;&lt;/p&gt;&lt;p&gt;받아온 결과의 출력을 위한 &lt;b&gt;XML(parse)&lt;/b&gt; 에 관련된 class들을 찾아보고 이해하면&lt;/p&gt;&lt;p&gt;제공되는 API들을 쉽게 사용할 수 있을 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Naver에서 제공하는 cafe API를 이용해서 원하는 cafe의 최신글만 android widget으로 출력하여 접근 용이하게 하는 app을 만들던중... 최신글의 list를 출력 해주는 service가 없어서 개발 중단. --;&lt;/p&gt;</description>
      <category>Android/Application</category>
      <category>Open API</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/70</guid>
      <comments>https://ekwang.tistory.com/70#entry70comment</comments>
      <pubDate>Thu, 30 Oct 2014 16:42:52 +0900</pubDate>
    </item>
    <item>
      <title>Connecting to the Network and download data.</title>
      <link>https://ekwang.tistory.com/67</link>
      <description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;간단한 Android Network Application을 작성하기 위한 기본 지식.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Android application의 main(UI) thread에서의 network 관련 동작의 실행은 warning이 발생하게 된다.&lt;/p&gt;&lt;p&gt;Network request의 경우 예상치 못한 delay가 발생하여 실행이 지연될 수 있기때문에&amp;nbsp;&lt;/p&gt;&lt;p&gt;main thread의 동작을 방해하기 때문이다.&lt;/p&gt;&lt;p&gt;하여 network연동을 할때는 별도의 thread에서 처리를 하도록 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이때 사용할 수 있는 class는 &lt;a href=&quot;http://developer.android.com/reference/java/lang/Thread.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;Thread&lt;/a&gt;(+runable)와 &lt;a href=&quot;http://developer.android.com/reference/android/os/Handler.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;Handler&lt;/a&gt;(thread에서 발생한 결과를 main thread로 전달 하기 위한)&amp;nbsp;또는 &lt;a href=&quot;http://developer.android.com/reference/android/os/AsyncTask.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;AsyncTask &lt;/a&gt;가 있다.&lt;/p&gt;&lt;p&gt;AsyncTask의 경우 별도의 Handler가 필요없이, 필요한 함수를 override하여 그곳에서&amp;nbsp;UI thread에서 처리가 필요한 내용들을 구현하는 것으로 간결히 처리 할 수 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;http 처리를 위해서 android에서는&amp;nbsp;&lt;a href=&quot;http://developer.android.com/reference/java/net/HttpURLConnection.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;HttpURLConnection&lt;/a&gt;과 Apach의 HttpClient를 지원하며&lt;/p&gt;&lt;p&gt;공식적으로는 GB이상에서는&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;HttpURLConnection(+URL)를 권장한다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;우선 network이 사용가능한 상태인지 확인을 위해 아래의 method를 사용한다.&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prettyprint&quot; style=&quot;font-size: 13px; margin-top: 0px; color: rgb(0, 102, 0); line-height: 1.5; padding: 1em; overflow: auto; border: 1px solid rgb(221, 221, 221); background: rgb(247, 247, 247);&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;color: rgb(102, 0, 102);&quot;&gt;ConnectivityManager.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: 돋움;&quot;&gt;getActiveNetworkInfo()&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;서버를 통해 전달받은 결과는 InputStream을 통해서 읽어들일 수 있고&lt;/p&gt;&lt;p&gt;InputStream을 통해 전달된 byte array를 String으로 변환하기 위하여 InputStreamReader,&amp;nbsp;&lt;span style=&quot;color: rgb(102, 0, 102); line-height: 14px; font-size: 13px; background-color: rgb(247, 247, 247);&quot;&gt;BufferedInputStream&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;등이 사용된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;inputstream을 통해서 data를 읽을때는 전송될 정확한 size를 알 수 없기 때문에 적당한 사이즈만큼만 read()를 하고 -1이 return되면 종료한다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;참고 :&amp;nbsp;&lt;a href=&quot;http://developer.android.com/training/basics/network-ops/connecting.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://developer.android.com/training/basics/network-ops/connecting.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Android/Application</category>
      <category>Android</category>
      <category>HTTP</category>
      <category>network</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/67</guid>
      <comments>https://ekwang.tistory.com/67#entry67comment</comments>
      <pubDate>Wed, 3 Sep 2014 10:55:17 +0900</pubDate>
    </item>
    <item>
      <title>REST</title>
      <link>https://ekwang.tistory.com/66</link>
      <description>&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;b&gt;Representational State Transfer.&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;De facto&amp;nbsp;표준.&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;b&gt;HTTP Uri + HTTP Method.&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;b&gt;URI &lt;/b&gt;: resource의 위치.&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;b&gt;Method &lt;/b&gt;: resource 에 대한 행위.Action.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin-left: 4em;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&amp;nbsp;POST(create), GET(select), DELETE(delete), PUT(create or update)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 4em;&quot;&gt;제약된 4가지 Action만이 존재 하므로 URI 설계의 어려움과 중요성이 존재한다.&lt;/p&gt;&lt;p style=&quot;margin-left: 4em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;참고.&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;http://bcho.tistory.com/category/%EC%95%84%ED%82%A4%ED%85%8D%EC%B3%90%20/WEB%202.0&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://bcho.tistory.com/category/%EC%95%84%ED%82%A4%ED%85%8D%EC%B3%90%20/WEB%202.0&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Web/HTTP</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/66</guid>
      <comments>https://ekwang.tistory.com/66#entry66comment</comments>
      <pubDate>Wed, 3 Sep 2014 01:15:47 +0900</pubDate>
    </item>
    <item>
      <title>MediaCodec sample code</title>
      <link>https://ekwang.tistory.com/57</link>
      <description>&lt;p&gt;Android JB부터&amp;nbsp;MediaCodec class가 추가되어&lt;/p&gt;&lt;p&gt;device에서 지원 하는 codec을 NDK로의 추가 구현 없이도 유연하게 사용할 수 있게 되었다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;MediaCodec을 이용하여 codec으로부터의 output data를 application이 쉽게 얻을 수 있다는 말이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;여기저기 기웃 거려보아도 동작하는 sample code가 없기에&lt;/p&gt;&lt;p&gt;시간을 좀 들여서 작성을 해보았다.&lt;/p&gt;&lt;p&gt;본인이 Android Application 개발자가 아니라 Android API 사용에 유창하지 않으니&lt;/p&gt;&lt;p&gt;API level 16부터 추가된 MediaCodec, MediaExtractor, MediaFormat 등의 사용에 참고만 하였으면 하는 바램이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;button type=&quot;button&quot; class=&quot;btn_more&quot; id=&quot;more57_0&quot; data-id=&quot;57_0&quot;&gt;더보기&lt;/button&gt;&lt;div class=&quot;moreless_content&quot; id=&quot;content57_0&quot; style=&quot;display: none;&quot;&gt;&lt;button type=&quot;button&quot; class=&quot;btn_less&quot; id=&quot;less57_0&quot; data-id=&quot;57_0&quot;&gt;&lt;span class=&quot;txt_fold&quot;&gt;접기&lt;/span&gt;&lt;/button&gt;
  &lt;p class=&quot;txt_view&quot;&gt;&lt;p&gt;/*&lt;/p&gt;&lt;p&gt;&amp;nbsp;* Test code for MediaCodec, MediaExtractor, MediaFormat class since API 16&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;* I've verified that only H.264(AVC) video and MP3 audio works correctly&lt;/p&gt;&lt;p&gt;&amp;nbsp;* But the other codec returns some errors.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;* TODO : To handle two MediaCodec for decode audio and video simultaneous and render video frame synchronous with audio playback time.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;*/&lt;/p&gt;&lt;p&gt;package com.ek.mediacodec;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//import android.R;&lt;/p&gt;&lt;p&gt;import java.io.IOException;&lt;/p&gt;&lt;p&gt;import java.nio.ByteBuffer;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;import android.media.AudioFormat;&lt;/p&gt;&lt;p&gt;import android.media.AudioManager;&lt;/p&gt;&lt;p&gt;import android.media.AudioTrack;&lt;/p&gt;&lt;p&gt;import android.media.MediaCodec;&lt;/p&gt;&lt;p&gt;import android.media.MediaCodec.BufferInfo;&lt;/p&gt;&lt;p&gt;import android.media.MediaCodecInfo;&lt;/p&gt;&lt;p&gt;import android.media.MediaCodecList;&lt;/p&gt;&lt;p&gt;import android.media.MediaExtractor;&lt;/p&gt;&lt;p&gt;import android.media.MediaFormat;&lt;/p&gt;&lt;p&gt;import android.media.MediaPlayer;&lt;/p&gt;&lt;p&gt;import android.media.MediaPlayer.OnErrorListener;&lt;/p&gt;&lt;p&gt;import android.media.MediaPlayer.OnVideoSizeChangedListener;&lt;/p&gt;&lt;p&gt;import android.os.Bundle;&lt;/p&gt;&lt;p&gt;import android.os.Handler;&lt;/p&gt;&lt;p&gt;import android.os.Looper;&lt;/p&gt;&lt;p&gt;import android.os.Message;&lt;/p&gt;&lt;p&gt;import android.app.Activity;&lt;/p&gt;&lt;p&gt;import android.util.Log;&lt;/p&gt;&lt;p&gt;import android.view.Menu;&lt;/p&gt;&lt;p&gt;import android.view.SurfaceHolder;&lt;/p&gt;&lt;p&gt;import android.view.View;&lt;/p&gt;&lt;p&gt;import android.view.SurfaceHolder.Callback;&lt;/p&gt;&lt;p&gt;import android.view.SurfaceView;&lt;/p&gt;&lt;p&gt;import android.widget.Button;&lt;/p&gt;&lt;p&gt;import android.widget.CheckBox;&lt;/p&gt;&lt;p&gt;import android.widget.TextView;&lt;/p&gt;&lt;p&gt;import android.widget.Toast;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;public class MainActivity extends Activity implements&lt;/p&gt;&lt;p&gt;OnErrorListener, OnVideoSizeChangedListener, SurfaceHolder.Callback {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public static final String TAG = &quot;Client.MediaCodec&quot;;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private int mVideoWidth;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private int mVideoHeight;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private MediaPlayer mMediaPlayer;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private SurfaceView mVideoView;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private SurfaceHolder mSurfaceHolder;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private Bundle extra;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private String mPath;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private Button button;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private Button mediacodec_button;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private CheckBox mediacodec_checkbox;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private TextView status;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private boolean bStart = false;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private Thread mThread;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private Handler mHandler;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private boolean mRender_flag = false;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private MediaExtractor mExtractor;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private MediaCodec mMediaCodec;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;//private MediaCodec mMediaCodec_Audio;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private ByteBuffer[] mInputBuffers = null;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private ByteBuffer[] mOutputBuffers = null;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;//temp buffer to get sampledata.&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private ByteBuffer mTempInputBuffer;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private AudioTrack mAudioTrack;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private MediaFormat mFormat;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private String mMime;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private static int mInput_buff_size;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private static int mOutput_buff_size;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private int input_cnt = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private int output_cnt = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private int mOffset = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private String status_update;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private String mSelectedmime;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private static final int LOCAL_VIDEO = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;// TODO: change file path &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private static final String mVideofile_path = &quot;/mnt/sdcard/[AVC_AAC]D1_25fps_1500kbps_Secret_Magic.avi&quot;;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private static final String mAudiofile_path = &quot;/mnt/sdcard/[MP3]Good_Day.mp3&quot;;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public void onCreate(Bundle savedInstanceState) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;super.onCreate(savedInstanceState);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;setContentView(R.layout.activity_main);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mVideoView = (SurfaceView) findViewById(R.id.videoView1);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mSurfaceHolder = mVideoView.getHolder();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mSurfaceHolder.addCallback((SurfaceHolder.Callback) this);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;extra = getIntent().getExtras();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mMediaPlayer = new MediaPlayer();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//MediaPlayer playback&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;button = (Button) findViewById(R.id.button);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;button.setOnClickListener(new View.OnClickListener(){&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;public void onClick(View v) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;// TODO Auto-generated method stub&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;if(bStart == false ) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;Log.v(TAG, &quot;START PLAYBACK using MEDIAPLAYER&quot;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;playVideo(LOCAL_VIDEO);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;button.setText(R.string.stop);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;else {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;Log.v(TAG, &quot;STOP PLAYBACK using MEDIAPLAYER&quot;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;bStart = false;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;mMediaPlayer.stop();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;mMediaPlayer.reset();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;button.setText(R.string.start);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;});&lt;/p&gt;&lt;p&gt;//MediaCodec Checkbox - If this is not checked, we consider video codec is selected.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mediacodec_checkbox = (CheckBox) findViewById(R.id.checkBox1);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//MediaCodec input/output buffer working status&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;status = (TextView) findViewById(R.id.status);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;&lt;/p&gt;&lt;p&gt;//MediaCodec playback&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mediacodec_button = (Button) findViewById(R.id.mediacodec_button);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mediacodec_button.setOnClickListener(new View.OnClickListener(){&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;public void onClick(View v) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;// TODO Auto-generated method stub&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;if(bStart == false ) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;Log.v(TAG, &quot;START PLAYBACK using MEDIACODEC&quot;);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;if( StartMediaCodec() == false )&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;						&lt;/span&gt;Toast.makeText(getApplicationContext(), &quot;Can't play&quot;, Toast.LENGTH_LONG).show();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;else&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;						&lt;/span&gt;bStart = true;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;						&lt;/span&gt;mediacodec_button.setText(R.string.stop);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;						&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;else {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;Log.v(TAG, &quot;STOP PLAYBACK using MEDIACODEC&quot;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;bStart = false;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;StopMediaCodec();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;					&lt;/span&gt;mediacodec_button.setText(R.string.start);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;});&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mHandler = new Handler();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private boolean IsVideo(String mime)&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;if( mime.contains(&quot;video&quot;) )&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;return true;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;else&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;return false;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private void StopMediaCodec() {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;if(mThread != null &amp;amp;&amp;amp; mThread.isAlive()) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mThread.interrupt();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;} &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( mAudioTrack != null )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mAudioTrack.flush();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mAudioTrack.stop();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mAudioTrack.release();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mMediaCodec.flush();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mMediaCodec.stop();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mMediaCodec.release();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mMediaCodec = null;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mExtractor.release();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mExtractor = null; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_cnt = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output_cnt = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private boolean StartMediaCodec() {&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;if( mediacodec_checkbox.isChecked())&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mPath = mAudiofile_path;//mAudiofile_path;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mSelectedmime = &quot;audio&quot;;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;else&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mPath = mVideofile_path;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mSelectedmime = &quot;video&quot;;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;/* init Extractor for queue sample data to Mediacodec */&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mExtractor = new MediaExtractor();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mExtractor.setDataSource(mPath);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;int i = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int numTracks = mExtractor.getTrackCount();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for ( i = 0; i &amp;lt; numTracks; ++i ) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mFormat = mExtractor.getTrackFormat(i);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( mFormat == null)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;Log.v(TAG, &quot;Fail to get getTrackFormat&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;return false; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mMime = mFormat.getString(MediaFormat.KEY_MIME);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.v(TAG, &quot;mime:&quot; + mMime);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( mMime.contains(mSelectedmime))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;break;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;mMime = &quot;&quot;; //can't find wanted format&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!mMime.isEmpty()) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Log.v(TAG, &quot;selected mime:&quot; + mMime + &quot;, selected trackid:&quot; + i); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;mExtractor.selectTrack(i);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;Log.v(TAG, &quot;This file doesn't contain &quot; + mSelectedmime );&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;return false;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;/* GetCodec info */ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;/*&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MediaCodecInfo codecinfo; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int codecnum = MediaCodecList.getCodecCount();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i = 0;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for ( i=0 ; i &amp;lt; codecnum; i++ )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;codecinfo = MediaCodecList.getCodecInfoAt(i);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;*/&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;mMediaCodec = MediaCodec.createDecoderByType(mMime);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;MediaFormat mMediaFormat = new MediaFormat();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;if( mMime.contains(&quot;audio&quot;))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mMediaFormat = MediaFormat.createAudioFormat(mMime, mFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE), mFormat.getInteger(MediaFormat.KEY_CHANNEL_COUNT));&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;else //video&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mMediaFormat = MediaFormat.createVideoFormat(mMime, mFormat.getInteger(MediaFormat.KEY_WIDTH), mFormat.getInteger(MediaFormat.KEY_HEIGHT));&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;/* Init MediaCodec */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;mMediaCodec.configure(mMediaFormat, mSurfaceHolder.getSurface(), null, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;mMediaCodec.start();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mInputBuffers = mMediaCodec.getInputBuffers();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mOutputBuffers = mMediaCodec.getOutputBuffers();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;if( mInputBuffers == null || mOutputBuffers == null )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;Log.v(TAG, &quot;Fail to get mInputBuffers or mOutputBuffers&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;return false;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mInput_buff_size = mInputBuffers[0].capacity();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mOutput_buff_size = mOutputBuffers[0].capacity();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mTempInputBuffer = ByteBuffer.allocate(mInput_buff_size/2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;Log.v(TAG, &quot;Got buffer from MediaCodec. inputbuffer_size:&quot;+mInput_buff_size+&quot;, outputbuffer_size:&quot;+mOutput_buff_size);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;/* Init AudioTrack */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;if( mMime.contains(&quot;audio&quot;))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, mFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE),&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;AudioFormat.CHANNEL_OUT_STEREO,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;AudioFormat.ENCODING_DEFAULT,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mOutput_buff_size,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;AudioTrack.MODE_STREAM);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;if(mAudioTrack == null || mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED)&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;return false;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;mAudioTrack.play();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;/* Thread */ &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mThread = new Thread(new Runnable() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void run() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;long presentationTimeUs = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp;int sample_size = 0; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp;int inputqueue_flag = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp;boolean not_eof = true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp;int sample_flag = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;int inputBufferIndex = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;int outputBufferIndex = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;int trackIndex = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; for (;;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; if( mThread.interrupted()) break;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; if( not_eof == true )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;//Check to get available inputbuffer index. why dequeueinputbuffer timedelay doesn't work? I want to get it 30ms interval.&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; inputBufferIndex = mMediaCodec.dequeueInputBuffer(0); //(30000);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; Log.v(TAG, &quot;inputBufferIndex:&quot;+inputBufferIndex);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; if ( inputBufferIndex &amp;gt;= 0 ) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; mInputBuffers[inputBufferIndex].clear();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; // fill inputBuffers[inputBufferIndex] with valid data&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp;input_cnt++;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while( mOffset+sample_size &amp;lt; mInput_buff_size )&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;not_eof = mExtractor.advance();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;sample_flag = mExtractor.getSampleFlags();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;mTempInputBuffer.clear();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sample_size = mExtractor.readSampleData(mTempInputBuffer, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;Log.v(TAG, &quot;sample_size:&quot; + sample_size + &quot;, offset:&quot; + mOffset + &quot;, not_eof:&quot; + not_eof + &quot;, sample_flag:&quot; + sample_flag);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if( sample_size &amp;gt;= 0) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;mTempInputBuffer.limit(sample_size);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trackIndex = mExtractor.getSampleTrackIndex();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;presentationTimeUs = mExtractor.getSampleTime();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;mOffset += sample_size;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;if( mOffset &amp;lt; mInput_buff_size)&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;mInputBuffers[inputBufferIndex].put(mTempInputBuffer.array(), 0, sample_size);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; Log.v(TAG, &quot;mInputBuffers position:&quot; + mInputBuffers[inputBufferIndex].position());&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;else&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;mOffset -= sample_size;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;Log.v(TAG, &quot;Read oversize!&quot;);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;break;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;break; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if( not_eof == false )&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;inputqueue_flag = MediaCodec.BUFFER_FLAG_END_OF_STREAM;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;sample_size = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;Log.v(TAG, &quot;EOF reached&quot;); &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;break;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(sample_flag == MediaExtractor.SAMPLE_FLAG_SYNC )&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;inputqueue_flag = MediaCodec.BUFFER_FLAG_SYNC_FRAME;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;inputqueue_flag = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp;//deliver valid input buffer to MediaCodec&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Log.v(TAG, &quot;queueInputBuffer:&quot; + inputBufferIndex + &quot;, presentationTimeUs:&quot; + presentationTimeUs + &quot;, sample_flag:&quot; + sample_flag);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mMediaCodec.queueInputBuffer(inputBufferIndex, 0, mOffset, presentationTimeUs, inputqueue_flag);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mOffset = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sample_size = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; MediaCodec.BufferInfo buf_info = new MediaCodec.BufferInfo();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//Check to get available outputBuffer index&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; outputBufferIndex = mMediaCodec.dequeueOutputBuffer(buf_info, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; Log.v(TAG, &quot;outputBufferIndex:&quot;+outputBufferIndex);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; if (outputBufferIndex &amp;gt;= 0) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; // outputBuffer is ready to be processed or rendered.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp; output_cnt++;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; Log.v(TAG, &quot;buf_info offset:&quot; + buf_info.offset + &quot;, size:&quot; + buf_info.size + &quot;, timeus:&quot; + buf_info.presentationTimeUs + &quot;, &amp;nbsp;remain:&quot; + mOutputBuffers[outputBufferIndex].remaining());&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; // I don't know why outputBuffers doesn't support transformation to array type.&lt;/p&gt;&lt;p&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; Log.d(TAG, &quot;outputBuffers[outputBufferIndex].array()&quot;+outputBuffers[outputBufferIndex].hasArray());&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; // So convert ByteBuffer to byte[] manually.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; if( mMime.contains(&quot;audio&quot;))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; byte[] pcm = new byte[buf_info.size];&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; mOutputBuffers[outputBufferIndex].get(pcm, 0, buf_info.size);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; //deliver pcm data to audiotrack.&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; mAudioTrack.write(pcm, 0, buf_info.size);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; mRender_flag = false;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; else&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; // trust rendering to MediaCodec.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; mRender_flag = true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; mMediaCodec.releaseOutputBuffer(outputBufferIndex, mRender_flag);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; mOutputBuffers[outputBufferIndex].clear();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; } else if (outputBufferIndex == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; mOutputBuffers = mMediaCodec.getOutputBuffers();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; } else if (outputBufferIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp; // Subsequent data will conform to new format.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp; MediaFormat format = mMediaCodec.getOutputFormat();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; //buf_info = null;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; status_update = &quot;inbuf:&quot;+input_cnt + &quot; outbuf:&quot; + output_cnt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; mHandler.post(new Runnable() {&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;public void run() {&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; status.setText(status_update);&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt; &amp;nbsp;}&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; });&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mThread.start();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public boolean onCreateOptionsMenu(Menu menu) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;getMenuInflater().inflate(R.menu.activity_main, menu);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;return true;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private void playVideo(Integer Media) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;doCleanUp();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;try {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;switch(Media) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;case LOCAL_VIDEO:&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;mPath = mVideofile_path;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;				&lt;/span&gt;break;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mMediaPlayer.setDataSource(mPath);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mMediaPlayer.setDisplay(mSurfaceHolder);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mMediaPlayer.prepare();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;mMediaPlayer.setOnVideoSizeChangedListener((OnVideoSizeChangedListener) this);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;}catch(Exception e) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public void onPrepared(MediaPlayer mediaplayer) {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public void surfaceCreated(SurfaceHolder holder) {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private void doCleanUp() {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mVideoWidth = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mVideoHeight = 0;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;private void startVideoPlayback() {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mMediaPlayer.start();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;bStart = true;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public void surfaceChanged(SurfaceHolder holder, int format, int width,&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;			&lt;/span&gt;int height) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;// TODO Auto-generated method stub&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public void surfaceDestroyed(SurfaceHolder holder) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;// TODO Auto-generated method stub&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public void onVideoSizeChanged(MediaPlayer arg0, int arg1, int arg2) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;// TODO Auto-generated method stub&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mVideoWidth = arg1;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mVideoHeight = arg2;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mSurfaceHolder.setFixedSize(mVideoWidth, mVideoHeight);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;Log.v(TAG, &quot;setFixedSize &quot; + mVideoWidth + &quot; X &quot; + mVideoHeight);&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;startVideoPlayback();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;@Override&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;public boolean onError(MediaPlayer mp, int what, int extra) {&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;// TODO Auto-generated method stub&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;String error;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;error = &quot;error(&quot; + what + &quot;,&quot; + extra + &quot;)&quot;;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG).show();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;mp.release();&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;bStart = false;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;return false;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;}&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: rgb(255, 255, 255);&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;/p&gt;
&lt;button type=&quot;button&quot; class=&quot;btn_less&quot; id=&quot;less57_0&quot; data-id=&quot;57_0&quot;&gt;&lt;span class=&quot;txt_fold&quot;&gt;접기&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Android/Application</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/57</guid>
      <comments>https://ekwang.tistory.com/57#entry57comment</comments>
      <pubDate>Mon, 3 Dec 2012 12:00:00 +0900</pubDate>
    </item>
    <item>
      <title>ADT doesn't show up in eclipse on ubuntu</title>
      <link>https://ekwang.tistory.com/56</link>
      <description>&lt;p&gt;우분투에서 eclipse에 ADT plugin 을 설치 하였는데,&lt;/p&gt;&lt;p&gt;보이지가 않는다!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;java version 이 1.6이하라서 그렇네.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;java -version 해서 1.6 이하일 경우 update후 ADT를 재 설치 하면 해결.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;update JDK to 1.6&lt;/p&gt;</description>
      <category>Android/Tools</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/56</guid>
      <comments>https://ekwang.tistory.com/56#entry56comment</comments>
      <pubDate>Tue, 20 Nov 2012 23:54:08 +0900</pubDate>
    </item>
    <item>
      <title>[Ubuntu] Grub 2 change boot menu order</title>
      <link>https://ekwang.tistory.com/52</link>
      <description>&lt;br /&gt;
&lt;font color=&quot;#000000&quot;&gt;
grub2에서 boot menu 의 순서를 변경하는 방법을 알아보자.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;#cd /boot/grub/grub.cfg&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
&lt;/b&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;&lt;b&gt;#ls -l&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(193, 193, 193); border-right-color: rgb(193, 193, 193); border-bottom-color: rgb(193, 193, 193); border-left-color: rgb(193, 193, 193); background-color: rgb(238, 238, 238); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp;6698 2011-10-01 21:40 00_header*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp;5522 2011-04-21 22:20 05_debian_theme*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp;6933 2010-10-06 21:23 07_os-prober*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp;7269 2011-10-01 21:40 10_linux*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp;6344 2011-10-01 21:40 20_linux_xen*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp;1588 2010-09-25 02:14 20_memtest86+*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp;7545 2011-10-01 21:40 30_os-prober*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp; 214 2010-10-06 21:23 40_custom*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;-rwxr-xr-x &amp;nbsp; 1 root root &amp;nbsp; &amp;nbsp;95 2010-10-06 21:23 41_custom*&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;font color=&quot;#000000&quot;&gt;&lt;br /&gt;
00_, 05_, 07_ &amp;nbsp;와 같은숫자의 순서에 따라&amp;nbsp;&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; &quot;&gt;/boot/grub/grub.cfg 파일에서 menuentry 등록 순서가 결정이 된다.&lt;br /&gt;
즉, 위의 파일들을 rename 하는 것으로서 부팅 menuentry 순서를 변경 할 수 있는 것이다.&lt;br /&gt;
&lt;br /&gt;
예 를 들어 아래와 같이 변경하게 되면 linux 가 window보다 상위에 위치하게 된다.&amp;nbsp;&lt;br /&gt;
&lt;b&gt;#mv 10_linux 06_linux&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
수정을 마쳤으면 변경된 순서를 적용하기 전에 grub.cfg 파일은 백업을 해두고,&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#/usr/sbin/update-grub&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
update-grub 을 하면 새로운 grub.cfg 파일이 생성되고 reboot.&lt;br /&gt;
&lt;br /&gt;
두번째 방법은 grub.cfg를 직접 수정하는 것이다.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#vi /boot/grub/grub.cfg&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(193, 193, 193); border-right-color: rgb(193, 193, 193); border-bottom-color: rgb(193, 193, 193); border-left-color: rgb(193, 193, 193); background-color: rgb(238, 238, 238); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Monaco, 'Courier New', monospace; font-size: 10px; &quot;&gt;...&lt;br /&gt;
menuentry 'Ubuntu, with Linux 2.6.35-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recordfail&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; insmod part_msdos&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; insmod ext2&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set root='(hd0,msdos2)'&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; search --no-floppy --fs-uuid --set 2742a9ed-e2ac-4411-ac63-53117647ac54&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linux&amp;nbsp; &amp;nbsp;/boot/vmlinuz-2.6.35-23-generic root=UUID=2742a9ed-e2ac-4411-ac63-53117647ac54 ro&amp;nbsp; &amp;nbsp;quiet splash&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; initrd&amp;nbsp; /boot/initrd.img-2.6.35-23-generic&lt;br style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;}&lt;br /&gt;
...&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
menuentry의 위치를 변경 하는 것으로 grub menu에서 부팅 순서를 변경할 수 있다.&lt;br /&gt;
또는&amp;nbsp;&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;/font&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; &quot;&gt;&lt;font color=&quot;#000000&quot;&gt;set default=&quot;0&quot; 값을 변경 하면 됨.&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;font color=&quot;#000000&quot;&gt;
&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;div id=&quot;__KO_DIC_LAYER__&quot; style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: fixed; z-index: 999999999; overflow-x: hidden; overflow-y: hidden; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(51, 51, 119); border-right-color: rgb(51, 51, 119); border-bottom-color: rgb(51, 51, 119); border-left-color: rgb(51, 51, 119); display: none; &quot;&gt;
&lt;iframe frameborder=&quot;0&quot; scrolling=&quot;yes&quot; style=&quot;width: 100%; height: 100%; background-color: rgb(255, 255, 255); &quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</description>
      <category>Linux/Ubuntu</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/52</guid>
      <comments>https://ekwang.tistory.com/52#entry52comment</comments>
      <pubDate>Thu, 15 Dec 2011 01:21:56 +0900</pubDate>
    </item>
    <item>
      <title>[Android] Repo, fatal: unable to connect a socket (Connection refused)</title>
      <link>https://ekwang.tistory.com/50</link>
      <description>&lt;br /&gt;
오랫만에 집에있는 노트북에서 android source 를 받으려고 했더니 아래와 같은 문제가 발생한다.&lt;br /&gt;
&lt;br /&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;b&gt;$repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(238, 238, 238); border-right-color: rgb(238, 238, 238); border-bottom-color: rgb(238, 238, 238); border-left-color: rgb(238, 238, 238); background-color: rgb(238, 238, 238); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;Getting repo ...&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&amp;nbsp; &amp;nbsp;from git://android.git.kernel.org/tools/repo.git&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;android.git.kernel.org[0: 149.20.4.77]: errno=Connection refused&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;fatal: unable to connect a socket (Connection refused) &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
생각해보니 android.git.kernel이 공격을 당해서 android git repository가 변경이 되었었지..&lt;br /&gt;
오래전에 받아둔 repo를 그대로써서 문제가 된것이다.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$vi ~/bin/repo&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(238, 238, 238); border-right-color: rgb(238, 238, 238); border-bottom-color: rgb(238, 238, 238); border-left-color: rgb(238, 238, 238); background-color: rgb(238, 238, 238); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;#!/bin/sh&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;## repo default configuration&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;##&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;REPO_URL=&lt;b&gt;'https://android.googlesource.com/tools/repo'&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;REPO_REV='stable'&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
구버젼 repo의 REPO_URL은 위의 주소가 아닌 git://android.git.kernel.org/... 로 되어 있을 것이다.&lt;br /&gt;
REPO_URL을 변경해 주거나, 깔끔하게 repo를 삭제하고 다시 받는게 좋다.&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;__KO_DIC_LAYER__&quot; style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: fixed; z-index: 999999999; overflow-x: hidden; overflow-y: hidden; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(51, 51, 119); border-right-color: rgb(51, 51, 119); border-bottom-color: rgb(51, 51, 119); border-left-color: rgb(51, 51, 119); display: none; &quot;&gt;
&lt;iframe frameborder=&quot;0&quot; scrolling=&quot;yes&quot; style=&quot;width: 100%; height: 100%; background-color: rgb(255, 255, 255); &quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</description>
      <category>Android/Tools</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/50</guid>
      <comments>https://ekwang.tistory.com/50#entry50comment</comments>
      <pubDate>Thu, 15 Dec 2011 00:17:03 +0900</pubDate>
    </item>
    <item>
      <title>[Android] CTS 테스트 #1</title>
      <link>https://ekwang.tistory.com/49</link>
      <description>&lt;br /&gt;
Windows 환경에서 CTS 테스트를 진행 하는 방법에 대한 설명.&lt;br /&gt;
CTS tool 중 ddmlib-prebuilt.jar, junit.jar, hosttestlib.jar 를 사용하여 auto test가 진행되고&lt;br /&gt;
testResult.xml 파일을 생성해준다.&lt;br /&gt;
&lt;br /&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l1 level1 lfo1&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-bidi-font-family:&amp;quot;맑은 고딕&amp;quot;;color:#1F497D&quot;&gt;1.&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;우선 아래 사이트에서 최신&lt;span lang=&quot;EN-US&quot;&gt; CTS&lt;/span&gt;를 다운 받고 압축을 적절한 위치에 푼다&lt;span lang=&quot;EN-US&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left:20.0pt;mso-para-margin-left:2.0gd;
text-indent:20.0pt&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;a href=&quot;http://source.android.com/compatibility/downloads.html&quot;&gt;http://source.android.com/compatibility/downloads.html&lt;/a&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left:20.0pt;mso-para-margin-left:2.0gd;
text-indent:20.0pt&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;a href=&quot;http://dl.google.com/dl/android/cts/android-cts-2.3_r9-linux_x86-armv5.zip&quot;&gt;&lt;span style=&quot;font-size:7.5pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#006699;
background:white&quot;&gt;Android 2.3 R9 Compatibility Test Suite (CTS)&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l1 level1 lfo1&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-bidi-font-family:&amp;quot;맑은 고딕&amp;quot;;color:#1F497D&quot;&gt;2.&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;첨부의&lt;span lang=&quot;EN-US&quot;&gt;
cts.cmd &lt;/span&gt;파일을 적절한 위치로&lt;span lang=&quot;EN-US&quot;&gt; copy&lt;/span&gt;한 후 본인의&lt;span lang=&quot;EN-US&quot;&gt;
CTS 설치&amp;nbsp;&lt;/span&gt;경로에 맞게 편집 한다&lt;span lang=&quot;EN-US&quot;&gt;. (현재 파일 첨부가 안되어 cts.cmd 파일이 없음. 아래 내용을 cts.cmd에 저장하여 사용하면 됨.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(121, 165, 228); border-right-color: rgb(121, 165, 228); border-bottom-color: rgb(121, 165, 228); border-left-color: rgb(121, 165, 228); background-color: rgb(219, 232, 251); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font color=&quot;#1f497d&quot;&gt;cd D:\project\document\Android\CTS\android-cts-2.3_r9-linux_x86-armv5\android-cts\tools&lt;br /&gt;
&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font color=&quot;#1f497d&quot;&gt;java -Xmx512m -cp &quot;cts.jar;D:\project\document\Android\CTS\android-cts-2.3_r9-linux_x86-armv5\android-cts\tools\ddmlib-prebuilt.jar;junit.jar;hosttestlib.jar&quot; com.android.cts.TestHost &quot;D:\project\document\Android\CTS\android-cts-2.3_r9-linux_x86-armv5\android-cts\repository\host_config.xml&quot;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;font color=&quot;#1f497d&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l1 level1 lfo1&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-bidi-font-family:&amp;quot;맑은 고딕&amp;quot;;color:#1F497D&quot;&gt;3.&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;window cmd&lt;/span&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;창에서&lt;span lang=&quot;EN-US&quot;&gt; cts.cmd &lt;/span&gt;파일 실행&lt;span lang=&quot;EN-US&quot;&gt;. cts_host&amp;gt; &lt;/span&gt;프롬프트가 보이면 정상임을 확인 후&lt;span lang=&quot;EN-US&quot;&gt; exit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l1 level1 lfo1&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-bidi-font-family:&amp;quot;맑은 고딕&amp;quot;;color:#1F497D&quot;&gt;4.&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;\android-cts-2.3_r9-linux_x86-armv5\android-cts\repository\testcases
&lt;/span&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;경로에 있는&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;TestDeviceSetup.apk &lt;/span&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;와 본인이 테스트할&lt;span lang=&quot;EN-US&quot;&gt; apk&lt;/span&gt;를 설치 한다&lt;span lang=&quot;EN-US&quot;&gt;. (ex. CtsMediaTestCases.apk)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(254, 137, 67); border-right-color: rgb(254, 137, 67); border-bottom-color: rgb(254, 137, 67); border-left-color: rgb(254, 137, 67); background-color: rgb(254, 222, 199); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 56pt; text-indent: -18pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; color: rgb(31, 73, 125); &quot;&gt;&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;adb install&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;–&lt;span lang=&quot;EN-US&quot;&gt;r Development.apk (Dev Tool&amp;nbsp;&lt;/span&gt;이 없으면 설치 해야 됨&lt;span lang=&quot;EN-US&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 56pt; text-indent: -18pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; color: rgb(31, 73, 125); &quot;&gt;&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;adb install&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;–&lt;span lang=&quot;EN-US&quot;&gt;r TestDeviceSetup.apk&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 56pt; text-indent: -18pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; color: rgb(31, 73, 125); &quot;&gt;&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;adb install&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;–&lt;span lang=&quot;EN-US&quot;&gt;r CtsMediaTestCases.apk&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:56.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l2 level1 lfo2&quot;&gt;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l1 level1 lfo1&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-bidi-font-family:&amp;quot;맑은 고딕&amp;quot;;color:#1F497D&quot;&gt;5.&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;다시&lt;span lang=&quot;EN-US&quot;&gt;
cts.cmd&lt;/span&gt;를 실행&lt;span lang=&quot;EN-US&quot;&gt;. cts_host&amp;gt; &lt;/span&gt;에서 상황에 맞게 아래&lt;span lang=&quot;EN-US&quot;&gt;
cmd &lt;/span&gt;입력&lt;span lang=&quot;EN-US&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;명이나&lt;span lang=&quot;EN-US&quot;&gt; testcase, test &lt;/span&gt;명은&lt;span lang=&quot;EN-US&quot;&gt; CtsMediaTestCases.xml &lt;/span&gt;파일에서
확인 할 수 있음&lt;span lang=&quot;EN-US&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;table class=&quot;MsoNormalTable&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm&quot;&gt;
 &lt;tbody&gt;&lt;tr&gt;
  &lt;td width=&quot;637&quot; valign=&quot;top&quot; style=&quot;width:477.9pt;border:solid black 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&amp;lt;TestSuite
  name=&quot;android&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &amp;lt;TestSuite name=&quot;media&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &amp;lt;TestSuite
  name=&quot;cts&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &amp;lt;TestCase name=&quot;&lt;u&gt;MediaPlayerStreamingTest&lt;/u&gt;&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &amp;lt;Test name=&quot;&lt;u&gt;testRTSP_H263_AMR_Video1&lt;/u&gt;&quot;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;br /&gt;
&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(254, 137, 67); border-right-color: rgb(254, 137, 67); border-bottom-color: rgb(254, 137, 67); border-left-color: rgb(254, 137, 67); background-color: rgb(254, 222, 199); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;color: rgb(51, 51, 51); margin-left: 56pt; text-indent: -18pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;1)&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;CtsMediaTestCases.apk package&lt;/span&gt;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;의 전체 항목 테스트&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;color: rgb(51, 51, 51); margin-left: 56pt; text-indent: 24pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; &quot;&gt;cts_host&amp;gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;start --plan CTS&amp;nbsp;&lt;b&gt;-p&lt;/b&gt;&amp;nbsp;android.media&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;color: rgb(51, 51, 51); margin-left: 56pt; text-indent: -18pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;2)&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;CtsMediaTestCases&lt;/span&gt;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;의 원하는&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;TestCase&amp;nbsp;&lt;/span&gt;항목만&lt;span lang=&quot;EN-US&quot;&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;color: rgb(51, 51, 51); margin-left: 56pt; text-indent: 24pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; &quot;&gt;cts_host&amp;gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;start --plan CTS&amp;nbsp;&lt;b&gt;-p&lt;/b&gt;&amp;nbsp;android.media&lt;b&gt;.cts.MediaPlayerStreamingTest&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;color: rgb(51, 51, 51); margin-left: 56pt; text-indent: -18pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;3)&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;CtsMediaTestCases&lt;/span&gt;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;의 원하는&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;TestCase&amp;nbsp;&lt;/span&gt;의 원하는&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;Test&amp;nbsp;&lt;/span&gt;만&lt;span lang=&quot;EN-US&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;MsoListParagraph&quot; style=&quot;color: rgb(51, 51, 51); margin-left: 56pt; text-indent: 24pt; &quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; &quot;&gt;cts_host&amp;gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: rgb(31, 73, 125); &quot;&gt;start --plan CTS&amp;nbsp;&lt;b&gt;-t&amp;nbsp;&lt;/b&gt;android.media.cts.MediaPlayerStreamingTest&lt;b&gt;#testRTSP_H263_AMR_Video1&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&amp;nbsp;&lt;span style=&quot;color: rgb(31, 73, 125); &quot;&gt;&amp;nbsp;&lt;/span&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l1 level1 lfo1&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-bidi-font-family:&amp;quot;맑은 고딕&amp;quot;;color:#1F497D&quot;&gt;6.&lt;span style=&quot;font-family: 'Times New Roman'; font-size: 7pt; line-height: normal; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color:#1F497D&quot;&gt;결과 확인&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left:38.0pt;mso-para-margin-left:0gd&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color:#1F497D&quot;&gt;\android-cts-2.3_r9-linux_x86-armv5\android-cts\repository\results&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div id=&quot;__KO_DIC_LAYER__&quot; style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: fixed; z-index: 999999999; overflow-x: hidden; overflow-y: hidden; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(51, 51, 119); border-right-color: rgb(51, 51, 119); border-bottom-color: rgb(51, 51, 119); border-left-color: rgb(51, 51, 119); border-image: initial; display: none; &quot;&gt;
&lt;iframe frameborder=&quot;0&quot; scrolling=&quot;yes&quot; style=&quot;width: 100%; height: 100%; background-color: rgb(255, 255, 255); &quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</description>
      <category>Android/Tools</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/49</guid>
      <comments>https://ekwang.tistory.com/49#entry49comment</comments>
      <pubDate>Tue, 13 Dec 2011 09:31:35 +0900</pubDate>
    </item>
    <item>
      <title>[ubuntu] Install doxygen with graphviz dot.</title>
      <link>https://ekwang.tistory.com/48</link>
      <description>&lt;span id=&quot;tx_marker_caret&quot;&gt;&lt;/span&gt;&lt;br /&gt;
1. Download &lt;b&gt;graphviz dot&amp;nbsp;&lt;/b&gt;tool from below site&lt;br /&gt;
&lt;a href=&quot;http://www.graphviz.org/pub/graphviz/ARCHIVE/&quot;&gt;http://www.graphviz.org/pub/graphviz/ARCHIVE/&lt;/a&gt;&lt;a href=&quot;http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.28.0.tar.gz&quot; style=&quot;font-family: 나눔고딕; line-height: normal; font-size: medium; &quot;&gt;graphviz-2.28.0.tar.gz&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Make and Install&lt;br /&gt;
&lt;div style=&quot;BORDER-BOTTOM: #c1c1c1 1px dashed; BORDER-LEFT: #c1c1c1 1px dashed; PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; BORDER-TOP: #c1c1c1 1px dashed; BORDER-RIGHT: #c1c1c1 1px dashed; PADDING-TOP: 10px&quot; class=&quot;txc-textbox&quot;&gt;
#tar xzvf graphviz-2.28.0.tar.gz&lt;br /&gt;
#./configure&lt;br /&gt;
#make &amp;amp;&amp;amp; make install&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
2. Download doxygen&lt;br /&gt;
&lt;a href=&quot;http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc&quot;&gt;http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Make and Install with configureation&lt;br /&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(254, 137, 67); border-right-color: rgb(254, 137, 67); border-bottom-color: rgb(254, 137, 67); border-left-color: rgb(254, 137, 67); background-color: rgb(254, 222, 199); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;#tar xzvf doxygen-1.7.5.1.src.tar.gz&lt;br /&gt;
#./configure&lt;br /&gt;
#./configure --with-doxywizard&lt;/p&gt;
&lt;/div&gt;
doxywizard : Build the GUI frontend for doxygen. (QT 가 설치 되어 있어야 함. apt-get install libqt4_dev)&lt;br /&gt;
&lt;br /&gt;
설정의 편의를 위해서 doxywizard 사용 권장.&lt;br /&gt;
&lt;br /&gt;
text로 설정을 변경하고 싶을 경우&lt;br /&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(193, 193, 193); border-right-color: rgb(193, 193, 193); border-bottom-color: rgb(193, 193, 193); border-left-color: rgb(193, 193, 193); background-color: rgb(238, 238, 238); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;#doxygen -g &amp;lt;filename&amp;gt;&lt;br /&gt;
#vi &amp;lt;filename&amp;gt;&lt;br /&gt;
#doxygen &amp;lt;filename&amp;gt;&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
doxygen wizard 설정은 아래 블로그 참고.(window용 설정 임..)&lt;br /&gt;
&lt;a href=&quot;http://blog.naver.com/khbrst?Redirect=Log&amp;amp;logNo=50112236741&quot;&gt;http://blog.naver.com/khbrst?Redirect=Log&amp;amp;logNo=50112236741&lt;/a&gt;&lt;div id=&quot;__KO_DIC_LAYER__&quot; style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: fixed; z-index: 999999999; overflow-x: hidden; overflow-y: hidden; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(51, 51, 119); border-right-color: rgb(51, 51, 119); border-bottom-color: rgb(51, 51, 119); border-left-color: rgb(51, 51, 119); border-image: initial; display: none; &quot;&gt;
&lt;iframe frameborder=&quot;0&quot; scrolling=&quot;yes&quot; style=&quot;width: 100%; height: 100%; background-color: rgb(255, 255, 255); &quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</description>
      <category>Linux/Ubuntu</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/48</guid>
      <comments>https://ekwang.tistory.com/48#entry48comment</comments>
      <pubDate>Fri, 30 Sep 2011 15:26:28 +0900</pubDate>
    </item>
    <item>
      <title>[Android] Google Music Beta apk</title>
      <link>https://ekwang.tistory.com/47</link>
      <description>Google music beta 초대권 8장 배포 합니다.&lt;br /&gt;
&lt;br /&gt;
google musicmanager deb file for ubuntu.&lt;br /&gt;
&lt;p style=&quot;margin:0&quot;&gt;&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;https://t1.daumcdn.net/cfile/tistory/17574D3B4E8488260D&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/unknown.gif&quot; style=&quot;vertical-align: middle;&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;google-musicmanager-beta_current_i386.deb&lt;/a&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;br /&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(193, 193, 193); border-right-color: rgb(193, 193, 193); border-bottom-color: rgb(193, 193, 193); border-left-color: rgb(193, 193, 193); background-color: rgb(238, 238, 238); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;$sudo dpkg -i google-musicmanager-beta_current_i386.deb&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
의존성 에러 발생하면&lt;br /&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(193, 193, 193); border-right-color: rgb(193, 193, 193); border-bottom-color: rgb(193, 193, 193); border-left-color: rgb(193, 193, 193); background-color: rgb(238, 238, 238); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;$sudo apt-get install -f&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
android device용 apk 파일!&lt;p style=&quot;margin:0&quot;&gt;&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;https://t1.daumcdn.net/cfile/tistory/1731DD3F4E736CB416&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/unknown.gif&quot; style=&quot;vertical-align: middle;&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;Google.android.music-301.apk&lt;/a&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;div id=&quot;__KO_DIC_LAYER__&quot; style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: fixed; z-index: 999999999; overflow-x: hidden; overflow-y: hidden; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(51, 51, 119); border-right-color: rgb(51, 51, 119); border-bottom-color: rgb(51, 51, 119); border-left-color: rgb(51, 51, 119); width: 411px; height: 530px; right: 10px; top: 0px; display: none; &quot;&gt;
&lt;iframe frameborder=&quot;0&quot; scrolling=&quot;yes&quot; style=&quot;width: 100%; height: 100%; background-color: rgb(255, 255, 255); &quot; src=&quot;http://engdic.daum.net/dicen/small_search.do?endic_kind=all&amp;amp;m=all&amp;amp;q=%EB%8B%88&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</description>
      <category>Android/Application</category>
      <category>Google Music Beta</category>
      <author>ekwang</author>
      <guid isPermaLink="true">https://ekwang.tistory.com/47</guid>
      <comments>https://ekwang.tistory.com/47#entry47comment</comments>
      <pubDate>Sat, 17 Sep 2011 00:39:22 +0900</pubDate>
    </item>
  </channel>
</rss>