How to setup a stream with 'default' resolution using VDO API? #128
-
Hi, If we were to build an ACAP using VDO API and interested to just 'consume' stream with default resolution (without any stream configuration), Can you suggest what APIs to use and may be you have an example using those APIs? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @bsriramprasad , thanks for your question, we'll get back to you when we had time to look in to this. |
Beta Was this translation helpful? Give feedback.
-
Hello again, We should firstly differentiate between single and multi sensor cameras. For one sensor cameras, you can: GError *error = NULL;
// 1. Create an empty settings map:
VdoMap *settings = vdo_map_new();
// 2. Create a video stream:
stream = vdo_stream_new(settings, NULL, &error);
// 3. Read resulting default resolution, like the width and height:
VdoMap *settings = vdo_stream_get_settings(stream, &error);
vdo_map_get_uint32(settings, "width", 0);
vdo_map_get_uint32(settings, "height", 0);
// 4. Read resulting default dimension after any potential rotation:
VdoMap *info = vdo_stream_get_info(stream, &error);
vdo_map_get_uint32(info, "width", 0);
vdo_map_get_uint32(info, "height", 0); If we retrieve the number of channels for these products, we will get 1 input channel, but products with more sensors, will have more input channels. Additionally, they will also have composite channel(s), which are channels that combine the input channels (multiview). Composite channels have a setting called "layout" that defines the position of the views. Let's take the AXIS P4705-PLVE Panoramic Camera. This camera has 3 channels: 2 input channels and 1 composite channel with layout "2,1", which when streamed can look like:
You can query the channel for layout info using the vdo-channel.h API, reading "layout" as a string. |
Beta Was this translation helpful? Give feedback.
Hello again,
We should firstly differentiate between single and multi sensor cameras. For one sensor cameras, you can: