当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
5 Star 0 Fork 5

OpenHarmony-SIG/opus
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

opus

简介

Opus是一种用于在互联网上进行交互式语音和音频传输的编解码器。它可以从低比特率窄带语音扩展到非常高的高品质立体声音乐。

下载安装

直接在OpenHarmony-SIG仓中搜索opus并下载。

使用说明

以OpenHarmony 3.1 Beta的rk3568版本为例

  1. 将下载的opus库代码存在以下路径:./third_party/opus

  2. 修改添加依赖的编译脚本,路径:/developtools/bytrace_standard/ohos.build


{
  "subsystem": "developtools",
  "parts": {
    "bytrace_standard": {
      "module_list": [
        "//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core",
        "//developtools/bytrace_standard/bin:bytrace_target",
        "//developtools/bytrace_standard/bin:bytrace.cfg",
        "//developtools/bytrace_standard/interfaces/kits/js/napi:bytrace",
        "//third_party/opus:opus_targets",
      ],
      "inner_kits": [
        {
          "type": "so",
          "name": "//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core",
          "header": {
            "header_files": [
              "bytrace.h"
            ],
            "header_base": "//developtools/bytrace_standard/interfaces/innerkits/native/include"
          }
        }
      ],
      "test_list": [
        "//developtools/bytrace_standard/bin/test:unittest"
      ]
    }
  }
}

  1. 编译:./build.sh --product-name rk3568 --ccache

  2. 生成库文件和一些可执行测试文件,路径:out/rk3568/developtools/profiler

接口说明

  1. 解码多流Opus数据包: opus_multistream_decode()
  2. 使用浮点输出解码多流Opus数据包: opus_multistream_decode_float()
  3. 分配和初始化多流解码器状态: opus_multistream_decoder_create()
  4. 在多流Opus解码器上执行CTL功能: opus_multistream_decoder_ctl()
  5. 释放已分配的OpusMSDecoder: opus_multistream_decoder_destroy()
  6. 获取OpusMSDecoder结构的大小: opus_multistream_decoder_get_size()
  7. 初始化以前分配的解码器状态对象: opus_multistream_decoder_init()
  8. 对多流Opus帧进行编码: opus_multistream_encode()
  9. 从浮点输入对多流Opus帧进行编码: opus_multistream_encode_float()
  10. 分配和初始化多流编码器状态: opus_multistream_encoder_create()
  11. 在多流Opus编码器上执行CTL功能: opus_multistream_encoder_ctl()
  12. 释放已分配的OpusMSEncoder: opus_multistream_encoder_destroy()
  13. 获取OpusMSEncoder结构的大小: opus_multistream_encoder_get_size()
  14. 初始化以前分配的多流编码器状态: opus_multistream_encoder_init()

约束与限制

在下述版本验证通过:

DevEco Studio 版本:3.1 Beta1(3.1.0.200),SDK:API9 Beta5(3.2.10.6)

目录结构

|---- opus
|     |---- celt                                 #低延迟CELT
|     |---- doc                                  #资源文件及说明文档
|     |---- include                              #头文件
|     |---- m4                                   #预处理文件
|     |---- scripts                              #脚本文件
|     |---- silk                                 #语音编解码器Silk
|     |---- src                                  #opus实现                      
|           |---- opus_decoder.c                 #opus解码器
|           |---- opus_demo.c                    #opus示例
|           |---- opus_encoder.c                 #opus编码器
|           |---- opus_multistream_decoder.c     #opus多流解码器
|           |---- opus_multistream_encoder.c     #opus多流编码器
|     |---- tests                        #测试文件
|     |---- win32                        #win32项目和生成自动化
|     |---- README.md                    #安装使用方法

贡献代码

使用过程中发现任何问题都可以提 Issue 给我们,当然,我们也非常欢迎你给我们发 PR

开源协议

本项目基于 BSD license ,请自由地享受和参与开源。

Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Opus is subject to the royalty-free patent licenses which are specified at: Xiph.Org Foundation: https://datatracker.ietf.org/ipr/1524/ Microsoft Corporation: https://datatracker.ietf.org/ipr/1914/ Broadcom Corporation: https://datatracker.ietf.org/ipr/1526/

简介

暂无描述 展开 收起
README
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony-sig/opus.git
git@gitee.com:openharmony-sig/opus.git
openharmony-sig
opus
opus
master

搜索帮助