[vlc-commits] [Git][videolan/vlc][master] vout: apple: add option to force fallback to libvlc legacy displays
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Nov 27 06:40:23 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
aa496943 by Maxime Chapelet at 2024-11-27T06:05:30+00:00
vout: apple: add option to force fallback to libvlc legacy displays
The recent addition of the new display to support natively decoded
CVSampleBufferRef frames provides straightforward Metal rendering
but may still suffer from unsupported features or unstable code.
Being able to fallback to any legacy OpenGL based display might be
helpful to get around unexpected issues with the new display.
In libvlc, vout displays are opened by order of priority and can't
be set using the `--vout` option.
Libvlc users had no way to use an alternate vout display if the
samplebufferdisplay doesn't work as expected.
This change is introducing a new option for libvlc users to force
a fallback to legacy OpenGL based displays.
- - - - -
1 changed file:
- modules/video_output/apple/VLCSampleBufferDisplay.m
Changes:
=====================================
modules/video_output/apple/VLCSampleBufferDisplay.m
=====================================
@@ -1139,6 +1139,9 @@ static void DeletePipController( pip_controller_t * pip_controller )
static int Open (vout_display_t *vd,
video_format_t *fmt, vlc_video_context *context)
{
+ if (var_InheritBool(vd, "force-darwin-legacy-display")) {
+ return VLC_EGENERIC;
+ }
// Display isn't compatible with 360 content hence opening with this kind
// of projection should fail if display use isn't forced
if (!vd->obj.force && fmt->projection_mode != PROJECTION_MODE_RECTANGULAR) {
@@ -1186,8 +1189,25 @@ static int Open (vout_display_t *vd,
/*
* Module descriptor
*/
+
+#define FORCE_LEGACY_DISPLAY_TEXT N_("Force fallback to legacy display")
+#define FORCE_LEGACY_DISPLAY_LONGTEXT N_( \
+ "Triggers an initialization failure to allow fallback to any other legacy display.")
+
+#define HELP_TEXT N_("This display handles hardware decoded pixel buffers "\
+ "and renders them in a view/layer. "\
+ "It can also convert and display software decoded frame buffers. "\
+ "This is the default display for Apple platforms. "\
+ "--force-darwin-legacy-display option can be used to abort the "\
+ "display's initialization and allows fallback to legacy displays like "\
+ "other OpenGL/ES based video outputs.")
+
vlc_module_begin()
set_description(N_("CoreMedia sample buffers based video output display"))
set_subcategory(SUBCAT_VIDEO_VOUT)
+ add_bool("force-darwin-legacy-display", false,
+ FORCE_LEGACY_DISPLAY_TEXT, FORCE_LEGACY_DISPLAY_LONGTEXT)
+ change_volatile()
+ set_help(HELP_TEXT)
set_callback_display(Open, 600)
vlc_module_end()
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/aa496943e41e3b73044d405cda7d4ff2740d467a
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/aa496943e41e3b73044d405cda7d4ff2740d467a
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list