原创 libcoap編譯與移植

開源庫git:https://github.com/miri64/libcoap   生成Makefile: autoconf // sudo apt install autoconf // sudo apt-get install li

原创 protobuf移植

GCC是mipsel-openwrt-linux-gcc protobuf版本protobuf-3.6.1   ./configure --host=mipsel-openwrt-linux CC=mipsel-openwrt-linux

原创 tstools封裝H264+aac成TS文件

本例修改Tstools的esmerge.c示例 部分更改庫內容,完成讀取H264文件和AAC文件封裝成TS文件。  使用函數指針做參數傳遞,達到把讀取源文件和寫目標文件方法提到更好操作的地方。 1. 下載tstools源碼     官方

原创 C++之類的繼承和多態

#include <iostream> using namespace std; class CPeople { public: void do_Thing1(){cout<<"CPeople do_thing1!"<<endl;}

原创 C++之vector iterator 和 bitset

vector:容器     引入:#inlcue <vector>                 using std::vector;     特點:類模板     定義:1)vector<T> v1             //默認構

原创 Mp4v2封裝H264+AAC爲MP4

本文介紹Mp4v2的使用,成功將H264 ES文件和AAC文件封裝成MP4文件 1. Mp4V2使用VS2013編譯 studio9.0\下打開方案 一般情況,編譯會出現錯誤 原因是缺少幾個關鍵文件:vstudio9.0\libmp4

原创 C++最大公約數和做小公倍數

#include <iostream> using namespace std; int LgYueShu(int v1, int v2) { if (v2 != 0) // we're done

原创 C++之函數和const

void func() const:     這種類型的const必須和類對象聯繫在一起,即存在this指針。下面是錯誤的使用: int func() const //error編譯無法通過 { int a = 10; retur

原创 tcpdump移植

本文介紹嵌入式網絡編程常用工具tcpdump的移植和使用方法: 下載源碼: http://www.tcpdump.org/ 交叉編譯: 1. 先編譯libpcap-1.7.4: ./configure --prefix=/home/l

原创 c++之try塊和異常處理

異常處理:             1)throw表達式:throw引發異常條件             2)try塊:try{...} catch(){...} catch(){..}模式,try塊拋出異常,catch處理