Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
1c46d14f by Steve Lhomme at 2024-04-15T05:51:40+00:00
display: keep the video placement internally
- - - - -
4ab62d06 by Steve Lhomme at 2024-04-15T05:51:40+00:00
display: notify display modules when the picture placement changed
In many cases thats what they really care about. Not the display size or
display filled value.
- - - - -
0c10d951 by Steve Lhomme at 2024-04-15T05:51:40+00:00
display: remove redundant VOUT_DISPLAY_CHANGE_ZOOM
If the zoom of the video changed, the video placement has changed as well.
Display modules dont actually care about the aspect ratio, just where
theyre supposed to stretch the video.
- - - - -
65b81371 by Steve Lhomme at 2024-04-15T05:51:40+00:00
display: remove redundant VOUT_DISPLAY_CHANGE_DISPLAY_FILLED
If the display filling mode of the video changed, the video placement has
changed as well.
Display modules dont actually care about the aspect ratio, just where
theyre supposed to stretch the video.
- - - - -
22 changed files:
- include/vlc_vout_display.h
- modules/hw/mmal/vout.c
- modules/video_output/android/display.c
- modules/video_output/apple/VLCSampleBufferDisplay.m
- modules/video_output/caca.c
- modules/video_output/caopengllayer.m
- modules/video_output/decklink.cpp
- modules/video_output/drm/display.c
- modules/video_output/flaschen.c
- modules/video_output/kva.c
- modules/video_output/libplacebo/display.c
- modules/video_output/macosx.m
- modules/video_output/opengl/display.c
- modules/video_output/splitter.c
- modules/video_output/vdummy.c
- modules/video_output/vmem.c
- modules/video_output/wayland/shm.c
- modules/video_output/win32/common.c
- modules/video_output/xcb/render.c
- modules/video_output/xcb/x11.c
- modules/video_output/yuv.c
- src/video_output/display.c
Changes:
=
include/vlc_vout_display.h
=
@@ -147,43 +147,34 @@ enum vout_display_query {
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,
/**
- * Notifies a change of the display fitting mode by the user.
+ * Notifies a change of the sample aspect ratio.
*
* \retval VLC_SUCCESS if the display handled the change
* \retval VLC_EGENERIC if a \ref vlc_display_operations::reset_pictures
* request is necessary
*/
-VOUT_DISPLAY_CHANGE_DISPLAY_FILLED,
+VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
/**
- * Notifies a change of the user zoom factor.
+ * Notifies a change of the source cropping.
*
- * \retval VLC_SUCCESS if the display handled the change
- * \retval VLC_EGENERIC if a \ref vlc_display_operations::reset_pictures
- * request is necessary
- */
-VOUT_DISPLAY_CHANGE_ZOOM,
-
-/**
- * Notifies a change of the sample aspect ratio.
+ * The cropping requested is stored by source \ref video_format_t
`i_x`/`y_offset`
+ * and `i_visible_width`/`height`
*
* \retval VLC_SUCCESS if the display handled the change
* \retval VLC_EGENERIC if a \ref vlc_display_operations::reset_pictures
* request is necessary
*/
-VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
+VOUT_DISPLAY_CHANGE_SOURCE_CROP,
/**
- * Notifies a change of the source cropping.
- *
- * The cropping requested is stored by source \ref video_format_t
`i_x`/`y_offset`
- * and `i_visible_width`/`height`
+ * Notified when the source placement in the display has changed
*
* \retval VLC_SUCCESS if the display handled the change
* \retval VLC_EGENERIC if a \ref vlc_display_operations::reset_pictures
* request is necessary
*/
-VOUT_DISPLAY_CHANGE_SOURCE_CROP,
+VOUT_DISPLAY_CHANGE_SOURCE_PLACE,
};
/**
@@ -294,10 +285,9 @@ struct vlc_display_operations
* Reset the picture format handled by the module.
* This occurs after a
* \ref VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,
- * \ref VOUT_DISPLAY_CHANGE_DISPLAY_FILLED,
- * \ref VOUT_DISPLAY_CHANGE_ZOOM,
- * \ref VOUT_DISPLAY_CHANGE_SOURCE_ASPECT or
- * \ref VOUT_DISPLAY_CHANGE_SOURCE_CROP
+ * \ref VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
+ * \ref VOUT_DISPLAY_CHANGE_SOURCE_CROP or
+ * \ref VOUT_DISPLAY_CHANGE_SOURCE_PLACE
* control query returns an error.
*
* \param ftmp video format that the module expects as input
=
modules/hw/mmal/vout.c
=
@@ -689,17 +689,13 @@ static int vd_control(vout_display_t *vd, int query)
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
+case VOUT_DISPLAY_CHANGE_SOURCE_PLACE:
{
if (configure_display(vd, vd->source) >= 0)
ret = VLC_SUCCESS;
break;
}
-case VOUT_DISPLAY_CHANGE_ZOOM:
-msg_Warn(vd, "Unsupported control