Archives: software programming

how to submit a patch to google’s webrtc native No ratings yet.

I recently submitted a patch to webrtc native. https://webrtc-review.googlesource.com/c/src/+/143841 https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/discuss-webrtc/zn4kmjflvt4 The process is not that difficult, but there could be some caveats depending on your os version etc. Here is my notes/steps:   Read official doc Basically you should follow this official doc is at: https://webrtc.org/contributing/   install depot_tools mkdir webrtc && cd webrtc $ git clone • Read More »


vim how to install vim-grammarous plugin ( grammar check ) 5/5 (1)

vim has a grammar check plugin https://github.com/rhysd/vim-grammarous How to install vim-grammarous? it uses new vim 8+ plugin mechanism, so we can easily install it by: mkdir -p ~/.vim/pack/bundle/start cd ~/.vim/pack/bundle/start git clone https://github.com/rhysd/vim-grammarous   The first time you run the: GrammarousCheck in the vim, it will auto download the languagetool (java jar) etc. How to • Read More »


H.264 profile-level-id, packetization-mode, NAL, I-frame, I-slice No ratings yet.

H.264 profile-level-id in sdp: profile-level-id = 428014  ( remember SDP use hex, wiki/h264 they use decimal ) profile_idc 0x42 == 66 so it is Baseline profile profile-iop 0x80 mean constraint_set0_flag=1 (so it is Constrained Baseline profile) and others 0 level-idc 0x14 == 20 so it is Level 2.0 https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC described the details of h264 profile, level. Profiles • Read More »


c++ coroutine No ratings yet.

Coroutines Internals https://www.boost.org/doc/libs/1_70_0/libs/coroutine2/doc/html/index.html https://theboostcpplibraries.com/boost.coroutine https://www.netways.de/en/blog/2019/04/04/modern-c-programming-coroutines-with-boost/ Coroutines introduction Your first coroutine co_awaiting coroutines   https://en.cppreference.com/w/cpp/language/coroutines   Please rate this rating


gdb and signal handling ( especially sigwaitinfo ) 5/5 (1)

How gdb generally works In a debugging session, when the debugger wants to set a breakpoint, it replaces an instruction by int3 When the trap instruction (0xCC on x86) is executed, the processor notifies the OS. On UNIX, the OS checks to see whether the process is being ptraced by somebody. If no, the SIGTRAP signal is delivered to • Read More »



c++ why std::shared_ptr need atomic_store, atomic_load or why we need atomic shared_ptr No ratings yet.

shared_ptr is some sort of confusing especially why we need atomic_store, atomic_load on that. It is NOT thread safe. In fact,  the primary intended use of std::shared_ptr is letting multiple threads control the lifetime of the same object, but not thread-safe. A good summary is: A shared_ptr behaves like a built-in type regarding thread-safety, Concurrent access to distinct • Read More »


c++ pass default shared_ptr reference as nullptr 5/5 (1)

First of all, shared_ptr can be a nullptr.  Nothing wrong passing a null shared pointer. In fact, a null shared pointer is an actual Null Object, which means that it’s designed exactly for those kinds of uses.   but if we want to pass the share_ptr as default nullptr reference, we need to put a const • Read More »


srtp and h.235.6 secure rtp No ratings yet.

SRTP RFCs and h.235 is Not an easy read. Here is my very high level beriefing: AES Encryption (1) AES is the foundation for both srtp and h.235.6 secured rtp AES is symmetric encryption,  it takes those two as input key + IV:  128/192/256-bits length key , ( + optional Initialized vector or counter) src input:    • Read More »


rabbitMQ exchanges, queue , routing keys, bindings No ratings yet.

RabiitMQ implement the  AMQP protocol. written in Erlang. it is a quite useful message broker or message middleware. It works like this: sender or receiver can create different type of Exchanges. Sender of course will send message to exchange. The receiver will create a queue, and binding to the exchange. The Exchange will route the • Read More »