原创 RTSP協議簡介與實現

一、簡介     RTSP(Real Time Streaming Protocol)被廣泛應用於安防行業,其主要特點是RTSP信令交互與HTTP協議相似,媒體層數據傳輸採用RTP/RTCP協議,支持UDP方式,實時性較好,協議擴

原创 Linux下TCP Socket編程實例

client.c #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <string.h> #include <unistd.h>

原创 C++雙緩衝隊列實現

#pragma once #include <queue> #include <mutex> namespace Infra { template<class T> class DoubleQueue {

原创 Linux IO多路複用

阻塞IO 每來一個請求創建一個線程 #include <stdio.h> #include <sys/socket.h> #include <string.h> #include <netinet/in.h> #include

原创 服務器主板主要組成部分

芯片組 總線種類 PCI-E

原创 hiredis使用案例-同步、Pipelining、異步

代碼工程文件: https://github.com/v354412101/hiredis_test 1、同步調用: #include <stdio.h> #include "hiredis/hiredis.h" int mai

原创 排序算法總結

常用算法的特點總結: 排序算法 平均時間複雜度 最好情況 最壞情況 空間複雜度 排序方式 穩定性 冒泡排序 O(n2)O(n^2)O(n2) O(n)O(n)O(n) O(n2)O(n^2)O(n2) O(1)O(1

原创 Linux下UDP Socket編程實例

server.c #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <string.h> #include <arpa/inet.

原创 RTSP URL正則表達式校驗

rtsp url正則表達式校驗 rtsp://192.168.1.3對應: rtsp:\/\/\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} rtsp://admin:[email protected]對應

原创 【設計模式-C++】單例模式

Singleton.h #pragma once #include <utility> template <typename T> class Singleton { public: template<typename..

原创 Google C++編程規範

總結: 在線手冊: https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/

原创 【srs流媒體服務器】工程源代碼結構分析

└── src ├── app ├── core ├── kernel ├── libs ├── main ├── protocol └── utest core:並不是很重要

原创 Linux下Socket編程實例

client.c #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <string.h> #include <unistd.h> #i

原创 100行代碼的簡單視頻播放器(ffmpeg4.1.3+SDL2.0.9)

100行代碼的簡單視頻播放器 #include <stdio.h> #include <signal.h> #include "SDL2/SDL.h" #include "libavformat/avformat.h" #inclu

原创 海康威視推出業界首款Android系統的網絡鍵盤:Android鍵盤與傳統鍵盤對比

       前兩天,從海康威視官網的產品列表裏發現海康推出了一款新的CMK(網絡鍵盤 ),型號爲DS-1600K(圖1),看了一下產品簡介和手冊,使我對CMK、Android、海康等都有了新的認識。       首先不得不佩服作爲行