当前位置: 首页 > news >正文

网站推广公司 wordpress求合伙人做网站

网站推广公司 wordpress,求合伙人做网站,莱芜都市网二手市场,品牌推广策略与方式介绍 在本系列#xff0c;我打算花大篇幅讲解我的 gitee 项目音视频播放器#xff0c;在这个项目#xff0c;您可以学到音视频解封装#xff0c;解码#xff0c;SDL渲染相关的知识。您对源代码感兴趣的话#xff0c;请查看基于FFmpeg和SDL的音视频播放器 如果您不理解本… 介绍 在本系列我打算花大篇幅讲解我的 gitee 项目音视频播放器在这个项目您可以学到音视频解封装解码SDL渲染相关的知识。您对源代码感兴趣的话请查看基于FFmpeg和SDL的音视频播放器 如果您不理解本文可参考我的前一篇文章音视频项目—基于FFmpeg和SDL的音视频播放器解析十一 解析 我们今天要讲的和音视频同步有关其中 async 主要负责时间的控制未来 audiooutput 和 videooutput 这两个负责播放音频和视频的文件就依赖其实现音视频同步。 我们先看看 async 的代码 #ifndef AVSYNC_H_ #define AVSYNC_H_#includechrono #includectime #includetime.h #includemath.h using namespace std::chrono;class AVSync { public:AVSync();void InitClock(){}void SetClockAt(double pts, double time){this-pts pts;pts_drift this-pts - time;}double GetClock(){double time GetMicroseconds() / 1000000.0;return pts_drift time;}double SetClock(){double time GetMicroseconds() / 1000000.0;SetClockAt(pts, time);}time_t GetMicroseconds(){system_clock::time_point time_point_new system_clock::now();system_clock::duration duration time_point_new.time_since_epoch();time_t us duration_castmicroseconds(duration).count();return us;}double pts 0;double pts_drift 0; };#endif 这个代码量不大成员变量有 ptspts_drift 这两个。成员函数主要是 GetMicrosecondsSetClockGetClockSetClockAt我们接下来逐步解析。 我们先说成员变量的含义。ptspresentation timestamp了解音视频的朋友应该知道这是显示时间戳表示帧应该在屏幕显示的时间。pts_drift当前 pts 与系统时间的差值。 然后我们看一下函数 GetMicroseconds time_t GetMicroseconds(){system_clock::time_point time_point_new system_clock::now();system_clock::duration duration time_point_new.time_since_epoch();time_t us duration_castmicroseconds(duration).count();return us; } 这个函数负责获取时间的间隔。 首先第一行system_clock::time_point time_point_new system_clock::now()我们获取了当前的时间。 然后system_clock::duration duration time_point_new.time_since_epoch()通过这个函数我们获得了时间间隔。注意先是得到 time_piont我们才能计算 duration。 最后time_t us duration_castmicroseconds(duration).count()转换成毫秒并返回。 SetClockAt void SetClockAt(double pts, double time){this-pts pts;pts_drift this-pts - time; } 这个函数负责给 pts 和 pts_drift 赋值。这很好理解因为 pts_drift 就是 pts 和当前时间的差值。 GetClock double GetClock(){double time GetMicroseconds() / 1000000.0;return pts_drift time; } 这个函数负责获取时间。获取了时间间隔后加上 pts_stamp 后就返回这个值。 SetClock double SetClock(){double time GetMicroseconds() / 1000000.0;SetClockAt(pts, time); } 这个函数负责设置设置时钟获取时间间隔然后调用 SetClockAt 后就可以了。 我们这篇文章就讲讲了时间设置的操作并没有深入讲音视频同步的原理。我们最后通过 audiooutput 和 videooutput 播放出音视频就好了到时候也会深入讲同步机制的。 欲知后事如何请听下回分解。
http://www.hkea.cn/news/14420014/

相关文章:

  • 建设维护网站未签订合同郑州市建设工程造价信息网
  • 获得网站php管理员密码淄博网站优化
  • 郑州中原区网站建设凡客诚品属于什么档次
  • 泉州优化seo网站关键词优化美工培训中心
  • 网站开发策略都有啥微信网页版怎么下载
  • 网站打开慢如何优化如何破解网站后台
  • 昆山网站建设有限公司怎么样做球服的网站有哪些
  • 网站建设初稿如何提升百度关键词排名
  • 网站建设要解决哪些方面的事项wordpress 评论 图片
  • 浙江省2012年7月自学考试网站建设与网页设计视频网站建设流程
  • 昆明网站开发报价wordpress注册评论
  • 宝安官网网站建设比较好的html5高端装修公司网站源码
  • 做网站编辑好吗钉钉低代码开发平台
  • 网站建设 源代码归属免费注册qq号
  • 网站建设怎么支付款项网站建设工作策划方案
  • 烟台网站制作厂家联系方式品牌网络
  • 徐州建站模板公司小说阅读网站开发源码
  • 城固县网站建设wordpress还原站点
  • 校园网站建设意见表填写安徽省建设厅网站个人怎么注册
  • 论坛网站制作费用做新网站推广的活动
  • 郑州旅游网站搭建班级网站建设图片
  • 策勒网站建设新万网
  • 咸宁网站设计公司井陉矿区网站建设
  • 淘宝客单页网站网站设计主要做什么
  • 嘉华伊美网站建设编程培训机构名字
  • 做网站属于程序员吗源码网站代理
  • 企业网站系统详细设计html手机版下载
  • 建设家具网站的目的及功能定位下载什么软件可以做动漫视频网站
  • 在线搭建网站深圳品牌策划vi设计
  • 网站一跳率如何制作单页网站