LibVLC
heapvlcRaw `@:hlNative` bindings to `vlc.hdll` (native/vlc.c), which wraps libVLC (https://wiki.videolan.org/LibVLC).
The vendored SDK under native/{include,lib} and the ideato surface libVLC's own diagnostic log (see `get_log`) both trace back to MAJigsaw77's work on libVLC/HashLink bindings (https://github.com/MAJigsaw77/hxvlc) - see native/vlc.c for specifics on what came from where.
Members
- global_init
- global_shutdown
- get_error
- get_log
- open
- play
- set_pause
- stop
- is_playing
- has_ended
- has_error
- take_playing
- get_size
- has_frame
- get_frame
- get_length
- get_time
- set_time
- get_position
- set_position
- get_volume
- set_volume
- set_mute
- get_rate
- set_rate
- get_audio_track_count
- get_audio_track
- set_audio_track
- get_subtitle_track_count
- get_subtitle_track
- set_subtitle_track
- close
Functions
static function global_init(pluginsPath:hl.Bytes):Bool
public static function global_init(pluginsPath:hl.Bytes):Bool { return false; }
static function global_shutdown():Void
public static function global_shutdown():Void {}
static function get_error(out:hl.Bytes, maxLen:Int):Int
public static function get_error(out:hl.Bytes, maxLen:Int):Int { return 0; }
static function get_log(out:hl.Bytes, maxLen:Int):Int
public static function get_log(out:hl.Bytes, maxLen:Int):Int { return 0; }
Copies libVLC's diagnostic log since the last `open()` into `out`. Non-destructive.
static function open(path:hl.Bytes, isUrl:Bool):VLCHandle
public static function open(path:hl.Bytes, isUrl:Bool):VLCHandle { return null; }
static function play(v:VLCHandle):Bool
public static function play(v:VLCHandle):Bool { return false; }
static function set_pause(v:VLCHandle, pause:Bool):Void
public static function set_pause(v:VLCHandle, pause:Bool):Void {}
static function stop(v:VLCHandle):Void
public static function stop(v:VLCHandle):Void {}
static function is_playing(v:VLCHandle):Bool
public static function is_playing(v:VLCHandle):Bool { return false; }
static function has_ended(v:VLCHandle):Bool
public static function has_ended(v:VLCHandle):Bool { return false; }
static function has_error(v:VLCHandle):Bool
public static function has_error(v:VLCHandle):Bool { return false; }
static function take_playing(v:VLCHandle):Bool
public static function take_playing(v:VLCHandle):Bool { return false; }
Event-based: returns true once when libVLC's "playing" event has fired since the last
call, then resets. Can fire again for the same handle, e.g. after pausing and resuming.
static function get_size(v:VLCHandle, width:hl.Ref<Int>, height:hl.Ref<Int>):Bool
public static function get_size(v:VLCHandle, width:hl.Ref<Int>, height:hl.Ref<Int>):Bool { return false; }
Returns true once the decoder has determined the video's pixel size.
static function has_frame(v:VLCHandle):Bool
public static function has_frame(v:VLCHandle):Bool { return false; }
static function get_frame(v:VLCHandle, out:hl.Bytes, outCapacity:Int):Bool
public static function get_frame(v:VLCHandle, out:hl.Bytes, outCapacity:Int):Bool { return false; }
static function get_length(v:VLCHandle):Float
public static function get_length(v:VLCHandle):Float { return 0; }
Media duration in milliseconds.
static function get_time(v:VLCHandle):Float
public static function get_time(v:VLCHandle):Float { return 0; }
Playback position in milliseconds.
static function set_time(v:VLCHandle, ms:Float):Void
public static function set_time(v:VLCHandle, ms:Float):Void {}
static function get_position(v:VLCHandle):Float
public static function get_position(v:VLCHandle):Float { return 0; }
Playback position, normalized 0..1.
static function set_position(v:VLCHandle, pos:Float):Void
public static function set_position(v:VLCHandle, pos:Float):Void {}
static function get_volume(v:VLCHandle):Int
public static function get_volume(v:VLCHandle):Int { return 0; }
Volume, 0..100+ (100 = normal).
static function set_volume(v:VLCHandle, volume:Int):Bool
public static function set_volume(v:VLCHandle, volume:Int):Bool { return false; }
static function set_mute(v:VLCHandle, mute:Bool):Void
public static function set_mute(v:VLCHandle, mute:Bool):Void {}
static function get_rate(v:VLCHandle):Single
public static function get_rate(v:VLCHandle):Single { return 1.0; }
Playback speed multiplier, e.g. `0.5` for half speed, `2.0` for double.
static function set_rate(v:VLCHandle, rate:Single):Bool
public static function set_rate(v:VLCHandle, rate:Single):Bool { return false; }
static function get_audio_track_count(v:VLCHandle):Int
public static function get_audio_track_count(v:VLCHandle):Int { return 0; }
static function get_audio_track(v:VLCHandle):Int
public static function get_audio_track(v:VLCHandle):Int { return -1; }
Currently selected audio track id, or `-1` if none/disabled.
static function set_audio_track(v:VLCHandle, track:Int):Bool
public static function set_audio_track(v:VLCHandle, track:Int):Bool { return false; }
static function get_subtitle_track_count(v:VLCHandle):Int
public static function get_subtitle_track_count(v:VLCHandle):Int { return 0; }
static function get_subtitle_track(v:VLCHandle):Int
public static function get_subtitle_track(v:VLCHandle):Int { return -1; }
Currently selected subtitle track id, or `-1` if none/disabled.
static function set_subtitle_track(v:VLCHandle, track:Int):Bool
public static function set_subtitle_track(v:VLCHandle, track:Int):Bool { return false; }
static function close(v:VLCHandle):Void
public static function close(v:VLCHandle):Void {}