论文部分内容阅读
根据视频流与实时监视应用的特点,提出一种基于TCP协议的动态双缓冲与双线程视频实时传输算法。在发送方设置视频数据缓存与数据发送缓存,并分别由视频数据输入线程与视频数据发送线程负责管理;视频数据输入线程根据预设的最大等待发送时间与实时计算的网络传输速率,动态调节缓存的大小以及在网络拥塞时有选择性地丢弃视频帧;视频数据发送线程实现视频数据发送与按帧从视频数据缓存获取数据,并实时计算出网络数据传输速率。实验结果表明,本算法能最大限度地利用动态变化的网络带宽,保证视频实时发送至接收方与平稳播放,可有效地应用于窄变带宽网络环境下实时视频监视。
According to the characteristics of video streaming and real-time monitoring applications, a dynamic double buffering and two-thread video real-time transmission algorithm based on TCP protocol is proposed. The sender sets the video data buffer and the data transmission buffer, and is respectively managed by the video data input thread and the video data transmission thread. The video data input thread dynamically adjusts the buffer according to the preset maximum waiting time and the real-time calculated network transmission rate And selectively discards video frames when the network is congested. The video data sending thread sends video data and frames by frame to obtain data from the video data cache, and real-time calculates the network data transmission rate. The experimental results show that this algorithm can make full use of the dynamic network bandwidth to ensure real-time video sent to the receiver and smooth playback, which can be effectively applied to real-time video surveillance in narrow bandwidth network environment.