media player examples based on mdk sdk. runs on all platforms. Download the latest sdk
About libmdk sdk: https://github.com/wang-bin/mdk-sdk
https://github.com/wang-bin/fvp
- has the most features
- use glfw context as foreign context mode
- use glfw window to create render loop and gl/d3d11/metal/vulkan context internally
1 player per window
many windows as render targets sharing the same player
Gapless play/seek multiple videos like a single video
minimal glfw example
- use
CAOpenGLLayer
as foreign context - use NSView to create render loop and gl context internally
Legacy Obj-C OpenGLES2 example
- HelloTriangle: Using mdk sdk to play video in Apple's official example https://developer.apple.com/documentation/metal/using_a_render_pipeline_to_render_primitives?language=objc
- OCPlayer: macOS only. via cocoapods
- SwiftMdkExample: supports macOS, iOS, macCatalyst. via submodule swiftMDK. requires mdk.xcframeworks
- SwiftPlayer: macOS only. via cocoapods
examples without platform specific code
- mdkplay: a mininal player with internally created platform dependent window/surface and opengl context, also create render loop and gl context
- DecodeFps: a tool to test decoder performance. `./DecodeFps [-c:v DecoderName] file"
- offscreen: offscreen rendering guide
- Integrate with QOpenGLWindow and QOpenGLWidget. Use gl context provided by Qt.
- Render on QOpenGLWindow and QOpenGLWidget via gl context provided by Qt
- QML example via QOpenGLFrameBuffer
- RHI example: vulkan, d3d11, metal, opengl
Use gl context provided by SDL
- Use gl context provided by SFML
- Render to SFML texture
UWP example, supports D3D11, and ANGLE GLES2
- use
Windows::UI::Core::CoreWindow
as platform dependent surface to create render loop and gl context internally - use App provided gl context
- Use
Windows::UI::Xaml::Controls::SwapChainPanel
as platform dependent surface to create render loop and gl context internally - Switch between 2 render targets
use gl to render, (Only test on Windows x64).