Skip to content

Libvlc4 api update#434

Open
mfkl wants to merge 10 commits into
videolan:masterfrom
mfkl:libvlc4-api-update
Open

Libvlc4 api update#434
mfkl wants to merge 10 commits into
videolan:masterfrom
mfkl:libvlc4-api-update

Conversation

@mfkl

@mfkl mfkl commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

mfkl added 10 commits July 1, 2026 14:43
Wrap the new libvlc_parser_t (MediaParser) with Task-based parse/thumbnail
helpers that replace the removed libvlc_media_parse_*/thumbnail_request_* entry
points, and update the Picture/PictureList bindings used to return generated
thumbnails.
…VLC 4

Adjust the marshaled structures for LibVLC 4: media track gains the I1-marshaled
id_stable/selected bool fields, ModuleDescription.HelpHtml, the OutputCallbacks
union, and the microsecond TimePoint/MediaPosition time base. Add the shared
MarshalUtils.NewCompletionSource helper and minor marshaling/core tweaks.
Dialog callbacks gain the version field and split error callback with get/set
context. MediaDiscoverer switches release to destroy and marshals is_running as
I1; both discoverers are adjusted for the LibVLC 4 API.
Reroute Media.ParseAsync/GenerateThumbnailAsync through the new parser, add
IsParsed and mark ParsedStatus/ParseStop obsolete, and update durations to the
microsecond time base. Adapt the Media and MediaList wrappers to the LibVLC 4
API and expose the hooks the managed event dispatchers bridge onto.
Update MediaPlayer for the LibVLC 4 API: microsecond SeekTo/time, the track
list/selection entry points with I1-marshaled bool params, PlayAsync(Media),
and async helpers routed through the shared completion-source factory. Harden
LibVLC/MediaPlayer disposal against double-dispose and unset-without-set.
LibVLC 4 removed libvlc_event_attach/detach and the per-object event managers.
Event delivery now flows through versioned libvlc_*_cbs callback structs passed
at construction: EventManager becomes a managed-only dispatcher
(Register/Unregister/FromOpaque) and MediaPlayer, RendererDiscoverer and
MediaDiscoverer build one shared native cbs struct with a per-instance opaque.

Media and MediaList no longer have a native event source, so their existing
public event APIs are re-surfaced by bridging from the media player callbacks
(parsed/meta/subitems/attachments) and by synthesizing media-list add/remove
events from the managed wrapper mutations. This commit completes the build
started by the bindings migration.
Add NativeBindingAssertions and rework LibVLCAPICoverage to assert, by type,
that the LibVLC 4 entry points and versioned callback structs are bound and that
removed LibVLC 3 APIs are no longer exposed. Add MediaParserTests for the new
parser bindings and bump the native VideoLAN.LibVLC.Windows test package to a
LibVLC 4 build.
Drive the playback tests through PlayAsync/StopAsync with bounded polling for
tracks, seekable and selection state instead of fixed delays, and use dummy
aout/vout so they no longer depend on a working audio device. TrackDescription
pauses right after playback starts so the short sample does not reach EOF before
selection is queried, and the discoverer test waits for the stop to complete.
Dispose the LibVLC instance per test and share StopWithTimeout /
NewCompletionSource from BaseSetup.
Route the attached-thumbnails picture test through the new MediaParser API,
make the error-dialog test resilient with a bounded wait and contains-based
assertions, and update the event/renderer discoverer tests for the LibVLC 4
event flow.
A minimal console sample that generates a thumbnail from a media file using the
new LibVLC 4 parser/thumbnail API (Media.GenerateThumbnailAsync).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant