MediaPlayerSetVideoCallbacks 方法 |
Set callbacks and private data to render decoded video to a custom area in memory.
Use libvlc_video_set_format() or libvlc_video_set_format_callbacks() to configure the decoded format.
Warning
Rendering video into custom memory buffers is considerably less efficient than rendering in a custom window as normal.
For optimal perfomances, VLC media player renders into a custom window, and does not use this function and associated callbacks.
It is highly recommended that other LibVLC-based application do likewise.
To embed video in a window, use libvlc_media_player_set_xid() or equivalent depending on the operating system.
If window embedding does not fit the application use case, then a custom LibVLC video output display plugin is required to maintain optimal video rendering performances.
The following limitations affect performance:
Hardware video decoding acceleration will either be disabled completely, or require(relatively slow) copy from video/DSP memory to main memory.
Sub-pictures(subtitles, on-screen display, etc.) must be blent into the main picture by the CPU instead of the GPU.
Depending on the video format, pixel format conversion, picture scaling, cropping and/or picture re-orientation,
must be performed by the CPU instead of the GPU.
Memory copying is required between LibVLC reference picture buffers and application buffers (between lock and unlock callbacks).
命名空间:
LibVLCSharp.Shared
程序集:
CPF.Vlc (在 CPF.Vlc.dll 中) 版本:0.8.8.5
语法 参见