• ffmpeg函数02__swr_alloc_set_opts()


    SwrContext *swr_alloc(void);  // 分配重采样的上下文。

    SwrContext *swr_alloc_set_opts(struct SwrContext *s, int64_t out_ch_layout, AVSampleFormat out_sample_fmt, int out_sample_rate

    , int64_t in_ch_layout, AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx

    );

    参数1:重采样上下文

    参数2:输出的layout, 如:5.1声道…

    参数3:输出的样本格式。Float, S16, S24

    参数4:输出的样本率。可以不变。

    参数5:输入的layout。

    参数6:输入的样本格式。

    参数7:输入的样本率。

    参数8,参数9,日志,不用管,可直接传0

    针对音频的播放速度,可以通过样本率的改变而改变。

     

    int swr_init(struct SwrContext *s);                       // 初始化上下文

    void swr_free(struct SwrContext **s);                  // 释放上下文空间

  • 相关阅读:
    [日常训练]FJ省夏令营day1
    [vijos1002][NOIP2005]过河
    [poj2446]Chessboard
    [bzoj1854][SCOI2010]游戏
    [模板]匈牙利算法
    [bzoj3670][2014湖北省队互测week2]似乎在梦中见过的样子
    笔记3-27
    笔记3-26
    笔记3-25
    Codeforces891C. Envy
  • 原文地址:https://www.cnblogs.com/xpylovely/p/11470240.html
Copyright © 2020-2023  润新知