libvlc_media_player_set_xwindow() should only force the embed-xid "vout window"
plugin but not the xid "vout display" plugin.
This allows to use the GL "vout display" via EGL/GLX (with full hardware
acceleration) with an embedded X window.
Fixes#18907
Since input_Control is executed asynchronously, current state may be
different to the state when INPUT_SET_STATE executing. Here is a use
case which is broken by check current state in
libvlc_media_player_set_pause():
1. current state is paused
2. call libvlc_media_player_play()
3. call libvlc_media_player_set_pause() immediately before
INPUT_SET_STATE PLAYING_S is executed, libvlc_media_player_set_pause()
will do nothing, so it looks like the pause request is been dropped
silently
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
This event was sent only when an ES was changed by libvlc. It was not sent when
an ES was changed by the input thread. To fix this issue, listen to the
INPUT_EVENT_ES input event (that is sent when an ES is added/deleted/selected)
to detect an ES selection change.
We don't want to trigger callbacks for "video-es"/"audio-es"/"spu-es" variables
from the input_thread since it's also listening to these callbacks and we want
to avoid a selecting busy loop.
Since 0 is an invalid page for the zvbi plugin.
libvlc_video_get_teletext() will now return 0 if teletext is disabled. The
teletext was already disabled by default, and libvlc_video_get_teletext() could
be misleading since it returned 100 by default.
There is no need for the explicit cast, nor do we need to state the
name of the object's type for which we are allocating memory. These
changes should make it easier to read, and maintain, the function.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
p_track_description is returned when goto end is executed, meaning
that we would return a non-NULL value that has already been released
by the call to libvlc_track_description_list_release.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Inherit "deinterlace" and "deinterlace-mode" values from libvlc (values are set
from libvlc-module.c).
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Because having two differents events for the same objective is way too
confusing (libvlc_MediaParsedStatus was recently added by me).
libvlc_MediaParsedCharged is now always sent after a call to
libvlc_media_parse_*() (this was not the case if the pre-parsing was skipped).
The core vlc_InputItemPreparsedChanged event is now only attached from the
media player. This allows the libvlc_MediaParsedCharged event to be sent when a
media is parsed from a media player.
/!\ Behavior change in libvlc API /!\
The libvlc_event_t.u.media_parsed_changed.new_status value changed, this is now
a libvlc_media_parsed_status_t. Before this patch, this value was always set to
true, even in case of parse failure/skipped. Now this value can be skipped (1),
failed (2) or done (3). There should be no changes for users that were checking
if new_status was true, since this events was called for these 3 cases (that
are all > 0).
This state was never set or used. If it was set, it would have overridden the
media state since a media can be buffering while opening or during playback
(while seeking).
PS: Listen to the libvlc_MediaPlayerBuffering event if you want to know if a
media player is buffering.
And set the JavaVM* in a libvlc var option.
This will allow android modules to access a JNIEnv* even when the parent is a
not a libvlc_media_player. This will be used for the android Keystore module
for example.
Furthermore, this simplify the libvlc API when setting an android context.