Closed vuhailongkl97 closed 1 year ago
Hi @vuhailongkl97 , thanks for your suggestion!
The suggestion is however not doing anything. The VdoMap
object
VdoMap *settings = vdo_map_new();
can hold various fields where width
and height
are only two of them.
See ACAP 3 API documentation for VDO.
If you follow function set_format you will see that it also sets settings
object instance.
static gboolean
set_format(VdoMap *settings, gchar *format, GError **error)
{
if (g_strcmp0(format, "h264") == 0) {
vdo_map_set_uint32(settings, "format", VDO_FORMAT_H264);
In this example you can also read that there are only three options that can be set.
If you want to be able to set the width and height from command-line you need to add them as input options. See the file for how the other options are set.
@pataxis I know what the set_format doing, however when I tried to change width and height with other values the program didn't work as I expected ( it was still 640x360 as default configuration). I assume that maybe width and height should be set before other attributes in memory ( I don't have time to check how your parser APIs work )
I guess you set the new height and width values in vdoencodeclient.c
, rebuild and reinstall the example.
<Device IP>/axis-cgi/param.cgi?action=list&group=Properties.Image.Resolution
I gave it a quick run for an Q1615-MKIII that has 800x600 as one of the supported resolutions
vdo_map_set_uint32(settings, "width", 800);
vdo_map_set_uint32(settings, "height", 600);
and the fetching seems to work according to application log
[ INFO ] vdoencodeclient[29222]: Starting stream: h264, 800x600, 30 fps
[ INFO ] vdoencodeclient[29222]: frame = 0, type = I, size = 18506
[ INFO ] vdoencodeclient[29222]: frame = 1, type = P, size = 27
[ INFO ] vdoencodeclient[29222]: frame = 2, type = P, size = 25
@pataxis Thank you for your support. it seems like I set unsupported resolutions
Describe your changes
I use your example vdostream, I tried to change width and height for vdostream but it didn't work I found that your code made the setting incorrect order
Checklist before requesting a review