[vlc-commits] player: Expose vlc_player_RestorePlaybackPos

Hugo Beauzée-Luyssen git at videolan.org
Thu Jan 23 10:05:22 CET 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Dec 16 16:03:40 2019 +0100| [24ae03977dbd287dd1705e1204e7cb437dd1feb7] | committer: Hugo Beauzée-Luyssen

player: Expose vlc_player_RestorePlaybackPos

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24ae03977dbd287dd1705e1204e7cb437dd1feb7
---

 include/vlc_player.h  | 6 ++++++
 src/libvlccore.sym    | 1 +
 src/player/medialib.c | 6 ++++++
 3 files changed, 13 insertions(+)

diff --git a/include/vlc_player.h b/include/vlc_player.h
index d0f9f0d973..52dc703609 100644
--- a/include/vlc_player.h
+++ b/include/vlc_player.h
@@ -912,6 +912,12 @@ vlc_player_GetSignal(vlc_player_t *player, float *quality, float *strength);
 VLC_API const struct input_stats_t *
 vlc_player_GetStatistics(vlc_player_t *player);
 
+/**
+ * Restore the previous playback position of the current media
+ */
+VLC_API void
+vlc_player_RestorePlaybackPos(vlc_player_t *player);
+
 /**
  * Get the V4L2 object used to do controls
  *
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 9680cd35f2..b704d24f28 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -833,6 +833,7 @@ vlc_player_program_Dup
 vlc_player_RemoveListener
 vlc_player_RemoveTimer
 vlc_player_RestartEsId
+vlc_player_RestorePlaybackPos
 vlc_player_Resume
 vlc_player_SeekByPos
 vlc_player_SeekByTime
diff --git a/src/player/medialib.c b/src/player/medialib.c
index e0c0b0f6f4..a887bb5a34 100644
--- a/src/player/medialib.c
+++ b/src/player/medialib.c
@@ -326,3 +326,9 @@ vlc_player_UpdateMLStates(vlc_player_t *player, struct vlc_player_input* input)
     vlc_ml_release(&input->ml.states);
     vlc_ml_release(media);
 }
+
+void
+vlc_player_RestorePlaybackPos(vlc_player_t *player)
+{
+    vlc_player_input_RestoreMlStates(player->input, true);
+}



More information about the vlc-commits mailing list