diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index a79cda520..073023359 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -125,8 +125,10 @@ class MediaController(RegistryBase, LogMixin, RegistryProperties): self.setup() self.vlc_player = VlcPlayer(self) State().add_service("mediacontroller", 0) + State().add_service("media_live", 0, requires="mediacontroller") if get_vlc() and pymediainfo_available: State().update_pre_conditions("mediacontroller", True) + State().update_pre_conditions('media_live', True) else: State().missing_text("mediacontroller", translate('OpenLP.SlideController', "VLC or pymediainfo are missing, so you are unable to play any media")) @@ -141,7 +143,7 @@ class MediaController(RegistryBase, LogMixin, RegistryProperties): try: self.setup_display(self.live_controller.display, False) except AttributeError: - State().update_pre_conditions('media', False) + State().update_pre_conditions('media_live', False) self.setup_display(self.preview_controller.preview_display, True) def display_controllers(self, controller_type): diff --git a/openlp/core/ui/media/mediatab.py b/openlp/core/ui/media/mediatab.py index a6b1a6ec0..bcfb738f3 100644 --- a/openlp/core/ui/media/mediatab.py +++ b/openlp/core/ui/media/mediatab.py @@ -34,6 +34,19 @@ from openlp.core.ui.icons import UiIcons LINUX_STREAM = 'v4l2:///dev/video0' WIN_STREAM = 'dshow:// :dshow-vdev=' +#from PyQt5.QtMultimedia import QCameraInfo, QAudioDeviceInfo, QAudio + +#print('Video input:') +#for cam in QCameraInfo.availableCameras(): +# print('===============') + ### print(cam.deviceName()) + # print(cam.description())# +#print() +#print('Audio input:') +#for au in QAudioDeviceInfo.availableDevices(QAudio.AudioInput): +# print('===============') +# print(au.deviceName()) + class MediaTab(SettingsTab): """ diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 6d1ce9de9..97ff56c93 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -116,6 +116,8 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties): self.can_preview = False self.can_make_live = False self.can_add_to_service = False + if State().check_preconditions('media_live'): + self.can_make_live = False def add_list_view_to_toolbar(self): """