-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to turn off video completely #295
Conversation
As I said in the linked issue and you noted in the help, with this option, framebuffer updates will still be received. So network will still be utilized, CPU will still have to decode the updates, and a frame will still be rendered on GPU - even if it is a black screen. Hence, I don't think this will be a power saver with current implementation. Since the main motivation is to conserve power, you should utilize pausing/resuming of framebuffer updates. It stops AVNC from asking for framebuffer updates, and should result in measurable power savings. |
/** | ||
* Stop rendering frame buffer. | ||
* This can save battery while still allowing control of the remote device. | ||
*/ | ||
@ColumnInfo(defaultValue = "0") | ||
var disableImageUpdates: Boolean = false, | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this filed changes database schema, but you haven't increased the database version and added a migration in MainDb
. So this will crash the app for existing users on original database schema.
Since this is a simple boolean flag, you should implement it similar to these flags. This will not not change database schema, and will be much simpler.
@@ -34,6 +34,7 @@ class EditorViewModel(app: Application, state: SavedStateHandle, initialProfile: | |||
val useRepeater = state.getLiveData("useRepeater", profile.useRepeater) | |||
val idOnRepeater = state.getLiveData("idOnRepeater", if (profile.useRepeater) profile.idOnRepeater.toString() else "") | |||
val useRawEncoding = state.getLiveData("useRawEncoding", profile.useRawEncoding) | |||
val disableImageUpdates = state.getLiveData("disableImageUpdates", profile.disableImageUpdates) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since disableImageUpdates
is a simple flag, you don't have to create LiveData
for this. You can directly bind to the profile
field like this:
android:checked="@={viewModel.profile.disableImageUpdates}"
That is expected. Since render function quits early, it doesn't allocate the texture in GPU memory to hold framebuffer data. Just for comparison, here is the result from a similar test with framebuffer updates paused: Notice how the CPU usage of AVNC drops to zero because its not doing anything.
As it stands, this is just a simple checkbox which, IMHO, doesn't serve the intended purpose of saving power. So sorry, but I am not going to merge this. |
In #154 you wrote:
However, there's no option to turn off video completely yet. I've made an attempt to achieve this by adding an option "Disable image updates" to the server profile, and with this on the received image stops rendering.
All the control is still available to the user (e.g. using keyboard/virtual keyboard, touchpad or touchscreen).
I understand that the "full remote control" is not the intended feature for this app, but the change seems simple enough to support it, since it's a common request.