Skip to content

Commit a4894c5

Browse files
committed
feat(avi_player): publish official version
1. add docs 2. add test-apps
1 parent 73a1002 commit a4894c5

17 files changed

+130
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ examples/**/build
3434

3535
# Example online download files
3636
examples/usb/device/usb_dual_uvc_device/**/*.avi
37+
components/avi_player/test_apps/**/*.avi
3738

3839
# Doc build artifacts
3940
docs/**/_build/

.gitlab/ci/build.yml

+7
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,13 @@ build_example_utilities_xz_decompress_file:
820820
variables:
821821
EXAMPLE_DIR: examples/utilities/xz_decompress_file
822822

823+
build_components_avi_player_test_apps:
824+
extends:
825+
- .build_examples_template
826+
- .rules:build:components_avi_player_test_apps
827+
- .build_idf_active_release_version
828+
variables:
829+
EXAMPLE_DIR: components/avi_player/test_apps
823830

824831
build_components_bluetooth_ble_hci_test_apps:
825832
extends:

.gitlab/ci/rules.yml

+12
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@
315315

316316
- "components/audio/dac_audio/include/dac_audio.h"
317317
- "components/audio/pwm_audio/include/pwm_audio.h"
318+
- "components/avi_player/include/avi_player.h"
318319
- "components/bluetooth/ble_conn_mgr/include/esp_ble_conn_mgr.h"
319320
- "components/bluetooth/ble_conn_mgr/include/esp_ble_conn_mgr.h"
320321
- "components/bluetooth/ble_hci/include/ble_hci.h"
@@ -1439,6 +1440,17 @@
14391440
- <<: *if-dev-push
14401441
changes: *patterns-components_audio_pwm_audio
14411442

1443+
.rules:build:components_avi_player_test_apps:
1444+
rules:
1445+
- <<: *if-protected
1446+
- <<: *if-label-build
1447+
- <<: *if-label-target_test
1448+
- <<: *if-trigger-job
1449+
- <<: *if-dev-push
1450+
changes: *patterns-build_system
1451+
- <<: *if-dev-push
1452+
changes: *patterns-components_avi_player
1453+
14421454
.rules:build:components_bluetooth_ble_hci_test_apps:
14431455
rules:
14441456
- <<: *if-protected

components/.build-rules.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
components/avi_player/test_apps:
2+
enable:
3+
- if: IDF_TARGET in ["esp32s3", "esp32p4"]
4+
15
components/touch/touch_proximity_sensor/test_apps:
26
enable:
37
- if: IDF_TARGET in ["esp32s3"]

components/avi_player/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ChangeLog
22

3+
## v1.0.0 - 2024-8-15
4+
5+
* publish official version
36

47
## v0.1.1 - 2024-05-22
58

components/avi_player/idf_component.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
version: "0.1.1"
1+
version: "1.0.0"
22
description: Parse the video stream and audio stream of an AVI video file.
33
url: https://github.com/espressif/esp-iot-solution/tree/master/components/avi_player
4+
documentation: https://docs.espressif.com/projects/esp-iot-solution/en/latest/multimedia/avi_player.html
45
issues: https://github.com/espressif/esp-iot-solution/issues
56
repository: https://github.com/espressif/esp-iot-solution.git
67
dependencies:

components/avi_player/include/avi_player.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ typedef struct {
6868
size_t buffer_size; /*!< Internal buffer size */
6969
video_write_cb video_cb; /*!< Video frame callback */
7070
audio_write_cb audio_cb; /*!< Audio frame callback */
71-
audio_set_clock_cb audio_set_clock_cb; /*!< Audio set clock callback */
71+
audio_set_clock_cb audio_set_clock_cb; /*!< Audio set clock callba ck */
7272
avi_play_end_cb avi_play_end_cb; /*!< AVI play end callback */
7373
UBaseType_t priority; /*!< FreeRTOS task priority */
7474
BaseType_t coreID; /*!< ESP32 core ID */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
# The following lines of boilerplate have to be in your project's CMakeLists
3+
# in this exact order for cmake to work correctly
4+
cmake_minimum_required(VERSION 3.5)
5+
6+
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components"
7+
"../../avi_player")
8+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
9+
project(avi_player_test)
10+
11+
set(URL "https://dl.espressif.com/AE/esp-iot-solution/p4_introduce_480_270_mjpeg_48000_2_1ch.avi")
12+
set(OUTPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/spiffs")
13+
file(MAKE_DIRECTORY ${OUTPUT_DIR})
14+
file(GLOB AVI_FILES "${OUTPUT_DIR}/*.avi")
15+
if(NOT AVI_FILES)
16+
file(DOWNLOAD ${URL} ${OUTPUT_DIR}/p4_introduce.avi)
17+
message(STATUS "File downloaded from ${URL} to: ${OUTPUT_DIR}/p4_introduce.avi")
18+
else()
19+
message(STATUS "AVI file(s) already exist(s) in the output directory: ${OUTPUT_DIR}")
20+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
idf_component_register(SRC_DIRS "."
2+
INCLUDE_DIRS ".")
3+
4+
spiffs_create_partition_image(avi ${CMAKE_CURRENT_SOURCE_DIR}/../spiffs FLASH_IN_PROJECT)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Name, Type, SubType, Offset, Size, Flags
2+
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3+
nvs, data, nvs, 0x9000, 0x6000,
4+
factory, 0, 0, , 0x90000,
5+
avi, data, spiffs, , 0x300000,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was generated using idf.py save-defconfig. It can be edited manually.
2+
# Espressif IoT Development Framework (ESP-IDF) 5.4.0 Project Minimal Configuration
3+
#
4+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
5+
CONFIG_PARTITION_TABLE_CUSTOM=y
6+
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
7+
CONFIG_ESP_TASK_WDT_EN=n
8+
CONFIG_FREERTOS_HZ=1000

docs/Doxyfile

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ PROJECT_NAME = "ESP IoT Solution Guide"
2323
INPUT = \
2424
$(PROJECT_PATH)/components/audio/dac_audio/include/dac_audio.h \
2525
$(PROJECT_PATH)/components/audio/pwm_audio/include/pwm_audio.h \
26+
$(PROJECT_PATH)/components/avi_player/include/avi_player.h \
2627
$(PROJECT_PATH)/components/bluetooth/ble_conn_mgr/include/esp_ble_conn_mgr.h \
2728
$(PROJECT_PATH)/components/bluetooth/ble_hci/include/ble_hci.h \
2829
$(PROJECT_PATH)/components/bluetooth/ble_profiles/std/ble_anp/include/esp_anp.h \

docs/en/multimedia/avi_player.rst

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
AVI Player
2+
==============
3+
:link_to_translation:`zh_CN:[中文]`
4+
5+
This component supports parsing AVI files and processes them at the FPS rate, providing audio and video data to the user through callbacks.
6+
7+
AVI (Audio Video Interleave) files are a multimedia container format used to store audio and video data. They can contain video and audio streams encoded in various formats and support different compression methods.
8+
9+
This component currently supports the following audio and video formats:
10+
11+
Video:
12+
- MJPEG
13+
- H264
14+
15+
Audio:
16+
- PCM
17+
18+
API Reference
19+
----------------
20+
21+
.. include-build-file:: inc/avi_Player.inc

docs/en/multimedia/index.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Audio/Video Codec
2+
===================
3+
:link_to_translation:`zh_CN:[中文]`
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
AVI Decoder <avi_player>

docs/zh_CN/index.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ESP-IoT-Solution 包含物联网系统开发中常用的外设驱动和代码框
1010
================== ================== ==================
1111
|入门指南|_ |显示设备|_ |USB主机&设备|_
1212
------------------ ------------------ ------------------
13-
`入门指南`_ `显示设备`_ `USB主机&设备`_
13+
`入门指南`_ `显示设备`_ `USB主机&设备`_
1414
------------------ ------------------ ------------------
1515
|图形界面|_ |输入设备|_ |传感器集|_
1616
------------------ ------------------ ------------------
@@ -68,6 +68,7 @@ ESP-IoT-Solution 包含物联网系统开发中常用的外设驱动和代码框
6868
显示设备 <display/index>
6969
USB主机&设备 <usb/index>
7070
音频设备 <audio/index>
71+
音视频编解码 <multimedia/index>
7172
图形界面 <gui/index>
7273
人工智能 <ai/index>
7374
输入设备 <input_device/index>

docs/zh_CN/multimedia/avi_player.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
AVI 播放器
2+
==============
3+
:link_to_translation:`en:[English]`
4+
5+
该组件支持解析 AVI 文件,并按照 FPS 速率解析 AVI 文件,将音视频数据已回调的方式提供给用户。
6+
7+
AVI (Audio Video Interleave) 文件是一种多媒体容器格式,用于存储音频和视频数据。它可以包含多种编码格式的视频和音频流,并且支持不同的压缩方式。
8+
9+
该组件目前仅支持以下格式的音视频
10+
11+
Video:
12+
13+
- MJPEG
14+
- H264
15+
16+
Audio:
17+
18+
- PCM
19+
20+
API 参考
21+
------------
22+
23+
.. include-build-file:: inc/avi_Player.inc

docs/zh_CN/multimedia/index.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
音视频编解码
2+
============
3+
:link_to_translation:`en:[English]`
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
AVI 解码器 <avi_player>

0 commit comments

Comments
 (0)