[vlc-commits] libvlc: rename libvlc_video_direct3d_set_resize_cb to a more generic name

Steve Lhomme git at videolan.org
Mon Feb 10 09:07:07 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb  4 15:33:38 2020 +0100| [4fb49a07d05eafed443c81c56bf17b49c1ff7075] | committer: Steve Lhomme

libvlc: rename libvlc_video_direct3d_set_resize_cb to a more generic name

Move the structure up.

No functional changes.

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

 include/vlc/libvlc_media_player.h | 36 ++++++++++++++++++------------------
 lib/media_player.c                |  2 +-
 modules/video_output/wextern.c    |  4 ++--
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index ce7335b85e..0dd8877d9a 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -676,6 +676,23 @@ typedef enum libvlc_video_engine_t {
     libvlc_video_engine_gles2,
 } libvlc_video_engine_t;
 
+/** Set the callback to call when the host app resizes the rendering area.
+ *
+ * This allows text rendering and aspect ratio to be handled properly when the host
+ * rendering size changes.
+ *
+ * It may be called before the \ref libvlc_video_output_setup_cb callback.
+ *
+ * \param opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb() [IN]
+ * \param report_size_change callback which must be called when the host size changes. [IN]
+ *        The callback is valid until another call to \ref libvlc_video_output_set_resize_cb
+ *        is done. This may be called from any thread.
+ * \param report_opaque private pointer to pass to the \ref report_size_change callback. [IN]
+ */
+typedef void( *libvlc_video_output_set_resize_cb )( void *opaque,
+                                                    void (*report_size_change)(void *report_opaque, unsigned width, unsigned height),
+                                                    void *report_opaque );
+
 /**
  * Set callbacks and data to render decoded video to a custom texture
  *
@@ -721,23 +738,6 @@ typedef enum libvlc_video_direct3d_engine_t {
     libvlc_video_direct3d_engine_d3d9,
 } libvlc_video_direct3d_engine_t;
 
-/** Set the callback to call when the host app resizes the rendering area.
- *
- * This allows text rendering and aspect ratio to be handled properly when the host
- * rendering size changes.
- *
- * It may be called before the \ref libvlc_video_output_setup_cb callback.
- *
- * \param opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb() [IN]
- * \param report_size_change callback which must be called when the host size changes. [IN]
- *        The callback is valid until another call to \ref libvlc_video_direct3d_set_resize_cb
- *        is done. This may be called from any thread.
- * \param report_opaque private pointer to pass to the \ref report_size_change callback. [IN]
- */
-typedef void( *libvlc_video_direct3d_set_resize_cb )( void *opaque,
-                                                      void (*report_size_change)(void *report_opaque, unsigned width, unsigned height),
-                                                      void *report_opaque );
-
 /** Tell the host the rendering for the given plane is about to start
  *
  * \param opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb() [IN]
@@ -786,7 +786,7 @@ bool libvlc_video_direct3d_set_callbacks( libvlc_media_player_t *mp,
                                          libvlc_video_direct3d_engine_t engine,
                                          libvlc_video_output_setup_cb setup_cb,
                                          libvlc_video_output_cleanup_cb cleanup_cb,
-                                         libvlc_video_direct3d_set_resize_cb resize_cb,
+                                         libvlc_video_output_set_resize_cb resize_cb,
                                          libvlc_video_update_output_cb update_output_cb,
                                          libvlc_video_swap_cb swap_cb,
                                          libvlc_video_makeCurrent_cb makeCurrent_cb,
diff --git a/lib/media_player.c b/lib/media_player.c
index 8f77b65fb1..6d621a100d 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1077,7 +1077,7 @@ bool libvlc_video_direct3d_set_callbacks(libvlc_media_player_t *mp,
                                          libvlc_video_direct3d_engine_t engine,
                                          libvlc_video_output_setup_cb setup_cb,
                                          libvlc_video_output_cleanup_cb cleanup_cb,
-                                         libvlc_video_direct3d_set_resize_cb resize_cb,
+                                         libvlc_video_output_set_resize_cb resize_cb,
                                          libvlc_video_update_output_cb update_output_cb,
                                          libvlc_video_swap_cb swap_cb,
                                          libvlc_video_makeCurrent_cb makeCurrent_cb,
diff --git a/modules/video_output/wextern.c b/modules/video_output/wextern.c
index f062ce7e45..aaa45ea577 100644
--- a/modules/video_output/wextern.c
+++ b/modules/video_output/wextern.c
@@ -48,8 +48,8 @@ vlc_module_begin()
 vlc_module_end()
 
 typedef struct {
-    void                                     *opaque;
-    libvlc_video_direct3d_set_resize_cb      setResizeCb;
+    void                                   *opaque;
+    libvlc_video_output_set_resize_cb      setResizeCb;
 } wextern_t;
 
 static void WindowResize(void *opaque, unsigned width, unsigned height)



More information about the vlc-commits mailing list