首页 网络技术 网络基础     /    将TS流文件发送到以太网络上(源码)

将TS流文件发送到以太网络上(源码)

上传者: iwgh | 上传时间:2018/5/3 18:47:12 | 文件大小:18KB | 文件类型:rar
TS
将TS流文件发送到以太网络上(源码)
一个小工具,将TS流文件发送到以太网络上。
支持使用UDP或者RTP协议。
根据TS流的PCR值跟踪时间同步发送。
我用的GetTickCount进行发送时间同步,线程按照10毫秒进行轮回,按照Win32系统普通线程切换时间,应该可以保证到10毫秒左右的同步精度。
但听人提过使用GetTickCount进行时间同步,长时间会有时间漂移现象,而且误差会逐渐累加,直到客户端缓冲溢出。
对方提出的处理方案是使用GPS卫星时间同步...个人以为GetTickCount是使用Win32底层的某个高精度时间结果。
在微观上不是很精确,但是宏观上应该是很精确。
我实际曾经使用这个工具,发送过同一个文件三天三夜,客户端使用VideoLan进行在线播放,缓冲设置300ms,没有发现VideoLan缓冲有溢出的情况。
如果这种同步方式,长时间发送,确实有精度问题,希望有同志给出例证和处理方案(除了使用GPS卫星时间以外的方案...)。
以便我改进。
demo中根据以太网通常的MTU值直接按7个TS包进行封装:SetGetTsPacketDataCB(GetTsPacketData,NULL,TS_PACKET_SIZE_MIN*7);如果是其他网络类型,需要根据网络的MTU值调整TS包数量。

文件下载

资源详情

[{"title":"(21个子文件18KB)将TS流文件发送到以太网络上(源码)","children":[{"title":"SendTs2Ip","children":[{"title":"StdAfx.cpp <span style='color:#111;'>296B</span>","children":null,"spread":false},{"title":"SourceTsFile.cpp <span style='color:#111;'>6.43KB</span>","children":null,"spread":false},{"title":"VBuffer.h <span style='color:#111;'>8.33KB</span>","children":null,"spread":false},{"title":"VBufferT.h <span style='color:#111;'>2.20KB</span>","children":null,"spread":false},{"title":"SendTs2Ip.sln <span style='color:#111;'>883B</span>","children":null,"spread":false},{"title":"Rtp.h <span style='color:#111;'>780B</span>","children":null,"spread":false},{"title":"SendTs2Ip.vcproj <span style='color:#111;'>6.82KB</span>","children":null,"spread":false},{"title":"Rtp.cpp <span style='color:#111;'>2.95KB</span>","children":null,"spread":false},{"title":"string_t.h <span style='color:#111;'>2.36KB</span>","children":null,"spread":false},{"title":"SourceTsFile.h <span style='color:#111;'>1.38KB</span>","children":null,"spread":false},{"title":"TLock.h <span style='color:#111;'>738B</span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'>1.20KB</span>","children":null,"spread":false},{"title":"Socket.cpp <span style='color:#111;'>3.78KB</span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'>936B</span>","children":null,"spread":false},{"title":"Socket.h <span style='color:#111;'>1.07KB</span>","children":null,"spread":false},{"title":"Udp.h <span style='color:#111;'>531B</span>","children":null,"spread":false},{"title":"SendTs2Ip.vcproj.SB-4198B7C3284E.cc.user <span style='color:#111;'>1.39KB</span>","children":null,"spread":false},{"title":"SendTs2Ip.cpp <span style='color:#111;'>3.30KB</span>","children":null,"spread":false},{"title":"Udp.cpp <span style='color:#111;'>4.05KB</span>","children":null,"spread":false},{"title":"SendTs2Ip.dsw <span style='color:#111;'>541B</span>","children":null,"spread":false},{"title":"SendTs2Ip.dsp <span style='color:#111;'>4.59KB</span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • 老衲不出家:
    有问题基本上用不了2020-08-30
  • gaodapang2011:
    谢谢,需要仔细专研2015-07-27
  • lsytb:
    都是c++写的,不是c的,不过有点帮助。2015-04-21
  • zhangtower:
    就是想要的,可以了解TS流的发送,不错!2015-02-14
  • guolebin:
    楼主,编译不通过,有问题呀。2014-04-22

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明