[vlc-commits] [Git][videolan/vlc][master] 2 commits: VLCSampleBufferDisplay: remove empty Display callback

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jul 16 09:44:21 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5c06e543 by Steve Lhomme at 2025-07-16T09:24:07+00:00
VLCSampleBufferDisplay: remove empty Display callback

It forces the core to handle a wait until Display can be called when the
display date is already handled during the Prepare.

- - - - -
83d8cef9 by Steve Lhomme at 2025-07-16T09:24:07+00:00
VLCSampleBufferDisplay: remove stray white spaces

- - - - -


1 changed file:

- modules/video_output/apple/VLCSampleBufferDisplay.m


Changes:

=====================================
modules/video_output/apple/VLCSampleBufferDisplay.m
=====================================
@@ -103,13 +103,13 @@ typedef NS_ENUM(NSUInteger, VLCSampleBufferPixelFlip) {
     value = CFDictionaryGetValue(poolAttr, kCVPixelBufferWidthKey);
     if (!value || CFGetTypeID(value) != CFNumberGetTypeID()
         || !CFNumberGetValue(value, kCFNumberIntType, &poolWidth)
-        || poolWidth != bufferWidth) 
+        || poolWidth != bufferWidth)
     {
         return NO;
     }
 
     value = CFDictionaryGetValue(poolAttr, kCVPixelBufferHeightKey);
-    if (!value || CFGetTypeID(value) != CFNumberGetTypeID() 
+    if (!value || CFGetTypeID(value) != CFNumberGetTypeID()
         || !CFNumberGetValue(value, kCFNumberIntType, &poolHeigth)
         || poolHeigth != bufferHeight)
     {
@@ -396,7 +396,7 @@ API_AVAILABLE(ios(16.0), tvos(16.0), macosx(13.0))
     CIImage *image = [[CIImage alloc] initWithCVPixelBuffer:pixelBuffer];
     image = [image imageByApplyingOrientation:_orientation];
     [_rotationContext render:image toCVPixelBuffer:rotated];
-    
+
     return rotated;
 }
 
@@ -683,10 +683,10 @@ shouldInheritContentsScale:(CGFloat)newScale
     self = [super init];
     if (!self)
         return nil;
-    
+
     if (vd->cfg->window->type != VLC_WINDOW_TYPE_NSOBJECT)
         return nil;
-    
+
     VLCView *window = (__bridge VLCView *)vd->cfg->window->handle.nsobject;
     if (!window) {
         msg_Err(vd, "No window found!");
@@ -698,14 +698,14 @@ shouldInheritContentsScale:(CGFloat)newScale
     _pipcontroller = CreatePipController(vd, (__bridge void *)self);
 
     _vd = vd;
-    
+
     return self;
 }
 
 - (void)preparePictureInPicture {
     if ( !_pipcontroller)
         return;
-    
+
     if ( _pipcontroller->ops->set_display_layer ) {
         _pipcontroller->ops->set_display_layer(
             _pipcontroller,
@@ -728,8 +728,8 @@ shouldInheritContentsScale:(CGFloat)newScale
         VLCSampleBufferDisplayView *displayView;
         VLCSampleBufferSubpictureView *spuView;
         VLCView *window = sys.window;
-        
-        displayView = 
+
+        displayView =
             [[VLCSampleBufferDisplayView alloc] initWithVoutDisplay:sys.vd];
         spuView = [VLCSampleBufferSubpictureView new];
         [window addSubview:displayView];
@@ -831,7 +831,7 @@ static void RenderPicture(vout_display_t *vd, picture_t *pic, vlc_tick_t date) {
         msg_Err(vd, "No pixelBuffer ref attached to pic!");
         return;
     }
-    
+
     if (vd->fmt->orientation != ORIENT_NORMAL) {
         CVPixelBufferRef rotated = [sys.rotationContext rotate:pixelBuffer];
         if (rotated) {
@@ -839,7 +839,7 @@ static void RenderPicture(vout_display_t *vd, picture_t *pic, vlc_tick_t date) {
             pixelBuffer = rotated;
         }
     }
-    
+
     id aspectRatio = @{
         (__bridge NSString*)kCVImageBufferPixelAspectRatioHorizontalSpacingKey:
             @(vd->source->i_sar_num),
@@ -1042,10 +1042,6 @@ static void Prepare (vout_display_t *vd, picture_t *pic,
     RenderSubpicture(vd, subpicture);
 }
 
-static void Display(vout_display_t *vd, picture_t *pic)
-{
-}
-
 static int Control (vout_display_t *vd, int query)
 {
     VLCSampleBufferDisplay *sys;
@@ -1139,7 +1135,7 @@ static int Open (vout_display_t *vd,
     }
 
     @autoreleasepool {
-        VLCSampleBufferDisplay *sys = 
+        VLCSampleBufferDisplay *sys =
             [[VLCSampleBufferDisplay alloc] initWithVoutDisplay:vd];
 
         if (sys == nil) {
@@ -1154,11 +1150,10 @@ static int Open (vout_display_t *vd,
         static const struct vlc_display_operations ops = {
             .close = Close,
             .prepare = Prepare,
-            .display = Display,
             .control = Control,
             .update_format = UpdateFormat,
         };
-        
+
         vd->ops = &ops;
 
         static const vlc_fourcc_t subfmts[] = {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/30fbe5f3f6be7d0d066c861c6d051d8ccdef5048...83d8cef9cfc4ef373f7e3562cf6c001d8bc44b9f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/30fbe5f3f6be7d0d066c861c6d051d8ccdef5048...83d8cef9cfc4ef373f7e3562cf6c001d8bc44b9f
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