Skip to content

Commit c780cae

Browse files
committed
version 0.22.1
1 parent d8dd731 commit c780cae

9 files changed

+99
-16
lines changed

Changelog.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
Change log:
22

3+
## 0.22.1 - 2023-09-30
4+
5+
- `VideoFrame.timestamp()` is alway readable. `TimestampEOS` indicates no more frames
6+
- Add global option `demuxer.max_errors` to continue on error if error count is less than this value
7+
- MFT:
8+
- Ignore h264 level by default
9+
- Fix adapter index if `vendor` property is set, e.g. `MFT:d3d=9:vendor=nv`
10+
- Add `mem` scheme to play from memory, url format is `mem://addr+size`
11+
- VDPAU:
12+
- Add `interop` property, can be `video`, `output` and `pixmap`. Detail: https://github.com/wang-bin/mdk-sdk/wiki/Decoders#vdpau
13+
- Use x11 display provided by user except `pixmap` interop
14+
- VAAPI: [document is updated](https://github.com/wang-bin/mdk-sdk/wiki/Decoders#vaapi)
15+
- Support GLX/EGL texture from dri3 pixmap from drm prime, via option `interop=dri3`, or fallback from `interop=x11` failure. For some drivers(intel iHD driver) it's the only 0-copy solution in GLX context because libva-x11 is broken(vaPutSurface error). `VAEntrypointVideoProc` is requred. Recommend to install `intel-media-va-driver-non-free`, because i965 and free iHD driver may lack of `VAEntrypointVideoProc`.
16+
- Support `GL_TEXTURE_EXTERNAL_OES` for `dri3` and `x11` interop, via option `external=1`
17+
- DXGI:
18+
- Fix crash in vm, or no gpu driver
19+
- Always try rgba8 if fail to create a rgb10a2 swapchain, fix d3d11 feature level 9.3 create render context error
20+
- Try the next decoder if a decoder does not produce any frame. MFT jpeg decoder may produce nothing but no error.
21+
- Fix decode error if previous decoder in decoder list failed
22+
- Fix open a decoder multiple times before trying the next decoder
23+
- Fix pause at eof then stop dead lock if `keep_open` is set(music with cover art).
24+
- Fix incorrect seek request count
25+
- CUDA: fix crash for some unsupported streams, e.g. av1 12bit
26+
- FFmpeg: fix crash if a codec is not enabled
27+
- Add `mdk.pri` for qt qmake projects. All you need is including this file
28+
- Enable full lto to reduce binary size. Thin lto was used in previous versions.
29+
30+
331
## 0.22.0 - 2023-08-31
432

533
- Add `Player.onMediaStatus(MediaStatus oldValue, MediaStatus newValue)` to simplify user code. `Player.onMediaStatusChanged` is deprecated.

README.Android.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818

1919
## About SDK for Android
2020
SDK is built with
21-
- ffmpeg: https://sourceforge.net/projects/avbuild/files/android/ffmpeg-master-android-clang-lite.tar.xz/download
22-
- ndk r25, libc++_shared
21+
- ffmpeg: https://sourceforge.net/projects/avbuild/files/android/ffmpeg-master-android-clang-lite-lto.tar.xz/download
22+
- ndk r25b for 32bit, ndk 26 for b4bit
23+
- requires ndk r23 and later because of ndk abi break in r23
2324

2425
SDK can be used by any C or C++11 compiler, e.g. g++, clang
2526

@@ -34,7 +35,7 @@ SDK can be used by any C or C++11 compiler, e.g. g++, clang
3435
### [Supported Decoders:](https://github.com/wang-bin/mdk-sdk/wiki/Decoders)
3536
- FFmpeg
3637
- MediaCodec: FFmpeg mediacodec implementation
37-
- AMediaCodec: builtin mediacodec implementation, using libmediandk or java api. propertyes: "surface" = "0" or "1", "copy" = "0" or "1" when "surface" is "0", "java" = "0" or "1"(use java or mediandk), "async" = "0" or "1"(android 9.0 is required by async mode)
38+
- AMediaCodec: builtin mediacodec implementation, using libmediandk or java api
3839

3940
MediaCodec/AMediaCodec decoder will not be destroyed if app go to background, and continues to work when resumed.
4041

@@ -43,15 +44,22 @@ MediaCodec/AMediaCodec decoder will not be destroyed if app go to background, an
4344
- AudioTrack (default)
4445

4546
### Data Source
46-
- "content:"
47-
- "android.resource:"
47+
- `content:`
48+
- `android.resource:`
49+
- `assets:`
4850

4951
### Use in CMake Projects
5052
```
5153
include(mdk-sdk-dir/lib/cmake/FindMDK.cmake)
5254
target_link_libraries(your_target PRIVATE mdk)
5355
```
5456

57+
### Recommended settings
58+
```cpp
59+
SetGlobalOption("JavaVM", JvmPtr); // REQUIRED
60+
player.setDecoders(MediaType::Video, {"AMediaCodec", "FFmpeg", "dav1d"});
61+
````
62+
5563
## Source code:
5664
- [some examples using mdk sdk](https://github.com/wang-bin/mdk-examples)
5765
- [OBS Studio plugin](https://github.com/wang-bin/obs-mdk)

README.Linux.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
## About SDK for Linux
2121
SDK is built by clang 17 with
22-
- ffmpeg: https://sourceforge.net/projects/avbuild/files/linux/ffmpeg-master-linux-clang-lite.tar.xz/download
23-
- libc++ 17
22+
- ffmpeg: https://sourceforge.net/projects/avbuild/files/linux/ffmpeg-master-linux-clang-lite-lto.tar.xz/download
23+
- libc++ 17. You can use delete libc++.so from sdk and use system libc++
2424

2525
SDK can be used by any C or C++11 compiler, e.g. g++, clang
2626

@@ -88,6 +88,18 @@ N videos renderers for 1 player: multiwidnows url
8888
target_link_libraries(your_target PRIVATE mdk)
8989
```
9090

91+
### Recommended settings
92+
- Linux:
93+
```cpp
94+
// XInitThreads(); // If using x11. before any x11 api call. some gui toolkits already call this, e.g. qt, glfw
95+
SetGlobalOption("X11Display", DisplayPtr); // If using x11. Requred by VAAPI, VDPAU
96+
player.setDecoders(MediaType::Video, {"VAAPI", "VDPAU", "CUDA", "hap", "FFmpeg", "dav1d"});
97+
```
98+
- Raspberry Pi: use [mdk-sdk-linux.tar.xz](https://sourceforge.net/projects/mdk-sdk/files/nightly/mdk-sdk-linux.tar.xz/download), delete libffmpeg.so.* to use system ffmpeg to support h264, hevc hardware decoder and 0-copy rendering
99+
```cpp
100+
player.setDecoders(MediaType::Video, {"V4L2M2M", "FFmpeg:hwcontext=drm", "FFmpeg"});
101+
```
102+
91103
## Source code:
92104
- [some examples using mdk sdk](https://github.com/wang-bin/mdk-examples)
93105
- [OBS Studio plugin](https://github.com/wang-bin/obs-mdk)

README.WinRT.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
## About SDK for Windows Store
2020
SDK is built by
21-
- clang-cl 17, with Windows SDK 10.0.19041.0, MSVC CRT 14.28.29333, [FFmpeg](https://sourceforge.net/projects/avbuild/files/uwp/ffmpeg-master-uwp-vs2022-lite.tar.xz/download)
22-
- latest VS2022 with [FFmpeg](https://sourceforge.net/projects/avbuild/files/uwp/ffmpeg-master-uwp-vs2022-lite.tar.xz/download)
21+
- latest VS2022 with [FFmpeg](https://sourceforge.net/projects/avbuild/files/uwp/ffmpeg-master-uwp-vs2022-lite.7z/download)
2322

2423
### Use in Visual Studio
2524
#### Install via NuGet (Recommended)
@@ -39,6 +38,11 @@ Once installed or imported, necessary compile flags and link flags will be added
3938
target_link_libraries(your_target PRIVATE mdk)
4039
```
4140

41+
### Recommended settings
42+
```cpp
43+
player.setDecoders(MediaType::Video, {"MFT:d3d=11", "D3D11", "CUDA", "hap", "FFmpeg", "dav1d"});
44+
```
45+
4246
4347
### [Runtime Requirements](https://github.com/wang-bin/mdk-sdk/wiki/System-Requirements#uwp)
4448
Optional:

README.Windows.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
## About SDK for Windows Desktop
2323
SDK is built by
24-
- clang-cl 17, with Windows SDK 10.0.19041.0, MSVC CRT 14.28.29333, [FFmpeg](https://sourceforge.net/projects/avbuild/files/windows-store/ffmpeg-master-windows-desktop-vs2022-lite.tar.xz/download)
25-
- latest VS2022 with [FFmpeg](https://sourceforge.net/projects/avbuild/files/windows-store/ffmpeg-master-windows-desktop-vs2022-lite.tar.xz/download)
24+
- latest VS2022 with [FFmpeg](https://sourceforge.net/projects/avbuild/files/windows-desktop/ffmpeg-master-windows-desktop-vs2022-lite.7z/download)
2625

2726
SDK can be used by any C or C++11 compiler, e.g. vs2015, vs2022, mingw g++, clang
2827

@@ -45,6 +44,11 @@ Once installed or imported, necessary compile flags and link flags will be added
4544
target_link_libraries(your_target PRIVATE mdk)
4645
```
4746

47+
### Recommended settings
48+
```cpp
49+
player.setDecoders(MediaType::Video, {"MFT:d3d=11", "D3D11", "CUDA", "hap", "FFmpeg", "dav1d"});
50+
```
51+
4852
4953
### [Runtime Requirements](https://github.com/wang-bin/mdk-sdk/wiki/System-Requirements#windows-desktop)
5054
- Vista+

README.iOS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ https://github.com/wang-bin/swiftMDK
2121

2222
## About SDK for iOS
2323
SDK is built by Xcode 14 with
24-
- ffmpeg: https://sourceforge.net/projects/avbuild/files/iOS/ffmpeg-master-iOS-lite.tar.xz/download
24+
- ffmpeg: https://sourceforge.net/projects/avbuild/files/iOS/ffmpeg-master-iOS-lite-lto.tar.xz/download
2525
- Minimal system: iOS 8.0
2626
- Support Metal renderer
2727

@@ -45,6 +45,11 @@ Choose any of
4545
- Add mdk.xcframework to your project(Embed & Sign)
4646
- install via cocoapods `pod 'mdk'`
4747

48+
49+
### Recommended settings
50+
51+
- macOS, iOS: `player.setDecoders(MediaType::Video, {"VT", "hap", "FFmpeg", "dav1d"});`
52+
4853
#### Code Sign
4954
Choose any of
5055
- In `Build Settings` add `--deep` to `Other Code Signing Flags`

README.macOS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ https://github.com/wang-bin/swiftMDK
2727
- Support X11 if runtime libraries exist
2828

2929
SDK is built by Xcode 14 with
30-
- ffmpeg: https://sourceforge.net/projects/avbuild/files/macOS/ffmpeg-master-macOS-lite.tar.xz/download
30+
- ffmpeg: https://sourceforge.net/projects/avbuild/files/macOS/ffmpeg-master-macOS-lite-lto.tar.xz/download
3131

3232
### macOS 10.15+
3333
Executables download from internet are not able to run. Try
@@ -70,6 +70,10 @@ N videos renderers for 1 player: multiwidnows url
7070
target_link_libraries(your_target PRIVATE mdk)
7171
```
7272

73+
### Recommended settings
74+
75+
- macOS, iOS: `player.setDecoders(MediaType::Video, {"VT", "hap", "FFmpeg", "dav1d"});`
76+
7377
### Use in Xcode
7478
Choose any of
7579
- Add mdk.xcframework to your project(Embed & Sign)

nuget/README.md

100755100644
Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
## About SDK for Windows Desktop & UWP
2525
SDK is built by
26-
- latest VS2022 with [FFmpeg](https://sourceforge.net/projects/avbuild/files/windows-store/ffmpeg-master-windows-desktop-vs2022-lite.tar.xz/download)
26+
- latest VS2022 with [FFmpeg](https://sourceforge.net/projects/avbuild/files/windows-desktop/ffmpeg-master-windows-desktop-vs2022-lite.7z/download)
2727

2828
SDK can be used by any C or C++11 compiler, e.g. vs2015, vs2022, mingw g++, clang
2929

@@ -33,6 +33,24 @@ SDK can be used by any C or C++11 compiler, e.g. vs2015, vs2022, mingw g++, clan
3333
target_link_libraries(your_target PRIVATE mdk)
3434
```
3535

36+
### Qt qmake project
37+
```qmake
38+
include($$MDK_SDK_DIR/mdk.pri)
39+
```
40+
41+
42+
### Recommended settings
43+
```cpp
44+
player.setDecoders(MediaType::Video, {"MFT:d3d=11", "D3D11", "CUDA", "hap", "FFmpeg", "dav1d"});
45+
```
46+
47+
#### Live streams (RTSP, RTMP etc.) low latency
48+
```cpp
49+
player.setProperty("avformat.fflags", "+nobuffer");
50+
player.setProperty("avformat.analyzeduration", "10000");
51+
player.setProperty("avformat.probesize", "1000");
52+
player.setProperty("avformat.fpsprobesize", "0");
53+
```
3654

3755
### [Runtime Requirements](https://github.com/wang-bin/mdk-sdk/wiki/System-Requirements#windows-desktop)
3856
- Vista+
@@ -73,4 +91,4 @@ Optional:
7391

7492

7593
Copyright (c) 2016-2023 WangBin(the author of QtAV) <wbsecg1 at gmail.com>
76-
Free for opensource softwares, non-commercial softwares, QtAV donors and contributors.
94+
Free for opensource softwares, non-commercial softwares, flutter, QtAV donors and contributors.

nuget/mdk.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>mdk</id>
5-
<version>0.22.0.0</version>
5+
<version>0.22.1.0</version>
66
<title>MDK</title>
77
<authors>Wang Bin</authors>
88
<owners>Wang Bin</owners>

0 commit comments

Comments
 (0)