From: Markus Armbruster <armbru@redhat.com>
To: Kshitij Suri <kshitij.suri@nutanix.com>
Cc: soham.ghosh@nutanix.com, peter.maydell@linaro.org,
thuth@redhat.com, berrange@redhat.com, prerna.saxena@nutanix.com,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
dgilbert@redhat.com, philippe.mathieu.daude@gmail.com,
kraxel@redhat.com, pbonzini@redhat.com,
prachatos.mitra@nutanix.com, eblake@redhat.com
Subject: Re: [PATCH v4 2/2] Added parameter to take screenshot with screendump as PNG
Date: Tue, 05 Apr 2022 09:24:18 +0200 [thread overview]
Message-ID: <877d84at7h.fsf@pond.sub.org> (raw)
In-Reply-To: <b2691f71-0693-4971-cd06-435d6be7ae9b@nutanix.com> (Kshitij Suri's message of "Tue, 5 Apr 2022 11:18:44 +0530")
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.
[...]
next prev parent reply other threads:[~2022-04-05 7:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 6:11 [PATCH v4 0/2] Option to take screenshot with screendump as PNG Kshitij Suri
2022-03-30 6:11 ` [PATCH v4 1/2] Replacing CONFIG_VNC_PNG with CONFIG_PNG Kshitij Suri
2022-03-30 6:11 ` [PATCH v4 2/2] Added parameter to take screenshot with screendump as PNG Kshitij Suri
2022-04-01 11:20 ` Markus Armbruster
2022-04-05 5:48 ` Kshitij Suri
2022-04-05 7:24 ` Markus Armbruster [this message]
2022-04-07 17:58 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d84at7h.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=kraxel@redhat.com \
--cc=kshitij.suri@nutanix.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philippe.mathieu.daude@gmail.com \
--cc=prachatos.mitra@nutanix.com \
--cc=prerna.saxena@nutanix.com \
--cc=qemu-devel@nongnu.org \
--cc=soham.ghosh@nutanix.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.