Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLCKit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
72
Issues
72
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLCKit
Commits
5d452072
Commit
5d452072
authored
Oct 27, 2020
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: add SPU scale getter
This fixes the compilation broken in
632c0c78
that used non-existing API
parent
dfd51ede
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
libvlc/patches/0018-lib-add-libvlc_video_get_spu_text_scale-API.patch
...es/0018-lib-add-libvlc_video_get_spu_text_scale-API.patch
+72
-0
No files found.
libvlc/patches/0018-lib-add-libvlc_video_get_spu_text_scale-API.patch
0 → 100644
View file @
5d452072
From a85164a9d9322211ccd9b273dda0866740357e83 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net>
Date: Tue, 27 Oct 2020 10:27:06 +0100
Subject: [PATCH 18/18] lib: add libvlc_video_get_spu_text_scale API
This complements 67c4ffd5.
---
include/vlc/libvlc_media_player.h | 11 +++++++++++
lib/libvlc.sym | 1 +
lib/video.c | 12 ++++++++++++
3 files changed, 24 insertions(+)
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index fea7034644..a017d6c1cf 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -1648,6 +1648,17 @@
LIBVLC_API int libvlc_video_update_viewpoint( libvlc_media_player_t *p_mi,
*/
LIBVLC_API int64_t libvlc_video_get_spu_delay( libvlc_media_player_t *p_mi );
+/**
+ * Get the current subtitle text scale
+ *
+ * The scale factor is expressed as a percentage of the default size, where
+ * 1.0 represents 100 percent.
+ *
+ * \param p_mi media player
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API float libvlc_video_get_spu_text_scale( libvlc_media_player_t *p_mi );
+
/**
* Set the subtitle text scale.
*
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 2bb67eccf8..5d9713cdb3 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -239,6 +239,7 @@
libvlc_video_get_spu
libvlc_video_get_spu_count
libvlc_video_get_spu_delay
libvlc_video_get_spu_description
+libvlc_video_get_spu_text_scale
libvlc_video_get_teletext
libvlc_video_get_track
libvlc_video_get_track_count
diff --git a/lib/video.c b/lib/video.c
index e06adf143b..d3cba035d8 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -368,6 +368,18 @@
int libvlc_video_set_spu_delay( libvlc_media_player_t *p_mi,
return 0;
}
+float libvlc_video_get_spu_text_scale( libvlc_media_player_t *p_mi )
+{
+ vlc_player_t *player = p_mi->player;
+ vlc_player_Lock(player);
+
+ unsigned scale = vlc_player_GetSubtitleTextScale(player);
+
+ vlc_player_Unlock(player);
+
+ return scale / 100.f;
+}
+
void libvlc_video_set_spu_text_scale( libvlc_media_player_t *p_mi,
float f_scale )
{
--
2.24.3 (Apple Git-128)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment