qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 2/2] Added parameter to take screenshot with screendump as


From: Markus Armbruster
Subject: Re: [PATCH v4 2/2] Added parameter to take screenshot with screendump as PNG
Date: Tue, 05 Apr 2022 09:24:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Kshitij Suri <kshitij.suri@nutanix.com> writes:

> On 01/04/22 4:50 pm, Markus Armbruster wrote:
>> Dave, please have a look at the HMP compatibility issue in
>> hmp-command.hx below.
>>
>> Kshitij Suri <kshitij.suri@nutanix.com> writes:
>>
>>> Currently screendump only supports PPM format, which is un-compressed and 
>>> not
>>> standard.
>> If "standard" means "have to pay a standards organization $$$ to access
>> the spec", PPM is not standard.  If it means "widely supported", it
>> certainly is.  I'd drop "and not standard".  Suggestion, not demand.
>
> Makes sense. Will modify it in the updated patch.
>
>>>            Added a "format" parameter to qemu monitor screendump capabilites
>>> to support PNG image capture using libpng. The param was added in QAPI 
>>> schema
>>> of screendump present in ui.json along with png_save() function which 
>>> converts
>>> pixman_image to PNG. HMP command equivalent was also modified to support the
>>> feature.
>> Suggest to use imperative mood to describe the commit, and omit details
>> that aren't necessary here:
>>
>>              Add a "format" parameter to QMP and HMP screendump command
>>    to support PNG image capture using libpng.
>
> Yes, will reduce the verbosity of the commit message.
>
>>> Example usage:
>>> { "execute": "screendump", "arguments": { "filename": "/tmp/image",
>>> "format":"png" } }
>>
>> Providing an example in the commit message is always nice, thanks!
>
> Thank you!
>
>>> Resolves: 
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.com_qemu-2Dproject_qemu_-2D_issues_718&d=DwIFaQ&c=s883GpUCOChKOHiocYtGcg&r=utjv19Ej9Fb0TB7_DX0o3faQ-OAm2ypPniPyqVSoj_w&m=oODILSxODcEhktuPJ-SfVt-MW867cpF_TvDe-WJyNRXx84FinSifhtp6-Racosb0&s=89nTa5MLAr16WtPfrm4aYkwWlPuRs6yuaD22dZTE_pM&e=
>>>
>>> Signed-off-by: Kshitij Suri <kshitij.suri@nutanix.com>
>>>
>>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>>> ---
>>>   hmp-commands.hx    |  11 ++---
>>>   monitor/hmp-cmds.c |  12 +++++-
>>>   qapi/ui.json       |  24 +++++++++--
>>>   ui/console.c       | 101 +++++++++++++++++++++++++++++++++++++++++++--
>>>   4 files changed, 136 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/hmp-commands.hx b/hmp-commands.hx
>>> index 8476277aa9..19b7cab595 100644
>>> --- a/hmp-commands.hx
>>> +++ b/hmp-commands.hx
>>> @@ -244,11 +244,12 @@ ERST
>>>         {
>>>           .name       = "screendump",
>>> -        .args_type  = "filename:F,device:s?,head:i?",
>>> -        .params     = "filename [device [head]]",
>>> -        .help       = "save screen from head 'head' of display device 
>>> 'device' "
>>> -                      "into PPM image 'filename'",
>>> -        .cmd        = hmp_screendump,
>>> +        .args_type  = "filename:F,format:s?,device:s?,head:i?",
>>
>> Incompatible change: meaning of "screendump ONE TWO" changes from
>> filename=ONE, device=TWO to filename=ONE, format=TWO.
>>
>> As HMP is not a stable interface, incompatible change is permissible.
>> But is this one wise?
>>
>> Could we add the new argument at the end instead?
>>
>>              .args_type  = "filename:F,device:s?,head:i?,format:s?",
>>
>> Could we do *without* an argument, and derive the format from the
>> filename extension?  .png means format=png, anything else format=ppm.
>> Would be a bad idea for QMP.  Okay for HMP?
>
> Should I go ahead with extracting format from filename provided for HMP?

Let's give Dave a chance to chime in.

[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]