[vlc-commits] qt: win32: add "Digital Output" checkbox in audio device menu
Thomas Guillem
git at videolan.org
Thu Mar 22 09:47:11 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar 21 11:09:42 2018 +0100| [bc594717e9e234c392306efe4f56492ffaa9dfc4] | committer: Thomas Guillem
qt: win32: add "Digital Output" checkbox in audio device menu
Only for mmdevice.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc594717e9e234c392306efe4f56492ffaa9dfc4
---
modules/gui/qt/menus.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index 3652827f72..051510a41a 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -1576,6 +1576,25 @@ void VLCMenuBar::updateAudioDevice( intf_thread_t * p_intf, audio_output_t *p_ao
free( ids );
free( names );
free( selected );
+
+#ifdef _WIN32
+ char *module = var_GetString( p_aout, "module-name" );
+ const bool is_mmdevice = module && strcmp(module, "mmdevice") == 0;
+ free(module);
+ if (is_mmdevice)
+ {
+ current->addSeparator();
+ addActionWithCheckbox( current, "mmdevice-digital-output",
+ qtr( "Digital Output" ) );
+
+ QVector<vlc_object_t *> objects;
+ QVector<const char *> varnames;
+ varnames.append( "mmdevice-digital-output" );
+ objects.append( VLC_OBJECT( p_aout ) );
+ Populate( current, varnames, objects );
+ }
+#endif
+
}
void VLCMenuBar::updateRecents( intf_thread_t *p_intf )
More information about the vlc-commits
mailing list