Monday, May 17, 2010

貼入中... Cancel

 

Valgrind - 北歐神話中英靈殿的入口
功能:
Memcheck : 檢查 memory leak, malloc(), new, free(), delete 都可以被檢查. 可以偵測未被初始化的記憶體, 讀取寫入已經釋放的記憶體, 或是超過範圍的記憶體, 記憶體洩漏, 不成對的 malloc <-> free, new <-> delete, 以及 memcpy 覆寫.
Cachegrind : cache 模擬分析器, 模擬 CPU I1 D1 L2 快取記憶體
Callgrind : 類似 Cachegrind ,但是進一步整合了模擬並分析呼叫者, 被呼叫者之間的關係
Massif : heap 分析器, 可以測量統計 heap 的使用情形,stack 的大小。可以幫你降低記憶體耗盡的機會,減少 swap 來加快速度
Helgrind : 偵測 POSIX threads 之間的同步錯誤。包括不正確的使用 POSIX API. 偵測潛在的 deadlock, 搶用資料, 因為沒有 lock 而造成程序間競爭讀寫同一份資料。
Lackey : 統計指令週期,記憶體使用,以及整數,浮點數的計算。

支援:
x86, ppc. 至於 arm 則為中等程度支援 (medium)
http://www.network-theory.co.uk/valgrind/manual/valgrind-sample.pdf編輯
Valgrind: Supported PlatformsOfficial Home Page for valgrind, a suite of tools for debugging and profiling. Automatically detect memory management and threading bugs, and perform detailed profiling. The current stable version is...


Sunday, May 16, 2010

下載 Kindle for PC

下載 Kindle for PC, google: kindle for pc,

http://www.amazon.com/gp/feature.html/ref=kcp_pc_mkt_lnd?docId=1000426311

height=185

不需要 Kindle 就可以透過此軟體看書。

Read Kindle Books on Your Computer

·        Get the best reading experience available on your PC. No Kindle required

·        Access your Kindle books even if you don't have your Kindle with you

·        Automatically synchronizes your last page read and annotations between devices with Whispersync

·        Create new highlights, notes, and bookmarks and manage those created on your Kindle

·        Full screen reading view, color modes, and brightness controls offer an immersive reading experience

http://g-ecx.images-amazon.com/images/G/01/kindle/www/mazama/download/beta-1-sm-home._V227198794_.gif

View larger image

 

安裝的過程很快速,來不及抓圖

 

Amazon Kindle 同步軟體

height=228

 

可以 Highlight 也可以 Add Note , Note 的呈現有一點不直覺

height=296

 

文字雖然可以框選段落,卻無法複製到剪貼簿,文字可以放大縮小而且會按照式窗大小自動重新排版。

 height=320

 

主頁面右上角有購物車按鈕,會直接打開 Amazon 網站讓你買書。height=319

 

 

Tuesday, May 4, 2010

利用 Wireshark 進一步分析 RTP 中的 H264 (Mpeg4)

通常我們抓了一段 RTSP/RTP 封包後,了不起做個 Decode As … RTP 就結束了,無法進一步解析 RTP payload。

但是其實 Wireshark 有一個特異功能可以進一步解析 RTP 中的 H264 (Mpeg4),

只要在 Edit -> Preferences… -> Protocols -> H264 , H264 dynamic payload type : 填入 96 (也就是 RTSP Describe 內的 m=video xx RTP/AVP 96).

就可以看到 H264 Stream 的部分欄位。在RTP封包中點選有 Marker bit 或是一般封包就可以看到。

在下面可以看到 FU Identifier 以及 FU Header,按照原本 TPL 的程式判斷 nal == 67 來解析 s-property,在這邊就是 FU Identified 的值,

對照 [RFC 3984], $5.3.  NAL Unit Octet Usage 有進一步的說明各欄位的意義。

 

 

cid:image002.jpg@01CAEC5D.C98E72B0cid:image006.jpg@01CAEC5D.C98E72B0 

 

除此之外還有一個隱藏功能,請嘗試尋找最後一個 P frame ,也就是一輪 GOV 裡的最後一個 frame,點選該 frame 的最後一個 packet (Marker bit)

可以看到更多的資料。

cid:image008.jpg@01CAEC5D.C98E72B0

 

RTP Mpeg4 Stream ,選擇 Edit -> Preferences … -> Protocols -> MP4V-ES MP4V-ES dynamic payload type : 96

記得將 H264 dynamic payload type 0 ,不然應該是會有衝突。

packets 中點選 P frame 第一個 packet 可以看到一點點資料,點選 I frame 第一個 packet 可以看到較多欄位。

cid:image010.jpg@01CAEC5D.C98E72B0

 

Regards,

Skyter