zoukankan      html  css  js  c++  java
  • AVStream 解析

    AVStream 是一个结构体

    //在AVFormatContext中的流索引

    iint index; 

    //流id,例如音频流id 视频流id等;

    //解封装的时候,由libavformat模块来赋值

    //加封装的时候,由用户设置,如果未设置,则用libavformat替换

    int id;  

    //这是以前版本的时候,封装跟解码耦合在一起,先如今俩者可以分开来,使用codecpar 结构体来替代

    AVCodecContext *codec;

    //这是表示帧时间戳的基本时间单位(以秒为单位) 

    AVRational time_base;

    int64_t start_time;

    //解码时:流的持续时间,以流的时间为基数。如果源文件没有指定持续时间,但指定了比特率,则该值将根据比特率和文件大小进行估计。

    //备注:使用该数值得出视频流的持续时间,计算方式  duration *(time_base.num/time_base.den) 秒。duration的数值有可能为空,所以一般情况下使用AVFormatContext的duration来计算时长。

    int64_t duration; 

    //帧数

    int64_t nb_frames;

    //样本比特率

    AVRational sample_aspect_ratio;

    //平均帧速率

    AVRational avg_frame_rate;

    //与此流相关的编解码器参数。分别在avformat_new_stream()和avformat_free_context()中由libavformat分配和释放。

    AVCodecParameters *codecpar;

  • 相关阅读:
    移动端布局方案汇总&&原理解析
    Javascript运行机制
    git 使用
    async await详解
    vue使用axios调用豆瓣API跨域问题
    hash和history的区别
    http状态码
    XSS 和 CSRF简述及预防措施
    【pytorch】pytorch基础学习
    [源码解读] ResNet源码解读(pytorch)
  • 原文地址:https://www.cnblogs.com/helloc14/p/12482864.html
Copyright © 2011-2022 走看看