Skip to content

Commit e9ad8e8

Browse files
Merge branch 'main' into 717_windows_build_updates
2 parents 5964eec + 410dae8 commit e9ad8e8

34 files changed

+2399
-1285
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
Checks: >
33
bugprone-*,
4+
-bugprone-easily-swappable-parameters,
45
cert-*,
56
clang-diagnostic-*,
67
clang-analyzer-*,
@@ -13,6 +14,7 @@ Checks: >
1314
-modernize-use-trailing-return-type,
1415
performance-*,
1516
readability-*,
17+
-readability-uppercase-literal-suffix,
1618
WarningsAsErrors: ''
1719
FormatStyle: 'file'
1820
...

.github/workflows/ci.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
arch-type: "x86_64"
5252
build-type: "Release"
5353
qt-version: "5.15.2"
54-
cmake-version: "3.29.8"
54+
cmake-version: "3.31.6"
5555
python-version: "3.10"
5656
vfx-platform: "CY2023"
5757
extra_repo: "powertools"
@@ -61,7 +61,7 @@ jobs:
6161
arch-type: "x86_64"
6262
build-type: "Release"
6363
qt-version: "5.15.2"
64-
cmake-version: "3.29.8"
64+
cmake-version: "3.31.6"
6565
python-version: "3.10"
6666
vfx-platform: "CY2023"
6767
extra_repo: "crb"
@@ -71,7 +71,7 @@ jobs:
7171
arch-type: "x86_64"
7272
build-type: "Debug"
7373
qt-version: "5.15.2"
74-
cmake-version: "3.29.8"
74+
cmake-version: "3.31.6"
7575
python-version: "3.10"
7676
vfx-platform: "CY2023"
7777
extra_repo: "powertools"
@@ -81,7 +81,7 @@ jobs:
8181
arch-type: "x86_64"
8282
build-type: "Debug"
8383
qt-version: "5.15.2"
84-
cmake-version: "3.29.8"
84+
cmake-version: "3.31.6"
8585
python-version: "3.10"
8686
vfx-platform: "CY2023"
8787
extra_repo: "crb"
@@ -180,7 +180,7 @@ jobs:
180180
tools: 'tools_qtcreator'
181181
set-env: 'true'
182182
tools-only: 'false'
183-
aqtversion: '==3.1.*'
183+
aqtversion: '==3.2.*'
184184

185185
- name: Install Python dependencies
186186
run: |
@@ -191,6 +191,7 @@ jobs:
191191

192192
- name: Configure OpenRV
193193
run: |
194+
cmake --version
194195
export QT_HOME=/__w/OpenRV/OpenRV/deps/Qt/${{ matrix.qt-version}}/gcc_64
195196
cmake -B _build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT5_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
196197
@@ -228,12 +229,14 @@ jobs:
228229
build-type: "Release"
229230
qt-version: "5.15.2"
230231
python-version: "3.10"
232+
cmake-version: "3.31.6"
231233
vfx-platform: "CY2023"
232234
- os: "macos-13"
233235
arch-type: "x86_64"
234236
build-type: "Debug"
235237
qt-version: "5.15.2"
236238
python-version: "3.10"
239+
cmake-version: "3.31.6"
237240
vfx-platform: "CY2023"
238241
steps:
239242
- name: Check if it is a schedule job
@@ -266,7 +269,12 @@ jobs:
266269
- name: Add repository as safe directory
267270
run: |
268271
git config --global --add safe.directory /__w/OpenRV/OpenRV
269-
272+
273+
- name: Install cmake
274+
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2
275+
with:
276+
cmake-version: "${{ matrix.cmake-version }}"
277+
270278
- name: Prepare Qt folder
271279
run: |
272280
mkdir -p "${{ github.workspace }}/deps"
@@ -289,7 +297,7 @@ jobs:
289297
tools: 'tools_qtcreator'
290298
set-env: 'true'
291299
tools-only: 'false'
292-
aqtversion: '==3.1.*'
300+
aqtversion: '==3.2.*'
293301

294302
- name: Patch Qt ${{ matrix.qt-version }}
295303
if: matrix.arch-type == 'x86_64'
@@ -345,6 +353,7 @@ jobs:
345353

346354
- name: Configure OpenRV
347355
run: |
356+
cmake --version
348357
cmake -B _build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT5_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
349358
350359
- name: Build OpenRV dependencies
@@ -385,7 +394,7 @@ jobs:
385394
build-type: "Release"
386395
qt-version: "5.15.2"
387396
python-version: "3.10"
388-
cmake-version: "3.29.8"
397+
cmake-version: "3.31.6"
389398
vfx-platform: "CY2023"
390399
msvc-component: "14.40.17.10.x86.x64"
391400
msvc-compiler: "14.40.33807"
@@ -394,7 +403,7 @@ jobs:
394403
build-type: "Debug"
395404
qt-version: "5.15.2"
396405
python-version: "3.10"
397-
cmake-version: "3.29.8"
406+
cmake-version: "3.31.6"
398407
vfx-platform: "CY2023"
399408
msvc-component: "14.40.17.10.x86.x64"
400409
msvc-compiler: "14.40.33807"
@@ -521,7 +530,7 @@ jobs:
521530
tools: 'tools_qtcreator'
522531
set-env: 'true'
523532
tools-only: 'false'
524-
aqtversion: '==3.1.*'
533+
aqtversion: '==3.2.*'
525534

526535
- name: Install Python dependencies
527536
run: |
@@ -551,6 +560,7 @@ jobs:
551560

552561
- name: Configure OpenRV
553562
run: |
563+
cmake --version
554564
export QT_HOME=c:/Qt/${{ matrix.qt-version }}/msvc2019_64
555565
cmake -B _build -G "Visual Studio 17 2022" -A x64 -DRV_DEPS_WIN_PERL_ROOT=c:/Strawberry/perl/bin -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT5_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
556566
shell: msys2 {0}

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ following command:
3030
git submodule update --init --recursive
3131
```
3232

33-
## Configuring Git to use the ignore file with `git blame`
33+
### Configuring Git to use the ignore file with `git blame`
3434

3535
A `.git-blame-ignore-revs` file lists commits to ignore when running `git blame`, such as formatting commits. This allows you to use `git blame` without these commits cluttering the Git history. To configure Git to use this file when running `git blame`, use the following command:
3636

@@ -64,12 +64,31 @@ the MACOSX_DEPLOYMENT_TARGET environment variable.
6464

6565
### Contributor setup
6666

67-
This repository uses a pre-commit to execute formatting before a commit. To install the pre-commit hooks:
67+
This repository uses the `pre-commit` tool to execute formatting hooks before a commit. To install the pre-commit hooks, ensure that the packages in `requirements.txt` are installed, and then run the following command:
6868

69-
```shell
69+
```bash
7070
pre-commit install
7171
```
7272

73+
#### Clang-tidy
74+
75+
It is highly suggested to enable clang-tidy locally to lint the C++ code you plan to contribute to the project. A `.clang-tidy` configuration file is present at the root of the project to help standardize linting rules. While it is recommended to use clangd (which integrates clang-tidy), you can refer to the list of other well-known clang-tidy integrations [here](https://clang.llvm.org/extra/clang-tidy/Integrations.html). For more details on how to install everything you need for your IDE, please follow the steps outlined [here](https://clangd.llvm.org/installation).
76+
77+
1. Install clangd with your package manager
78+
2. Install the clangd extension in your IDE
79+
> **Note:** For VSCode users, after installing [vscode-clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd), you need to disable [Microsoft C/C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) IntelliSense by adding `"C_Cpp.intelliSenseEngine": "disabled"` to your `settings.json`.
80+
3. Generate a `compile_commands.json` file with CMake during the [configure step](#configure)
81+
82+
```shell
83+
rvcfg -DCMAKE_EXPORT_COMPILE_COMMANDS=1
84+
```
85+
86+
4. Create a symlink to the `compile_commands.json` file in the root directory of the project so that `clangd` can locate it:
87+
88+
```shell
89+
ln -s _build/compile_commands.json compile_commands.json
90+
```
91+
7392
### Cleanup
7493

7594
To clean your build directory and restart from a clean slate, use the `rvclean` common build alias, or delete
@@ -140,6 +159,20 @@ Example:
140159
rvcfg -DRV_FFMPEG_NON_FREE_DECODERS_TO_ENABLE="aac;hevc" -DRV_FFMPEG_NON_FREE_ENCODERS_TO_ENABLE="aac"
141160
```
142161

162+
##### Apple ProRes on Apple Silicon
163+
164+
On Apple Silicon machines, Open RV supports hardware decoding through Apple's VideoToolbox framework. This feature is enabled by default but can be controlled using the `-DRV_FFMPEG_USE_VIDEOTOOLBOX` option. Set this option to `ON` to enable or `OFF` to disable VideoToolbox hardware decoding.
165+
166+
To enable decoding of ProRes media files, you must also specify the following option during the configuration step:
167+
168+
```bash
169+
-DRV_FFMPEG_NON_FREE_DECODERS_TO_ENABLE="prores"
170+
```
171+
172+
Note that you should always have `-DRV_FFMPEG_USE_VIDEOTOOLBOX` enabled when decoding Apple ProRes videos on Apple Silicon machines. Failure to do so will result in performance issues and is not compliant with Apple's licensing requirements.
173+
174+
**Important:** Before enabling ProRes decoding, you are required to obtain a proper license agreement from Apple by contacting [[email protected]](mailto:[email protected]).
175+
143176
#### Manually
144177

145178
##### Windows

cmake/dependencies/ffmpeg.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,18 @@ SET(${_force_rebuild}
259259
FALSE
260260
)
261261

262+
IF(RV_TARGET_APPLE_ARM64)
263+
SET(RV_FFMPEG_USE_VIDEOTOOLBOX_DEFAULT_VALUE
264+
ON
265+
)
266+
ELSE()
267+
SET(RV_FFMPEG_USE_VIDEOTOOLBOX_DEFAULT_VALUE
268+
OFF
269+
)
270+
ENDIF()
271+
272+
OPTION(RV_FFMPEG_USE_VIDEOTOOLBOX "FFmpeg laveraging the VideoToolbox framework" ${RV_FFMPEG_USE_VIDEOTOOLBOX_DEFAULT_VALUE})
273+
262274
# Make a list of the Open RV's FFmpeg config options unless already customized. Note that a super project, a project consuming Open RV as a submodule, can
263275
# customize the FFmpeg config options via the RV_FFMPEG_CONFIG_OPTIONS cmake property.
264276
IF(NOT RV_FFMPEG_CONFIG_OPTIONS)

0 commit comments

Comments
 (0)