Releases: wang-bin/mdk-sdk
Releases Β· wang-bin/mdk-sdk
v0.30.1
Version 0.30.0
- API:
- Add
Player.appendBuffer()
to play streams with user provided data, for example data is from websocket. media protocol isstream
, i.e.player.setMedia("stream:empty_or_any_string")
.setTimeout()
can abort current playback if timedout to read data from user.
- Add
- Plain text subtitle(srt for example) style can be changed by user via subtitle properties
- Multi channels audio rendering, no downmix to stereo
- Support dolby vision in mpeg ts
- PulseAudio is the default audio render for linux
- Improve audio renderer delay and AV sync
- VT: Fix hardware decoder disabled if hvcC has no PS NALUs
- D3D11:
- Fix UMA check if run x64 on arm64 and failed to create textures
- Disable cross context 0-copy for AMD gpus to avoid corrupt result on many gpus
- Set usage for swapchain, fix back buffer RTV create error on some win7 devices
- VAAPI:
- Map YUYV fourcc, fix jpeg yuv 422 rendering
- Convert to RGB with VPP if DRM to EGLImage is not possible(desktop gl + external only formats)
- DRM Prime:
- Error if no OpenGL ES2/3 context for external only formats, then VAAPI can fallback to suboptimal rendering instead of blank
- Map more formats
- Player property "audio.tracks", "video.tracks" and "subtitle.tracks" is same as
setActiveTracks()
, value is a int list string, e.g."0,1"
- Reset more callbacks before deleting player object to simplify user code
- Fix undefined symbol on wayland < 1.10, compatible with more linux distributions, e.g. ubuntu 14.04
- More packed yuv formats
- MFT: fix d3d9 not tried if d3d11 is not supported
- Fix null callback invoked if reset by user
- Will try to load Ass.framework on apple OS except macOS, to be compatible with media-kit's frameworks
- FFmpeg: Fix wromg abi version if avfilter is disabled when swresample is loaded and crash, e.g. qt6's ffmpeg dlls
- Add nvjpeg2000 plugin for windows x64, requires cudart64_12.dll and nvjpeg2k_0.dll
- Compatible with libc++20
Version 0.29.1
- Android 64bit is built with 16KB page size support
- Supprt GL_EXT_EGL_image_storage for drm, via global option "eglimage.storage=1"
- VAAPI: prefer x11 display to support both EGL and GLX
- Add privacy manifest for apple platforms
- Improve demuxer cache
- Enable http reconnect
- Fix OpenGL symbols not resolved on android 15 emulator
- Fix snapshot in OpenGL renderers
- Fix snapshot callback not invoked if failed
- Fix muxer write after close
- Fix a decoder crash when stopping playback
- Fix waitFor(State::Stopped)
- Stop demuxer immediately if io is aborted.
- Apply ffmmpeg muxer options
- Prefer ffmpeg dynamic library even if statically linked. mainly used by iOS user provided FFmpeg.framework
Version 0.29.0
- Support demuxer cache for http(s), can be enabled via
player.setProperty("demux.buffer.ranges", "8"/*or other positive int*/)
.{count, "cache.ranges"}
event will be triggered when cached time ranges are created, dropped(via LRU cache) or merged. Other protocols can be enabled via player propertyplayer.setProperty("demux.buffer.ranges", "http,https,proto1,proto2");
. - Add
Player.bufferedTimeRanges()
- Dolby vision: support reading metadata from av1 in all decoders, previously only supported by ffmpeg hwaccels and software decoder.
- Support pause/resume rtsp stream in
Player.set(State)
. Enable viaplayer.setProperty("reader.pause", "1");
. - Record video from non-key frame if property "reader.starts_with_key" is "0"
- Support nvJPEG2000 as a plugin
- Support planar xyz format, produced by nvJPEG2000
- Support p012, p212, p412, can be produced by VT decoder(can be tested with VT:fourcc=tv20)
- OpenGL:
- Detect(guess) invalid foreign context, usually in old OSes(ubuntu 20.04) and with
GLRenderAPI.getProcAddress
set by user. - Fix blank display if failed update textures
- Detect(guess) invalid foreign context, usually in old OSes(ubuntu 20.04) and with
- D3D11: fix crash if decoder and renderer adapters are different
- Metal:
- Set layer scale, fix low resolution
- Build highest shader version
- VT: support ProRes without fourcc
- VAAPI:
- Prefer drm display over x11, less errors, better performance
- Fix upload unmapped host memory crash
- Fix wrong channels in recorded pcm
- Fix prepare callback not invoked if decoder changed
- Fix rgb48be rendering
- FFmpeg
- Improve abi compatibility, found in x86 32bit ffmpeg 4.x
- Fix flipped frame in avfilter
- Compatible with msvcp 14.40+
Version 0.28.0
- Support rendering in a foreign render pass for all renderers. Previously only foreign opengl context are implemented. The performance should be better than rendering to texture. Now it's able to render in a Qt RHI window
- Support decoding A53 closed caption in all video decoders. Previously only supported by ffmpeg hwaccels and software decoder. Can be disabled by player property "cc=0".
- Add new player properties: "buffer", "audio.decoders", "video.decoders". Convenient to control player in flutter.
- Support video frames with negative stride, frames are vertically flipped
- BRAW: support 4.0 SDK, compatible with 3.0
- Improve NALU start code and EBP search
- VT decoder:
- fix hevc mpegts decode error after seek
- max continuous session restart on error is 1 by default, controlled by property "error=1"
- MFT: fix mf shutdown too early and crash when releasing a sample after stop
- Fix CUDA decoder error after seek. It's a regression in the previous release.
- OpenGL: Fix UBO error, requires glsl150(OpenGL 3.2, ES 3.0)
- Fix alpha channel value of render target when blending subtitle, now output alpha >= background alpha
- Fix multiple frames rendered if prepare() without play
- Fix wrong position() value after prepare() without play
- Fix buffering progress value
- Fix play a new media if previously an individual audio track file/url is used
- Fix endless wait when buffering on apple
- Fix audio channels on apple
- Fix no frame decoded if decoder changed when seeking
- Vulkan: fix wsi extension check
- Metal: fix layer colorspace and disable EDR for SDR
- Fix wrong frame height if copy DX9/11 textures to host memory
- Fix negative duration and start time for live streams, should be 0
Version 0.27.0
- Dolby Vision profile 5 support:
- Works for all renderers: OpenGL, D3D11/12, Metal, Vulkan
- Support SDR and HDR10 display
- Works for all decoders. For ffmpeg software decoder and hwaccels, dolby vision metadata are parsed by ffmpeg. For other decoders including ffmpeg external decoders and mdk hardware decoders, metadata is parsed in mdk
- AMediaCodec system dolby vision decoder is disabled by default(previously was enabled). Can turn on via property "dv=1".
- Improve gpu const buffer/uniform update for all renderers
- OpenGL: Support UBO. Enabled for OpenGLES >= 3.0, OpenGL >= 3.1 or extension
GL_ARB_uniform_buffer_object
is supported. Can be disabled via global option "gl.ubo=0" or env var "GL_UBO=0" - Fix blank display when switching to some videos
- Fix dx swapchain colorspace support check
- Reset some callbacks when destroying player
- Add option "reader.starts_with_key", "0" can decode from non-key. Can be used to reduce latency of network stream
- C++ API:
- Fix callbacks are not thread safe
- Fix MediaStatus callback register only once
- Fix seek, prepare, snapshot callbacks
- Fix video with a single frame not decoded until EOS
- Fix blank display if play another video with only different color primaries
- Fix packet drop
- Fix seek after EOS demuxed
- Use display p3 if hdr10 metadata is invalid
- Read duration from metadata if stream duration is unknown
- Set android application context automatically for ffmpeg 7.0+
- Prefer AudioTrack over OpenSLES
- FFmpeg: Add avformat.video/audio/subtitle_codec_id options
Version 0.26.0
- Support WinUI3.
updateNativeSurface()
acceptsSwapChainPanel
as surface like UWP - Enable UWP features for windows desktop
- Support visionOS
- Add metadata change event
MediaEvent{.category = "metadata"}
, new metadata can be read fromPlayer.mediaInfo().metadata
. Useful to get icy metadata for SHOUTcast. - D3D11:
- Support sync via kmt, requires env var
D3D11_ZERO_COPY=0
andD3D11_KMT=1
- Ignore RTV creation error for shader resource, e.g. textures produced by MFT software decoder via
d3d=11
- Support sync via kmt, requires env var
- Vulkan:
- Enable pipeline cache
- Select the 1st physical device provided by vulkan by default, previously try to use a discrete device
- Fix
Player.WaitFor()
may return wrong value - Fix YCgCo rendering
- Add global option
plugins.dir
- Android: link to
libmediandk.so
for 64bit targets - macOS: fix audio data dropped when paused and results in wrong playback speed
- BRAW, R3D:
- Fix a crash when stopped
- (R3D) Fix crash if seek a video without audio track if the previous media has a audio track
- Build with R3DSDK 8.5.1
- Support macOS appex, see the QuickLook plugin. mdk now weak link to r3d and braw to work in sandbox
- Fix failed to play a normal video after braw/r3d in the same player instance
- braw sdk now can be loaded from a custom dir from global option
BRAWSDK_DIR
- (BRAW) Fix some memory leaks
- FFmpeg:
- Support FFmpeg 7.0, now supported runtime versions are 4.0~7.0. Default build version is 6.1, you can remove bundled ffmpeg and add 7.0 shared library|ies to try the new version.
- Can use avio directly via global option
io.avio=1
, default is via a custom avio
- Swift: support cocoapods and swit package manager
Version 0.25.0
- D3D11:
- Improve gpu and cpu 0-copy rendering. Some AMD gpus are disabled because the result is wrong. Can be disabled by environment var
D3D11_ZERO_COPY=0
- Improve sync if copy, decode, draw device contexts are different
- Enable shader_resource in D3D11 decoder by default to support gpu 0-copy rendering, lower gpu load.
- limit highest feature level to 12.1 to fix device create error
- Support global device via SetGlobalOption("d3d11.device", devPtr) for both decoders and renderers, then gpu 0-copy will be enabled without issues found in cross device 0-copy, but performance may be lower than cross device 0-copy(tested 8k 60fps av1 hdr with RTX3050)
- Improve gpu and cpu 0-copy rendering. Some AMD gpus are disabled because the result is wrong. Can be disabled by environment var
- D3D12: sync between D3D12/MFT:d3d=12 decoder and renderer
- MFT:
shader_resource
option default value is1
for MFT:d3d=11 to support 0-copy rendering - VideoFrame can import an existing d3d11 or d3d9 resources
- Support tvOS
- VT decoder: enable av1, not tested
- CUDA decoder: skip av1C header to fix parse error
- OpenGL: Support GL_EXT_YUV_target, used by android hardware decoder rendering, can be enabled via env var
GL_YUV_SAMPLER=1
- Fix dead lock if output too many frames in 1 decode
- Fix video size event not triggered for custom readers, e.g. braw and r3d
- Improve overlay rendering
- Wayland: support xdg-shell
- Set subtitle fonts dir and default font file via global option "subtitle.fonts.dir" and "subtitle.fonts.file". Useful for android(lacks of many system fonts). Android subtitle font can be an asset, and then
SetGlobalOption("subtitle.fonts.file", "assets://sub_font_path.ttf")
- Android: add libass.so in sdk, and will be bundled into your app if use FindMDK.cmake. Remove libass.so from sdk if you don't need it
- Linux: libc++18 compatible
Version 0.24.0
- OpenGL:
- GLRenderAPI.getProcAddress now works, can be provided by user. If not provided, will try to use standard GL library names
- Support hardware decoder rendering in multiple renderers and multiple threads.
- Vulkan:
- Support hdr metadata if render context is created in the library via
updateNativeSurface
- Support scRGB swapchain
- Fix invalid framebuffer after resetting render pass(resize error in qmlrhi example).
- Support hdr metadata if render context is created in the library via
- Ensure swapchain bufferfs are cleared after stop. Previously only clear once, may result in showing blank image and the last frame repeatly.
- Improve audio/video track switch
Player.setActiveTracks()
, fast and accurate - Improve (mpegts) program switch
Player.setActiveTracks(MediaType::Unknown, )
, fast and accurate - If use
updateNativeSurface()
, vo_opaque must be thesurface
parameter. - VT: Support mpeg4
- AMediaCodec/MediaCodec:
- property "surface" and "window" to enable tunnel mode, the value is
Surface
jobject andANativeWindow*
value string(Previously "surface" value wasANativeWindow*
). - Increase image queue size to reduce acquire errors. max images can be set via decoder property "images=N" or
player.setProperty("video.decoder", "N")
, where N > 1
- property "surface" and "window" to enable tunnel mode, the value is
- Player.record will choose a suitable format if the format guessed from url does not support all codecs. Select correct format for rtmp and rtsp.
- Recorded timestamp is continious and monotonicity by default, required by live streaming. Previous behavior can be enabled by
Player.setProperty("recorder.copyts", "1")
- Add
MediaEvent{track, "video", "size", {width, height}}
to indicate video track size change,MediaInfo.video[track].width/height
also change changes - Improve decoder change event
MediaEvent{track, "decoder.video", decoderName, stream}
, decoderName of hardware decoders is the alias name(e.g. VAAPI), software decoder name is always "FFmpeg". Previously hardware decoderName may be FFmpeg - Improve packet drop
- iOS: try to load ass.framework and dav1d.framework instead of .dylib
- Subtitle: ignore invalid ass images to fix crash
- Fix crash if audio channels > 8
- Fix thread safe issues for callback setting apis.
- Fix scRGB map in DX and apple
- Fix mpeg4 mosaic after seek
- Fix cmake3.28 xcframework error
- FFmpeg:
- Add
D3D12
decoder, alias ofFFmpeg:hwcontext=d3d12va
D3D12
decoder supports 0-copy rendering in a d3d12 renderer- Fix wrong audio time base of filter output
- Fix a potential crash in hw decoder copy mode
- Add
- New .NET binding and Avalonia example
Version 0.23.1
- HDR
- Fix scRGB white level scale
- Add ColorSpaceExtendedSRGB and ColorSpaceExtendedLinearSRGB. scRGB is used on windows, lumiance is scene referred, while ExtendedLinearSRGB(used on apple) is display referred
- Vulkan:
- Compress built-in spv via smol-v
- Add spv for scRGB output
- Support build shader via shaderc shared library(shaderc_shared.dll, libshaderc_shared.so{,.1}, libshaderc_shared{.1,}.dynamic) if no built-in spv found.
- Add
VideoStreamInfo.image
as audio cover art image - Apply rotation in recorded video
- Add
MediaEvent{track, "decoder.video", "size", {width, height}}
indicates video frame size changed, value inMediaInfo
is also updated - Add
player.setProperty("avcodec.opt_name", "opt_val")
to applyAVCodecContext
options. For video only codecs, you can also useplayer.setProperty("video.decoder", "opt_name=opt_val")
; - Do not sync to audio if no audio decoded
- AMediaCodec: add property "name" to force a codec name, e.g.
AMediaCodec:name=c2.android.hevc.decoder
. - MFT: fix d3d=11 driver bug (receive MF_E_TRANSFORM_STREAM_CHANGE endlessly)
- Fix
setBufferRange()
dropping mode incorrectly drops audio packets - Fix some dead locks