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

File tree

17 files changed

+130
-3
lines changed

17 files changed

+130
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
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

Lines changed: 7 additions & 0 deletions
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

Lines changed: 12 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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 */
Lines changed: 20 additions & 0 deletions
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()
Lines changed: 4 additions & 0 deletions
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)
Lines changed: 5 additions & 0 deletions
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,

0 commit comments

Comments
 (0)