This class provides static methods to interact with the LibVLC library. It allows for the creation and management of VLC instances, media players, and media objects, as well as the handling of audio, video, and events.

Static methods

@:native("libvlc_new")staticalloc(argc:Int, argv:RawPointer<ConstCharStar>):RawPointer<LibVLC_Instance_T>

Allocates and initializes a LibVLC instance.

Parameters:

argc

Number of arguments.

argv

Argument values.

Returns:

Pointer to the new LibVLC instance.

@:native("libvlc_audio_get_delay")staticaudio_get_delay(p_mi:RawPointer<LibVLC_Media_Player_T>):Int64

Gets the audio delay.

Parameters:

p_mi

Pointer to the media player.

Returns:

The audio delay in microseconds.

@:native("libvlc_audio_get_track")staticaudio_get_track(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the current audio track.

Parameters:

p_mi

Pointer to the media player.

Returns:

The audio track ID, or -1 if no active input.

@:native("libvlc_audio_get_track_count")staticaudio_get_track_count(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the number of available audio tracks.

Parameters:

p_mi

Pointer to the media player.

Returns:

The number of available audio tracks, or -1 if unavailable.

@:native("libvlc_audio_get_track_description")staticaudio_get_track_description(p_mi:RawPointer<LibVLC_Media_Player_T>):RawPointer<LibVLC_Track_Description_T>

Gets the description of available audio tracks.

Parameters:

p_mi

Pointer to the media player.

Returns:

Pointer to the list containing descriptions of available audio tracks, or null. It must be freed with libvlc_track_description_list_release().

@:native("libvlc_audio_get_volume")staticaudio_get_volume(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the current software audio volume.

Parameters:

p_mi

Pointer to the media player.

Returns:

The software volume in percent (0 = mute, 100 = nominal / 0dB).

@:native("libvlc_audio_set_callbacks")staticaudio_set_callbacks(mp:RawPointer<LibVLC_Media_Player_T>, play:LibVLC_Audio_Play_CB, pause:LibVLC_Audio_Pause_CB, resume:LibVLC_Audio_Resume_CB, flush:LibVLC_Audio_Flush_CB, drain:LibVLC_Audio_Drain_CB, opaque:RawPointer<Void>):Void

Sets the audio callbacks.

Parameters:

mp

Pointer to the media player.

play

Audio play callback.

pause

Audio pause callback.

resume

Audio resume callback.

flush

Audio flush callback.

drain

Audio drain callback.

opaque

Pointer to the opaque data.

@:native("libvlc_audio_set_delay")staticaudio_set_delay(p_mi:RawPointer<LibVLC_Media_Player_T>, i_delay:Int64):Int

Sets the audio delay.

Parameters:

p_mi

Pointer to the media player.

i_delay

The new audio delay in microseconds.

Returns:

0 on success, -1 on failure.

@:native("libvlc_audio_set_format")staticaudio_set_format(mp:RawPointer<LibVLC_Media_Player_T>, format:ConstCharStar, rate:UInt32, channels:UInt32):Void

Sets the audio format.

Parameters:

mp

Pointer to the media player.

format

Audio format string.

rate

Sample rate.

channels

Number of audio channels.

@:native("libvlc_audio_set_format_callbacks")staticaudio_set_format_callbacks(mp:RawPointer<LibVLC_Media_Player_T>, setup:LibVLC_Audio_Setup_CB, cleanup:LibVLC_Audio_Cleanup_CB):Void

Sets the audio format callbacks.

Parameters:

mp

Pointer to the media player.

setup

Audio format setup callback. This callback is invoked to configure the audio format.

cleanup

Audio format cleanup callback. This callback is invoked to clean up after the audio format is no longer needed.

@:native("libvlc_audio_set_track")staticaudio_set_track(p_mi:RawPointer<LibVLC_Media_Player_T>, i_track:Int):Int

Sets the current audio track.

Parameters:

p_mi

Pointer to the media player.

i_track

The track ID (i_id field from track description).

Returns:

0 on success, -1 on error.

@:native("libvlc_audio_set_volume")staticaudio_set_volume(p_mi:RawPointer<LibVLC_Media_Player_T>, i_volume:Int):Int

Sets the current software audio volume.

Parameters:

p_mi

Pointer to the media player.

i_volume

The volume in percent (0 = mute, 100 = 0dB).

Returns:

0 if the volume was set, -1 if it was out of range.

@:native("libvlc_audio_set_volume_callback")staticaudio_set_volume_callback(mp:RawPointer<LibVLC_Media_Player_T>, set_volume:LibVLC_Audio_Set_Volume_CB):Void

Sets the audio volume callback.

Parameters:

mp

Pointer to the media player.

set_volume

Audio set volume callback.

@:native("libvlc_delay")staticdelay(pts:Int64):Int64

Returns the delay (in microseconds) until a certain timestamp.

Parameters:

pts

The timestamp.

Returns:

A negative value if the timestamp is in the past, a positive value if it is in the future.

@:native("libvlc_errmsg")staticerrmsg():ConstCharStar

Gets the last error message.

Returns:

The last error message.

@:native("libvlc_event_attach")staticevent_attach(p_event_manager:RawPointer<LibVLC_Event_Manager_T>, i_event_type:Int, f_callback:LibVLC_Callback_T, user_data:RawPointer<Void>):Int

Attaches an event callback.

Parameters:

p_event_manager

Pointer to the event manager.

i_event_type

Type of the event.

f_callback

Event callback function.

user_data

User data to pass to the callback.

Returns:

0 on success, -1 on failure.

@:native("libvlc_event_detach")staticevent_detach(p_event_manager:RawPointer<LibVLC_Event_Manager_T>, i_event_type:Int, f_callback:LibVLC_Callback_T, user_data:RawPointer<Void>):Void

Detaches an event callback.

Parameters:

p_event_manager

Pointer to the event manager.

i_event_type

Type of the event.

f_callback

Event callback function.

user_data

User data passed to the callback.

@:native("libvlc_event_type_name")staticevent_type_name(event_type:Int):ConstCharStar

Get an event's type name.

Parameters:

event_type

the desired event

@:native("libvlc_get_changeset")staticget_changeset():ConstCharStar

Gets the LibVLC changeset.

Returns:

The changeset string.

@:native("libvlc_get_compiler")staticget_compiler():ConstCharStar

Gets the LibVLC compiler information.

Returns:

The compiler information string.

@:native("libvlc_get_version")staticget_version():ConstCharStar

Gets the LibVLC version.

Returns:

The LibVLC version string.

@:native("libvlc_log_get_context")staticlog_get_context(ctx:RawConstPointer<LibVLC_Log_T>, module:RawPointer<ConstCharStar>, file:RawPointer<ConstCharStar>, line:RawPointer<UInt32>):Void

Gets log message debug information.

This function retrieves self-debug information about a log message: - the name of the VLC module emitting the message, - the name of the source code module (i.e., file), and - the line number within the source code module.

The returned module name and file name will be null if unknown. The returned line number will similarly be zero if unknown.

Parameters:

ctx

Message context (as passed to the libvlc_log_cb callback).

module

Module name storage (or null) [OUT].

file

Source code file name storage (or null) [OUT].

@:native("libvlc_log_set")staticlog_set(p_instance:RawPointer<LibVLC_Instance_T>, cb:LibVLC_Log_CB, data:RawPointer<Void>):Void

Sets the logging callback.

Parameters:

p_instance

Pointer to the LibVLC instance.

cb

Logging callback function.

data

User data to pass to the callback.

@:native("libvlc_log_unset")staticlog_unset(p_instance:RawPointer<LibVLC_Instance_T>):Void

Unsets the logging callback.

Parameters:

p_instance

Pointer to the LibVLC instance.

@:native("libvlc_media_add_option")staticmedia_add_option(p_md:RawPointer<LibVLC_Media_T>, psz_options:ConstCharStar):Void

Adds an option to a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

psz_options

The option string.

@:native("libvlc_media_event_manager")staticmedia_event_manager(p_md:RawPointer<LibVLC_Media_T>):RawPointer<LibVLC_Event_Manager_T>

Gets the event manager of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

Returns:

Pointer to the event manager.

@:native("libvlc_media_get_duration")staticmedia_get_duration(p_md:RawPointer<LibVLC_Media_T>):LibVLC_Time_T

Gets the duration of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

Returns:

The duration in milliseconds.

@:native("libvlc_media_get_meta")staticmedia_get_meta(p_md:RawPointer<LibVLC_Media_T>, e_meta:LibVLC_Meta_T):CastCharStar

Gets the metadata of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

e_meta

Metadata type.

Returns:

The metadata string.

@:native("libvlc_media_get_mrl")staticmedia_get_mrl(p_md:RawPointer<LibVLC_Media_T>):CastCharStar

Gets the media resource locator (MRL) of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

Returns:

The MRL string.

@:native("libvlc_media_get_parsed_status")staticmedia_get_parsed_status(p_md:RawPointer<LibVLC_Media_T>):LibVLC_Media_Parsed_Status_T

Gets the parsed status of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

Returns:

The parsed status.

@:native("libvlc_media_get_stats")staticmedia_get_stats(p_md:RawPointer<LibVLC_Media_T>, p_stats:RawPointer<LibVLC_Media_Stats_T>):Int

Gets the statistics of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

p_stats

Pointer to the statistics structure.

Returns:

0 on success, -1 on failure.

@:native("libvlc_media_list_count")staticmedia_list_count(p_ml:RawPointer<LibVLC_Media_List_T>):Int

Gets the number of items in a media list.

Parameters:

p_ml

Pointer to the media list.

Returns:

Number of items in the list.

@:native("libvlc_media_list_item_at_index")staticmedia_list_item_at_index(p_ml:RawPointer<LibVLC_Media_List_T>, i_pos:Int):RawPointer<LibVLC_Media_T>

Gets the media item at the specified index in a media list.

Parameters:

p_ml

Pointer to the media list.

i_pos

Index of the media item to retrieve.

Returns:

Pointer to the media descriptor.

@:native("libvlc_media_list_release")staticmedia_list_release(p_ml:RawPointer<LibVLC_Media_List_T>):Void

Releases a media list.

Parameters:

p_ml

Pointer to the media list.

@:native("libvlc_media_new_callbacks")staticmedia_new_callbacks(p_instance:RawPointer<LibVLC_Instance_T>, open_cb:LibVLC_Media_Open_CB, read_cb:LibVLC_Media_Read_CB, seek_cb:LibVLC_Media_Seek_CB, close_cb:LibVLC_Media_Close_CB, opaque:RawPointer<Void>):RawPointer<LibVLC_Media_T>

Creates a new media descriptor from custom callbacks.

Parameters:

p_instance

Pointer to the LibVLC instance.

open_cb

Open callback function.

read_cb

Read callback function.

seek_cb

Seek callback function.

close_cb

Close callback function.

opaque

User data to pass to the callbacks.

Returns:

Pointer to the new media descriptor.

@:native("libvlc_media_new_fd")staticmedia_new_fd(p_instance:RawPointer<LibVLC_Instance_T>, fd:Int):RawPointer<LibVLC_Media_T>

Creates a new media descriptor from a file descriptor.

Parameters:

p_instance

Pointer to the LibVLC instance.

fd

The file descriptor.

Returns:

Pointer to the new media descriptor.

@:native("libvlc_media_new_location")staticmedia_new_location(p_instance:RawPointer<LibVLC_Instance_T>, psz_mrl:ConstCharStar):RawPointer<LibVLC_Media_T>

Creates a new media descriptor from a location.

Parameters:

p_instance

Pointer to the LibVLC instance.

psz_mrl

The location string.

Returns:

Pointer to the new media descriptor.

@:native("libvlc_media_new_path")staticmedia_new_path(p_instance:RawPointer<LibVLC_Instance_T>, path:ConstCharStar):RawPointer<LibVLC_Media_T>

Creates a new media descriptor from a file path.

Parameters:

p_instance

Pointer to the LibVLC instance.

path

The file path.

Returns:

Pointer to the new media descriptor.

@:native("libvlc_media_parse_stop")staticmedia_parse_stop(p_md:RawPointer<LibVLC_Media_T>):Void

Stops the parsing of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

@:native("libvlc_media_parse_with_options")staticmedia_parse_with_options(p_md:RawPointer<LibVLC_Media_T>, parse_flag:LibVLC_Media_Parse_Flag_T, timeout:Int):Int

Parses a media descriptor with options.

Parameters:

p_md

Pointer to the media descriptor.

parse_flag

Parse flags.

timeout

Timeout in milliseconds.

Returns:

0 on success, -1 on failure.

@:native("libvlc_media_player_add_slave")staticmedia_player_add_slave(p_mi:RawPointer<LibVLC_Media_Player_T>, i_type:LibVLC_Media_Slave_Type_T, psz_uri:ConstCharStar, b_select:Bool):Int

Adds a slave to the current media player.

@note If the player is playing, the slave will be added directly. This call

  will also update the slave list of the attached libvlc_media_t.

Parameters:

p_mi

Pointer to the media player.

i_type

Subtitle or audio.

psz_uri

URI of the slave (should contain a valid scheme).

b_select

true if this slave should be selected when it's loaded.

Returns:

0 on success, -1 on error.

@:native("libvlc_media_player_can_pause")staticmedia_player_can_pause(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Checks if the media player can pause.

Parameters:

p_mi

Pointer to the media player.

Returns:

1 if can pause, 0 otherwise.

@:native("libvlc_media_player_event_manager")staticmedia_player_event_manager(mp:RawPointer<LibVLC_Media_Player_T>):RawPointer<LibVLC_Event_Manager_T>

Gets the event manager of a media player.

Parameters:

mp

Pointer to the media player.

Returns:

Pointer to the event manager.

@:native("libvlc_media_player_get_chapter")staticmedia_player_get_chapter(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the current chapter.

Parameters:

p_mi

Pointer to the media player.

Returns:

The current chapter.

@:native("libvlc_media_player_get_chapter_count")staticmedia_player_get_chapter_count(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the total number of chapters.

Parameters:

p_mi

Pointer to the media player.

Returns:

The total number of chapters.

@:native("libvlc_media_player_get_length")staticmedia_player_get_length(p_mi:RawPointer<LibVLC_Media_Player_T>):LibVLC_Time_T

Gets the media length.

Parameters:

p_mi

Pointer to the media player.

Returns:

The media length in milliseconds.

@:native("libvlc_media_player_get_media")staticmedia_player_get_media(p_mi:RawPointer<LibVLC_Media_Player_T>):RawPointer<LibVLC_Media_T>

Gets the media descriptor from a media player.

Parameters:

p_mi

Pointer to the media player.

Returns:

Pointer to the media descriptor.

@:native("libvlc_media_player_get_position")staticmedia_player_get_position(p_mi:RawPointer<LibVLC_Media_Player_T>):Single

Gets the current playback position.

Parameters:

p_mi

Pointer to the media player.

Returns:

The current playback position as a float between 0.0 and 1.0.

@:native("libvlc_media_player_get_rate")staticmedia_player_get_rate(p_mi:RawPointer<LibVLC_Media_Player_T>):Single

Gets the current playback rate.

Parameters:

p_mi

Pointer to the media player.

Returns:

The current playback rate.

@:native("libvlc_media_player_get_role")staticmedia_player_get_role(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the role of the media player.

Parameters:

p_mi

Pointer to the media player.

Returns:

The role of the media player.

@:native("libvlc_media_player_get_time")staticmedia_player_get_time(p_mi:RawPointer<LibVLC_Media_Player_T>):LibVLC_Time_T

Gets the current playback time.

Parameters:

p_mi

Pointer to the media player.

Returns:

The current playback time in milliseconds.

@:native("libvlc_media_player_is_playing")staticmedia_player_is_playing(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Checks if the media player is playing.

Parameters:

p_mi

Pointer to the media player.

Returns:

1 if playing, 0 otherwise.

@:native("libvlc_media_player_is_seekable")staticmedia_player_is_seekable(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Checks if the media player is seekable.

Parameters:

p_mi

Pointer to the media player.

Returns:

1 if seekable, 0 otherwise.

@:native("libvlc_media_player_new")staticmedia_player_new(p_libvlc_instance:RawPointer<LibVLC_Instance_T>):RawPointer<LibVLC_Media_Player_T>

Creates a new media player.

Parameters:

p_libvlc_instance

Pointer to the LibVLC instance.

Returns:

Pointer to the new media player.

@:native("libvlc_media_player_next_chapter")staticmedia_player_next_chapter(p_mi:RawPointer<LibVLC_Media_Player_T>):Void

Moves to the next chapter.

Parameters:

p_mi

Pointer to the media player.

@:native("libvlc_media_player_pause")staticmedia_player_pause(p_mi:RawPointer<LibVLC_Media_Player_T>):Void

Pauses playback of the media player.

Parameters:

p_mi

Pointer to the media player.

@:native("libvlc_media_player_play")staticmedia_player_play(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Starts playback of the media player.

Parameters:

p_mi

Pointer to the media player.

Returns:

0 on success, -1 on failure.

@:native("libvlc_media_player_previous_chapter")staticmedia_player_previous_chapter(p_mi:RawPointer<LibVLC_Media_Player_T>):Void

Moves to the previous chapter.

Parameters:

p_mi

Pointer to the media player.

@:native("libvlc_media_player_release")staticmedia_player_release(p_mi:RawPointer<LibVLC_Media_Player_T>):Void

Releases a media player.

Parameters:

p_mi

Pointer to the media player.

@:native("libvlc_media_player_set_chapter")staticmedia_player_set_chapter(p_mi:RawPointer<LibVLC_Media_Player_T>, i_chapter:Int):Void

Sets the current chapter.

Parameters:

p_mi

Pointer to the media player.

i_chapter

The new chapter.

@:native("libvlc_media_player_set_media")staticmedia_player_set_media(p_mi:RawPointer<LibVLC_Media_Player_T>, p_md:RawPointer<LibVLC_Media_T>):Void

Sets the media descriptor for a media player.

Parameters:

p_mi

Pointer to the media player.

p_md

Pointer to the media descriptor.

@:native("libvlc_media_player_set_pause")staticmedia_player_set_pause(p_mi:RawPointer<LibVLC_Media_Player_T>, do_pause:Int):Void

Sets pause state for the media player.

Parameters:

p_mi

Pointer to the media player.

do_pause

1 to pause, 0 to play.

@:native("libvlc_media_player_set_position")staticmedia_player_set_position(p_mi:RawPointer<LibVLC_Media_Player_T>, f_pos:Single):Void

Sets the current playback position.

Parameters:

p_mi

Pointer to the media player.

f_pos

The new playback position as a float between 0.0 and 1.0.

@:native("libvlc_media_player_set_rate")staticmedia_player_set_rate(p_mi:RawPointer<LibVLC_Media_Player_T>, rate:Single):Int

Sets the playback rate.

Parameters:

p_mi

Pointer to the media player.

rate

The new playback rate.

Returns:

0 on success, -1 on failure.

@:native("libvlc_media_player_set_role")staticmedia_player_set_role(p_mi:RawPointer<LibVLC_Media_Player_T>, role:UInt32):Int

Sets the role of the media player.

Parameters:

p_mi

Pointer to the media player.

role

The new role.

Returns:

0 on success, -1 on failure.

@:native("libvlc_media_player_set_time")staticmedia_player_set_time(p_mi:RawPointer<LibVLC_Media_Player_T>, i_time:LibVLC_Time_T):Int

Sets the current playback time.

Parameters:

p_mi

Pointer to the media player.

i_time

The new playback time in milliseconds.

Returns:

0 on success, -1 on failure.

@:native("libvlc_media_player_stop")staticmedia_player_stop(p_mi:RawPointer<LibVLC_Media_Player_T>):Void

Stops playback of the media player.

Parameters:

p_mi

Pointer to the media player.

@:native("libvlc_media_release")staticmedia_release(p_md:RawPointer<LibVLC_Media_T>):Void

Releases a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

@:native("libvlc_media_save_meta")staticmedia_save_meta(p_md:RawPointer<LibVLC_Media_T>):Int

Saves the metadata of a media descriptor.

This function commits any metadata modifications to the underlying storage, if applicable.

Parameters:

p_md

Pointer to the media descriptor.

Returns:

0 on failure, a non-zero value if the metadata was saved successfully.

@:native("libvlc_media_set_meta")staticmedia_set_meta(p_md:RawPointer<LibVLC_Media_T>, e_meta:LibVLC_Meta_T, psz_value:ConstCharStar):Void

Sets the metadata of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

e_meta

Metadata type.

psz_value

New metadata value.

@:native("libvlc_media_subitems")staticmedia_subitems(p_md:RawPointer<LibVLC_Media_T>):RawPointer<LibVLC_Media_List_T>

Gets the subitems of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor.

Returns:

Pointer to the media list containing subitems.

@:native("libvlc_media_tracks_get")staticmedia_tracks_get(p_md:RawPointer<LibVLC_Media_T>, tracks:RawPointer<RawPointer<RawPointer<LibVLC_Media_Track_T>>>):UInt32

Gets the elementary streams (tracks) description of a media descriptor.

Parameters:

p_md

Pointer to the media descriptor object.

tracks

Address to store an allocated array of elementary streams descriptions (must be freed with libvlc_media_tracks_release by the caller) [OUT].

Returns:

The number of elementary streams (zero on error).

@:native("libvlc_media_tracks_release")staticmedia_tracks_release(p_tracks:RawPointer<RawPointer<LibVLC_Media_Track_T>>, i_count:UInt32):Void

Releases the array of media track descriptions.

Parameters:

p_tracks

The array of pointers to media track descriptions to release.

i_count

The number of elements in the array.

@:native("libvlc_release")staticrelease(p_instance:RawPointer<LibVLC_Instance_T>):Void

Releases a LibVLC instance.

Parameters:

p_instance

Pointer to the LibVLC instance.

@:native("libvlc_set_user_agent")staticset_user_agent(p_instance:RawPointer<LibVLC_Instance_T>, name:ConstCharStar, http:ConstCharStar):Void

Sets the application name and HTTP user agent string for LibVLC.

Parameters:

p_instance

Pointer to the LibVLC instance.

name

Human-readable application name, e.g., "FooBar player 1.2.3".

http

HTTP User Agent string, e.g., "FooBar/1.2.3 Python/2.6.0".

@:native("libvlc_track_description_list_release")statictrack_description_list_release(p_track_description:RawPointer<LibVLC_Track_Description_T>):Void

Releases (frees) a libvlc_track_description_t structure.

Parameters:

p_track_description

Pointer to the structure to release.

@:native("libvlc_video_get_size")staticvideo_get_size(mp:RawPointer<LibVLC_Media_Player_T>, num:UInt32, px:RawPointer<UInt32>, py:RawPointer<UInt32>):Int

Gets the pixel dimensions of a video.

Parameters:

mp

Pointer to the media player.

num

The index of the video (starting from 0, and most commonly 0).

px

Pointer to store the width of the video in pixels [OUT].

py

Pointer to store the height of the video in pixels [OUT].

Returns:

0 on success, -1 if the specified video does not exist.

@:native("libvlc_video_get_spu")staticvideo_get_spu(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the current video subtitle.

Parameters:

p_mi

Pointer to the media player.

Returns:

The video subtitle selected, or -1 if none.

@:native("libvlc_video_get_spu_count")staticvideo_get_spu_count(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the number of available video subtitles.

Parameters:

p_mi

Pointer to the media player.

Returns:

The number of available video subtitles.

@:native("libvlc_video_get_spu_delay")staticvideo_get_spu_delay(p_mi:RawPointer<LibVLC_Media_Player_T>):Int64

Gets the current subtitle delay. Positive values mean subtitles are displayed later, negative values earlier.

Parameters:

p_mi

Pointer to the media player.

Returns:

Time (in microseconds) the display of subtitles is being delayed.

@:native("libvlc_video_get_spu_description")staticvideo_get_spu_description(p_mi:RawPointer<LibVLC_Media_Player_T>):RawPointer<LibVLC_Track_Description_T>

Gets the description of available video subtitles.

Parameters:

p_mi

Pointer to the media player.

Returns:

Pointer to the list containing descriptions of available video subtitles. It must be freed with libvlc_track_description_list_release().

@:native("libvlc_video_get_track")staticvideo_get_track(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the current video track.

Parameters:

p_mi

Pointer to the media player.

Returns:

The video track ID, or -1 if no active input.

@:native("libvlc_video_get_track_count")staticvideo_get_track_count(p_mi:RawPointer<LibVLC_Media_Player_T>):Int

Gets the number of available video tracks.

Parameters:

p_mi

Pointer to the media player.

Returns:

The number of available video tracks.

@:native("libvlc_video_get_track_description")staticvideo_get_track_description(p_mi:RawPointer<LibVLC_Media_Player_T>):RawPointer<LibVLC_Track_Description_T>

Gets the description of available video tracks.

Parameters:

p_mi

Pointer to the media player.

Returns:

Pointer to the list containing descriptions of available video tracks, or null on error. It must be freed with libvlc_track_description_list_release().

@:native("libvlc_video_set_callbacks")staticvideo_set_callbacks(mp:RawPointer<LibVLC_Media_Player_T>, lock:LibVLC_Video_Lock_CB, unlock:LibVLC_Video_Unlock_CB, display:LibVLC_Video_Display_CB, opaque:RawPointer<Void>):Void

Sets the video callbacks.

Parameters:

mp

Pointer to the media player.

lock

Video lock callback.

unlock

Video unlock callback.

display

Video display callback.

opaque

Pointer to the opaque data.

@:native("libvlc_video_set_format")staticvideo_set_format(mp:RawPointer<LibVLC_Media_Player_T>, chroma:ConstCharStar, width:UInt32, height:UInt32, pitch:UInt32):Void

Sets the video format.

Parameters:

mp

Pointer to the media player.

chroma

Four-character string identifying the chroma format (e.g., "RV32" for 32-bit RGBA).

width

Width of the video in pixels.

height

Height of the video in pixels.

pitch

Number of bytes per row of pixels in the video.

@:native("libvlc_video_set_format_callbacks")staticvideo_set_format_callbacks(mp:RawPointer<LibVLC_Media_Player_T>, setup:LibVLC_Video_Format_CB, cleanup:LibVLC_Video_Cleanup_CB):Void

Sets the video format callbacks.

Parameters:

mp

Pointer to the media player.

setup

Video format setup callback.

cleanup

Video format cleanup callback.

@:native("libvlc_video_set_spu")staticvideo_set_spu(p_mi:RawPointer<LibVLC_Media_Player_T>, i_spu:Int):Int

Sets a new video subtitle.

Parameters:

p_mi

Pointer to the media player.

i_spu

Video subtitle track to select (i_id from track description).

Returns:

0 on success, -1 if out of range.

@:native("libvlc_video_set_spu_delay")staticvideo_set_spu_delay(p_mi:RawPointer<LibVLC_Media_Player_T>, i_delay:Int64):Int

Sets the subtitle delay. Positive values result in subtitles being displayed later, while negative values result in subtitles being displayed earlier. The delay resets to zero when the media changes.

Parameters:

p_mi

Pointer to the media player.

i_delay

Time (in microseconds) the display of subtitles should be delayed.

Returns:

0 on success, -1 on error.

@:native("libvlc_video_set_track")staticvideo_set_track(p_mi:RawPointer<LibVLC_Media_Player_T>, i_track:Int):Int

Sets the video track.

Parameters:

p_mi

Pointer to the media player.

i_track

The track ID (i_id field from track description).

Returns:

0 on success, -1 if out of range.