Commit Graph
14 Commits
Author SHA1 Message Date
Andrew Rabert efc973aca6 Use PlayerComponent signals for screensaver state 2025-11-30 20:50:44 -05:00
Ian Walton 721e84f5b4 Switch from QsLog to regular QT logging. 2023-03-08 19:37:32 -05:00
Vincent Lang a4694b221f Linux: fix build with -DLINUX_X11POWER=on
This was pointed out by a user. Oops.

The changes in PowerComponent.cpp are not strictly necessary and could
be considered an unrelated cleanup.
2017-03-01 06:34:11 +01:00
Vincent Lang 73f70f6381 Add a simpler screensaver API for web-client
Give web-client complete control over the screensaver state. Add a
setScreensaverEnabled() API, which simply enables/disables the OS
screensaver directly.

Remove all the other code. This requires web-client to manage the
screensaver state itself, including responsibilities as checking
fullscreen state or acting upon fullscreen changes.

The old API, the screenSaverEnabled/screenSaverDisabled are still left
in and do nothing. They're here to avoid that older web-client versions
crash at initialization.
2016-10-21 16:36:24 +02:00
Vincent Lang 98d5fb618c Don't disable screensaver during music playback
Rename the playbackActive signal to videoPlaybackActive, and trigger it
only if the video output is in use.
2016-09-05 12:46:39 +02:00
Jonathan Leroy 7a3e494e46 Rename PowerComponentOE to PowerComponentDBus and add a LINUX_DBUS
option

Plex-CLA-1.0-signed-off-by: Jonathan Leroy <jonathan@harrycow.fr>
2016-08-12 17:44:19 +02:00
Vincent Lang 5b7269b8ab PowerComponent: try not to use the non-existent OS screensaver on Embedded
When we enable the OS screensaver, web-client disables its own
screensaver. But Embedded has no OS screensaver, so no screen-saving
happens at all.

This is due to the "preventSystemScreensaver" setting being false. It
really should default to true on Embedded. It's already a bit too late
to change that, since there are multiple user installs with that setting
in the config file. Since setting it to false is never useful on
Embedded, just force it to true in C++.
2016-07-07 12:01:27 +02:00
Tobias Hieta 40a8811711 By default allow sleep in fullscreen as well.
We have now introduced a new hidden setting called main.preventSystemScreensaver
that defaults to false. When set to true the old behavior will be
in effect (not allowing the screensaver and sleep when PMP is in fullscreen)
the new default behavior is to allow the screensaver and sleep
when PMP is in fullscreen.
2016-06-10 09:30:21 +02:00
Vincent Lang 29e85a0513 PlayerComponent: cleanup playback states
This goes in hand with the C++ host branch vlang-playbackstates. Neither
the C++ nor the web change are backwards-compatible.

This also gets rid of a bunch of crud that is either unnecessary, or
was never used. For example, passing the media URL via the playback
state signals was intended for gapless audio, but will have to be
redone in a better way anyway.

Fixes #485.

We have to map multiple independent states to a single state. Moreover,
these independent state changes can be sent to us in arbitrary order. We
also want to avoid sending temporary states resulting from this (e.g.
player might send us pause=false and playbackactive=true in arbitrary
order - if the latter comes first, we'd have to go to a buffering state,
and immediately leave it again). Solve this by "collecting" all state
sent from mpv until the current batch of updates stops, and then
redeciding the canonical web state.

Certain circumstances, like the single-threaded QtQuick render loop on
Windows, make this a bit harder again, and I see myself forced to create
a bunch of fields for caching state (like m_paused).
2016-05-24 19:34:24 +02:00
Tobias Hieta e168dac0a1 Add option to hide power options from the exit dialog.
Users requested a way to disable the power options on their machines
since they have smaller kids or clueless people that might power
down or suspend the machine unintentionally. I opted to make this a
hidden option since it's mostly for power users.

This required a small refactoring since we wanted a central place
to check that setting instead of in every sub power component. I
chose to use the capabilites flags instead of doing the several
different methods, this seemed cleaner for the subclasses.
2016-04-14 10:24:11 +02:00
Tobias Hieta 628daf9866 Fix some minor issues when turning on more checks in clang-tidy 2016-03-29 10:28:57 +02:00
Tobias Hieta 78bcff222d Use identifier-naming from clang-tidy and align all member names 2016-03-22 11:36:50 +01:00
Tobias Hieta 1fa34ec9aa Refactor host commands
Removes the ugly if statement in KonvergoWindow and instead makes each
component call InputComponent::registerHostCommand() if they want to
handle a host command.
2015-11-17 13:02:54 +01:00
Tobias Hieta 3d4859f1b1 Initial public commit of Plex Media Player 2015-10-13 11:05:27 +02:00