[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: menus: properly check player bound renderer

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Sun Sep 19 10:02:12 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
ec78dfa6 by Alaric Senat at 2021-09-19T09:41:02+00:00
qt: menus: properly check player bound renderer

Use the player API instead of an opaque arbitrary vlc variable.

- - - - -
7c569348 by Alaric Senat at 2021-09-19T09:41:02+00:00
objects: remove vlc_player_t as a valid public c++ obj cast

Since the player became an opaque type, the object cast should not be
available publicly anymore.

- - - - -


3 changed files:

- include/vlc_objects.h
- modules/gui/qt/menus/custom_menus.cpp
- src/player/player.h


Changes:

=====================================
include/vlc_objects.h
=====================================
@@ -89,7 +89,6 @@ static inline struct vlc_object_t *VLC_OBJECT(struct t *d) \
 
 vlc_object_cast(libvlc_int_t)
 vlc_object_cast(intf_thread_t)
-vlc_object_cast(vlc_player_t)
 vlc_object_cast(stream_t)
 vlc_object_cast(stream_directory_t)
 vlc_object_cast(stream_extractor_t)


=====================================
modules/gui/qt/menus/custom_menus.cpp
=====================================
@@ -74,11 +74,8 @@ RendererMenu::RendererMenu( QMenu *parent, qt_intf_t *p_intf_ )
     addAction( action );
     group->addAction(action);
 
-    char *psz_renderer = var_InheritString( p_intf->p_player, "sout" );
-    if ( psz_renderer == NULL )
+    if ( vlc_player_GetRenderer( p_intf->p_player ) == nullptr )
         action->setChecked( true );
-    else
-        free( psz_renderer );
 
     addSeparator();
 


=====================================
src/player/player.h
=====================================
@@ -280,6 +280,8 @@ struct vlc_player_t
     struct vlc_player_timer timer;
 };
 
+vlc_object_cast(vlc_player_t);
+
 #ifndef NDEBUG
 /*
  * Assert that the player mutex is locked.



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f5bb4d021bb42a07e42a8c44e31e1ce6e40b0ab2...7c569348f90116de6cd81d47d4de163f9d67ae7a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f5bb4d021bb42a07e42a8c44e31e1ce6e40b0ab2...7c569348f90116de6cd81d47d4de163f9d67ae7a
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list