[vlc-commits] macosx/player: add OSD position display

Felix Paul Kühne git at videolan.org
Wed Mar 27 17:52:52 CET 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Wed Mar 27 16:34:30 2019 +0100| [a96268397e443302fcb785189f8912dee6ff5cb1] | committer: Felix Paul Kühne

macosx/player: add OSD position display

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

 modules/gui/macosx/playlist/VLCPlayerController.h | 6 ++++++
 modules/gui/macosx/playlist/VLCPlayerController.m | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/modules/gui/macosx/playlist/VLCPlayerController.h b/modules/gui/macosx/playlist/VLCPlayerController.h
index b2ecaae8a5..dfb977b527 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.h
+++ b/modules/gui/macosx/playlist/VLCPlayerController.h
@@ -391,6 +391,12 @@ extern NSString *VLCPlayerMuteChanged;
 - (void)setPositionPrecise:(float)position;
 
 /**
+ * shows the current position as OSD within the video
+ * does not do anything if you do not have a vout
+ */
+- (void)displayPosition;
+
+/**
  * helper function to jump forward with the extra short interval (user configurable in preferences)
  */
 - (void)jumpForwardExtraShort;
diff --git a/modules/gui/macosx/playlist/VLCPlayerController.m b/modules/gui/macosx/playlist/VLCPlayerController.m
index 52cbae313d..be2304bccd 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.m
+++ b/modules/gui/macosx/playlist/VLCPlayerController.m
@@ -880,6 +880,13 @@ static const struct vlc_player_aout_cbs player_aout_callbacks = {
     vlc_player_Unlock(_p_player);
 }
 
+- (void)displayPosition
+{
+    vlc_player_Lock(_p_player);
+    vlc_player_DisplayPosition(_p_player);
+    vlc_player_Unlock(_p_player);
+}
+
 - (void)jumpWithValue:(char *)p_userDefinedJumpSize forward:(BOOL)shallJumpForward
 {
     int64_t interval = var_InheritInteger(getIntf(), p_userDefinedJumpSize);



More information about the vlc-commits mailing list