最近遇到的問題,很容易疏忽的問題
有些function parameter只收 int& (call by refernce)
像是 void ExternalDisplay::getAttributes(int& width, int& height)
angledark0123 發表在 痞客邦 留言(0) 人氣(30)
http://anemospring.blogspot.tw/2010/11/linux-driver-writing-arch.html
adb memo
angledark0123 發表在 痞客邦 留言(0) 人氣(7)
這是接下來一個月的topic,要摸熟
來這裡memo看到不錯的文章
不錯的介紹
angledark0123 發表在 痞客邦 留言(0) 人氣(9)
就是有白痴天天再打的command
有時候一覺醒來會突然失意
所以來備忘一下
angledark0123 發表在 痞客邦 留言(0) 人氣(20)
http://blog.csdn.net/linuxandroidwince/article/details/7638318
ion 使用
http://blog.csdn.net/tjy1985/article/details/7554437
http://groleo.wordpress.com/2012/07/24/ion-buffer-sharing-mechanism/
angledark0123 發表在 痞客邦 留言(0) 人氣(58)
adb shell 內執行 cat /proc/kmsg | while read LINE; do echo '\06kernel\0'$LINE'\0' > /dev/log/main; done
然後同時開另一個視窗 紀錄 adb logcat
這是目前看到最好讀的版本了
angledark0123 發表在 痞客邦 留言(0) 人氣(11)
install教學
http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
操作參數
http://lnpcd.blogspot.tw/2012/09/ffmpeg.html
angledark0123 發表在 痞客邦 留言(0) 人氣(20)
pthread_cond_wait() 用於阻塞當前線程,等待別的線程使用pthread_cond_signal()或pthread_cond_broadcast來喚醒它。 pthread_cond_wait() 必須與pthread_mutex配套使用。pthread_cond_wait()
函數一進入wait狀態就會自動release mutex。當其他線程通過pthread_cond_signal() 或pthread_cond_broadcast ,把該線程喚醒,使pthread_cond_wait()通過(返回)時,該線程又自動獲得該mutex 。
pthread_cond_signal 函數的作用是發送一個信號給另外一個正在處於阻塞等待狀態的線程,使其脫離阻塞狀態,繼續執行.如果沒有線程處在阻塞等待狀態,pthread_cond_signal也會成功返回。 使用pthread_cond_signal一般不會有“驚群現象”產生,他最多只給一個線程發信號。假如有多個線程正在阻塞等待著這個條件變量的話,那麼是根據各等待線程優先級的高低確定哪個線程接收到信號開始繼續執行。如果各線程優先級相同,則根據等待時間的長短來確定哪個線程獲得信號。但無論如何一個pthread_cond_signal調用最多發信一次。 但是pthread_cond_signal 在多處理器上可能同時喚醒多個線程,當你只能讓一個線程處理某個任務時,其它被喚醒的線程就需要繼續wait,而且規範要求pthread_cond_signal 至少喚醒一個pthread_cond_wait上的線程,其實有些實現為了簡單在單處理器上也會喚醒多個線程. 另外,某些應用,如線程池,pthread_cond_broadcast 喚醒全部線程,但我們通常只需要一部分線程去做執行任務,所以其它的線程需要繼續wait.所以強烈推薦對pthread_cond_wait()使用while循環來做條件判斷.Consider two shared variables x and y, protected by the mutex mut, and a condition vari- able cond that is to be signaled whenever x becomes greater than y. int x , y ; pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER ; pthread_cond_t cond = PTHREAD_COND_INITIALIZER ;
Waiting until x is greater than y is performed as follows: pthread_mutex_lock (& mut ); while ( x <= y ) { pthread_cond_wait (& cond , & mut ); } /* operate on x and y */ pthread_mutex_unlock (& mut );
Modifications on x and y that may cause x to become greater than y should signal the con-
angledark0123 發表在 痞客邦 留言(0) 人氣(13,857)
金錢碎碎念mode on
開始上班後,發現錢還是很吃緊
要存錢但又想要買好的東西,基本上所有慾望清單列出來,全部滿足後大概正好工作一週年吧,我實在超級誇張的
這期間好料是一定不斷的,因為對我來說那是沙漠綠洲、生命中的活水,所以每個月也是固定會有2000左右的費用花在這裡吧
6~8月薪水都拿去穩定上班的生活去了 (房間佈置、衣服等)
angledark0123 發表在 痞客邦 留言(2) 人氣(21)
為了要各方面測試Encoder和Decoder,所以常需要製作特別的mp4
今天特別把好用的tool整理一下
資料主要參考:
http://idaiwan.pixnet.net/blog/post/26310277-%E4%BD%BF%E7%94%A8-mp4box-%E5%88%86%E5%89%B2%E8%A6%96%E8%A8%8A%E6%A0%BC%E5%BC%8F%E7%82%BA-h264%EF%BC%88avc%EF%BC%89%E7%9A%84-flv-%E6%AA%94
angledark0123 發表在 痞客邦 留言(1) 人氣(91)