<html><head></head><body>Does that work if assert.h was not included earlier?<br><br><div class="gmail_quote">Le 21 mai 2019 10:53:18 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><br><br>On Mon, May 20, 2019, at 17:36, Romain Vimont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">The new player stops asynchronously. This is a breaking change, so use a<br>different function name.<hr> doc/libvlc/QtPlayer/player.cpp | 2 +-<br> doc/libvlc/d3d11_player.cpp | 2 +-<br> doc/libvlc/d3d9_player.c | 2 +-<br> doc/libvlc/gtk_player.c | 2 +-<br> doc/libvlc/vlc-thumb.c | 2 +-<br> doc/libvlc/wx_player.cpp | 2 +-<br> include/vlc/libvlc_media.h | 2 --<br> include/vlc/libvlc_media_list_player.h | 2 +-<br> include/vlc/libvlc_media_player.h | 2 +-<br> lib/libvlc.sym | 4 ++--<br> lib/media_list_player.c | 4 ++--<br> lib/media_player.c | 2 +-<br> test/libvlc/media_list_player.c | 4 ++--<br> test/libvlc/media_player.c | 6 +++---<br> 14 files changed, 18 insertions(+), 20 deletions(-)<br><br>diff --git a/doc/libvlc/QtPlayer/player.cpp <br>b/doc/libvlc/QtPlayer/player.cpp<br>index 6a25564c62..b1316026ba 100644<br>--- a/doc/libvlc/QtPlayer/player.cpp<br>+++ b/doc/libvlc/QtPlayer/player.cpp<br>@@ -201,7 +201,7 @@ void Mwindow::updateInterface() { //Update <br>interface and check if song is finish<br> void Mwindow::stop() {<br> if(vlcPlayer) {<br> /* stop the media player */<br>- libvlc_media_player_stop(vlcPlayer);<br>+ libvlc_media_player_stop_async(vlcPlayer);<br> <br> /* release the media player */<br> libvlc_media_player_release(vlcPlayer);<br>diff --git a/doc/libvlc/d3d11_player.cpp b/doc/libvlc/d3d11_player.cpp<br>index a739730455..a287afbb4e 100644<br>--- a/doc/libvlc/d3d11_player.cpp<br>+++ b/doc/libvlc/d3d11_player.cpp<br>@@ -470,7 +470,7 @@ int WINAPI WinMain(HINSTANCE hInstance,<br> }<br> }<br> <br>- libvlc_media_player_stop( p_mp );<br>+ libvlc_media_player_stop_async( p_mp );<br> <br> libvlc_media_player_release( p_mp );<br> libvlc_media_release( p_media );<br>diff --git a/doc/libvlc/d3d9_player.c b/doc/libvlc/d3d9_player.c<br>index 043fca777f..980bd1dff9 100644<br>--- a/doc/libvlc/d3d9_player.c<br>+++ b/doc/libvlc/d3d9_player.c<br>@@ -368,7 +368,7 @@ int WINAPI WinMain(HINSTANCE hInstance,<br> break;<br> }<br> <br>- libvlc_media_player_stop( p_mp );<br>+ libvlc_media_player_stop_async( p_mp );<br> <br> libvlc_media_player_release( p_mp );<br> libvlc_media_release( p_media );<br>diff --git a/doc/libvlc/gtk_player.c b/doc/libvlc/gtk_player.c<br>index 8196476249..9369b940ff 100644<br>--- a/doc/libvlc/gtk_player.c<br>+++ b/doc/libvlc/gtk_player.c<br>@@ -62,7 +62,7 @@ void on_playpause(GtkWidget *widget, gpointer data) {<br> <br> void on_stop(GtkWidget *widget, gpointer data) {<br> pause_player();<br>- libvlc_media_player_stop(media_player);<br>+ libvlc_media_player_stop_async(media_player);<br> }<br> <br> void play(void) {<br>diff --git a/doc/libvlc/vlc-thumb.c b/doc/libvlc/vlc-thumb.c<br>index 7cb5aaafcc..a63307379c 100644<br>--- a/doc/libvlc/vlc-thumb.c<br>+++ b/doc/libvlc/vlc-thumb.c<br>@@ -217,7 +217,7 @@ int main(int argc, const char **argv)<br> set_position(mp);<br> snapshot(mp, width, out_with_ext);<br> <br>- libvlc_media_player_stop(mp);<br>+ libvlc_media_player_stop_async(mp);<br> <br> /* clean up */<br> if (out != out_with_ext) {<br>diff --git a/doc/libvlc/wx_player.cpp b/doc/libvlc/wx_player.cpp<br>index a1690ce3ca..c2e6d8bfa8 100644<br>--- a/doc/libvlc/wx_player.cpp<br>+++ b/doc/libvlc/wx_player.cpp<br>@@ -222,7 +222,7 @@ void MainWindow::pause() {<br> <br> void MainWindow::stop() {<br> pause();<br>- libvlc_media_player_stop(media_player);<br>+ libvlc_media_player_stop_async(media_player);<br> stop_button->Enable(false);<br> setTimeline(0.0);<br> timeline->Enable(false);<br>diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h<br>index 4bc6f924ef..7b5acc0b24 100644<br>--- a/include/vlc/libvlc_media.h<br>+++ b/include/vlc/libvlc_media.h<br>@@ -348,8 +348,6 @@ typedef int (*libvlc_media_open_cb)(void *opaque, <br>void **datap,<br> *<br> * \note If no data is immediately available, then the callback should <br>sleep.<br> * \warning The application is responsible for avoiding deadlock <br>situations.<br>- * In particular, the callback should return an error if playback is <br>stopped;<br>- * if it does not return, then libvlc_media_player_stop() will never <br>return.<br> */<br> typedef ssize_t (*libvlc_media_read_cb)(void *opaque, unsigned char <br>*buf,<br> size_t len);<br>diff --git a/include/vlc/libvlc_media_list_player.h <br>b/include/vlc/libvlc_media_list_player.h<br>index 8dcdcb961a..4fb7f31f50 100644<br>--- a/include/vlc/libvlc_media_list_player.h<br>+++ b/include/vlc/libvlc_media_list_player.h<br>@@ -197,7 +197,7 @@ int <br>libvlc_media_list_player_play_item(libvlc_media_list_player_t * p_mlp,<br> * \param p_mlp media list player instance<br> */<br> LIBVLC_API void<br>- libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp);<br>+ libvlc_media_list_player_stop_async( libvlc_media_list_player_t * <br>p_mlp);<br> <br> /**<br> * Play next item from media list<br>diff --git a/include/vlc/libvlc_media_player.h <br>b/include/vlc/libvlc_media_player.h<br>index 27f34ab239..7706765beb 100644<br>--- a/include/vlc/libvlc_media_player.h<br>+++ b/include/vlc/libvlc_media_player.h<br>@@ -270,7 +270,7 @@ LIBVLC_API void libvlc_media_player_pause ( <br>libvlc_media_player_t *p_mi );<br> *<br> * \param p_mi the Media Player<br> */<br>-LIBVLC_API void libvlc_media_player_stop ( libvlc_media_player_t *p_mi <br>);<br>+LIBVLC_API void libvlc_media_player_stop_async ( libvlc_media_player_t <br>*p_mi );<br></blockquote><br>What about the static_assert like Steve suggested ?<br><br><br>> <br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> /**<br> * Set a renderer to the media player<br>diff --git a/lib/libvlc.sym b/lib/libvlc.sym<br>index ca115fb7b1..99600d1f63 100644<br>--- a/lib/libvlc.sym<br>+++ b/lib/libvlc.sym<br>@@ -115,7 +115,7 @@ libvlc_media_list_player_set_media_list<br> libvlc_media_list_player_set_media_player<br> libvlc_media_list_player_set_pause<br> libvlc_media_list_player_set_playback_mode<br>-libvlc_media_list_player_stop<br>+libvlc_media_list_player_stop_async<br> libvlc_media_list_release<br> libvlc_media_list_remove_index<br> libvlc_media_list_retain<br>@@ -177,7 +177,7 @@ libvlc_media_player_set_role<br> libvlc_media_player_set_time<br> libvlc_media_player_set_title<br> libvlc_media_player_set_xwindow<br>-libvlc_media_player_stop<br>+libvlc_media_player_stop_async<br> libvlc_media_player_navigate<br> libvlc_media_player_set_video_title_display<br> libvlc_media_release<br>diff --git a/lib/media_list_player.c b/lib/media_list_player.c<br>index c4ae8c4043..0188863e7a 100644<br>--- a/lib/media_list_player.c<br>+++ b/lib/media_list_player.c<br>@@ -730,7 +730,7 @@ static void stop(libvlc_media_list_player_t * p_mlp)<br> <br> /* We are not interested in getting media stop event now */<br> uninstall_media_player_observer(p_mlp);<br>- libvlc_media_player_stop(p_mlp->p_mi);<br>+ libvlc_media_player_stop_async(p_mlp->p_mi);<br> install_media_player_observer(p_mlp);<br> <br> free(p_mlp->current_playing_item_path);<br>@@ -745,7 +745,7 @@ static void stop(libvlc_media_list_player_t * p_mlp)<br> <br>/**************************************************************************<br> * Stop (Public)<br> <br>**************************************************************************/<br>-void libvlc_media_list_player_stop(libvlc_media_list_player_t * p_mlp)<br>+void libvlc_media_list_player_stop_async(libvlc_media_list_player_t * <br>p_mlp)<br> {<br> lock(p_mlp);<br> stop(p_mlp);<br>diff --git a/lib/media_player.c b/lib/media_player.c<br>index 057add2afe..fd085c3793 100644<br>--- a/lib/media_player.c<br>+++ b/lib/media_player.c<br>@@ -967,7 +967,7 @@ bool <br>libvlc_media_player_is_playing(libvlc_media_player_t *p_mi)<br> <br>/**************************************************************************<br> * Stop playing.<br> <br>**************************************************************************/<br>-void libvlc_media_player_stop( libvlc_media_player_t *p_mi )<br>+void libvlc_media_player_stop_async( libvlc_media_player_t *p_mi )<br> {<br> vlc_player_t *player = p_mi->player;<br> vlc_player_Lock(player);<br>diff --git a/test/libvlc/media_list_player.c <br>b/test/libvlc/media_list_player.c<br>index e68399facb..27cf3e1fbc 100644<br>--- a/test/libvlc/media_list_player.c<br>+++ b/test/libvlc/media_list_player.c<br>@@ -78,7 +78,7 @@ static inline void <br>wait_stopped(libvlc_media_list_player_t *mlp)<br> <br> static inline void stop_and_wait(libvlc_media_list_player_t *mlp)<br> {<br>- libvlc_media_list_player_stop (mlp);<br>+ libvlc_media_list_player_stop_async (mlp);<br> wait_stopped (mlp);<br> }<br> <br>@@ -484,7 +484,7 @@ static void test_media_list_player_playback_options <br>(const char** argv, int argc<br> libvlc_media_release (md4);<br> libvlc_media_release (md5);<br> <br>- libvlc_media_list_player_stop (mlp);<br>+ libvlc_media_list_player_stop_async (mlp);<br> <br> while (libvlc_media_list_player_is_playing (mlp))<br> sched_yield();<br>diff --git a/test/libvlc/media_player.c b/test/libvlc/media_player.c<br>index 2489e6f5fa..56f847e05a 100644<br>--- a/test/libvlc/media_player.c<br>+++ b/test/libvlc/media_player.c<br>@@ -144,7 +144,7 @@ static void test_media_player_set_media(const <br>char** argv, int argc)<br> <br> play_and_wait(mp);<br> <br>- libvlc_media_player_stop (mp);<br>+ libvlc_media_player_stop_async (mp);<br> libvlc_media_player_release (mp);<br> libvlc_release (vlc);<br> }<br>@@ -171,7 +171,7 @@ static void test_media_player_play_stop(const <br>char** argv, int argc)<br> <br> play_and_wait(mi);<br> <br>- libvlc_media_player_stop (mi);<br>+ libvlc_media_player_stop_async (mi);<br> libvlc_media_player_release (mi);<br> libvlc_release (vlc);<br> }<br>@@ -205,7 +205,7 @@ static void test_media_player_pause_stop(const <br>char** argv, int argc)<br> pause_and_wait(mi);<br> test_audio_video(mi);<br> <br>- libvlc_media_player_stop (mi);<br>+ libvlc_media_player_stop_async (mi);<br> test_audio_video(mi);<br> <br> libvlc_media_player_release (mi);<br>-- <br>2.20.1<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>